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:
parent
ee61568911
commit
c74ad746f5
70 changed files with 829 additions and 596 deletions
|
|
@ -7,6 +7,7 @@ import {
|
|||
useOrganizations,
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: CARDS
|
||||
|
|
@ -23,8 +24,8 @@ import {
|
|||
array, only the short card description.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* Wide enough for a logo beside two lines of text, narrow enough
|
||||
|
|
@ -70,7 +71,7 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
|||
return (
|
||||
<div
|
||||
className="rounded-2xl p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
|
||||
style={{ border: `1px solid ${color}`, background: "#ffffff" }}
|
||||
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
|
||||
>
|
||||
<div className="flex items-start gap-4">
|
||||
<OrgMark org={org} color={color} />
|
||||
|
|
@ -195,7 +196,7 @@ export default function OrgListCards({
|
|||
|
||||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
@ -203,7 +204,7 @@ export default function OrgListCards({
|
|||
|
||||
if (organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{empty}
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue