diff --git a/CLAUDE.md b/CLAUDE.md
index 82d4c0f..790b523 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -66,6 +66,7 @@ In dev, Vite proxies `/api` to the target set in `vite.config.ts`, so the API mu
- **Imports need explicit extensions** (`.ts`, `.tsx`, `.js`) everywhere.
- **Vite resolves `.js` before `.ts`**, so a `.js` and `.ts` file with the same base name will import the wrong one. Give new hooks distinct names.
- **Don't use `fallback: EMPTY` in api.ts hooks.** It silently returns empty arrays and hides server errors; let the error state surface.
+- **Colours are tokens, not hex.** Use the utilities from `src/index.css` (`text-ink`, `text-body`, `text-muted`, `text-link`, `bg-surface`, `bg-tint`, `bg-action`, `border-brand/20`...) so dark mode works; a literal only for something that must look the same in both modes (white on a dark band, a platform's colour). Data colours (accents, event and region colours) go through `withAlpha`, `accentText` and `readableOn` in `src/lib/color.ts`, never `${color}55`.
- **No em-dashes** (U+2014) anywhere: UI text, help text, comments, docs, commit messages. Use a colon, comma or parentheses. An empty table cell shows `-`.
- **Admin editor text:** blank select options read `Default: …` (what blank means), examples in help text start with `eg.`, and record ids are called "URL ID". Cut-off preview text uses `preview()` from `src/lib/text.ts`, which ends it with an ellipsis. See `docs/updating-data-in-code.md`.
diff --git a/docs/updating-data-in-code.md b/docs/updating-data-in-code.md
index 7e99a0e..3593c64 100644
--- a/docs/updating-data-in-code.md
+++ b/docs/updating-data-in-code.md
@@ -274,6 +274,7 @@ The numbers band's "Number Source" dropdown works the same way:
| History page decade headers | `src/data/historyDecades.ts` | Title, tagline and blurb per decade. |
| Chapter map tiles and area names | `src/data/mapGrid.ts` | `AREAS` (tile positions) and `AREA_NAMES`. Which region paints which tile is in the database (Admin → Data → Organizations → a region → Map areas). |
| Feedback form types | `src/data/feedbackTypes.ts` **and** `TYPES` in `server/src/routes/feedback.js` | Keep the ids identical in both; the server stores unknown ids as `general`. Labels and hints are client-only. `DATA_REQUEST` ('privacy') isn't a tile: the Privacy page's form sends it, and the server requires an email for it. |
+| The site's colours, light and dark | `src/index.css` (`@theme` tokens and the dark overrides under them) | Change a token's value in both modes and every use follows. Use the token utilities (`text-muted`, `bg-surface`, `border-brand/20`) or `var(--color-…)`, not hex. A colour that arrives as data (a page accent, an event's or region's colour) goes through `src/lib/color.ts`: `withAlpha` for tints, `accentText` for text in it, `readableOn` for text on it. |
| Privacy Policy and Terms wording | `src/pages/Privacy.tsx`, `src/pages/Terms.tsx` | The `PARTS` list, and `LAST_UPDATED` whenever the wording changes. The Privacy page must stay true of the code: what the feedback form stores, what the browser keeps, which embeds wait for a click. |
| Event type labels and plurals (public site) | `src/lib/eventTypes.ts` | Also the order of the type filter chips. |
| Event and person role labels (public site) | `ROLE_LABEL` in `src/pages/EventDetail.tsx` and `src/pages/PersonDetail.tsx` | |
diff --git a/index.html b/index.html
index d51965e..c10f0c2 100644
--- a/index.html
+++ b/index.html
@@ -5,6 +5,15 @@
+
+
diff --git a/server/src/admin-schema.js b/server/src/admin-schema.js
index 72935f7..b25e2aa 100644
--- a/server/src/admin-schema.js
+++ b/server/src/admin-schema.js
@@ -378,7 +378,6 @@ const events = {
text("org_logo"),
text("event_logo"),
text("color"),
- text("gradient"),
text("card_image"),
bool("is_published"),
bool("is_listed"),
diff --git a/server/src/migrations/040_drop_event_gradient.sql b/server/src/migrations/040_drop_event_gradient.sql
new file mode 100644
index 0000000..3282ab1
--- /dev/null
+++ b/server/src/migrations/040_drop_event_gradient.sql
@@ -0,0 +1,12 @@
+-- ═══════════════════════════════════════════════════════════════
+-- 040 NO MORE CARD GRADIENTS
+--
+-- An event card is its photo (card_image) under a light veil, or a
+-- plain card, always with the event's colour as its border. The
+-- gradient layer went over the photo and hid it, and gradients are
+-- leaving the design, so the column goes. Any gradient saved on an
+-- event is dropped with it; the card falls back to its photo or the
+-- plain surface.
+-- ═══════════════════════════════════════════════════════════════
+
+ALTER TABLE events DROP COLUMN gradient;
diff --git a/server/src/routes/content.js b/server/src/routes/content.js
index a8dd3f6..e232246 100644
--- a/server/src/routes/content.js
+++ b/server/src/routes/content.js
@@ -147,7 +147,6 @@ function shapeEvent(row, links, cardBlocks, hosts = []) {
org_logo: row.effective_org_logo,
event_logo: row.event_logo,
color: row.effective_color,
- gradient: row.gradient,
card_image: row.card_image,
hosts: hosts.map(shapeHost),
diff --git a/server/src/seed-showcase.js b/server/src/seed-showcase.js
index 41bcb3b..c592ed9 100644
--- a/server/src/seed-showcase.js
+++ b/server/src/seed-showcase.js
@@ -352,7 +352,6 @@ tx(db, () => {
org_logo: IMAGE,
event_logo: IMAGE,
color: "#d62976",
- gradient: "linear-gradient(160deg, rgba(214,41,118,0.10), rgba(19,139,160,0.10))",
card_image: IMAGE,
is_published: 1,
is_listed: LISTED,
diff --git a/src/components/ContentBlocks.tsx b/src/components/ContentBlocks.tsx
index 30d3199..71d80c8 100644
--- a/src/components/ContentBlocks.tsx
+++ b/src/components/ContentBlocks.tsx
@@ -38,8 +38,9 @@ import type { ContentBlock } from '../lib/useContent.ts'
import { Anchor, Inline, Paragraphs } from './InlineText.tsx'
import VideoPlayer from './VideoPlayer.tsx'
import ScheduleBlock from './ScheduleBlock.tsx'
+import { accentText } from '../lib/color.ts'
-const BODY = '#4a6b72'
+const BODY = 'var(--color-muted)'
export default function ContentBlocks({
blocks,
@@ -76,14 +77,14 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
switch (block.type) {
case 'heading':
return (
-
{href ? (
// Stretched over the whole card, so the picture and the
// blurb are part of the click without nesting links.
@@ -96,12 +96,12 @@ function Card({ card }: { card: FeaturedCard }) {
)}
)}
- {card.blurb &&
{card.blurb}
}
+ {card.blurb &&
{card.blurb}
}
)
return (
-
+
{card.kind === 'video' ? (
// Above the stretched link, which a video card doesn't have
// anyway, so the play button always gets the click.
diff --git a/src/components/InlineText.tsx b/src/components/InlineText.tsx
index 380d987..381abf7 100644
--- a/src/components/InlineText.tsx
+++ b/src/components/InlineText.tsx
@@ -20,6 +20,7 @@
import { Fragment, type CSSProperties, type ReactNode } from 'react'
import { Link } from 'react-router-dom'
+import { accentText } from '../lib/color.ts'
const TOKEN = /\*\*(.+?)\*\*|\*(.+?)\*|\[([^\]]+)\]\(([^)\s]+)\)/g
const SAFE_URL = /^(\/(?!\/)|#|https?:\/\/|mailto:|tel:)/i
@@ -88,7 +89,7 @@ function line(text: string, accent: string, key: string): ReactNode[] {
else if (italic != null) out.push({italic})
else if (label != null && SAFE_URL.test(url)) {
out.push(
-
+
{label}
,
)
diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx
index 1198c82..1f57631 100644
--- a/src/components/Layout.tsx
+++ b/src/components/Layout.tsx
@@ -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() {
Skip to content
@@ -207,6 +208,8 @@ export default function Layout() {
))}