From 52d7a5e3e24a9a118378cc16e3ab7d093e4b85c8 Mon Sep 17 00:00:00 2001 From: agent Date: Tue, 6 Oct 2026 10:35:15 +0000 Subject: [PATCH] Admin shell: standalone login/preview, fixed admin theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /login and /preview no longer render the admin navbar (the login page showed Pages/Export/Logout to signed-out users; the page preview iframe showed the whole admin shell above the draft). - Site colours from Globals were written onto --color-primary/--color-accent of the admin document, which are DaisyUI's theme variables — so the brand colour restyled every admin button (low-contrast white-on-sage) and flashed after hydration. Apply them only inside /preview; give the admin its own sage primary at ~5:1 contrast. - Login page redesigned with DaisyUI 5 markup (full-width inputs, labels above), autocomplete hints, pending state. - Navbar: active-route highlight, consistent button sizes, wraps instead of overflowing on narrow screens. - Import: confirm before overwriting, show per-item errors instead of auto-reloading them away, friendly message for invalid JSON. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv --- app-admin/src/app.css | 11 ++ app-admin/src/routes/+layout.svelte | 148 +++++++++++++--------- app-admin/src/routes/login/+page.svelte | 64 ++++++---- app-admin/src/routes/preview/+page.svelte | 71 +++++++---- 4 files changed, 181 insertions(+), 113 deletions(-) diff --git a/app-admin/src/app.css b/app-admin/src/app.css index 84c1665..74c593c 100644 --- a/app-admin/src/app.css +++ b/app-admin/src/app.css @@ -4,6 +4,17 @@ themes: light --default; } +/* Admin UI theme: DaisyUI light with a fixed sage primary. Deliberately NOT + tied to the site's Globals → Colors (those only apply inside /preview), so + a light brand colour can't make admin buttons unreadable. #647556 on white + text is ~5:1 contrast (WCAG AA). */ +@plugin 'daisyui/theme' { + name: 'light'; + default: true; + --color-primary: #647556; + --color-primary-content: #ffffff; +} + @theme { --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif; --font-serif: 'Playfair Display', Georgia, serif; diff --git a/app-admin/src/routes/+layout.svelte b/app-admin/src/routes/+layout.svelte index 93aa833..877bbf8 100644 --- a/app-admin/src/routes/+layout.svelte +++ b/app-admin/src/routes/+layout.svelte @@ -1,13 +1,29 @@ @@ -80,48 +97,55 @@ -
-