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
|
|
@ -23,9 +23,10 @@ import PageState from '../components/PageState.tsx'
|
|||
import { useAward, type Recipient } from '../lib/useContent.ts'
|
||||
import { eventHref, orgHref, personHref } from '../lib/hrefs.ts'
|
||||
import { awardLogo, initials, personPhoto } from '../lib/media.ts'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
export default function AwardDetail() {
|
||||
const { id } = useParams()
|
||||
|
|
@ -61,7 +62,7 @@ export default function AwardDetail() {
|
|||
? 'Nobody has received this yet.'
|
||||
: undefined,
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||
<div className="flex flex-wrap items-center gap-x-6 gap-y-3 text-sm">
|
||||
|
|
@ -75,7 +76,7 @@ export default function AwardDetail() {
|
|||
<Link
|
||||
to={orgHref(award.org.id, award.org.kind)}
|
||||
className="font-medium hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{award.org.name}
|
||||
</Link>
|
||||
|
|
@ -131,7 +132,7 @@ function RecipientRow({ recipient, accent }: { recipient: Recipient; accent: str
|
|||
<Link
|
||||
to={personHref(recipient.id)}
|
||||
className="hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{recipient.name}
|
||||
</Link>
|
||||
|
|
@ -150,7 +151,7 @@ function RecipientRow({ recipient, accent }: { recipient: Recipient; accent: str
|
|||
<Link
|
||||
to={eventHref(recipient.event.id)}
|
||||
className="hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{recipient.event.title}
|
||||
</Link>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue