mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
fix(client): center the top glow on the main column
Paint the glow from a zero-height element in the main inset instead of the full-width shell, so it centers on the content column and follows the sidebar as it resizes or collapses. The shell's own background patterns (dots, mesh, aurora and others) were hidden under the old glow and now render.
This commit is contained in:
+19
-12
@@ -253,22 +253,28 @@
|
|||||||
mask-size: 150px 150px;
|
mask-size: 150px 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glow-wrapper {
|
/* A zero-height flow item at the top of the main inset. Being in flow, it spans the inset's content box,
|
||||||
background-image: var(--glow-image);
|
which ends at the sidebar's edge, so the glow centres on the main column and follows the sidebar as it
|
||||||
background-position: top;
|
resizes or collapses. Its layers sit at a negative z-index, under the shell's content like the
|
||||||
background-repeat: no-repeat;
|
background patterns. The texture is a layer of its own so its tiles keep their size; the reach only
|
||||||
background-size: auto calc(var(--glow-band) * var(--glow-reach));
|
moves the fade. */
|
||||||
|
.shell-glow {
|
||||||
|
position: relative;
|
||||||
|
flex: none;
|
||||||
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The texture sits on its own layer so its tiles keep their size; the reach only moves the fade. Negative
|
.shell-glow::before,
|
||||||
z-index keeps it under the shell's content and the glow, like the background patterns. */
|
.shell-glow::after {
|
||||||
.glow-wrapper::after {
|
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0 0 auto;
|
inset: 0 0 auto;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
height: calc(var(--glow-band) * var(--glow-reach));
|
height: calc(var(--glow-band) * var(--glow-reach));
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shell-glow::before {
|
||||||
background-image: var(--glow-texture);
|
background-image: var(--glow-texture);
|
||||||
background-position: top center;
|
background-position: top center;
|
||||||
background-size: var(--glow-texture-size);
|
background-size: var(--glow-texture-size);
|
||||||
@@ -276,12 +282,13 @@
|
|||||||
mask-image: radial-gradient(ellipse 62% 100% at 50% 0%, #000 0%, transparent 100%);
|
mask-image: radial-gradient(ellipse 62% 100% at 50% 0%, #000 0%, transparent 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-glow='off'] .glow-wrapper {
|
.shell-glow::after {
|
||||||
background-image: none;
|
background-image: var(--glow-image);
|
||||||
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-glow='off'] .glow-wrapper::after {
|
html[data-glow='off'] .shell-glow {
|
||||||
content: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
--shell-backdrop: blur(24px) saturate(150%);
|
--shell-backdrop: blur(24px) saturate(150%);
|
||||||
--shell-shadow: var(--elevation-lg);
|
--shell-shadow: var(--elevation-lg);
|
||||||
|
|
||||||
/* Accent glow behind the top of the shell (.glow-wrapper). --glow-band is the style's own reach and
|
/* Accent glow behind the top of the main column (.shell-glow). --glow-band is the style's own reach and
|
||||||
--glow-reach the user's multiplier on it, written on <html>. A texture keeps its tile size at any reach;
|
--glow-reach the user's multiplier on it, written on <html>. A texture keeps its tile size at any reach;
|
||||||
only the fade that reveals it follows the band. */
|
only the fade that reveals it follows the band. */
|
||||||
--glow-reach: 0.8;
|
--glow-reach: 0.8;
|
||||||
|
|||||||
@@ -50,9 +50,10 @@ const viewKey = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<SidebarProvider class="app-shell glow-wrapper min-h-svh" :class="themeStore.appliedBackgroundClass">
|
<SidebarProvider class="app-shell min-h-svh" :class="themeStore.appliedBackgroundClass">
|
||||||
<AppSidebar />
|
<AppSidebar />
|
||||||
<SidebarInset class="app-shell-inset flex flex-col h-svh overflow-hidden relative bg-transparent pb-(--shell-gap)">
|
<SidebarInset class="app-shell-inset flex flex-col h-svh overflow-hidden relative bg-transparent pb-(--shell-gap)">
|
||||||
|
<div aria-hidden="true" class="shell-glow" />
|
||||||
<!-- 1. Global App Header: Fixed at the top, independent of views -->
|
<!-- 1. Global App Header: Fixed at the top, independent of views -->
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user