- 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>
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
/* ═══════════════════════════════════════════════════════════════
|
|
LEGAL TEXT
|
|
|
|
The Privacy and Terms pages: a list of headed parts, each a few
|
|
paragraphs or a bullet list, in a readable column. The words live
|
|
in the page files; this only lays them out the same way.
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
import type { ReactNode } from 'react'
|
|
|
|
export type LegalPart = {
|
|
/** Anchor for linking to one part, eg. 'cookies'. */
|
|
id: string
|
|
heading: string
|
|
body: ReactNode[]
|
|
list?: ReactNode[]
|
|
/** After the list. */
|
|
after?: ReactNode[]
|
|
}
|
|
|
|
export default function LegalText({ parts }: { parts: LegalPart[] }) {
|
|
return (
|
|
<div className="mx-auto max-w-3xl space-y-10 px-6 leading-relaxed text-body">
|
|
{parts.map((part) => (
|
|
<section key={part.id} id={part.id} style={{ scrollMarginTop: '6rem' }}>
|
|
<h3 className="text-xl font-bold text-ink">{part.heading}</h3>
|
|
<div className="mt-3 space-y-3">
|
|
{part.body.map((paragraph, i) => (
|
|
<p key={i}>{paragraph}</p>
|
|
))}
|
|
{part.list && (
|
|
<ul className="list-disc space-y-2 pl-6">
|
|
{part.list.map((item, i) => (
|
|
<li key={i}>{item}</li>
|
|
))}
|
|
</ul>
|
|
)}
|
|
{part.after?.map((paragraph, i) => (
|
|
<p key={i}>{paragraph}</p>
|
|
))}
|
|
</div>
|
|
</section>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|