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

@ -1,3 +1,4 @@
import { ArrowRight } from "@phosphor-icons/react";
import { Link } from "react-router-dom";
/* ═══════════════════════════════════════════════════════════════
@ -13,18 +14,7 @@ export default function ArrowLink({ to, label, color, size = "h-9 w-9" }) {
className={`${size} shrink-0 rounded-full flex items-center justify-center transition-transform duration-200 hover:scale-110`}
style={{ border: `1px solid ${color}`, color }}
>
<svg
viewBox="0 0 24 24"
className="h-4 w-4"
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<path d="M5 12h14M13 6l6 6-6 6" />
</svg>
<ArrowRight className="h-4 w-4" weight="bold" aria-hidden="true" />
</Link>
);
}

View file

@ -1,3 +1,4 @@
import { X } from "@phosphor-icons/react";
import { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { SITE_BANNER } from "../data/bannerConfig.ts";
@ -54,9 +55,7 @@ export default function Banner() {
aria-label="Dismiss announcement"
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 rounded-md text-white/50 hover:text-white hover:bg-white/10 transition-colors"
>
<svg className="w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
<path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" />
</svg>
<X className="w-4 h-4" weight="bold" aria-hidden="true" />
</button>
)}
</div>

View file

@ -0,0 +1,24 @@
/* ═══════════════════════════════════════════════════════════════
COMING SOON
What a page section shows before it has content, instead of a
heading over nothing: that it's being put together, and where to
ask in the meantime. Swap it for the real content when there is
some.
═══════════════════════════════════════════════════════════════ */
const CONTACT = 'info@nextgenerationofunity.org'
export default function ComingSoon({ what }: { what: string }) {
return (
<div className="mx-auto max-w-6xl px-6">
<p className="max-w-xl rounded-2xl border border-dashed border-brand/30 bg-surface/60 p-6 text-body">
We’re putting {what} together. In the meantime, ask us at{' '}
<a href={`mailto:${CONTACT}`} className="font-semibold text-link underline underline-offset-2">
{CONTACT}
</a>
.
</p>
</div>
)
}

View file

@ -38,13 +38,13 @@ import type { ContentBlock } from '../lib/useContent.ts'
import { Anchor, Inline, Paragraphs } from './InlineText.tsx'
import VideoPlayer from './VideoPlayer.tsx'
import ScheduleBlock from './ScheduleBlock.tsx'
import { accentText } from '../lib/color.ts'
import { accentText, BRAND } from '../lib/color.ts'
const BODY = 'var(--color-muted)'
export default function ContentBlocks({
blocks,
accent = '#0f7183',
accent = BRAND,
className = '',
}: {
blocks?: ContentBlock[] | null

View file

@ -60,7 +60,7 @@ function Picture({ card }: { card: FeaturedCard }) {
alt=""
loading="lazy"
onError={img.onError}
className="max-h-full max-w-full object-contain"
className="logo-plate max-h-full max-w-full object-contain"
/>
</div>
)
@ -77,7 +77,7 @@ function Card({ card }: { card: FeaturedCard }) {
const text = (
<div className="flex flex-1 flex-col p-6">
{card.eyebrow && (
<p className="text-xs font-bold uppercase tracking-[0.2em] text-link">{card.eyebrow}</p>
<p className="text-sm font-semibold text-link">{card.eyebrow}</p>
)}
{card.title && (
<h3 className="mt-2 font-display text-xl font-extrabold leading-snug text-ink">
@ -117,7 +117,7 @@ function Card({ card }: { card: FeaturedCard }) {
export default function FeaturedCards({ cards }: { cards: FeaturedCard[] }) {
return (
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3 lg:[&>li:first-child]:col-span-2">
{cards.map((card, index) => (
<Card key={`${card.kind}-${card.ref?.id ?? card.url}-${index}`} card={card} />
))}

View file

@ -111,9 +111,9 @@ export default function Footer() {
target="_blank"
rel="noopener noreferrer"
className="inline-block mt-8 px-6 py-2.5 rounded-full text-sm font-bold text-white whitespace-nowrap transition-all duration-200 hover:scale-105"
style={{ background: "#0f7183" }}
style={{ background: "var(--color-action)" }}
>
Support Us
{giveAction.label}
</a>
)}
</div>

View file

@ -1,3 +1,4 @@
import { X, List } from "@phosphor-icons/react";
import { Suspense, useState, useEffect, useRef } from "react";
import { NavLink, Link, Outlet, useLocation } from "react-router-dom";
import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts";
@ -28,7 +29,7 @@ const ACTION_VARIANTS: Record<
},
fancy: {
className: "font-bold text-white hover:scale-105",
style: { background: "#0f7183" },
style: { background: "var(--color-action)" },
},
};
@ -47,7 +48,7 @@ function NavAction({
onClick?: () => void;
}) {
const v = ACTION_VARIANTS[item.variant] ?? ACTION_VARIANTS.ghost;
const className = `inline-block whitespace-nowrap rounded-full transition-all duration-200 ${ACTION_SIZES[size]} ${v.className}`;
const className = `inline-block whitespace-nowrap rounded-full transition-all duration-200 active:scale-[0.98] ${ACTION_SIZES[size]} ${v.className}`;
return item.external ? (
<a
@ -74,7 +75,11 @@ const navActions = NAV_ACTIONS as NavActionItem[];
export default function Layout() {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const [activeSection, setActiveSection] = useState<string | null>(null);
const [headerHeight, setHeaderHeight] = useState(72);
// Measured below; this first guess (nav, plus the section strip on
// pages that have one) keeps the content from jumping when it lands.
const [headerHeight, setHeaderHeight] = useState(() =>
72 + ((PAGE_SECTIONS[window.location.pathname] ?? []).length ? 36 : 0),
);
const headerRef = useRef<HTMLElement>(null);
const closeMenuRef = useRef<HTMLButtonElement>(null);
const location = useLocation();
@ -153,7 +158,10 @@ export default function Layout() {
}, [location.pathname, headerHeight]);
return (
<div className="min-h-screen overflow-x-hidden">
<div
className="min-h-screen overflow-x-hidden"
style={{ "--header-h": `${headerHeight}px` } as React.CSSProperties}
>
<a
href="#main"
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:rounded-full focus:bg-surface focus:px-4 focus:py-2 focus:font-semibold focus:text-ink"
@ -182,7 +190,7 @@ export default function Layout() {
<img src={nguLogo} alt="Next Generation of Unity" className="h-10 w-auto" />
</Link>
<div className="hidden md:flex items-center gap-6">
<div className="hidden lg:flex items-center gap-6">
{PAGE_LINKS.map((page) => (
<NavLink
key={page.path}
@ -203,7 +211,7 @@ export default function Layout() {
</div>
<div className="flex items-center gap-4">
<div className="hidden md:flex items-center gap-3">
<div className="hidden lg:flex items-center gap-3">
{navActions.map((item) => (
<NavAction key={item.label} item={item} />
))}
@ -212,14 +220,12 @@ export default function Layout() {
<ThemeToggle className="text-white/80 hover:bg-white/10 hover:text-white" />
<button
className="md:hidden text-white p-2"
className="lg:hidden text-white p-2"
aria-label="Open menu"
aria-expanded={mobileMenuOpen}
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
>
<div className="w-6 h-0.5 bg-white mb-1.5 transition-all" />
<div className="w-6 h-0.5 bg-white mb-1.5" />
<div className="w-6 h-0.5 bg-white" />
<List size={26} weight="bold" aria-hidden="true" />
</button>
</div>
</nav>
@ -294,7 +300,7 @@ export default function Layout() {
aria-label="Close menu"
onClick={() => setMobileMenuOpen(false)}
>
×
<X size={28} weight="bold" aria-hidden="true" />
</button>
<div className="w-64">
@ -309,7 +315,7 @@ export default function Layout() {
end={page.path === "/"}
className={({ isActive }) =>
`block text-2xl font-bold py-3 transition-colors ${
isActive ? "text-[#aac992]" : "text-white hover:text-[#10d48a]"
isActive ? "text-[#aac992]" : "text-white hover:text-[#9fe7d0]"
}`
}
>
@ -326,7 +332,7 @@ export default function Layout() {
<a
key={section.hash}
href={section.hash}
className="text-white/80 text-lg py-2 hover:text-[#10d48a] transition-colors"
className="text-white/80 text-lg py-2 hover:text-[#9fe7d0] transition-colors"
onClick={() => setMobileMenuOpen(false)}
>
{section.label}

View file

@ -25,5 +25,6 @@ export default function Logo({
}) {
const img = useSmallImage(src)
if (img.failed) return <>{fallback}</>
return <img src={img.src} alt={alt} loading="lazy" className={className} onError={img.onError} />
// logo-plate: a light backing in dark mode, for marks drawn for white.
return <img src={img.src} alt={alt} loading="lazy" className={`logo-plate ${className ?? ""}`} onError={img.onError} />
}

View file

@ -20,7 +20,7 @@
title: "Local Chapters",
blurb: "Optional line under the section heading.",
accent: "#0f7183", // heading, banner, rule
accent: BRAND, // heading, banner, rule
background: "var(--color-tint)",
actions: <SomeButton />, // optional, right of the heading
content: <YourStuff />,
@ -32,9 +32,8 @@
import { useEffect, type ReactNode } from "react";
import { documentTitle } from "../lib/site.ts";
import { accentText } from '../lib/color.ts'
import { accentText, BRAND } from '../lib/color.ts'
const TEAL = "#0f7183";
export type ShellSection = {
id: string;
@ -70,20 +69,21 @@ export function Section({ section }: { section: ShellSection }) {
<section
id={id}
className="py-20"
style={{ background, scrollMarginTop: "5rem" }}
// Clear of the fixed header, whatever it holds today (Layout
// sets --header-h from its measured height).
style={{ background, scrollMarginTop: "calc(var(--header-h, 5rem) + 1rem)" }}
>
{/* Heading, left aligned, optional actions on the right */}
<div className="max-w-6xl mx-auto px-6 mb-10">
<div className="flex flex-wrap items-end justify-between gap-4">
<div>
<h2 className="text-4xl md:text-5xl font-extrabold" style={{ color: accentText(accent) }}>
<h2 className="text-3xl md:text-4xl font-extrabold" style={{ color: accentText(accent) }}>
{title}
</h2>
{blurb && <p className="mt-2 text-muted max-w-xl">{blurb}</p>}
</div>
{actions}
</div>
<div className="mt-6 h-px w-full" style={{ background: accent, opacity: 0.35 }} />
</div>
{content}
@ -104,7 +104,7 @@ export default function PageShell({ title, intro, sections }: PageShellProps) {
{/* Page header */}
<div className="pt-24 pb-12 px-6" style={{ background: "var(--color-tint)" }}>
<div className="max-w-6xl mx-auto">
<h1 className="text-5xl md:text-6xl font-extrabold" style={{ color: accentText(TEAL) }}>
<h1 className="text-5xl md:text-6xl font-extrabold" style={{ color: accentText(BRAND) }}>
{title}
</h1>
{intro && <p className="mt-3 text-lg text-muted max-w-2xl">{intro}</p>}

View file

@ -16,9 +16,8 @@
import { Link } from 'react-router-dom'
import PageShell from './PageShell.tsx'
import { accentText } from '../lib/color.ts'
import { accentText, BRAND } from '../lib/color.ts'
const TEAL = '#0f7183'
const BODY = 'var(--color-muted)'
export default function PageState({
@ -53,7 +52,7 @@ export default function PageState({
<Link
to={backTo}
className="mt-4 inline-block rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
style={{ borderColor: TEAL, color: accentText(TEAL) }}
style={{ borderColor: BRAND, color: accentText(BRAND) }}
>
{backLabel}
</Link>
@ -63,12 +62,12 @@ export default function PageState({
title = 'Something went wrong'
content = (
<div className="max-w-6xl mx-auto px-6">
<p style={{ color: '#b3261e' }}>Couldn’t load this {noun}. {error}</p>
<p className="text-danger">Couldn’t load this {noun}. {error}</p>
<button
type="button"
onClick={onRetry}
className="mt-3 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
style={{ borderColor: TEAL, color: accentText(TEAL) }}
style={{ borderColor: BRAND, color: accentText(BRAND) }}
>
Try again
</button>
@ -77,16 +76,22 @@ export default function PageState({
} else {
title = 'Loading…'
content = (
<p className="max-w-6xl mx-auto px-6" style={{ color: BODY }} role="status">
Loading this {noun}…
</p>
<div className="max-w-6xl mx-auto px-6" role="status">
<span className="sr-only">Loading this {noun}…</span>
<div aria-hidden="true" className="space-y-4">
<div className="skeleton !min-h-0 h-8 w-2/3 !rounded-xl" />
<div className="skeleton !min-h-0 h-4 w-full !rounded-lg" />
<div className="skeleton !min-h-0 h-4 w-5/6 !rounded-lg" />
<div className="skeleton !min-h-0 mt-8 aspect-video w-full max-w-3xl" />
</div>
</div>
)
}
return (
<PageShell
title={title}
sections={[{ id: 'status', title: '', accent: TEAL, background: 'var(--color-surface)', content }]}
sections={[{ id: 'status', title: '', accent: BRAND, background: 'var(--color-surface)', content }]}
/>
)
}

View file

@ -15,7 +15,7 @@
/* color */
--pl-accent: #0f7183;
--pl-frame-bg: var(--color-surface);
--pl-frame-edge: rgba(15, 23, 42, 0.1);
--pl-frame-edge: color-mix(in srgb, var(--color-muted) 20%, transparent);
--pl-photo-bg: color-mix(in srgb, var(--color-muted) 15%, var(--color-surface));
--pl-ink: var(--color-ink);
--pl-muted: var(--color-muted);

View file

@ -1,3 +1,4 @@
import { ArrowRight, CaretDown, X } from "@phosphor-icons/react";
import {
useEffect,
useId,
@ -643,7 +644,7 @@ function DetailPanel({
</div>
<button type="button" className="pl__close" onClick={onClose}>
<span className="pl__sr">Close details</span>
<span aria-hidden="true">×</span>
<X size={18} weight="bold" aria-hidden="true" />
</button>
</div>
@ -692,7 +693,7 @@ function DetailPanel({
{profile && (
<Link to={profile} className="pl__profile">
View full profile →
View full profile <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</Link>
)}
</div>
@ -701,16 +702,7 @@ function DetailPanel({
function Chevron() {
return (
<svg viewBox="0 0 16 16" width="12" height="12" focusable="false">
<path
d="M4 6.5 8 10.5 12 6.5"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<CaretDown size={12} weight="bold" aria-hidden="true" />
);
}

View file

@ -10,6 +10,7 @@
index.css.
═══════════════════════════════════════════════════════════════ */
import { Sun, Moon } from '@phosphor-icons/react'
import { useEffect, useState } from 'react'
type Theme = 'light' | 'dark'
@ -62,18 +63,7 @@ export default function ThemeToggle({ className = '' }: { className?: string })
title={dark ? 'Light mode' : 'Dark mode'}
className={`flex h-9 w-9 items-center justify-center rounded-full transition-colors ${className}`}
>
{dark ? (
// Sun
<svg viewBox="0 0 24 24" className="h-5 w-5" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" strokeLinecap="round" />
</svg>
) : (
// Moon
<svg viewBox="0 0 24 24" className="h-5 w-5" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
<path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z" strokeLinejoin="round" />
</svg>
)}
{dark ? <Sun size={20} weight="bold" aria-hidden="true" /> : <Moon size={20} weight="bold" aria-hidden="true" />}
</button>
)
}

View file

@ -11,12 +11,13 @@
goes somewhere: the still becomes a link to it.
═══════════════════════════════════════════════════════════════ */
import { Play } from '@phosphor-icons/react'
import { useState } from 'react'
import HomeLink from '../pages/sections/home/HomeLink.tsx'
import { playingSource, videoSource, videoThumbnail } from '../lib/embeds.ts'
import { BRAND } from '../lib/color.ts'
const ACCENT = '#0f7183'
export default function VideoPlayer({
url,
@ -62,9 +63,7 @@ export default function VideoPlayer({
className="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/25"
>
<span className="flex h-16 w-16 items-center justify-center rounded-full bg-white/90 shadow-lg transition-transform group-hover:scale-110">
<svg viewBox="0 0 24 24" className="ml-1 h-7 w-7" fill={ACCENT}>
<path d="M8 5v14l11-7z" />
</svg>
<Play className="ml-1 h-7 w-7" weight="fill" style={{ color: BRAND }} aria-hidden="true" />
</span>
</span>
</>

View file

@ -75,6 +75,7 @@
able to read and copy.
═══════════════════════════════════════════════════════════════ */
import { ArrowUp, ArrowDown, CaretRight } from "@phosphor-icons/react";
import { useRef, useState } from "react";
import ContentBlocks from "../ContentBlocks.tsx";
@ -581,7 +582,7 @@ export function Repeater({
expanded ? "rotate-90" : ""
}`}
>
▶
<CaretRight size={14} weight="bold" aria-hidden="true" />
</span>
<span className="truncate">
{spec.title ? spec.title(row, options) : `#${index + 1}`}
@ -597,14 +598,14 @@ export function Repeater({
onClick={() => move(index, -1)}
disabled={index === 0}
>
↑
<ArrowUp size={14} weight="bold" aria-hidden="true" />
</IconButton>
<IconButton
label="Move down"
onClick={() => move(index, 1)}
disabled={index === list.length - 1}
>
↓
<ArrowDown size={14} weight="bold" aria-hidden="true" />
</IconButton>
<IconButton
label="Insert a new one below"