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
|
|
@ -18,9 +18,10 @@ import ContentBlocks from '../components/ContentBlocks.tsx'
|
|||
import PeopleTiles from '../components/PeopleTiles.tsx'
|
||||
import { blogImage, personPhoto } from '../lib/media.ts'
|
||||
import { postDate, useBlogPost } from '../lib/useBlog.ts'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const ACCENT = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
/* Where "back" goes: the section on the Community page. */
|
||||
const BACK = { to: '/community#blog', label: 'Community Blog' }
|
||||
|
|
@ -66,7 +67,7 @@ export default function BlogPost() {
|
|||
id: 'post',
|
||||
title: 'Post',
|
||||
accent: ACCENT,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<article className="mx-auto max-w-3xl space-y-8 px-6">
|
||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm" style={{ color: BODY }}>
|
||||
|
|
@ -76,12 +77,12 @@ export default function BlogPost() {
|
|||
<span
|
||||
key={tag}
|
||||
className="rounded-full px-3 py-0.5 text-xs font-semibold"
|
||||
style={{ background: '#eef9fb', color: ACCENT }}
|
||||
style={{ background: 'var(--color-tint)', color: accentText(ACCENT) }}
|
||||
>
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
<Link to={BACK.to} className="ml-auto hover:underline" style={{ color: ACCENT }}>
|
||||
<Link to={BACK.to} className="ml-auto hover:underline" style={{ color: accentText(ACCENT) }}>
|
||||
{BACK.label}
|
||||
</Link>
|
||||
</div>
|
||||
|
|
@ -101,7 +102,7 @@ export default function BlogPost() {
|
|||
id: 'authors',
|
||||
title: authors.length === 1 ? 'About the author' : 'About the authors',
|
||||
accent: ACCENT,
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<PeopleTiles size="md" accent={ACCENT} people={authors} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue