mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
refactor: overhaul UI layout and modernize design system
- transition to floating UI with centralized background pattern in AppLayout - restructure core layout for stable headers and independent view scrolling - synchronize component radii (scrollers, cards, skeletons) with global settings - standardize headers and book detail tabs for consistent alignment and height - enhance AppSidebar, AppHeader, and ViewHeader with refined active states - center project logo in collapsed sidebar by removing offset padding - update shadcn components and theme bridge for consistent design system support
This commit is contained in:
+114
-707
@@ -3,712 +3,17 @@
|
||||
@import 'tailwindcss';
|
||||
@import 'tw-animate-css';
|
||||
|
||||
@import './theme/tokens.css';
|
||||
@import './theme/accents.css';
|
||||
@import './theme/radius.css';
|
||||
@import './theme/bridge.css';
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
/* ── Theme tokens ───────────────────────────────────────────
|
||||
Single source of truth. Never hardcode values in components.
|
||||
|
||||
Architecture:
|
||||
- --tint-h / --tint-c control the hue of ALL neutral surfaces.
|
||||
Changing just --tint-h shifts the entire palette toward that hue.
|
||||
- Accent classes override --tint-h (surfaces) + --primary (interactive).
|
||||
- Radius classes override --radius.
|
||||
- Dark mode overrides lightness + slightly raises --tint-c.
|
||||
/* ── Background patterns ─────────────────────────────────────
|
||||
Applied as a class on the library/lens/collection content area.
|
||||
Uses --dot-color and --primary from the active theme.
|
||||
────────────────────────────────────────────────────────────── */
|
||||
:root {
|
||||
/* Tint controls — warm amber base */
|
||||
--tint-h: 80;
|
||||
--tint-c: 0.006;
|
||||
|
||||
/* Colour roles */
|
||||
--background: oklch(0.99 var(--tint-c) var(--tint-h));
|
||||
--foreground: oklch(0.145 0.015 var(--tint-h));
|
||||
|
||||
--card: oklch(0.975 var(--tint-c) var(--tint-h));
|
||||
--card-foreground: oklch(0.145 0.015 var(--tint-h));
|
||||
|
||||
--popover: oklch(0.975 var(--tint-c) var(--tint-h));
|
||||
--popover-foreground: oklch(0.145 0.015 var(--tint-h));
|
||||
|
||||
--primary: oklch(0.21 0.015 var(--tint-h));
|
||||
--primary-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
|
||||
--secondary: oklch(0.955 var(--tint-c) var(--tint-h));
|
||||
--secondary-foreground: oklch(0.21 0.015 var(--tint-h));
|
||||
|
||||
--muted: oklch(0.955 var(--tint-c) var(--tint-h));
|
||||
--muted-foreground: oklch(0.52 0.008 var(--tint-h));
|
||||
|
||||
--accent: oklch(0.955 var(--tint-c) var(--tint-h));
|
||||
--accent-foreground: oklch(0.21 0.015 var(--tint-h));
|
||||
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--destructive-foreground: oklch(0.985 0 0);
|
||||
|
||||
--border: oklch(0.878 0.01 var(--tint-h));
|
||||
--input: oklch(0.878 0.01 var(--tint-h));
|
||||
--ring: oklch(0.65 0.01 var(--tint-h));
|
||||
|
||||
--sidebar: oklch(0.965 var(--tint-c) var(--tint-h));
|
||||
--sidebar-foreground: oklch(0.145 0.015 var(--tint-h));
|
||||
--sidebar-primary: oklch(0.21 0.015 var(--tint-h));
|
||||
--sidebar-primary-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
--sidebar-accent: oklch(0.955 var(--tint-c) var(--tint-h));
|
||||
--sidebar-accent-foreground: oklch(0.21 0.015 var(--tint-h));
|
||||
--sidebar-border: oklch(0.878 0.01 var(--tint-h));
|
||||
--sidebar-ring: oklch(0.65 0.01 var(--tint-h));
|
||||
|
||||
--chart-1: oklch(0.646 0.222 41.116);
|
||||
--chart-2: oklch(0.6 0.118 184.704);
|
||||
--chart-3: oklch(0.398 0.07 227.392);
|
||||
--chart-4: oklch(0.828 0.189 84.429);
|
||||
--chart-5: oklch(0.769 0.188 70.08);
|
||||
|
||||
/* Elevation surfaces */
|
||||
--surface-1: oklch(0.975 var(--tint-c) var(--tint-h));
|
||||
--surface-2: oklch(0.955 var(--tint-c) var(--tint-h));
|
||||
--surface-3: oklch(0.93 0.01 var(--tint-h));
|
||||
--surface-4: oklch(0.91 0.012 var(--tint-h));
|
||||
|
||||
/* Shadows */
|
||||
--elevation-xs: 0 1px 2px oklch(0 0 0 / 0.05);
|
||||
--elevation-sm: 0 1px 3px oklch(0 0 0 / 0.08), 0 1px 2px oklch(0 0 0 / 0.06);
|
||||
--elevation-md: 0 4px 6px -1px oklch(0 0 0 / 0.08), 0 2px 4px -2px oklch(0 0 0 / 0.06);
|
||||
--elevation-lg: 0 10px 15px -3px oklch(0 0 0 / 0.08), 0 4px 6px -4px oklch(0 0 0 / 0.05);
|
||||
--elevation-xl: 0 20px 25px -5px oklch(0 0 0 / 0.1), 0 8px 10px -6px oklch(0 0 0 / 0.06);
|
||||
--elevation-2xl: 0 25px 50px -12px oklch(0 0 0 / 0.18);
|
||||
|
||||
/* Shape */
|
||||
--radius: 0.625rem;
|
||||
|
||||
--dot-color: oklch(0.82 0.01 var(--tint-h));
|
||||
}
|
||||
|
||||
.dark {
|
||||
--tint-c: 0.01;
|
||||
--bg-lift: 0;
|
||||
|
||||
--background: oklch(calc(0.145 + var(--bg-lift)) var(--tint-c) var(--tint-h));
|
||||
--foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
|
||||
--card: oklch(calc(0.205 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--card-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
|
||||
--popover: oklch(calc(0.205 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--popover-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
|
||||
--primary: oklch(0.91 var(--tint-c) var(--tint-h));
|
||||
--primary-foreground: oklch(0.205 0.012 var(--tint-h));
|
||||
|
||||
--secondary: oklch(calc(0.265 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--secondary-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
|
||||
--muted: oklch(calc(0.265 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--muted-foreground: oklch(0.68 0.008 var(--tint-h));
|
||||
|
||||
--accent: oklch(calc(0.265 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--accent-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
|
||||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--destructive-foreground: oklch(0.985 0 0);
|
||||
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.52 0.008 var(--tint-h));
|
||||
|
||||
--sidebar: oklch(calc(0.205 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--sidebar-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
--sidebar-primary: oklch(0.91 var(--tint-c) var(--tint-h));
|
||||
--sidebar-primary-foreground: oklch(0.205 0.012 var(--tint-h));
|
||||
--sidebar-accent: oklch(calc(0.265 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--sidebar-accent-foreground: oklch(0.985 0.004 var(--tint-h));
|
||||
--sidebar-border: oklch(1 0 0 / 10%);
|
||||
--sidebar-ring: oklch(0.52 0.008 var(--tint-h));
|
||||
|
||||
--chart-1: oklch(0.488 0.243 264.376);
|
||||
--chart-2: oklch(0.696 0.17 162.48);
|
||||
--chart-3: oklch(0.769 0.188 70.08);
|
||||
--chart-4: oklch(0.627 0.265 303.9);
|
||||
--chart-5: oklch(0.645 0.246 16.439);
|
||||
|
||||
/* Elevation surfaces */
|
||||
--surface-1: oklch(calc(0.205 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--surface-2: oklch(calc(0.235 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--surface-3: oklch(calc(0.265 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
--surface-4: oklch(calc(0.295 + var(--bg-lift)) 0.012 var(--tint-h));
|
||||
|
||||
/* Shadows */
|
||||
--elevation-xs: 0 1px 2px oklch(0 0 0 / 0.4);
|
||||
--elevation-sm: 0 1px 3px oklch(0 0 0 / 0.5), 0 1px 2px oklch(0 0 0 / 0.4);
|
||||
--elevation-md: 0 4px 8px -1px oklch(0 0 0 / 0.5), 0 2px 4px -2px oklch(0 0 0 / 0.4);
|
||||
--elevation-lg: 0 10px 20px -3px oklch(0 0 0 / 0.5), 0 4px 8px -4px oklch(0 0 0 / 0.4);
|
||||
--elevation-xl: 0 20px 30px -5px oklch(0 0 0 / 0.6), 0 8px 12px -6px oklch(0 0 0 / 0.4);
|
||||
--elevation-2xl: 0 25px 50px -12px oklch(0 0 0 / 0.7);
|
||||
|
||||
--dot-color: oklch(calc(0.3 + var(--bg-lift)) 0.01 var(--tint-h));
|
||||
}
|
||||
|
||||
/* ── Accent presets ──────────────────────────────────────────
|
||||
--tint-h shifts all neutral surfaces toward the accent hue.
|
||||
Vivid: high chroma. Pastel: low chroma, muted feel.
|
||||
Amber/yellow/lime/butter/lemon use dark foreground text.
|
||||
────────────────────────────────────────────────────────────── */
|
||||
|
||||
/* Vivid — 15 colors, rainbow order */
|
||||
|
||||
html.accent-rose {
|
||||
--tint-h: 15;
|
||||
--primary: oklch(0.57 0.24 15);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.57 0.24 15);
|
||||
--sidebar-primary: oklch(0.57 0.24 15);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-rose.dark {
|
||||
--primary: oklch(0.73 0.2 15);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.73 0.2 15);
|
||||
--sidebar-primary: oklch(0.73 0.2 15);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-orange {
|
||||
--tint-h: 42;
|
||||
--primary: oklch(0.64 0.22 42);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.64 0.22 42);
|
||||
--sidebar-primary: oklch(0.64 0.22 42);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-orange.dark {
|
||||
--primary: oklch(0.78 0.18 42);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.78 0.18 42);
|
||||
--sidebar-primary: oklch(0.78 0.18 42);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-amber {
|
||||
--tint-h: 70;
|
||||
--primary: oklch(0.72 0.17 70);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.17 70);
|
||||
--sidebar-primary: oklch(0.72 0.17 70);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
html.accent-amber.dark {
|
||||
--primary: oklch(0.82 0.17 70);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.82 0.17 70);
|
||||
--sidebar-primary: oklch(0.82 0.17 70);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-yellow {
|
||||
--tint-h: 95;
|
||||
--primary: oklch(0.75 0.18 95);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.18 95);
|
||||
--sidebar-primary: oklch(0.75 0.18 95);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
html.accent-yellow.dark {
|
||||
--primary: oklch(0.84 0.16 95);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.84 0.16 95);
|
||||
--sidebar-primary: oklch(0.84 0.16 95);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-lime {
|
||||
--tint-h: 118;
|
||||
--primary: oklch(0.64 0.2 118);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.64 0.2 118);
|
||||
--sidebar-primary: oklch(0.64 0.2 118);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
html.accent-lime.dark {
|
||||
--primary: oklch(0.77 0.18 118);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.77 0.18 118);
|
||||
--sidebar-primary: oklch(0.77 0.18 118);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-green {
|
||||
--tint-h: 142;
|
||||
--primary: oklch(0.527 0.18 142);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.527 0.18 142);
|
||||
--sidebar-primary: oklch(0.527 0.18 142);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-green.dark {
|
||||
--primary: oklch(0.72 0.18 142);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.18 142);
|
||||
--sidebar-primary: oklch(0.72 0.18 142);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-emerald {
|
||||
--tint-h: 162;
|
||||
--primary: oklch(0.52 0.17 162);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.52 0.17 162);
|
||||
--sidebar-primary: oklch(0.52 0.17 162);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-emerald.dark {
|
||||
--primary: oklch(0.72 0.15 162);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.15 162);
|
||||
--sidebar-primary: oklch(0.72 0.15 162);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-teal {
|
||||
--tint-h: 180;
|
||||
--primary: oklch(0.52 0.18 180);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.52 0.18 180);
|
||||
--sidebar-primary: oklch(0.52 0.18 180);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-teal.dark {
|
||||
--primary: oklch(0.74 0.16 180);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.74 0.16 180);
|
||||
--sidebar-primary: oklch(0.74 0.16 180);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-cyan {
|
||||
--tint-h: 197;
|
||||
--primary: oklch(0.52 0.2 197);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.52 0.2 197);
|
||||
--sidebar-primary: oklch(0.52 0.2 197);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-cyan.dark {
|
||||
--primary: oklch(0.75 0.17 197);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.17 197);
|
||||
--sidebar-primary: oklch(0.75 0.17 197);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-sky {
|
||||
--tint-h: 213;
|
||||
--primary: oklch(0.54 0.21 213);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.54 0.21 213);
|
||||
--sidebar-primary: oklch(0.54 0.21 213);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-sky.dark {
|
||||
--primary: oklch(0.75 0.18 213);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.18 213);
|
||||
--sidebar-primary: oklch(0.75 0.18 213);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-blue {
|
||||
--tint-h: 263;
|
||||
--primary: oklch(0.487 0.25 263);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.487 0.25 263);
|
||||
--sidebar-primary: oklch(0.487 0.25 263);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-blue.dark {
|
||||
--primary: oklch(0.72 0.2 263);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.2 263);
|
||||
--sidebar-primary: oklch(0.72 0.2 263);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-indigo {
|
||||
--tint-h: 276;
|
||||
--primary: oklch(0.51 0.26 276);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.51 0.26 276);
|
||||
--sidebar-primary: oklch(0.51 0.26 276);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-indigo.dark {
|
||||
--primary: oklch(0.72 0.22 276);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.22 276);
|
||||
--sidebar-primary: oklch(0.72 0.22 276);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-violet {
|
||||
--tint-h: 292;
|
||||
--primary: oklch(0.491 0.27 292);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.491 0.27 292);
|
||||
--sidebar-primary: oklch(0.491 0.27 292);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-violet.dark {
|
||||
--primary: oklch(0.72 0.23 292);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.23 292);
|
||||
--sidebar-primary: oklch(0.72 0.23 292);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-fuchsia {
|
||||
--tint-h: 312;
|
||||
--primary: oklch(0.56 0.27 312);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.56 0.27 312);
|
||||
--sidebar-primary: oklch(0.56 0.27 312);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-fuchsia.dark {
|
||||
--primary: oklch(0.75 0.22 312);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.22 312);
|
||||
--sidebar-primary: oklch(0.75 0.22 312);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-pink {
|
||||
--tint-h: 328;
|
||||
--primary: oklch(0.56 0.26 328);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.56 0.26 328);
|
||||
--sidebar-primary: oklch(0.56 0.26 328);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-pink.dark {
|
||||
--primary: oklch(0.75 0.22 328);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.22 328);
|
||||
--sidebar-primary: oklch(0.75 0.22 328);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
/* Pastel — 15 colors, rainbow order */
|
||||
|
||||
html.accent-coral {
|
||||
--tint-h: 25;
|
||||
--primary: oklch(0.6 0.12 25);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.6 0.12 25);
|
||||
--sidebar-primary: oklch(0.6 0.12 25);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-coral.dark {
|
||||
--primary: oklch(0.76 0.1 25);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.76 0.1 25);
|
||||
--sidebar-primary: oklch(0.76 0.1 25);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-peach {
|
||||
--tint-h: 38;
|
||||
--primary: oklch(0.63 0.11 38);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.63 0.11 38);
|
||||
--sidebar-primary: oklch(0.63 0.11 38);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-peach.dark {
|
||||
--primary: oklch(0.78 0.09 38);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.78 0.09 38);
|
||||
--sidebar-primary: oklch(0.78 0.09 38);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-butter {
|
||||
--tint-h: 80;
|
||||
--primary: oklch(0.66 0.13 80);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.66 0.13 80);
|
||||
--sidebar-primary: oklch(0.66 0.13 80);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
html.accent-butter.dark {
|
||||
--primary: oklch(0.8 0.11 80);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.8 0.11 80);
|
||||
--sidebar-primary: oklch(0.8 0.11 80);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-lemon {
|
||||
--tint-h: 100;
|
||||
--primary: oklch(0.7 0.12 100);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.7 0.12 100);
|
||||
--sidebar-primary: oklch(0.7 0.12 100);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
html.accent-lemon.dark {
|
||||
--primary: oklch(0.82 0.1 100);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.82 0.1 100);
|
||||
--sidebar-primary: oklch(0.82 0.1 100);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-celadon {
|
||||
--tint-h: 122;
|
||||
--primary: oklch(0.61 0.1 122);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.61 0.1 122);
|
||||
--sidebar-primary: oklch(0.61 0.1 122);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
html.accent-celadon.dark {
|
||||
--primary: oklch(0.76 0.08 122);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.76 0.08 122);
|
||||
--sidebar-primary: oklch(0.76 0.08 122);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-sage {
|
||||
--tint-h: 142;
|
||||
--primary: oklch(0.52 0.1 142);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.52 0.1 142);
|
||||
--sidebar-primary: oklch(0.52 0.1 142);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-sage.dark {
|
||||
--primary: oklch(0.72 0.09 142);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.72 0.09 142);
|
||||
--sidebar-primary: oklch(0.72 0.09 142);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-mint {
|
||||
--tint-h: 158;
|
||||
--primary: oklch(0.6 0.1 158);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.6 0.1 158);
|
||||
--sidebar-primary: oklch(0.6 0.1 158);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-mint.dark {
|
||||
--primary: oklch(0.75 0.09 158);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.09 158);
|
||||
--sidebar-primary: oklch(0.75 0.09 158);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-seafoam {
|
||||
--tint-h: 178;
|
||||
--primary: oklch(0.61 0.09 178);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.61 0.09 178);
|
||||
--sidebar-primary: oklch(0.61 0.09 178);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-seafoam.dark {
|
||||
--primary: oklch(0.76 0.08 178);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.76 0.08 178);
|
||||
--sidebar-primary: oklch(0.76 0.08 178);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-powder {
|
||||
--tint-h: 205;
|
||||
--primary: oklch(0.59 0.1 205);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.59 0.1 205);
|
||||
--sidebar-primary: oklch(0.59 0.1 205);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-powder.dark {
|
||||
--primary: oklch(0.75 0.09 205);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.75 0.09 205);
|
||||
--sidebar-primary: oklch(0.75 0.09 205);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-mist {
|
||||
--tint-h: 218;
|
||||
--primary: oklch(0.56 0.1 218);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.56 0.1 218);
|
||||
--sidebar-primary: oklch(0.56 0.1 218);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-mist.dark {
|
||||
--primary: oklch(0.74 0.09 218);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.74 0.09 218);
|
||||
--sidebar-primary: oklch(0.74 0.09 218);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-periwinkle {
|
||||
--tint-h: 265;
|
||||
--primary: oklch(0.54 0.11 265);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.54 0.11 265);
|
||||
--sidebar-primary: oklch(0.54 0.11 265);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-periwinkle.dark {
|
||||
--primary: oklch(0.73 0.1 265);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.73 0.1 265);
|
||||
--sidebar-primary: oklch(0.73 0.1 265);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-wisteria {
|
||||
--tint-h: 285;
|
||||
--primary: oklch(0.55 0.1 285);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.55 0.1 285);
|
||||
--sidebar-primary: oklch(0.55 0.1 285);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-wisteria.dark {
|
||||
--primary: oklch(0.73 0.09 285);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.73 0.09 285);
|
||||
--sidebar-primary: oklch(0.73 0.09 285);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-lavender {
|
||||
--tint-h: 300;
|
||||
--primary: oklch(0.55 0.11 300);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.55 0.11 300);
|
||||
--sidebar-primary: oklch(0.55 0.11 300);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-lavender.dark {
|
||||
--primary: oklch(0.73 0.1 300);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.73 0.1 300);
|
||||
--sidebar-primary: oklch(0.73 0.1 300);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-orchid {
|
||||
--tint-h: 315;
|
||||
--primary: oklch(0.56 0.11 315);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.56 0.11 315);
|
||||
--sidebar-primary: oklch(0.56 0.11 315);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-orchid.dark {
|
||||
--primary: oklch(0.74 0.1 315);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.74 0.1 315);
|
||||
--sidebar-primary: oklch(0.74 0.1 315);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
html.accent-blush {
|
||||
--tint-h: 345;
|
||||
--primary: oklch(0.54 0.11 345);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--ring: oklch(0.54 0.11 345);
|
||||
--sidebar-primary: oklch(0.54 0.11 345);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
}
|
||||
html.accent-blush.dark {
|
||||
--primary: oklch(0.73 0.1 345);
|
||||
--primary-foreground: oklch(0.145 0 0);
|
||||
--ring: oklch(0.73 0.1 345);
|
||||
--sidebar-primary: oklch(0.73 0.1 345);
|
||||
--sidebar-primary-foreground: oklch(0.145 0 0);
|
||||
}
|
||||
|
||||
/* ── Radius presets ──────────────────────────────────────────
|
||||
Applied as a class on <html>. Default is :root value.
|
||||
────────────────────────────────────────────────────────────── */
|
||||
html.radius-sharp {
|
||||
--radius: 0rem;
|
||||
}
|
||||
html.radius-rounded {
|
||||
--radius: 1.25rem;
|
||||
}
|
||||
html.radius-pill {
|
||||
--radius: 2.5rem;
|
||||
}
|
||||
|
||||
/* ── Tailwind theme bridge ───────────────────────────────────
|
||||
Maps CSS variables → Tailwind utility classes.
|
||||
────────────────────────────────────────────────────────────── */
|
||||
@theme inline {
|
||||
--radius-sm: calc(var(--radius) - 4px);
|
||||
--radius-md: calc(var(--radius) - 2px);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) + 4px);
|
||||
|
||||
--font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, sans-serif;
|
||||
--font-serif: 'Fraunces Variable', ui-serif, Georgia, serif;
|
||||
--font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
||||
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-card: var(--card);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-destructive-foreground: var(--destructive-foreground);
|
||||
--color-border: var(--border);
|
||||
--color-input: var(--input);
|
||||
--color-ring: var(--ring);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
--color-surface-1: var(--surface-1);
|
||||
--color-surface-2: var(--surface-2);
|
||||
--color-surface-3: var(--surface-3);
|
||||
--color-surface-4: var(--surface-4);
|
||||
|
||||
--shadow-xs: var(--elevation-xs);
|
||||
--shadow-sm: var(--elevation-sm);
|
||||
--shadow-md: var(--elevation-md);
|
||||
--shadow-lg: var(--elevation-lg);
|
||||
--shadow-xl: var(--elevation-xl);
|
||||
--shadow-2xl: var(--elevation-2xl);
|
||||
}
|
||||
|
||||
.pattern-dots {
|
||||
background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
|
||||
background-size: 24px 24px;
|
||||
@@ -722,10 +27,6 @@ html.radius-pill {
|
||||
12px 12px;
|
||||
}
|
||||
|
||||
.pattern-gradient {
|
||||
background-image: radial-gradient(ellipse 70% 55% at 0% 0%, color-mix(in oklch, var(--primary) 20%, transparent), transparent 65%);
|
||||
}
|
||||
|
||||
.pattern-aurora {
|
||||
background-image:
|
||||
radial-gradient(ellipse 60% 45% at 0% 50%, color-mix(in oklch, var(--primary) 15%, transparent), transparent 100%),
|
||||
@@ -737,6 +38,112 @@ html.radius-pill {
|
||||
background-image: linear-gradient(180deg, transparent 0%, color-mix(in oklch, var(--primary) 8%, transparent) 50%, transparent 100%);
|
||||
}
|
||||
|
||||
.pattern-topo {
|
||||
background-image:
|
||||
repeating-radial-gradient(circle at 0% 0%, transparent 0, transparent 40px, color-mix(in oklch, var(--dot-color) 50%, transparent) 40px, color-mix(in oklch, var(--dot-color) 50%, transparent) 41px, transparent 41px, transparent 80px),
|
||||
repeating-radial-gradient(circle at 100% 100%, transparent 0, transparent 40px, color-mix(in oklch, var(--dot-color) 50%, transparent) 40px, color-mix(in oklch, var(--dot-color) 50%, transparent) 41px, transparent 41px, transparent 80px);
|
||||
}
|
||||
|
||||
.pattern-mesh {
|
||||
background-image:
|
||||
radial-gradient(at 0% 0%, color-mix(in oklch, var(--primary) 20%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 100% 0%, color-mix(in oklch, var(--primary) 15%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 100% 100%, color-mix(in oklch, var(--primary) 20%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 0% 100%, color-mix(in oklch, var(--primary) 15%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 50% 50%, color-mix(in oklch, var(--primary) 10%, transparent) 0px, transparent 50%);
|
||||
}
|
||||
|
||||
.pattern-glow {
|
||||
background-image: radial-gradient(ellipse 80% 50% at 50% -10%, color-mix(in oklch, var(--primary) 20%, transparent) 0%, transparent 100%);
|
||||
}
|
||||
|
||||
.pattern-scanlines::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(to bottom, transparent 50%, color-mix(in oklch, var(--primary) 5%, transparent) 50%);
|
||||
background-size: 100% 4px;
|
||||
}
|
||||
|
||||
.pattern-brushed {
|
||||
background-image: repeating-linear-gradient(45deg, transparent, transparent 1px, color-mix(in oklch, var(--primary) 6%, transparent) 1px, color-mix(in oklch, var(--primary) 6%, transparent) 2px);
|
||||
}
|
||||
|
||||
.pattern-prism::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(135deg, rgba(255, 0, 0, 0.03) 0%, transparent 50%),
|
||||
linear-gradient(225deg, rgba(0, 0, 255, 0.03) 0%, transparent 50%),
|
||||
linear-gradient(45deg, rgba(0, 255, 0, 0.03) 0%, transparent 50%);
|
||||
filter: contrast(150%) brightness(110%);
|
||||
}
|
||||
|
||||
.pattern-spectrum::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(135deg, oklch(0.7 0.15 var(--tint-h) / 0.08) 0%, transparent 50%),
|
||||
linear-gradient(225deg, oklch(0.7 0.15 calc(var(--tint-h) + 120) / 0.08) 0%, transparent 50%),
|
||||
linear-gradient(45deg, oklch(0.7 0.15 calc(var(--tint-h) + 240) / 0.08) 0%, transparent 50%);
|
||||
filter: contrast(160%) brightness(110%);
|
||||
}
|
||||
|
||||
.pattern-isogrid::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.08;
|
||||
background-color: var(--primary);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='50' height='86' viewBox='0 0 50 86' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 21.5L25 36l25-14.5v29L25 65 0 50.5V21.5z' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M25 36v29M0 21.5L25 7M50 21.5L25 7' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
|
||||
mask-image: url("data:image/svg+xml,%3Csvg width='50' height='86' viewBox='0 0 50 86' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 21.5L25 36l25-14.5v29L25 65 0 50.5V21.5z' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M25 36v29M0 21.5L25 7M50 21.5L25 7' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
|
||||
mask-size: 100px 172px;
|
||||
}
|
||||
|
||||
.pattern-elevation::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(to bottom, color-mix(in oklch, var(--primary) 5%, transparent), transparent 40%),
|
||||
linear-gradient(to top, color-mix(in oklch, var(--primary) 3%, transparent), transparent 30%);
|
||||
}
|
||||
|
||||
.pattern-terminal::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.05;
|
||||
background-image: repeating-linear-gradient(90deg, var(--primary), var(--primary) 1px, transparent 1px, transparent 40px);
|
||||
}
|
||||
|
||||
.pattern-wireframe::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.1;
|
||||
background-color: var(--primary);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50l50-50 50 50-50 50z' fill='none' stroke='black' stroke-width='0.5'/%3E%3Cpath d='M50 0v100M0 50h100' stroke='black' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='2' fill='black'/%3E%3C/svg%3E");
|
||||
mask-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50l50-50 50 50-50 50z' fill='none' stroke='black' stroke-width='0.5'/%3E%3Cpath d='M50 0v100M0 50h100' stroke='black' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='2' fill='black'/%3E%3C/svg%3E");
|
||||
mask-size: 150px 150px;
|
||||
}
|
||||
|
||||
.glow-wrapper {
|
||||
background-image:
|
||||
url('/topbar.png'), radial-gradient(50% 50% at center -25px, color-mix(in oklch, var(--primary) 35%, transparent) 0%, transparent 100%);
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
}
|
||||
|
||||
.pattern-cross {
|
||||
background-image:
|
||||
radial-gradient(circle, var(--dot-color) 1px, transparent 1px),
|
||||
radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
|
||||
background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px), radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
|
||||
background-size: 24px 24px;
|
||||
background-position: 0 0, 12px 12px;
|
||||
background-position:
|
||||
0 0,
|
||||
12px 12px;
|
||||
}
|
||||
|
||||
.pattern-gradient {
|
||||
@@ -30,13 +30,182 @@
|
||||
background-image: linear-gradient(180deg, transparent 0%, color-mix(in oklch, var(--primary) 8%, transparent) 50%, transparent 100%);
|
||||
}
|
||||
|
||||
.pattern-mesh {
|
||||
background-image:
|
||||
radial-gradient(at 0% 0%, color-mix(in oklch, var(--primary) 20%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 100% 0%, color-mix(in oklch, var(--primary) 15%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 100% 100%, color-mix(in oklch, var(--primary) 20%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 0% 100%, color-mix(in oklch, var(--primary) 15%, transparent) 0px, transparent 50%),
|
||||
radial-gradient(at 50% 50%, color-mix(in oklch, var(--primary) 10%, transparent) 0px, transparent 50%);
|
||||
}
|
||||
|
||||
.pattern-glow {
|
||||
background-image: radial-gradient(ellipse 80% 50% at 50% -10%, color-mix(in oklch, var(--primary) 20%, transparent) 0%, transparent 100%);
|
||||
}
|
||||
|
||||
.pattern-circuit::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
opacity: 0.12;
|
||||
pointer-events: none;
|
||||
background-color: var(--primary);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h80v80h-80z' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M30 10v30M70 10v30M10 50h30M10 70h30M60 50h30M60 70h30M50 30v40' stroke='black' stroke-width='1' fill='none'/%3E%3Ccircle cx='30' cy='40' r='2' fill='black'/%3E%3Ccircle cx='70' cy='40' r='2' fill='black'/%3E%3Ccircle cx='40' cy='50' r='2' fill='black'/%3E%3Ccircle cx='40' cy='70' r='2' fill='black'/%3E%3Ccircle cx='60' cy='50' r='2' fill='black'/%3E%3Ccircle cx='60' cy='70' r='2' fill='black'/%3E%3C/svg%3E");
|
||||
mask-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h80v80h-80z' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M30 10v30M70 10v30M10 50h30M10 70h30M60 50h30M60 70h30M50 30v40' stroke='black' stroke-width='1' fill='none'/%3E%3Ccircle cx='30' cy='40' r='2' fill='black'/%3E%3Ccircle cx='70' cy='40' r='2' fill='black'/%3E%3Ccircle cx='40' cy='50' r='2' fill='black'/%3E%3Ccircle cx='40' cy='70' r='2' fill='black'/%3E%3Ccircle cx='60' cy='50' r='2' fill='black'/%3E%3Ccircle cx='60' cy='70' r='2' fill='black'/%3E%3C/svg%3E");
|
||||
-webkit-mask-size: 150px 150px;
|
||||
mask-size: 150px 150px;
|
||||
}
|
||||
|
||||
.pattern-scanlines::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(to bottom, transparent 50%, color-mix(in oklch, var(--primary) 5%, transparent) 50%);
|
||||
background-size: 100% 4px;
|
||||
}
|
||||
|
||||
.pattern-parchment {
|
||||
background-image:
|
||||
radial-gradient(circle at 20% 30%, color-mix(in oklch, var(--primary) 5%, transparent) 0%, transparent 20%),
|
||||
radial-gradient(circle at 80% 70%, color-mix(in oklch, var(--primary) 5%, transparent) 0%, transparent 20%),
|
||||
url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.05'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.pattern-brushed {
|
||||
background-image: repeating-linear-gradient(
|
||||
45deg,
|
||||
transparent,
|
||||
transparent 1px,
|
||||
color-mix(in oklch, var(--primary) 6%, transparent) 1px,
|
||||
color-mix(in oklch, var(--primary) 6%, transparent) 2px
|
||||
);
|
||||
}
|
||||
|
||||
.pattern-stardust::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
background-image:
|
||||
radial-gradient(1px 1px at 10% 20%, var(--foreground) 100%, transparent), radial-gradient(1px 1px at 30% 50%, var(--foreground) 80%, transparent),
|
||||
radial-gradient(2px 2px at 50% 80%, var(--foreground) 60%, transparent), radial-gradient(1px 1px at 80% 10%, var(--foreground) 90%, transparent),
|
||||
radial-gradient(1.5px 1.5px at 90% 90%, var(--foreground) 70%, transparent),
|
||||
radial-gradient(1px 1px at 25% 35%, var(--foreground) 100%, transparent), radial-gradient(1px 1px at 65% 45%, var(--foreground) 80%, transparent),
|
||||
radial-gradient(1px 1px at 15% 75%, var(--foreground) 90%, transparent), radial-gradient(2px 2px at 75% 25%, var(--foreground) 60%, transparent),
|
||||
radial-gradient(1px 1px at 45% 15%, var(--foreground) 70%, transparent), radial-gradient(1px 1px at 5% 55%, var(--foreground) 100%, transparent),
|
||||
radial-gradient(1px 1px at 35% 85%, var(--foreground) 80%, transparent), radial-gradient(1px 1px at 55% 5%, var(--foreground) 90%, transparent),
|
||||
radial-gradient(2px 2px at 95% 45%, var(--foreground) 60%, transparent), radial-gradient(1px 1px at 40% 60%, var(--foreground) 70%, transparent);
|
||||
background-size: 300px 300px;
|
||||
}
|
||||
|
||||
.pattern-prism::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(135deg, rgba(255, 0, 0, 0.03) 0%, transparent 50%), linear-gradient(225deg, rgba(0, 0, 255, 0.03) 0%, transparent 50%),
|
||||
linear-gradient(45deg, rgba(0, 255, 0, 0.03) 0%, transparent 50%);
|
||||
filter: contrast(150%) brightness(110%);
|
||||
}
|
||||
|
||||
.pattern-spectrum::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(135deg, oklch(0.7 0.15 var(--tint-h) / 0.08) 0%, transparent 50%),
|
||||
linear-gradient(225deg, oklch(0.7 0.15 calc(var(--tint-h) + 120) / 0.08) 0%, transparent 50%),
|
||||
linear-gradient(45deg, oklch(0.7 0.15 calc(var(--tint-h) + 240) / 0.08) 0%, transparent 50%);
|
||||
filter: contrast(160%) brightness(110%);
|
||||
}
|
||||
|
||||
.pattern-elevation::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.05;
|
||||
background-color: var(--primary);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0L85 15v70L50 100 15 85V15z' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M50 10L78 22v56L50 90 22 78V22z' fill='none' stroke='black' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='10' fill='none' stroke='black' stroke-width='0.5'/%3E%3C/svg%3E");
|
||||
mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0L85 15v70L50 100 15 85V15z' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M50 10L78 22v56L50 90 22 78V22z' fill='none' stroke='black' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='10' fill='none' stroke='black' stroke-width='0.5'/%3E%3C/svg%3E");
|
||||
mask-size: 400px 400px;
|
||||
mask-position: center;
|
||||
mask-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.pattern-elevation::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(to bottom, color-mix(in oklch, var(--primary) 5%, transparent), transparent 40%),
|
||||
linear-gradient(to top, color-mix(in oklch, var(--primary) 3%, transparent), transparent 30%);
|
||||
}
|
||||
|
||||
.pattern-refraction::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(135deg, color-mix(in oklch, var(--primary) 10%, transparent) 0%, transparent 15%),
|
||||
linear-gradient(315deg, color-mix(in oklch, var(--primary) 8%, transparent) 0%, transparent 20%);
|
||||
}
|
||||
|
||||
.pattern-radar::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.1;
|
||||
background-color: var(--primary);
|
||||
-webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='48' fill='none' stroke='black' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='black' stroke-width='0.2'/%3E%3Cpath d='M50 2v96M2 50h96' stroke='black' stroke-width='0.2'/%3E%3C/svg%3E");
|
||||
mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='48' fill='none' stroke='black' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='black' stroke-width='0.2'/%3E%3Cpath d='M50 2v96M2 50h96' stroke='black' stroke-width='0.2'/%3E%3C/svg%3E");
|
||||
mask-size: 500px 500px;
|
||||
mask-position: center;
|
||||
mask-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.pattern-origami::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(170deg, color-mix(in oklch, var(--primary) 4%, transparent) 0%, transparent 50%),
|
||||
linear-gradient(10deg, color-mix(in oklch, var(--primary) 3%, transparent) 0%, transparent 40%);
|
||||
}
|
||||
|
||||
.pattern-terminal::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0.05;
|
||||
background-image: repeating-linear-gradient(90deg, var(--primary), var(--primary) 1px, transparent 1px, transparent 40px);
|
||||
}
|
||||
|
||||
.glow-wrapper {
|
||||
background-image:
|
||||
url('/topbar.png'),
|
||||
radial-gradient(50% 50% at center -25px, color-mix(in oklch, var(--primary) 35%, transparent) 0%, transparent 100%);
|
||||
url('/topbar.png'), radial-gradient(50% 50% at center -25px, color-mix(in oklch, var(--primary) 35%, transparent) 0%, transparent 100%);
|
||||
background-blend-mode: hard-light, color-dodge;
|
||||
background-position: top;
|
||||
background-repeat: no-repeat;
|
||||
background-size: auto 12rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
--radius-md: calc(var(--radius) - 2px);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) + 4px);
|
||||
--radius-2xl: calc(var(--radius) + 8px);
|
||||
--radius-3xl: calc(var(--radius) + 12px);
|
||||
|
||||
--font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, sans-serif;
|
||||
--font-serif: 'Fraunces Variable', ui-serif, Georgia, serif;
|
||||
|
||||
@@ -140,7 +140,7 @@ function formatBadgeClass(fmt: string): string {
|
||||
|
||||
<template>
|
||||
<header
|
||||
class="flex h-14 shrink-0 items-center gap-2 border-b border-border/50 bg-background/70 backdrop-blur-xl backdrop-saturate-150 px-3 shadow-sm sticky top-0 z-30"
|
||||
class="flex h-12 shrink-0 items-center gap-2 border border-sidebar-border/50 bg-background/90 backdrop-blur-xl px-3 shadow-lg shadow-black/5 relative mt-3 ml-0 mr-4 z-30 rounded-xl transition-all duration-300 flex-none"
|
||||
>
|
||||
<!-- Mobile: search active overlay -->
|
||||
<template v-if="mobileSearchOpen">
|
||||
@@ -236,9 +236,9 @@ function formatBadgeClass(fmt: string): string {
|
||||
<!-- Center: desktop global search -->
|
||||
<div
|
||||
class="hidden md:flex flex-1 mx-4 relative items-center transition-all duration-300"
|
||||
:class="searchFocused || globalSearchQuery ? 'max-w-lg' : 'max-w-xs'"
|
||||
:class="searchFocused || globalSearchQuery ? 'max-w-xl' : 'max-w-sm'"
|
||||
>
|
||||
<Search class="absolute left-2.5 text-muted-foreground pointer-events-none" :size="13" />
|
||||
<Search class="absolute left-3 text-muted-foreground/60 pointer-events-none" :size="14" />
|
||||
<input
|
||||
ref="desktopSearchInput"
|
||||
v-model="globalSearchQuery"
|
||||
@@ -246,11 +246,16 @@ function formatBadgeClass(fmt: string): string {
|
||||
@blur="searchFocused = false; selectedIndex = -1"
|
||||
@keydown="handleSearchKeydown"
|
||||
placeholder="Search all books..."
|
||||
class="w-full h-8 pl-8 pr-7 text-sm rounded-md border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary transition-shadow"
|
||||
class="w-full h-8 pl-9 pr-8 text-[13px] rounded-full border-none bg-primary/5 text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1.5 focus:ring-primary/30 transition-all duration-300 shadow-inner shadow-black/5"
|
||||
/>
|
||||
<button v-if="globalSearchQuery" @click="clearSearch()" class="absolute right-2 text-muted-foreground hover:text-foreground">
|
||||
<X :size="13" />
|
||||
</button>
|
||||
<div class="absolute right-2.5 flex items-center gap-1.5">
|
||||
<button v-if="globalSearchQuery" @click="clearSearch()" class="text-muted-foreground/60 hover:text-foreground transition-colors">
|
||||
<X :size="13" />
|
||||
</button>
|
||||
<kbd v-else class="hidden lg:inline-flex h-4.5 select-none items-center gap-1 rounded border border-sidebar-border/50 bg-background/50 px-1.5 font-mono text-[9px] font-medium text-muted-foreground/40 opacity-100">
|
||||
<span class="text-xs">⌘</span>K
|
||||
</kbd>
|
||||
</div>
|
||||
|
||||
<!-- Desktop search dropdown -->
|
||||
<div
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { SidebarProvider, SidebarInset } from '@/components/ui/sidebar'
|
||||
import AppSidebar from '@/components/AppSidebar.vue'
|
||||
import AppHeader from '@/components/AppHeader.vue'
|
||||
import { useThemeStore, BACKGROUND_OPTIONS } from '@/stores/theme'
|
||||
|
||||
const route = useRoute()
|
||||
const themeStore = useThemeStore()
|
||||
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SidebarProvider>
|
||||
<SidebarProvider class="glow-wrapper min-h-screen" :class="backgroundClass">
|
||||
<AppSidebar />
|
||||
<SidebarInset class="flex flex-col h-screen glow-wrapper overflow-x-hidden">
|
||||
<SidebarInset class="flex flex-col h-screen overflow-hidden relative bg-transparent">
|
||||
<!-- 1. Global App Header: Fixed at the top, independent of views -->
|
||||
<AppHeader />
|
||||
<router-view v-slot="{ Component }">
|
||||
<component :is="Component" :key="route.path" />
|
||||
</router-view>
|
||||
|
||||
<!-- 2. Independent View Area: Everything below the header scrolls here -->
|
||||
<div class="flex-1 overflow-y-auto overflow-x-hidden relative scroll-smooth bg-transparent">
|
||||
<router-view :key="route.path" />
|
||||
<!-- Bottom gutter matching the top floating margin -->
|
||||
<div class="h-6 w-full" />
|
||||
</div>
|
||||
</SidebarInset>
|
||||
</SidebarProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* No more masks or negative margins. Clean, stable layout. */
|
||||
</style>
|
||||
|
||||
@@ -136,13 +136,11 @@ onMounted(async () => {
|
||||
<CreateCollectionDialog :open="createCollectionOpen" @close="createCollectionOpen = false" />
|
||||
<LibraryCreatorModal v-if="createLibraryOpen" @close="createLibraryOpen = false" @saved="onLibrarySaved" />
|
||||
|
||||
<Sidebar
|
||||
collapsible="icon"
|
||||
style="--sidebar-border: color-mix(in oklch, var(--primary) 18%, transparent)"
|
||||
class="[&>div:last-child]:shadow-[4px_0_12px_-2px_oklch(0_0_0/0.08)]"
|
||||
>
|
||||
<SidebarHeader class="border-b border-sidebar-border bg-gradient-to-b from-primary/6 to-transparent">
|
||||
<div class="flex items-center gap-2.5 px-1 py-1">
|
||||
<Sidebar variant="floating" collapsible="icon" style="--sidebar-border: color-mix(in oklch, var(--primary) 18%, transparent)">
|
||||
<SidebarHeader class="border-b border-sidebar-border bg-gradient-to-b from-primary/6 to-transparent rounded-t-xl">
|
||||
<div
|
||||
class="flex items-center gap-2.5 px-1 py-1 group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:justify-center"
|
||||
>
|
||||
<!-- Logo mark -->
|
||||
<div
|
||||
class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg shadow-sm"
|
||||
@@ -175,19 +173,39 @@ onMounted(async () => {
|
||||
<SidebarGroupContent>
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton :is-active="isDashboardActive" tooltip="Dashboard" class="gap-3 h-9" @click="router.push({ name: 'dashboard' })">
|
||||
<LayoutDashboard :size="16" :class="isDashboardActive ? 'text-sidebar-primary' : 'text-sidebar-foreground/50'" />
|
||||
<span class="text-sm" :class="isDashboardActive ? 'font-semibold text-sidebar-foreground' : 'text-sidebar-foreground/80'">Dashboard</span>
|
||||
<SidebarMenuButton
|
||||
:is-active="isDashboardActive"
|
||||
tooltip="Dashboard"
|
||||
class="relative gap-3 h-9 transition-all duration-300 group/item"
|
||||
:class="isDashboardActive ? 'bg-primary/10 text-primary' : 'hover:bg-sidebar-accent/50'"
|
||||
@click="router.push({ name: 'dashboard' })"
|
||||
>
|
||||
<div v-if="isDashboardActive" class="absolute left-0 w-1 h-5 bg-primary rounded-full -ml-3" />
|
||||
<LayoutDashboard
|
||||
:size="16"
|
||||
:class="isDashboardActive ? 'text-primary' : 'text-sidebar-foreground/50 group-hover/item:text-sidebar-foreground'"
|
||||
/>
|
||||
<span class="text-sm font-medium" :class="isDashboardActive ? 'text-primary' : 'text-sidebar-foreground/75'">Dashboard</span>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem v-if="hasPermission('staging_access')">
|
||||
<SidebarMenuButton :is-active="isStagingActive" tooltip="Staging" class="gap-3 h-9" @click="router.push({ name: 'staging' })">
|
||||
<PackageOpen :size="16" :class="isStagingActive ? 'text-sidebar-primary' : 'text-sidebar-foreground/50'" />
|
||||
<span class="text-sm" :class="isStagingActive ? 'font-semibold text-sidebar-foreground' : 'text-sidebar-foreground/80'">Staging</span>
|
||||
<SidebarMenuButton
|
||||
:is-active="isStagingActive"
|
||||
tooltip="Staging"
|
||||
class="relative gap-3 h-9 transition-all duration-300 group/item"
|
||||
:class="isStagingActive ? 'bg-primary/10 text-primary' : 'hover:bg-sidebar-accent/50'"
|
||||
@click="router.push({ name: 'staging' })"
|
||||
>
|
||||
<div v-if="isStagingActive" class="absolute left-0 w-1 h-5 bg-primary rounded-full -ml-3" />
|
||||
<PackageOpen
|
||||
:size="16"
|
||||
:class="isStagingActive ? 'text-primary' : 'text-sidebar-foreground/50 group-hover/item:text-sidebar-foreground'"
|
||||
/>
|
||||
<span class="text-sm font-medium" :class="isStagingActive ? 'text-primary' : 'text-sidebar-foreground/75'">Staging</span>
|
||||
<span
|
||||
v-if="stagingSummary.total > 0"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium group-data-[collapsible=icon]:hidden transition-colors"
|
||||
:class="isStagingActive ? 'bg-primary/15 text-primary' : 'bg-sidebar-foreground/10 text-sidebar-foreground/60'"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium transition-colors"
|
||||
:class="isStagingActive ? 'bg-primary/20 text-primary' : 'bg-sidebar-foreground/10 text-sidebar-foreground/60'"
|
||||
>
|
||||
{{ stagingSummary.total }}
|
||||
</span>
|
||||
@@ -202,12 +220,15 @@ onMounted(async () => {
|
||||
<!-- Libraries -->
|
||||
<SidebarGroup class="py-2">
|
||||
<div class="flex h-8 items-center px-2 group-data-[collapsible=icon]:hidden">
|
||||
<button
|
||||
class="flex flex-1 items-center gap-2 min-w-0 group/hdr"
|
||||
@click="toggleLibraries"
|
||||
>
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-sidebar-foreground/55 group-hover/hdr:text-sidebar-foreground/90 transition-colors">Libraries</span>
|
||||
<span v-if="!librariesOpen && libraries.length > 0" class="text-[11px] font-normal normal-case tracking-normal text-sidebar-foreground/40">
|
||||
<button class="flex flex-1 items-center gap-2 min-w-0 group/hdr" @click="toggleLibraries">
|
||||
<span
|
||||
class="text-xs font-bold uppercase tracking-wider text-sidebar-foreground/55 group-hover/hdr:text-sidebar-foreground/90 transition-colors"
|
||||
>Libraries</span
|
||||
>
|
||||
<span
|
||||
v-if="!librariesOpen && libraries.length > 0"
|
||||
class="text-[11px] font-normal normal-case tracking-normal text-sidebar-foreground/40"
|
||||
>
|
||||
({{ libraries.length }})
|
||||
</span>
|
||||
<ChevronDown
|
||||
@@ -233,30 +254,32 @@ onMounted(async () => {
|
||||
<SidebarMenuButton
|
||||
:is-active="activeLibraryId === lib.id"
|
||||
:tooltip="getProgress(lib.id)?.status === 'running' ? `${lib.name} - Scanning ${scanPct(lib.id)}%` : lib.name"
|
||||
class="gap-2.5 h-8 [&>svg]:size-4.25!"
|
||||
class="relative gap-2.5 h-8 [&>svg]:size-4.25! transition-all duration-300 group/item"
|
||||
:class="activeLibraryId === lib.id ? 'bg-primary/10 text-primary' : 'hover:bg-sidebar-accent/50'"
|
||||
@click="router.push({ name: 'library', params: { id: lib.id } })"
|
||||
>
|
||||
<div v-if="activeLibraryId === lib.id" class="absolute left-0 w-0.75 h-4 bg-primary rounded-full -ml-3" />
|
||||
<component
|
||||
:is="getLibraryIcon(lib.icon)"
|
||||
:size="18"
|
||||
:class="[
|
||||
activeLibraryId === lib.id ? 'text-sidebar-primary' : 'text-sidebar-foreground/45',
|
||||
activeLibraryId === lib.id ? 'text-primary' : 'text-sidebar-foreground/45 group-hover/item:text-sidebar-foreground',
|
||||
getProgress(lib.id)?.status === 'running' ? 'animate-pulse' : '',
|
||||
]"
|
||||
/>
|
||||
<span class="text-[13.5]" :class="activeLibraryId === lib.id ? 'font-semibold text-sidebar-foreground' : 'text-sidebar-foreground/75'">
|
||||
<span class="text-[13.5px] font-medium" :class="activeLibraryId === lib.id ? 'text-primary' : 'text-sidebar-foreground/75'">
|
||||
{{ lib.name }}
|
||||
</span>
|
||||
<span
|
||||
v-if="getProgress(lib.id)?.status === 'running'"
|
||||
class="ml-auto shrink-0 rounded bg-primary/15 px-1.5 py-px text-[11px] tabular-nums font-medium text-primary group-data-[collapsible=icon]:hidden"
|
||||
class="ml-auto shrink-0 rounded bg-primary/15 px-1.5 py-px text-[11px] tabular-nums font-medium text-primary"
|
||||
>
|
||||
{{ scanPct(lib.id) }}%
|
||||
</span>
|
||||
<span
|
||||
v-else-if="lib.bookCount !== undefined"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium group-data-[collapsible=icon]:hidden transition-colors"
|
||||
:class="activeLibraryId === lib.id ? 'bg-primary/15 text-primary' : 'bg-sidebar-foreground/8 text-sidebar-foreground/50'"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium transition-colors"
|
||||
:class="activeLibraryId === lib.id ? 'bg-primary/20 text-primary' : 'bg-sidebar-foreground/8 text-sidebar-foreground/50'"
|
||||
>
|
||||
{{ lib.bookCount.toLocaleString() }}
|
||||
</span>
|
||||
@@ -289,7 +312,10 @@ onMounted(async () => {
|
||||
<SidebarGroup class="py-2">
|
||||
<div class="flex h-8 items-center px-2 group-data-[collapsible=icon]:hidden">
|
||||
<button class="flex flex-1 items-center gap-2 min-w-0 group/hdr" @click="toggleLenses">
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-sidebar-foreground/55 group-hover/hdr:text-sidebar-foreground/90 transition-colors">Lenses</span>
|
||||
<span
|
||||
class="text-xs font-bold uppercase tracking-wider text-sidebar-foreground/55 group-hover/hdr:text-sidebar-foreground/90 transition-colors"
|
||||
>Lenses</span
|
||||
>
|
||||
<span v-if="!lensesOpen && lenses.length > 0" class="text-[11px] font-normal normal-case tracking-normal text-sidebar-foreground/40">
|
||||
({{ lenses.length }})
|
||||
</span>
|
||||
@@ -315,21 +341,23 @@ onMounted(async () => {
|
||||
<SidebarMenuButton
|
||||
:is-active="activeLensId === lens.id"
|
||||
:tooltip="lens.name"
|
||||
class="gap-2.5 h-8"
|
||||
class="relative gap-2.5 h-8 transition-all duration-300 group/item"
|
||||
:class="activeLensId === lens.id ? 'bg-primary/10 text-primary' : 'hover:bg-sidebar-accent/50'"
|
||||
@click="router.push({ name: 'lens', params: { id: lens.id } })"
|
||||
>
|
||||
<div v-if="activeLensId === lens.id" class="absolute left-0 w-0.75 h-4 bg-primary rounded-full -ml-3" />
|
||||
<component
|
||||
:is="getLensIcon(lens.icon)"
|
||||
:size="16"
|
||||
:class="activeLensId === lens.id ? 'text-sidebar-primary' : 'text-sidebar-foreground/45'"
|
||||
:class="activeLensId === lens.id ? 'text-primary' : 'text-sidebar-foreground/45 group-hover/item:text-sidebar-foreground'"
|
||||
/>
|
||||
<span class="text-[13.5]" :class="activeLensId === lens.id ? 'font-semibold text-sidebar-foreground' : 'text-sidebar-foreground/75'">
|
||||
<span class="text-[13.5px] font-medium" :class="activeLensId === lens.id ? 'text-primary' : 'text-sidebar-foreground/75'">
|
||||
{{ lens.name }}
|
||||
</span>
|
||||
<span
|
||||
v-if="lens.bookCount !== undefined"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium group-data-[collapsible=icon]:hidden transition-colors"
|
||||
:class="activeLensId === lens.id ? 'bg-primary/15 text-primary' : 'bg-sidebar-foreground/8 text-sidebar-foreground/50'"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium transition-colors"
|
||||
:class="activeLensId === lens.id ? 'bg-primary/20 text-primary' : 'bg-sidebar-foreground/8 text-sidebar-foreground/50'"
|
||||
>
|
||||
{{ lens.bookCount.toLocaleString() }}
|
||||
</span>
|
||||
@@ -349,8 +377,14 @@ onMounted(async () => {
|
||||
<SidebarGroup class="py-2">
|
||||
<div class="flex h-8 items-center px-2 group-data-[collapsible=icon]:hidden">
|
||||
<button class="flex flex-1 items-center gap-2 min-w-0 group/hdr" @click="toggleCollections">
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-sidebar-foreground/55 group-hover/hdr:text-sidebar-foreground/90 transition-colors">Collections</span>
|
||||
<span v-if="!collectionsOpen && collections.length > 0" class="text-[11px] font-normal normal-case tracking-normal text-sidebar-foreground/40">
|
||||
<span
|
||||
class="text-xs font-bold uppercase tracking-wider text-sidebar-foreground/55 group-hover/hdr:text-sidebar-foreground/90 transition-colors"
|
||||
>Collections</span
|
||||
>
|
||||
<span
|
||||
v-if="!collectionsOpen && collections.length > 0"
|
||||
class="text-[11px] font-normal normal-case tracking-normal text-sidebar-foreground/40"
|
||||
>
|
||||
({{ collections.length }})
|
||||
</span>
|
||||
<ChevronDown
|
||||
@@ -375,20 +409,29 @@ onMounted(async () => {
|
||||
<SidebarMenuButton
|
||||
:is-active="activeCollectionId === collection.id"
|
||||
:tooltip="collection.name"
|
||||
class="gap-2.5 h-8"
|
||||
class="relative gap-2.5 h-8 transition-all duration-300 group/item"
|
||||
:class="activeCollectionId === collection.id ? 'bg-primary/10 text-primary' : 'hover:bg-sidebar-accent/50'"
|
||||
@click="router.push({ name: 'collection', params: { id: collection.id } })"
|
||||
>
|
||||
<div v-if="activeCollectionId === collection.id" class="absolute left-0 w-0.75 h-4 bg-primary rounded-full -ml-3" />
|
||||
<component
|
||||
:is="getCollectionIcon(collection.icon)"
|
||||
:size="16"
|
||||
:class="activeCollectionId === collection.id ? 'text-sidebar-primary' : 'text-sidebar-foreground/45'"
|
||||
:class="
|
||||
activeCollectionId === collection.id ? 'text-primary' : 'text-sidebar-foreground/45 group-hover/item:text-sidebar-foreground'
|
||||
"
|
||||
/>
|
||||
<span class="text-[13.5]" :class="activeCollectionId === collection.id ? 'font-semibold text-sidebar-foreground' : 'text-sidebar-foreground/75'">
|
||||
<span
|
||||
class="text-[13.5px] font-medium"
|
||||
:class="activeCollectionId === collection.id ? 'text-primary' : 'text-sidebar-foreground/75'"
|
||||
>
|
||||
{{ collection.name }}
|
||||
</span>
|
||||
<span
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium group-data-[collapsible=icon]:hidden transition-colors"
|
||||
:class="activeCollectionId === collection.id ? 'bg-primary/15 text-primary' : 'bg-sidebar-foreground/8 text-sidebar-foreground/50'"
|
||||
class="ml-auto shrink-0 rounded px-1.5 py-px text-[11px] tabular-nums font-medium transition-colors"
|
||||
:class="
|
||||
activeCollectionId === collection.id ? 'bg-primary/20 text-primary' : 'bg-sidebar-foreground/8 text-sidebar-foreground/50'
|
||||
"
|
||||
>
|
||||
{{ collection.bookCount.toLocaleString() }}
|
||||
</span>
|
||||
|
||||
@@ -42,67 +42,67 @@ function getIconComponent(name: string) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex h-11 shrink-0 items-center gap-2 border-b border-border/60 bg-card/40 px-4">
|
||||
<div class="flex h-10 shrink-0 items-center gap-2 px-1 mr-4 mt-2 ml-0 mb-2 sticky top-0 z-20 transition-all duration-300">
|
||||
<!-- Left: optional icon + title + count -->
|
||||
<div class="flex items-center gap-2 flex-1 min-w-0">
|
||||
<component v-if="icon" :is="getIconComponent(icon)" :size="15" class="shrink-0 text-muted-foreground" />
|
||||
<span class="font-semibold text-[14px] text-foreground tracking-tight truncate">{{ title }}</span>
|
||||
<span
|
||||
class="hidden sm:inline-flex text-[11px] font-medium text-primary/70 bg-primary/8 px-2 py-0.5 rounded-full tabular-nums border border-primary/15 shrink-0"
|
||||
>
|
||||
{{ loaded.toLocaleString() }}<span class="text-muted-foreground/60 mx-0.5">/</span>{{ total.toLocaleString() }}
|
||||
<div class="flex items-center gap-2.5 flex-1 min-w-0">
|
||||
<div class="w-1 h-4 bg-primary/40 rounded-full" />
|
||||
<component v-if="icon" :is="getIconComponent(icon)" :size="14" class="shrink-0 text-muted-foreground/60" />
|
||||
<span class="font-bold text-[16px] text-foreground/90 tracking-tight truncate">{{ title }}</span>
|
||||
<span class="text-[12px] font-bold text-primary/60 tabular-nums uppercase tracking-wider ml-1">
|
||||
{{ loaded.toLocaleString() }}<span class="text-muted-foreground/30 mx-0.5 font-normal">/</span>{{ total.toLocaleString() }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Right -->
|
||||
<div class="flex items-center gap-2 shrink-0">
|
||||
<div class="flex items-center gap-1 shrink-0">
|
||||
<slot name="toolbar" />
|
||||
<div class="w-px h-3.5 bg-border/40 mx-1.5" />
|
||||
<slot name="actions" />
|
||||
|
||||
<!-- Select mode toggle -->
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
class="hidden md:flex h-8 gap-1.5 text-xs px-2.5"
|
||||
:class="selectionMode ? 'text-primary bg-primary/10 hover:bg-primary/20' : 'text-muted-foreground hover:text-foreground'"
|
||||
class="hidden md:flex h-8 gap-1.5 text-[11px] font-bold uppercase tracking-tight px-2.5 rounded-lg transition-all"
|
||||
:class="selectionMode ? 'text-primary bg-primary/10 hover:bg-primary/20 ring-1 ring-primary/20' : 'text-muted-foreground/60 hover:text-foreground hover:bg-primary/5'"
|
||||
@click="emit('toggle-selection')"
|
||||
>
|
||||
<CheckSquare v-if="selectionMode" :size="14" />
|
||||
<Square v-else :size="14" />
|
||||
<CheckSquare v-if="selectionMode" :size="13" />
|
||||
<Square v-else :size="13" />
|
||||
Select
|
||||
</Button>
|
||||
|
||||
<Separator orientation="vertical" class="hidden md:block mx-1 h-4" />
|
||||
<div class="hidden md:block w-px h-3.5 bg-border/40 mx-1.5" />
|
||||
|
||||
<!-- Desktop: view mode toggle -->
|
||||
<div class="hidden md:flex items-center">
|
||||
<div class="hidden md:flex items-center gap-0.5">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-8 w-8"
|
||||
:class="viewMode === 'grid' ? 'text-primary' : 'text-muted-foreground hover:text-foreground'"
|
||||
class="h-8 w-8 rounded-lg"
|
||||
:class="viewMode === 'grid' ? 'text-primary bg-primary/10' : 'text-muted-foreground/50 hover:text-foreground hover:bg-primary/5'"
|
||||
@click="emit('update:viewMode', 'grid')"
|
||||
>
|
||||
<LayoutGrid :size="15" />
|
||||
<LayoutGrid :size="14" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-8 w-8"
|
||||
:class="viewMode === 'list' ? 'text-primary' : 'text-muted-foreground hover:text-foreground'"
|
||||
class="h-8 w-8 rounded-lg"
|
||||
:class="viewMode === 'list' ? 'text-primary bg-primary/10' : 'text-muted-foreground/50 hover:text-foreground hover:bg-primary/5'"
|
||||
@click="emit('update:viewMode', 'list')"
|
||||
>
|
||||
<List :size="15" />
|
||||
<List :size="14" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Separator orientation="vertical" class="hidden md:block mx-1 h-4" />
|
||||
<div class="hidden md:block w-px h-3.5 bg-border/40 mx-1.5" />
|
||||
|
||||
<!-- Desktop: display settings popover -->
|
||||
<Popover>
|
||||
<PopoverTrigger as-child>
|
||||
<Button variant="ghost" size="icon" class="hidden md:flex h-8 w-8 text-muted-foreground hover:text-foreground">
|
||||
<SlidersHorizontal :size="15" />
|
||||
<Button variant="ghost" size="icon" class="hidden md:flex h-8 w-8 rounded-lg text-muted-foreground/50 hover:text-foreground hover:bg-primary/5">
|
||||
<SlidersHorizontal :size="14" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent class="w-56 p-4" align="end">
|
||||
|
||||
@@ -71,7 +71,7 @@ const { isMobile, state, openMobile, setOpenMobile } = useSidebar()
|
||||
: 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',
|
||||
// Adjust the padding for floating and inset variants.
|
||||
variant === 'floating' || variant === 'inset'
|
||||
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
|
||||
? 'p-3 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(6))+2px)]'
|
||||
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',
|
||||
props.class,
|
||||
)
|
||||
@@ -80,7 +80,7 @@ const { isMobile, state, openMobile, setOpenMobile } = useSidebar()
|
||||
>
|
||||
<div
|
||||
data-sidebar="sidebar"
|
||||
class="bg-sidebar/50 backdrop-blur-xl backdrop-saturate-150 border-r border-sidebar-border/60 shadow-[1px_0_0_0_oklch(1_0_0/0.04)] group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
||||
class="bg-sidebar/55 backdrop-blur-2xl backdrop-saturate-200 border-r border-sidebar-border/60 shadow-[1px_0_0_0_oklch(1_0_0/0.04)] group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-xl group-data-[variant=floating]:border group-data-[variant=floating]:shadow-xl group-data-[variant=floating]:shadow-black/5"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -12,12 +12,16 @@ const props = defineProps<{
|
||||
data-slot="sidebar-inset"
|
||||
:class="
|
||||
cn(
|
||||
'bg-background relative flex w-full flex-1 flex-col',
|
||||
'relative flex w-full flex-1 flex-col',
|
||||
// Sidebar variant: padding-left replaces the old spacer div, letting the background extend under the sidebar for glass effect
|
||||
'md:peer-data-[variant=sidebar]:pl-(--sidebar-width)',
|
||||
'md:peer-data-[variant=sidebar]:peer-data-[collapsible=offcanvas]:pl-0',
|
||||
'md:peer-data-[variant=sidebar]:peer-data-[collapsible=icon]:pl-(--sidebar-width-icon)',
|
||||
'md:peer-data-[variant=sidebar]:transition-[padding-left] md:peer-data-[variant=sidebar]:duration-200 md:peer-data-[variant=sidebar]:ease-linear',
|
||||
// Floating variant: align with the sidebar container's edge
|
||||
'md:peer-data-[variant=floating]:pl-(--sidebar-width)',
|
||||
'md:peer-data-[variant=floating]:peer-data-[collapsible=icon]:pl-[calc(var(--sidebar-width-icon)+(--spacing(6))+2px)]',
|
||||
'md:peer-data-[variant=floating]:transition-[padding-left] md:peer-data-[variant=floating]:duration-200 md:peer-data-[variant=floating]:ease-linear',
|
||||
// Inset variant: existing margin-based layout unchanged
|
||||
'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',
|
||||
props.class,
|
||||
|
||||
@@ -9,7 +9,7 @@ const props = defineProps<{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Separator data-slot="sidebar-separator" data-sidebar="separator" :class="cn('bg-sidebar-border mx-2 w-auto', props.class)">
|
||||
<Separator data-slot="sidebar-separator" data-sidebar="separator" :class="cn('bg-sidebar-border mx-2 my-2 w-auto', props.class)">
|
||||
<slot />
|
||||
</Separator>
|
||||
</template>
|
||||
|
||||
@@ -17,11 +17,11 @@ function navigate(routeName: string) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center gap-0 overflow-x-auto flex-1 min-w-0">
|
||||
<div class="flex items-stretch gap-0 overflow-x-auto flex-1 min-w-0">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.routeName"
|
||||
class="px-3 py-2.5 text-sm font-medium border-b-2 transition-colors whitespace-nowrap"
|
||||
class="px-3 h-full text-sm font-medium border-b-2 transition-colors whitespace-nowrap"
|
||||
:class="route.name === tab.routeName ? 'border-primary text-foreground' : 'border-transparent text-muted-foreground hover:text-foreground'"
|
||||
@click="navigate(tab.routeName)"
|
||||
>
|
||||
|
||||
@@ -41,7 +41,7 @@ function handleClick() {
|
||||
<template>
|
||||
<div class="group cursor-pointer select-none" @click="handleClick">
|
||||
<div
|
||||
class="relative w-full overflow-hidden rounded-md shadow-md transition-all duration-200 group-hover:shadow-xl group-hover:scale-[1.04]"
|
||||
class="relative w-full overflow-hidden rounded-lg shadow-md transition-all duration-200 group-hover:shadow-xl group-hover:scale-[1.04]"
|
||||
style="aspect-ratio: 2/3"
|
||||
:style="coverLoaded ? {} : coverStyle"
|
||||
>
|
||||
|
||||
@@ -66,7 +66,7 @@ const SKELETONS = Array.from({ length: 8 })
|
||||
<!-- Skeleton -->
|
||||
<div v-if="loading" class="flex gap-3 overflow-hidden px-5 pb-5">
|
||||
<div v-for="(_, n) in SKELETONS" :key="n" class="w-[120px] shrink-0">
|
||||
<div class="w-full animate-pulse rounded-md bg-muted" style="aspect-ratio: 2/3" />
|
||||
<div class="w-full animate-pulse rounded-lg bg-muted" style="aspect-ratio: 2/3" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -37,7 +37,20 @@ export type Accent =
|
||||
| 'orchid'
|
||||
| 'blush'
|
||||
export type Radius = 'sharp' | 'default' | 'rounded' | 'pill'
|
||||
export type Background = 'none' | 'dots' | 'cross' | 'gradient' | 'aurora' | 'horizon'
|
||||
export type Background =
|
||||
| 'none'
|
||||
| 'dots'
|
||||
| 'cross'
|
||||
| 'aurora'
|
||||
| 'horizon'
|
||||
| 'mesh'
|
||||
| 'glow'
|
||||
| 'scanlines'
|
||||
| 'brushed'
|
||||
| 'prism'
|
||||
| 'spectrum'
|
||||
| 'elevation'
|
||||
| 'terminal'
|
||||
|
||||
export const ACCENT_VIVID: { id: Accent; label: string; color: string }[] = [
|
||||
{ id: 'rose', label: 'Rose', color: '#e11d48' },
|
||||
@@ -85,12 +98,26 @@ export const RADIUS_OPTIONS: { id: Radius; label: string }[] = [
|
||||
]
|
||||
|
||||
export const BACKGROUND_OPTIONS: { id: Background; label: string; cssClass: string }[] = [
|
||||
// Basic
|
||||
{ id: 'none', label: 'None', cssClass: '' },
|
||||
{ id: 'dots', label: 'Dots', cssClass: 'pattern-dots' },
|
||||
{ id: 'cross', label: 'Cross', cssClass: 'pattern-cross' },
|
||||
{ id: 'gradient', label: 'Gradient', cssClass: 'pattern-gradient' },
|
||||
|
||||
// Atmospheric
|
||||
{ id: 'aurora', label: 'Aurora', cssClass: 'pattern-aurora' },
|
||||
{ id: 'horizon', label: 'Horizon', cssClass: 'pattern-horizon' },
|
||||
{ id: 'glow', label: 'Glow', cssClass: 'pattern-glow' },
|
||||
{ id: 'mesh', label: 'Mesh', cssClass: 'pattern-mesh' },
|
||||
|
||||
// Technical
|
||||
{ id: 'scanlines', label: 'Scanlines', cssClass: 'pattern-scanlines' },
|
||||
{ id: 'terminal', label: 'Terminal', cssClass: 'pattern-terminal' },
|
||||
{ id: 'brushed', label: 'Brushed', cssClass: 'pattern-brushed' },
|
||||
|
||||
// Architectural
|
||||
{ id: 'elevation', label: 'Elevation', cssClass: 'pattern-elevation' },
|
||||
{ id: 'prism', label: 'Prism', cssClass: 'pattern-prism' },
|
||||
{ id: 'spectrum', label: 'Spectrum', cssClass: 'pattern-spectrum' },
|
||||
]
|
||||
|
||||
const ACCENT_IDS = ACCENT_OPTIONS.map((a) => a.id)
|
||||
|
||||
@@ -6,7 +6,6 @@ import DetailsTab from '@/features/book/components/detail/tabs/DetailsTab.vue'
|
||||
import { useBookDetail } from '@/features/book/composables/useBookDetail'
|
||||
import { useBookEvents } from '@/features/book/composables/useBookEvents'
|
||||
import { useScanProgress } from '@/features/scanner/composables/useScanProgress'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
@@ -36,40 +35,37 @@ onBookMoved((bookIds) => {
|
||||
})
|
||||
|
||||
watch(bookId, (id) => fetch(id), { immediate: true })
|
||||
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center border-b shrink-0 h-11">
|
||||
<BookDetailTabs :book-id="bookId" />
|
||||
</div>
|
||||
<div class="flex items-stretch border-b shrink-0 h-11 px-3">
|
||||
<BookDetailTabs :book-id="bookId" />
|
||||
</div>
|
||||
|
||||
<main class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6" :class="backgroundClass">
|
||||
<DetailsTab v-if="detail" :book="detail" />
|
||||
<main class="flex-none overflow-x-hidden px-6 py-6">
|
||||
<DetailsTab v-if="detail" :book="detail" />
|
||||
|
||||
<template v-else-if="loading">
|
||||
<div class="flex flex-col md:flex-row gap-8">
|
||||
<div class="md:w-56 shrink-0">
|
||||
<div class="w-full rounded-sm bg-muted animate-pulse" style="aspect-ratio: 2/3" />
|
||||
<div class="mt-4 space-y-2">
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 space-y-3">
|
||||
<div class="h-7 w-3/4 rounded bg-muted animate-pulse" />
|
||||
<div class="h-4 w-1/2 rounded bg-muted animate-pulse" />
|
||||
<div class="h-4 w-1/3 rounded bg-muted animate-pulse" />
|
||||
<div class="flex gap-1.5 mt-4">
|
||||
<div class="h-5 w-12 rounded bg-muted animate-pulse" />
|
||||
<div class="h-5 w-16 rounded bg-muted animate-pulse" />
|
||||
<div class="h-5 w-10 rounded bg-muted animate-pulse" />
|
||||
</div>
|
||||
<div class="h-32 w-full rounded bg-muted animate-pulse mt-4" />
|
||||
</div>
|
||||
<template v-else-if="loading">
|
||||
<div class="flex flex-col md:flex-row gap-8">
|
||||
<div class="md:w-56 shrink-0">
|
||||
<div class="w-full rounded-sm bg-muted animate-pulse" style="aspect-ratio: 2/3" />
|
||||
<div class="mt-4 space-y-2">
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="flex-1 space-y-3">
|
||||
<div class="h-7 w-3/4 rounded bg-muted animate-pulse" />
|
||||
<div class="h-4 w-1/2 rounded bg-muted animate-pulse" />
|
||||
<div class="h-4 w-1/3 rounded bg-muted animate-pulse" />
|
||||
<div class="flex gap-1.5 mt-4">
|
||||
<div class="h-5 w-12 rounded bg-muted animate-pulse" />
|
||||
<div class="h-5 w-16 rounded bg-muted animate-pulse" />
|
||||
<div class="h-5 w-10 rounded bg-muted animate-pulse" />
|
||||
</div>
|
||||
<div class="h-32 w-full rounded bg-muted animate-pulse mt-4" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,6 @@ import type { BookDetail } from '@projectx/types'
|
||||
import BookDetailTabs from '@/features/book/components/detail/BookDetailTabs.vue'
|
||||
import EditMetadataTab from '@/features/book/components/detail/tabs/EditMetadataTab.vue'
|
||||
import { useBookDetail } from '@/features/book/composables/useBookDetail'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
@@ -15,9 +14,6 @@ const { detail, loading, fetch } = useBookDetail()
|
||||
|
||||
watch(bookId, (id) => fetch(id), { immediate: true })
|
||||
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
|
||||
function onMetadataSaved(updated: BookDetail) {
|
||||
detail.value = updated
|
||||
}
|
||||
@@ -28,16 +24,16 @@ function onCoverChanged(source: 'extracted' | 'custom' | null) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center border-b shrink-0 h-11">
|
||||
<BookDetailTabs :book-id="bookId" />
|
||||
</div>
|
||||
<div class="flex items-stretch border-b shrink-0 h-11 px-3">
|
||||
<BookDetailTabs :book-id="bookId" />
|
||||
</div>
|
||||
|
||||
<main class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6" :class="backgroundClass">
|
||||
<EditMetadataTab v-if="detail" :book="detail" @saved="onMetadataSaved" @cover-changed="onCoverChanged" />
|
||||
<div v-else-if="loading" class="max-w-2xl space-y-4">
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
</div>
|
||||
<main class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6">
|
||||
<EditMetadataTab v-if="detail" :book="detail" @saved="onMetadataSaved" @cover-changed="onCoverChanged" />
|
||||
<div v-else-if="loading" class="max-w-2xl space-y-4">
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
<div class="h-9 rounded-md bg-muted animate-pulse" />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useRoute } from 'vue-router'
|
||||
import BookDetailTabs from '@/features/book/components/detail/BookDetailTabs.vue'
|
||||
import FilesTab from '@/features/book/components/detail/tabs/FilesTab.vue'
|
||||
import { useBookDetail } from '@/features/book/composables/useBookDetail'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
@@ -13,20 +12,17 @@ const bookId = computed(() => Number(route.params.bookId))
|
||||
const { detail, loading, fetch } = useBookDetail()
|
||||
|
||||
watch(bookId, (id) => fetch(id), { immediate: true })
|
||||
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center border-b shrink-0 h-11">
|
||||
<BookDetailTabs :book-id="bookId" />
|
||||
</div>
|
||||
<div class="flex items-stretch border-b shrink-0 h-11 px-3">
|
||||
<BookDetailTabs :book-id="bookId" />
|
||||
</div>
|
||||
|
||||
<main class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6" :class="backgroundClass">
|
||||
<FilesTab v-if="detail" :book="detail" />
|
||||
<div v-else-if="loading" class="space-y-3">
|
||||
<div v-for="i in 3" :key="i" class="h-16 rounded-md bg-muted animate-pulse" />
|
||||
</div>
|
||||
<main class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6">
|
||||
<FilesTab v-if="detail" :book="detail" />
|
||||
<div v-else-if="loading" class="space-y-3">
|
||||
<div v-for="i in 3" :key="i" class="h-16 rounded-md bg-muted animate-pulse" />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -19,13 +19,10 @@ import { useBookSelection } from '@/features/book/composables/useBookSelection'
|
||||
import { useDeleteBook } from '@/features/book/composables/useDeleteBook'
|
||||
import { useBookBulkActions } from '@/features/book/composables/useBookBulkActions'
|
||||
import { useDisplaySettings } from '@/composables/useDisplaySettings'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
import type { BookCard } from '@projectx/types'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
const { coverSize, gridGap, viewMode } = useDisplaySettings()
|
||||
|
||||
const collectionId = computed(() => Number(route.params.id))
|
||||
@@ -191,7 +188,7 @@ watch(
|
||||
</template>
|
||||
</ViewHeader>
|
||||
|
||||
<main class="flex-1 overflow-y-auto px-4 py-4" :class="backgroundClass">
|
||||
<main class="flex-none pr-4 pb-2">
|
||||
<div v-if="!loading && books.length === 0" class="flex flex-col items-center justify-center py-24 gap-3 text-center">
|
||||
<div class="h-16 w-16 rounded-full bg-muted flex items-center justify-center">
|
||||
<FolderOpen :size="28" class="text-muted-foreground/50" />
|
||||
|
||||
@@ -4,19 +4,15 @@ import { Settings2 } from 'lucide-vue-next'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
|
||||
import { useAuth } from '@/features/auth/composables/useAuth'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
import DashboardScroller from '@/features/dashboard/components/DashboardScroller.vue'
|
||||
import DashboardSettingsSheet from '@/features/dashboard/components/DashboardSettingsSheet.vue'
|
||||
import { useDashboardConfig } from '@/features/dashboard/composables/useDashboardConfig'
|
||||
|
||||
const { user } = useAuth()
|
||||
const { scrollers } = useDashboardConfig()
|
||||
const themeStore = useThemeStore()
|
||||
|
||||
const settingsOpen = ref(false)
|
||||
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
|
||||
const enabledScrollers = computed(() => scrollers.value.filter((s) => s.enabled).sort((a, b) => a.order - b.order))
|
||||
|
||||
const greeting = computed(() => {
|
||||
@@ -28,25 +24,28 @@ const greeting = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="flex-1 overflow-y-auto" :class="backgroundClass">
|
||||
<!-- Greeting -->
|
||||
<div class="flex items-center justify-between px-6 pb-4 pt-6">
|
||||
<h1 class="text-xl font-semibold tracking-tight">{{ greeting }}</h1>
|
||||
<Tooltip>
|
||||
<TooltipTrigger as-child>
|
||||
<button
|
||||
class="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||
@click="settingsOpen = true"
|
||||
>
|
||||
<Settings2 :size="16" />
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Customize dashboard</TooltipContent>
|
||||
</Tooltip>
|
||||
<main class="flex-none">
|
||||
<!-- Greeting -->
|
||||
<div class="flex items-center justify-between px-1 h-10 ml-5 pt-4 mr-4 mb-2 sticky top-0 z-20 transition-all duration-300">
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="w-1 h-4 bg-primary/40 rounded-full" />
|
||||
<h1 class="text-[16px] font-bold text-foreground/90 tracking-tight">{{ greeting }}</h1>
|
||||
</div>
|
||||
<Tooltip>
|
||||
<TooltipTrigger as-child>
|
||||
<button
|
||||
class="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||
@click="settingsOpen = true"
|
||||
>
|
||||
<Settings2 :size="15" />
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Customize dashboard</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<!-- Scrollers -->
|
||||
<div class="space-y-5 px-4 pb-8 sm:px-6">
|
||||
<!-- Scrollers -->
|
||||
<div class="space-y-5 px-4 pb-8 pt-2 sm:px-6">
|
||||
<DashboardScroller
|
||||
v-for="scroller in enabledScrollers"
|
||||
:key="`${scroller.id}-${scroller.type}-${scroller.lensId ?? 0}`"
|
||||
|
||||
@@ -24,13 +24,10 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
|
||||
import { useDisplaySettings } from '@/composables/useDisplaySettings'
|
||||
import { useLibraries } from '@/features/library/composables/useLibraries'
|
||||
import { useScanProgress } from '@/features/scanner/composables/useScanProgress'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
import { SORT_FIELD_LABELS } from '@/features/book/lib/filter-labels'
|
||||
import type { GroupRule, SortSpec } from '@projectx/types'
|
||||
|
||||
const route = useRoute()
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
const { coverSize, gridGap, viewMode } = useDisplaySettings()
|
||||
const { libraries } = useLibraries()
|
||||
|
||||
@@ -326,7 +323,7 @@ function handleBookAction(book: BookCard, action: BookActionType) {
|
||||
</template>
|
||||
</ViewHeader>
|
||||
|
||||
<main class="flex-1 overflow-y-auto px-4 py-4" :class="backgroundClass">
|
||||
<main class="flex-none pr-4 pb-2">
|
||||
<div v-if="error" class="text-sm text-destructive mb-4">{{ error }}</div>
|
||||
|
||||
<!-- Filter builder panel -->
|
||||
|
||||
@@ -18,15 +18,12 @@ import { useDisplaySettings } from '@/composables/useDisplaySettings'
|
||||
import { useBookSelection } from '@/features/book/composables/useBookSelection'
|
||||
import { useDeleteBook } from '@/features/book/composables/useDeleteBook'
|
||||
import { useBookBulkActions } from '@/features/book/composables/useBookBulkActions'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
import FilterSummary from '@/features/book/components/FilterSummary.vue'
|
||||
import { SORT_FIELD_LABELS } from '@/features/book/lib/filter-labels'
|
||||
import type { BookCard, GroupRule, SortField } from '@projectx/types'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
const { coverSize, gridGap, viewMode, lensFilterExpanded } = useDisplaySettings()
|
||||
|
||||
const lensId = computed(() => Number(route.params.id))
|
||||
@@ -240,7 +237,7 @@ watch(
|
||||
</template>
|
||||
</ViewHeader>
|
||||
|
||||
<main class="flex-1 overflow-y-auto px-4 py-4" :class="backgroundClass">
|
||||
<main class="flex-none pr-4 pb-2">
|
||||
<!-- Filter summary -->
|
||||
<div
|
||||
v-if="filterExpanded && (lens?.filter || sortChip)"
|
||||
|
||||
@@ -4,7 +4,6 @@ import { PackageOpen, CheckCircle2, AlertCircle } from 'lucide-vue-next'
|
||||
import type { StagingFile } from '@projectx/types'
|
||||
import { api } from '@/lib/api'
|
||||
import { formatBytes } from '@/lib/formatting'
|
||||
import { BACKGROUND_OPTIONS, useThemeStore } from '@/stores/theme'
|
||||
import { useStagingFiles } from '@/features/staging/composables/useStagingFiles'
|
||||
import { useStagingSummary } from '@/features/staging/composables/useStagingSummary'
|
||||
import { useStagingStatistics } from '@/features/staging/composables/useStagingStatistics'
|
||||
@@ -15,9 +14,6 @@ import StagingFileSheet from '@/features/staging/components/StagingFileSheet.vue
|
||||
import StagingFinalizeDialog from '@/features/staging/components/StagingFinalizeDialog.vue'
|
||||
import StagingBulkEditDialog from '@/features/staging/components/StagingBulkEditDialog.vue'
|
||||
|
||||
const themeStore = useThemeStore()
|
||||
const backgroundClass = computed(() => BACKGROUND_OPTIONS.find((b) => b.id === themeStore.background)?.cssClass ?? '')
|
||||
|
||||
const {
|
||||
items,
|
||||
loading,
|
||||
@@ -256,13 +252,12 @@ onUnmounted(() => {
|
||||
|
||||
<template>
|
||||
<main
|
||||
class="flex-1 overflow-y-auto"
|
||||
:class="backgroundClass"
|
||||
@dragover="onDragOver"
|
||||
@dragenter="onDragEnter"
|
||||
@dragleave="onDragLeave"
|
||||
@drop="onDrop"
|
||||
>
|
||||
class="flex-1"
|
||||
@dragover="onDragOver"
|
||||
@dragenter="onDragEnter"
|
||||
@dragleave="onDragLeave"
|
||||
@drop="onDrop"
|
||||
>
|
||||
<div class="flex flex-col gap-4 p-4 sm:p-6 max-w-6xl mx-auto w-full">
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="flex items-center justify-center size-9 rounded-lg bg-primary/10">
|
||||
|
||||
Reference in New Issue
Block a user