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:
Zaldimmar 2026-09-29 02:54:03 -05:00
parent f72a9604d2
commit 048c7599ce
59 changed files with 416 additions and 350 deletions

View file

@ -15,11 +15,12 @@
entrance animation for each choice.
═══════════════════════════════════════════════════════════════ */
import { ArrowRight, ArrowUpRight, BookOpen, CalendarBlank, ChatCircle, Compass, GraduationCap, HandHeart, Heart, House, MapPin, MusicNotes, Sparkle, Star, Tent, UsersThree, type Icon } from '@phosphor-icons/react'
import { useId, useRef, useState, type KeyboardEvent } from 'react'
import HomeLink, { isExternal } from './HomeLink.tsx'
import type { FrontPagePath } from '../../../lib/useFrontPage.ts'
import { withAlpha, accentText } from '../../../lib/color.ts'
import { ACCENTS, withAlpha, accentText, readableOn } from '../../../lib/color.ts'
type PathfinderProps = {
id: string
@ -30,7 +31,34 @@ type PathfinderProps = {
/* One accent per position, cycling. Paths are data; colour is
presentation, so it's assigned here rather than stored. */
const ACCENTS = ['#0f7183', '#0b7a52', '#8a6516', '#7a5ea8', '#b0502c']
/* A path's icon: a key from src/data/pathIcons.ts, drawn from
Phosphor. A path saved before the list existed may hold an emoji;
that shows as it is. Nothing set is a dot. */
const ICONS: Record<string, Icon> = {
heart: Heart,
hands: HandHeart,
people: UsersThree,
calendar: CalendarBlank,
tent: Tent,
map: MapPin,
home: House,
book: BookOpen,
learn: GraduationCap,
chat: ChatCircle,
music: MusicNotes,
compass: Compass,
sparkle: Sparkle,
star: Star,
}
function PathIcon({ value }: { value?: string | null }) {
const Glyph = value ? ICONS[value] : null
if (Glyph) return <Glyph size={26} weight="bold" />
return <>{value || '•'}</>
}
// The site's accent family, in turn (color.ts).
const PATH_ACCENTS = [ACCENTS.teal, ACCENTS.green, ACCENTS.mint, ACCENTS.deep]
export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps) {
const [selected, setSelected] = useState(0)
@ -40,7 +68,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
if (paths.length === 0) return null
const path = paths[Math.min(selected, paths.length - 1)]
const accent = ACCENTS[selected % ACCENTS.length]
const accent = PATH_ACCENTS[selected % PATH_ACCENTS.length]
const focus = (index: number) => {
const next = (index + paths.length) % paths.length
@ -67,10 +95,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
<div className="mx-auto max-w-6xl px-6">
<div className="grid gap-12 lg:grid-cols-12">
<div className="lg:col-span-5">
<p className="text-xs font-bold uppercase tracking-[0.3em] text-link">
I’m looking to…
</p>
<h2 className="mt-3 font-display text-4xl font-extrabold text-ink md:text-5xl">
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
{title}
</h2>
{blurb && <p className="mt-4 text-lg text-muted">{blurb}</p>}
@ -84,7 +109,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
>
{paths.map((option, index) => {
const on = index === selected
const color = ACCENTS[index % ACCENTS.length]
const color = PATH_ACCENTS[index % PATH_ACCENTS.length]
return (
<button
key={`${option.label}-${index}`}
@ -107,10 +132,13 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
>
<span
className="flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl transition-transform duration-300 group-hover:scale-110"
style={{ background: on ? color : `${withAlpha(color, 12)}` }}
style={{
background: on ? color : `${withAlpha(color, 12)}`,
color: on ? readableOn(color) : accentText(color),
}}
aria-hidden="true"
>
{option.icon || '•'}
<PathIcon value={option.icon} />
</span>
<span className="font-display text-xl font-bold" style={{ color: on ? accentText(color) : 'var(--color-ink)' }}>
{option.label}
@ -120,7 +148,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
style={{ color, opacity: on ? 1 : 0 }}
aria-hidden="true"
>
→
<ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</span>
</button>
)
@ -133,15 +161,9 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
id={`${base}-panel`}
role="tabpanel"
aria-labelledby={`${base}-tab-${selected}`}
className="relative overflow-hidden rounded-[2rem] p-8 md:p-10 lg:col-span-7"
className="relative overflow-hidden rounded-3xl p-8 md:p-10 lg:col-span-7"
style={{ background: withAlpha(accent, 5) }}
>
<span
className="pointer-events-none absolute -right-6 -top-10 select-none text-[10rem] leading-none opacity-10"
aria-hidden="true"
>
{path.icon}
</span>
{path.blurb && (
<p className="hp-pop relative max-w-md font-display text-2xl font-semibold leading-snug text-ink">
@ -167,7 +189,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
style={{ color: accentText(accent) }}
aria-hidden="true"
>
{isExternal(action.url) ? '↗' : '→'}
{isExternal(action.url) ? <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /> : <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />}
</span>
</span>
{action.description && (