- Accessibility panel: the switch knob stays in its track; the panel follows its button in the Tab order and opens on its first switch. - Reading mode is the page as plain text: one column, no colors, pictures, cards or motion; descriptions stay in place. - Color blind mode (protanopia, deuteranopia, tritanopia, monochrome): palette swaps chosen by simulation, applied to code, data and CSS colors on public pages only. The newsletter uses the stored palette. - Audit fixes: focus not hidden by the header, focus on page change and in-page jumps, focus return for the menu, day list and people details, labelled admin fields and dialogs, keyboard map tiles, scrollable tables, and more. - Calendar asks /events for its six weeks only (?from=&to=); carousels take their 12 most recent past events (?past=12). 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}>
|
|
<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>
|
|
)
|
|
}
|