Add colour tokens, dark mode and drop gradients

- Colour tokens in index.css named by role (ink, body, muted, link,
  brand, action, surface, tint, danger), used everywhere instead of hex
- Dark mode: follows the system, a header toggle (site and admin)
  overrides it and is remembered; set before first paint in index.html
- Data colours go through src/lib/color.ts: withAlpha for tints,
  accentText (lighter on dark) for text in an accent, readableOn for
  text on one, so an admin's pale colour still reads
- Migration 040 drops events.gradient: a card is its photo or plain,
  with its colour as the border; other decorative gradients are solid
- The countdown and a hero event without a photo mix their colour
  toward ink behind white text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-28 22:42:59 -05:00
parent ee61568911
commit c74ad746f5
70 changed files with 829 additions and 596 deletions

View file

@ -5,6 +5,7 @@ import Banner from "./Banner.tsx";
import nguLogo from "../assets/logos/NGU_Logo.svg";
import Footer from "./Footer.tsx";
import PrivacyNotice from "./PrivacyNotice.tsx";
import ThemeToggle from "./ThemeToggle.tsx";
/* ── Right-side nav actions ──────────────────────────────── */
@ -154,7 +155,7 @@ export default function Layout() {
<div className="min-h-screen overflow-x-hidden">
<a
href="#main"
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:rounded-full focus:bg-white focus:px-4 focus:py-2 focus:font-semibold focus:text-[#073d4a]"
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:rounded-full focus:bg-surface focus:px-4 focus:py-2 focus:font-semibold focus:text-ink"
>
Skip to content
</a>
@ -207,6 +208,8 @@ export default function Layout() {
))}
</div>
<ThemeToggle className="text-white/80 hover:bg-white/10 hover:text-white" />
<button
className="md:hidden text-white p-2"
aria-label="Open menu"