Fix dark mode and bring the public design in line with the taste audit
- Dark mode: the countdown card, timeline section, Giving text, error text, the Leadership button, skeletons and the admin's dark text all follow the tokens; logos get a light plate in dark mode - One BRAND accent (the button token, so the admin palette reaches every page) and one ACCENTS family in color.ts, replacing 20 local teal constants and the purple, ochre and rust section colours; neon green and gold become mint and brand green - Shadows are tinted with the site's ink; glow shadows are gone - One giving label, Give, in the nav, footer and Giving page - Phosphor icons replace the hand-drawn SVGs and the glyph icons; Pathfinder paths pick a named icon (emoji still shown) and lose the watermark - Home keeps two eyebrows; StatsBand's title is a real heading; section headings step down under the page title - Nav links switch to the menu below lg, so they never wrap; jump links land clear of the header; press feedback on buttons - Empty sections say what's coming and who to ask; loading is a skeleton; form placeholders and borders are readable; one corner-radius rule; theme-color for both modes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f72a9604d2
commit
048c7599ce
59 changed files with 416 additions and 350 deletions
|
|
@ -19,6 +19,7 @@
|
|||
Nothing featured, and the section doesn't render at all.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { ArrowRight, CaretRight, CaretLeft } from '@phosphor-icons/react';
|
||||
import { useRef, useState, type PointerEvent as ReactPointerEvent } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
|
|
@ -26,10 +27,9 @@ import HomeLink from './HomeLink.tsx'
|
|||
import { useHistory } from '../../../lib/useHistory.ts'
|
||||
import { hrefFor, logoSrc } from '../../../lib/timelineRefs.ts'
|
||||
import { MONTH_LABELS, type TimelineItem } from '../../../lib/timeline.ts'
|
||||
import { accentText } from '../../../lib/color.ts'
|
||||
import { accentText, BRAND } from '../../../lib/color.ts'
|
||||
import { scrollBehavior } from '../../../lib/motion.ts';
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const DRAG_SLOP = 6
|
||||
|
||||
type RailProps = { id: string; title: string; blurb?: string | null }
|
||||
|
|
@ -76,7 +76,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
}
|
||||
|
||||
return (
|
||||
<section id={id} className="overflow-hidden py-24" style={{ background: '#f4faf7' }}>
|
||||
<section id={id} className="overflow-hidden py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||
<div className="mx-auto flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
||||
<div>
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
|
|
@ -88,16 +88,16 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
{featured.length > 1 && (
|
||||
<div className="ml-auto flex gap-2">
|
||||
{[
|
||||
[-1, '‹', 'Earlier'],
|
||||
[1, '›', 'Later'],
|
||||
[-1, <CaretLeft size={22} weight="bold" aria-hidden="true" />, 'Earlier'],
|
||||
[1, <CaretRight size={22} weight="bold" aria-hidden="true" />, 'Later'],
|
||||
].map(([direction, glyph, label]) => (
|
||||
<button
|
||||
key={label}
|
||||
key={label as string}
|
||||
type="button"
|
||||
onClick={() => step(direction as number)}
|
||||
aria-label={label as string}
|
||||
className="flex h-12 w-12 items-center justify-center rounded-full border text-2xl transition-colors hover:bg-surface"
|
||||
style={{ borderColor: TEAL, color: accentText(TEAL) }}
|
||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||
>
|
||||
{glyph}
|
||||
</button>
|
||||
|
|
@ -116,7 +116,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
) : loading ? (
|
||||
<div className="mx-auto mt-12 flex max-w-6xl gap-6 px-6" aria-hidden="true">
|
||||
{[0, 1, 2].map((i) => (
|
||||
<div key={i} className="h-72 w-80 shrink-0 animate-pulse rounded-3xl bg-surface" />
|
||||
<div key={i} className="h-72 w-80 shrink-0 animate-pulse rounded-3xl bg-tint" />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
|
|
@ -156,11 +156,11 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
to="/history"
|
||||
draggable={false}
|
||||
className="flex flex-1 flex-col justify-center rounded-3xl p-8 text-white transition-transform duration-300 hover:-translate-y-1"
|
||||
style={{ background: TEAL }}
|
||||
style={{ background: BRAND }}
|
||||
>
|
||||
<span className="font-display text-2xl font-extrabold">The whole story</span>
|
||||
<span className="mt-2 text-white/75">Every year, every milestone.</span>
|
||||
<span className="mt-6 font-semibold">See the full history →</span>
|
||||
<span className="mt-6 font-semibold">See the full history <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /></span>
|
||||
</Link>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -194,10 +194,10 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
alt=""
|
||||
loading="lazy"
|
||||
draggable={false}
|
||||
className="mb-5 h-14 w-14 object-contain"
|
||||
className="logo-plate mb-5 h-14 w-14 object-contain"
|
||||
/>
|
||||
)}
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accentText(TEAL) }}>
|
||||
<p className="text-sm font-semibold" style={{ color: accentText(BRAND) }}>
|
||||
{dateLabel(item)}
|
||||
</p>
|
||||
<p className="mt-2 font-display text-xl font-bold leading-snug text-ink">
|
||||
|
|
@ -208,8 +208,8 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
<p className="mt-3 line-clamp-4 text-sm leading-relaxed text-muted">{item.blurb}</p>
|
||||
)}
|
||||
{href && (
|
||||
<span className="mt-auto pt-5 text-sm font-semibold" style={{ color: accentText(TEAL) }}>
|
||||
Read more →
|
||||
<span className="mt-auto pt-5 text-sm font-semibold" style={{ color: accentText(BRAND) }}>
|
||||
Read more <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
|
|
@ -225,12 +225,12 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-brand/30" />
|
||||
<span
|
||||
className="absolute left-0 top-1/2 h-3 w-3 -translate-y-1/2 rounded-full border-2 bg-surface"
|
||||
style={{ borderColor: TEAL }}
|
||||
style={{ borderColor: BRAND }}
|
||||
/>
|
||||
{showYear && (
|
||||
<span
|
||||
className="absolute left-5 top-1/2 -translate-y-1/2 rounded-full px-3 py-0.5 font-display text-sm font-bold text-white"
|
||||
style={{ background: TEAL }}
|
||||
style={{ background: BRAND }}
|
||||
>
|
||||
{year(item)}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue