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

@ -24,7 +24,7 @@ import { mediaUrl } from '../../lib/media.ts'
import { preview } from '../../lib/text.ts'
import { postDate, useCommunityBlog, type BlogPostSummary } from '../../lib/useBlog.ts'
import HomeLink from './home/HomeLink.tsx'
import { accentText } from '../../lib/color.ts'
import { accentText, BRAND } from '../../lib/color.ts'
import { useSmallImage } from '../../lib/useSmallImage.ts'
/* Headings for a half the admin didn't title. */
@ -50,7 +50,7 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
)}
<div className="flex flex-1 flex-col p-6">
{(date || post.tags.length > 0) && (
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accentText(accent) }}>
<p className="text-sm font-semibold" style={{ color: accentText(accent) }}>
{[date, ...post.tags].filter(Boolean).join(' · ')}
</p>
)}
@ -79,7 +79,7 @@ function Subheading({ children, accent }: { children: string; accent: string })
)
}
export default function CommunityBlog({ accent = '#0f7183' }: { accent?: string }) {
export default function CommunityBlog({ accent = BRAND }: { accent?: string }) {
const { data: blog, loading, error, reload } = useCommunityBlog()
if (!blog) {
@ -112,7 +112,7 @@ export default function CommunityBlog({ accent = '#0f7183' }: { accent?: string
{hasInternal && (
<div>
<Subheading accent={accent}>{internal.title || DEFAULTS.internal}</Subheading>
<ul className="mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
<ul className="mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3 lg:[&>li:first-child]:col-span-2">
{internal.posts.map((post) => (
<PostCard key={post.id} post={post} accent={accent} />
))}

View file

@ -39,7 +39,8 @@
just has one answer on a phone.
═══════════════════════════════════════════════════════════════ */
import { useMemo, useState } from 'react'
import { ArrowRight, ArrowLeft, CaretRight, CaretLeft } from '@phosphor-icons/react'
import { useMemo, useState, type ReactNode } from 'react'
import { Link } from 'react-router-dom'
import { typesPresent, useEvents } from '../../lib/eventData.ts'
@ -47,7 +48,7 @@ import { EVENT_TYPES, eventTypeLabel, type EventType } from '../../lib/eventType
import { firstOccurrenceFrom, occurrencesBetween, seriesTimes } from '../../lib/eventSeries.ts'
import { eventHref } from '../../lib/hrefs.ts'
import type { EventListItem } from '../../lib/useContent.ts'
import { withAlpha, accentText, readableOn } from '../../lib/color.ts'
import { withAlpha, accentText, readableOn, BRAND } from '../../lib/color.ts'
export type CalendarControl = 'scope' | 'type' | 'online' | 'search'
export type CalendarView = 'month' | 'list'
@ -57,7 +58,6 @@ const ALL_CONTROLS: CalendarControl[] = ['scope', 'type', 'online', 'search']
/* Bar rows drawn per week before a day collapses to "+N more". */
const MAX_LANES = 3
const TEAL = '#0f7183'
const INK = 'var(--color-ink)'
const BODY = 'var(--color-muted)'
@ -228,7 +228,7 @@ export default function EventCalendar({
host,
status,
type,
accent = TEAL,
accent = BRAND,
controls = ALL_CONTROLS,
defaultView = 'month',
}: EventCalendarProps) {
@ -312,10 +312,10 @@ export default function EventCalendar({
<div className="flex flex-wrap items-center gap-3">
<div className="flex items-center gap-2">
<NavButton label="Previous month" onClick={() => go(shiftMonth(month, -1))} accent={accent}>
‹
<CaretLeft size={20} weight="bold" aria-hidden="true" />
</NavButton>
<NavButton label="Next month" onClick={() => go(shiftMonth(month, 1))} accent={accent}>
›
<CaretRight size={20} weight="bold" aria-hidden="true" />
</NavButton>
</div>
@ -381,7 +381,7 @@ export default function EventCalendar({
/>
)}
{show('online') && (
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm">
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm">
<input
type="checkbox"
checked={onlineOnly}
@ -399,7 +399,7 @@ export default function EventCalendar({
onChange={(e) => setQuery(e.target.value)}
placeholder="Search events"
aria-label="Search events"
className="min-w-[12rem] flex-1 rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
className="min-w-[12rem] flex-1 rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
/>
)}
{filtering && (
@ -422,7 +422,7 @@ export default function EventCalendar({
Couldn’t load events. {error.message}
</p>
) : loading ? (
<div className="h-[32rem] animate-pulse rounded-3xl bg-white/70" aria-hidden="true" />
<div className="h-[32rem] animate-pulse rounded-3xl bg-tint" aria-hidden="true" />
) : (
<>
{view === 'month' && (
@ -460,7 +460,7 @@ export default function EventCalendar({
className="font-semibold hover:underline"
style={{ color: accentText(accent) }}
>
Jump to the next event, {monthTitle(monthKey(next))} →
Jump to the next event, {monthTitle(monthKey(next))} <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</button>
) : filtering ? (
'Nothing matches these filters.'
@ -593,14 +593,14 @@ function Bar({ seg, accent }: { seg: Segment; accent: string }) {
background: color,
}}
>
{seg.continuesBefore && <span aria-hidden="true">←</span>}
{seg.continuesBefore && <ArrowLeft size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />}
<span className="truncate">
{seg.time && seg.span === 1 && <span className="font-normal opacity-85">{seg.time.split(' – ')[0]} </span>}
{seg.event.title}
</span>
{seg.continuesAfter && (
<span className="ml-auto" aria-hidden="true">
→
<ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</span>
)}
</Link>
@ -749,7 +749,7 @@ function NavButton({
label: string
onClick: () => void
accent: string
children: string
children: ReactNode
}) {
return (
<button
@ -782,7 +782,7 @@ function FilterSelect({
value={value}
onChange={(e) => onChange(e.target.value)}
aria-label={label}
className="rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
className="rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
>
<option value="">{all}</option>
{options.map(([id, name]) => (

View file

@ -1,3 +1,4 @@
import { CaretDown, CaretRight, CaretLeft, Cards, SquaresFour } from '@phosphor-icons/react';
import { useEffect, useMemo, useRef, useState } from "react";
import { Link } from "react-router-dom";
import { splitByStatus, typesPresent, useEvents } from "../../lib/eventData.ts";
@ -7,7 +8,7 @@ import { seriesLabel } from "../../lib/eventSeries.ts";
import PlatformIcon from "../../components/PlatformIcon.tsx";
import { mediaUrl } from "../../lib/media.ts";
import Logo from "../../components/Logo.tsx";
import { accentText, withAlpha, readableOn } from '../../lib/color.ts'
import { accentText, withAlpha, readableOn, BRAND } from '../../lib/color.ts'
/* ═══════════════════════════════════════════════════════════════
EVENT LIST: CARDS
@ -35,7 +36,6 @@ import { accentText, withAlpha, readableOn } from '../../lib/color.ts'
fires only for an event with no host at all. */
const DEFAULT_ORG_LOGO = null;
const TEAL = "#0f7183"; // last-resort card color
const INK = "var(--color-ink)"; // button text: the card colour is only a border
const CARD_BG = "var(--color-surface)"; // sits under every card, photo or not
@ -131,8 +131,8 @@ function TitleLink({ ev, linked, children }) {
═══════════════════════════════════════════════════════════════ */
export function Card({
ev,
defaultColor = TEAL,
accent = TEAL,
defaultColor = BRAND,
accent = BRAND,
compact = false,
interactive = true,
linked = true,
@ -397,10 +397,7 @@ export function EventCardsToggle({ view, setView, accent }) {
className="flex items-center gap-2 py-2 px-4 font-bold text-sm transition-colors duration-200"
style={btn(view === "carousel")}
>
<svg viewBox="0 0 24 24" className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<rect x="7" y="5" width="10" height="14" rx="2" />
<path d="M3.5 8v8M20.5 8v8" />
</svg>
<Cards className="h-4 w-4" weight="bold" aria-hidden="true" />
Carousel
</button>
<button
@ -409,12 +406,7 @@ export function EventCardsToggle({ view, setView, accent }) {
className="flex items-center gap-2 py-2 px-4 font-bold text-sm transition-colors duration-200"
style={btn(view === "grid")}
>
<svg viewBox="0 0 24 24" className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<rect x="3" y="3" width="7" height="7" rx="1.5" />
<rect x="14" y="3" width="7" height="7" rx="1.5" />
<rect x="3" y="14" width="7" height="7" rx="1.5" />
<rect x="14" y="14" width="7" height="7" rx="1.5" />
</svg>
<SquaresFour className="h-4 w-4" weight="bold" aria-hidden="true" />
Grid
</button>
</div>
@ -437,7 +429,7 @@ export default function EventListCards({
status,
type,
view = "carousel",
accent = TEAL,
accent = BRAND,
defaultColor,
empty = "· Events coming soon, stay connected for announcements ·",
}: any) {
@ -630,19 +622,7 @@ export default function EventListCards({
{showPast
? "Hide past events"
: `See past events (${pastEvents.length})`}
<svg
viewBox="0 0 24 24"
className="h-4 w-4 transition-transform duration-300"
style={{ transform: showPast ? "rotate(180deg)" : "none" }}
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<path d="M6 9l6 6-6 6" />
</svg>
<CaretDown className="h-4 w-4 transition-transform duration-300" style={{ transform: showPast ? "rotate(180deg)" : "none" }} weight="bold" aria-hidden="true" />
</button>
</div>
</div>
@ -696,7 +676,7 @@ export default function EventListCards({
className="absolute left-2 md:left-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-bold shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
style={arrowStyle(index > 0)}
>
‹
<CaretLeft size={20} weight="bold" aria-hidden="true" />
</button>
<button
onClick={next}
@ -705,7 +685,7 @@ export default function EventListCards({
className="absolute right-2 md:right-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-bold shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
style={arrowStyle(index < events.length - 1)}
>
›
<CaretRight size={20} weight="bold" aria-hidden="true" />
</button>
</>
)}

View file

@ -15,13 +15,13 @@
need an email, since the answer has to go somewhere.
═══════════════════════════════════════════════════════════════ */
import { CaretDown } from '@phosphor-icons/react';
import { useState } from "react";
import { post, ApiError } from "../../lib/api.ts";
import { PAGE_LINKS, PAGE_SECTIONS } from "../../navConfig.ts";
import { DATA_REQUEST, FEEDBACK_TYPES } from "../../data/feedbackTypes.ts";
import { accentText } from '../../lib/color.ts'
import { accentText, BRAND } from '../../lib/color.ts'
const ACCENT = "#0f7183";
const MUTED = "var(--color-muted)";
const MAX_CHARS = 1500;
const MIN_MESSAGE = 10; // matches the server
@ -35,8 +35,8 @@ const WHOLE_PAGE = "";
/* ── Shared field chrome ─────────────────────────────────────── */
const fieldClass =
"w-full rounded-xl border border-muted/25 bg-surface px-4 py-3 text-body " +
"placeholder:text-muted/50 outline-none transition-colors " +
"w-full rounded-xl border border-muted/50 bg-surface px-4 py-3 text-body " +
"placeholder:text-muted outline-none transition-colors " +
"focus:border-brand focus:ring-2 focus:ring-brand/25";
const errorFieldClass = "border-danger focus:border-danger focus:ring-danger/20";
@ -76,21 +76,7 @@ function Select({ id, label, value, onChange, children }) {
>
{children}
</select>
<svg
aria-hidden="true"
viewBox="0 0 20 20"
fill="none"
className="pointer-events-none absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2"
style={{ color: MUTED }}
>
<path
d="M5 8l5 5 5-5"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<CaretDown aria-hidden="true" weight="bold" className="pointer-events-none absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2" style={{ color: MUTED }} />
</div>
</div>
);
@ -297,7 +283,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
aria-live="polite"
className="rounded-2xl border border-brand/20 bg-surface p-8 sm:p-10"
>
<h3 className="text-2xl font-bold" style={{ color: accentText(ACCENT) }}>
<h3 className="text-2xl font-bold" style={{ color: accentText(BRAND) }}>
Thanks, we've got it
</h3>
{where && (

View file

@ -1,3 +1,4 @@
import { ArrowUpRight } from '@phosphor-icons/react';
import ArrowLink from "../../components/ArrowLink.tsx";
import { mediaUrl } from "../../lib/media.ts";
import Logo from "../../components/Logo.tsx";
@ -112,7 +113,7 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
className="py-2 px-4 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
style={{ border: `1px solid ${color}`, color }}
>
{siteLabel} ↗
{siteLabel} <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</a>
)}
@ -171,7 +172,7 @@ export default function OrgListCards({
pageLabel = "Learn more",
siteLabel = "Visit site",
sort = byName,
empty = "· Nothing to show here just yet ·",
empty = "Nothing to show here yet.",
}) {
const { organizations, loading, error } = useOrganizations(kind);

View file

@ -1,3 +1,4 @@
import { CaretRight, X } from '@phosphor-icons/react';
import { useEffect, useRef, useState } from "react";
import { useCommunity } from "../../lib/chapters.ts";
import { Link } from "react-router-dom";
@ -526,17 +527,7 @@ function ChapterCard({ chapter, color, open, onOpen }) {
transform: open ? "rotate(90deg)" : "none",
}}
>
<svg
viewBox="0 0 24 24"
className="h-4 w-4"
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M9 6l6 6-6 6" />
</svg>
<CaretRight className="h-4 w-4" weight="bold" aria-hidden="true" />
</button>
{orgPath(chapter) && (
@ -587,7 +578,7 @@ function ChapterDetail({ chapter, region, onClose }) {
className="shrink-0 h-8 w-8 rounded-full flex items-center justify-center text-lg font-bold transition-transform duration-200 hover:scale-110"
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
>
×
<X size={20} weight="bold" aria-hidden="true" />
</button>
</div>

View file

@ -1,3 +1,4 @@
import { ArrowUpRight, CaretRight } from '@phosphor-icons/react';
import { useId, useState } from "react";
import ArrowLink from "../../components/ArrowLink.tsx";
import { mediaUrl } from "../../lib/media.ts";
@ -108,19 +109,7 @@ function OrgRow({ org, pageLabel, siteLabel }) {
aria-controls={panelId}
className="flex-1 min-w-0 flex items-center gap-3 text-left py-1"
>
<svg
viewBox="0 0 24 24"
className="ol-chevron h-4 w-4 shrink-0"
style={{ color, transform: open ? "rotate(90deg)" : "none" }}
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<path d="M9 6l6 6-6 6" />
</svg>
<CaretRight className="ol-chevron h-4 w-4 shrink-0" style={{ color, transform: open ? "rotate(90deg)" : "none" }} weight="bold" aria-hidden="true" />
<OrgMark org={org} color={color} />
@ -155,7 +144,7 @@ function OrgRow({ org, pageLabel, siteLabel }) {
rel="noopener noreferrer"
color={color}
>
{siteLabel} ↗
{siteLabel} <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</RowButton>
)}
@ -256,7 +245,7 @@ export default function OrgListVertical({
pageLabel = "Region page",
siteLabel = "Visit site",
sort = byName,
empty = "· Nothing to show here just yet ·",
empty = "Nothing to show here yet.",
}) {
const { organizations, loading, error } = useOrganizations(kind);

View file

@ -38,9 +38,8 @@ import { NAV_ACTIONS, PAGE_LINKS, PAGE_SECTIONS } from '../../navConfig.ts'
import { awardHref, blogHref, eventHref, orgHref, personHref, teamHref } from '../../lib/hrefs.ts'
import { siteUrl } from '../../lib/site.ts'
import { useDirectory, type Directory } from '../../lib/useContent.ts'
import { accentText } from '../../lib/color.ts'
import { accentText, BRAND } from '../../lib/color.ts'
const TEAL = '#0f7183'
const MUTED = 'var(--color-muted)'
/* PNG download size in pixels. Plenty for print at a few inches;
@ -329,7 +328,7 @@ export default function QrCodeMaker() {
placeholder="https://… or /retreats"
className={`mt-2 ${inputClass}`}
/>
<p className="mt-1 text-sm" style={{ color: custom.trim() && !typed ? '#b3261e' : MUTED }}>
<p className="mt-1 text-sm" style={{ color: custom.trim() && !typed ? 'var(--color-danger)' : MUTED }}>
{custom.trim() && !typed
? 'That isn’t a web address. Use https://…, a domain, or a site path like /retreats.'
: 'A full address, a domain (example.org), or a path on this site (/retreats).'}
@ -407,7 +406,7 @@ export default function QrCodeMaker() {
setDoveColor(QR_DOVE)
}}
className="pb-2 text-sm underline"
style={{ color: accentText(TEAL) }}
style={{ color: accentText(BRAND) }}
>
Reset colours
</button>
@ -431,7 +430,7 @@ export default function QrCodeMaker() {
type="button"
onClick={copy}
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-brand/10"
style={{ borderColor: TEAL, color: accentText(TEAL) }}
style={{ borderColor: BRAND, color: accentText(BRAND) }}
>
{copied ? 'Copied ✓' : 'Copy link'}
</button>
@ -488,7 +487,7 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
}
const inputClass =
'w-full rounded-xl border border-muted/25 bg-surface px-4 py-3 text-body ' +
'w-full rounded-xl border border-muted/50 bg-surface px-4 py-3 text-body ' +
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
/* A colour well with its hex beside it, both editable. */
@ -526,7 +525,7 @@ function ColourInput({
setText(e.target.value)
if (/^#[0-9a-f]{6}$/i.test(e.target.value)) onChange(e.target.value.toLowerCase())
}}
className="w-24 rounded-lg border border-muted/25 bg-surface px-2 py-1.5 font-mono text-sm text-body outline-none focus:border-brand"
className="w-24 rounded-lg border border-muted/50 bg-surface px-2 py-1.5 font-mono text-sm text-body outline-none focus:border-brand"
/>
</div>
</div>
@ -534,7 +533,7 @@ function ColourInput({
}
const selectClass =
'w-full appearance-none rounded-xl border border-muted/25 bg-surface px-4 py-3 pr-10 text-body ' +
'w-full appearance-none rounded-xl border border-muted/50 bg-surface px-4 py-3 pr-10 text-body ' +
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
function Select({

View file

@ -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>

View file

@ -35,6 +35,7 @@
arrives. The error itself is shown by Home, not here.
═══════════════════════════════════════════════════════════════ */
import { ArrowRight, Play, Pause, Star } from '@phosphor-icons/react'
import { useEffect, useState, type CSSProperties } from 'react'
import { Link } from 'react-router-dom'
@ -48,7 +49,6 @@ import { mediaUrl } from '../../../lib/media.ts'
import { eventHref } from '../../../lib/hrefs.ts'
import { seriesLabel } from '../../../lib/eventSeries.ts'
import type { Hero, HeroBackdrop, HeroEvent, HeroFeature, HeroSlide } from '../../../lib/useFrontPage.ts'
import { withAlpha } from '../../../lib/color.ts'
const DEEP = '#04262e'
@ -131,12 +131,12 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
</p>
) : feature === 'event' ? (
<p className="mb-6 inline-flex items-center gap-3 rounded-full bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
<span className="text-[#9fe7d0]" aria-hidden="true">★</span>
<Star className="text-[#9fe7d0]" weight="fill" aria-hidden="true" />
Featured event
</p>
) : feature === 'video' ? (
<p className="mb-6 inline-flex items-center gap-3 rounded-full bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
<span className="text-[#9fe7d0]" aria-hidden="true">▶</span>
<Play className="text-[#9fe7d0]" weight="fill" aria-hidden="true" />
Featured video
{hero.video?.title && (
<span className="normal-case tracking-normal text-white/75">
@ -193,7 +193,7 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
url={hero.secondary.url}
className="rounded-full border border-white/35 px-8 py-4 text-lg font-semibold text-white transition-colors duration-300 hover:bg-white/10"
>
{hero.secondary.label} →
{hero.secondary.label} <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</HomeLink>
)}
</div>
@ -208,8 +208,8 @@ function BrandBackdrop() {
return (
<div className="absolute inset-0 -z-10" aria-hidden="true">
<div className="hp-aurora hp-aurora--a" style={blob('#138ba0', '48vw', '-10%', '-10%')} />
<div className="hp-aurora hp-aurora--b" style={blob('#10d48a', '38vw', '45%', '20%')} />
<div className="hp-aurora hp-aurora--c" style={blob('#d8b64a', '30vw', '70%', '-5%')} />
<div className="hp-aurora hp-aurora--b" style={blob('#9fe7d0', '38vw', '45%', '20%')} />
<div className="hp-aurora hp-aurora--c" style={blob('#aac992', '30vw', '70%', '-5%')} />
<svg
className="absolute -right-[20vw] top-1/2 h-[120vw] w-[120vw] -translate-y-1/2 md:-right-[10vw] md:h-[80vw] md:w-[80vw]"
@ -308,7 +308,7 @@ function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: numb
<p className="max-w-md rounded-xl bg-black/35 px-4 py-2 text-sm text-white/90 backdrop-blur">
{current.link_url ? (
<HomeLink url={current.link_url} className="hover:underline">
{current.caption} →
{current.caption} <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</HomeLink>
) : (
current.caption
@ -344,7 +344,7 @@ function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: numb
aria-label={paused ? 'Play slideshow' : 'Pause slideshow'}
className="flex h-8 w-8 items-center justify-center rounded-full border border-white/40 text-xs text-white hover:bg-white/10"
>
{paused ? '▶' : '❚❚'}
{paused ? <Play size={14} weight="fill" aria-hidden="true" /> : <Pause size={14} weight="fill" aria-hidden="true" />}
</button>
</div>
)}
@ -362,7 +362,7 @@ function LiveFrame({ src, url, title }: { src: string | null; url: string; title
return (
<div
className="relative overflow-hidden rounded-3xl border border-white/15 bg-black shadow-2xl"
style={{ boxShadow: '0 30px 80px -20px rgba(16, 212, 138, 0.35)' }}
style={{ boxShadow: '0 24px 48px -24px rgba(4, 38, 46, 0.6)' }}
>
<div className="aspect-video w-full">
{src && watching ? (
@ -419,7 +419,7 @@ function VideoFrame({
return (
<div
className="relative overflow-hidden rounded-3xl border border-white/15 bg-black shadow-2xl"
style={{ boxShadow: '0 30px 80px -20px rgba(92, 231, 255, 0.35)' }}
style={{ boxShadow: '0 24px 48px -24px rgba(4, 38, 46, 0.6)' }}
>
<div className="aspect-video w-full">
{source?.kind === 'file' ? (
@ -455,7 +455,7 @@ function VideoFrame({
to its page. The first action link is the filled button, since
it's usually Register. */
function EventPanel({ event }: { event: HeroEvent }) {
const color = event.color || '#0f7183'
const color = event.color || 'var(--color-action)'
const photo = mediaUrl(event.card_image)
const when = seriesLabel(event.series, event.starts_on) ?? event.date_label
const where = event.is_online && !event.location_label ? 'Online' : event.location_label
@ -463,7 +463,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
return (
<div
className="overflow-hidden rounded-3xl border border-white/15 bg-white/10 text-white shadow-2xl backdrop-blur"
style={{ boxShadow: `0 30px 80px -20px ${withAlpha(color, 40)}` }}
style={{ boxShadow: '0 24px 48px -24px rgba(4, 38, 46, 0.6)' }}
>
{photo ? (
<img src={photo} alt="" className="aspect-[16/7] w-full object-cover" />
@ -508,7 +508,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
to={eventHref(event.id)}
className="rounded-full border border-white/35 px-6 py-3 font-semibold text-white transition-colors hover:bg-white/10"
>
Event details →
Event details <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</Link>
</div>
</div>

View file

@ -18,15 +18,15 @@
blurb from the admin aren't drawn here.
═══════════════════════════════════════════════════════════════ */
import { ArrowRight } from '@phosphor-icons/react'
import { useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
import { eventHref } from '../../../lib/hrefs.ts'
import { upcomingOccurrences } from '../../../lib/eventSeries.ts'
import type { CountdownEvent } from '../../../lib/useFrontPage.ts'
import { withAlpha, accentText } from '../../../lib/color.ts'
import { withAlpha, accentText, BRAND } from '../../../lib/color.ts'
const TEAL = '#0f7183'
/* Local midnight (or HH:MM) on a 'YYYY-MM-DD'. */
function localMoment(date: string, time?: string | null): Date | null {
@ -65,7 +65,7 @@ export default function NextEventCountdown({
}) {
const now = useNow(1000)
const when = target(event)
const accent = event.color || TEAL
const accent = event.color || BRAND
const remaining = when ? when.getTime() - now : 0
const live = !when || remaining <= 0
@ -86,7 +86,7 @@ export default function NextEventCountdown({
>
<Link
to={eventHref(event.id)}
className="group mx-auto flex max-w-6xl flex-col gap-6 rounded-3xl border bg-white/95 p-6 shadow-2xl backdrop-blur transition-transform duration-300 hover:-translate-y-1 md:flex-row md:items-center md:p-8"
className="group mx-auto flex max-w-6xl flex-col gap-6 rounded-3xl border bg-surface/95 p-6 shadow-2xl backdrop-blur transition-transform duration-300 hover:-translate-y-1 md:flex-row md:items-center md:p-8"
style={{ borderColor: `${withAlpha(accent, 33)}` }}
>
<div className="min-w-0 flex-1">
@ -126,7 +126,7 @@ export default function NextEventCountdown({
className="self-start text-sm font-semibold transition-transform group-hover:translate-x-1 md:self-center"
style={{ color: accentText(accent) }}
>
Details →
Details <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</span>
</Link>
</section>

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 && (

View file

@ -7,12 +7,12 @@
front page's heading and a way through to the full page.
═══════════════════════════════════════════════════════════════ */
import { ArrowRight } from '@phosphor-icons/react'
import { Link } from 'react-router-dom'
import EventListCards from '../EventList-Cards.tsx'
import { accentText } from '../../../lib/color.ts'
import { accentText, BRAND } from '../../../lib/color.ts'
const TEAL = '#0f7183'
type RetreatsBandProps = { id: string; title: string; blurb?: string | null }
@ -29,13 +29,13 @@ export default function RetreatsBand({ id, title, blurb }: RetreatsBandProps) {
<Link
to="/retreats"
className="ml-auto rounded-full border px-5 py-2 text-sm font-semibold transition-colors hover:bg-surface"
style={{ borderColor: TEAL, color: accentText(TEAL) }}
style={{ borderColor: BRAND, color: accentText(BRAND) }}
>
All retreats →
All retreats <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</Link>
</div>
<EventListCards scope="national" type="retreat" view="carousel" accent={TEAL} />
<EventListCards scope="national" type="retreat" view="carousel" accent={BRAND} />
</section>
)
}

View file

@ -51,12 +51,12 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
>
<div
className="pointer-events-none absolute -left-40 -top-40 h-[32rem] w-[32rem] rounded-full opacity-25 blur-3xl"
style={{ background: '#10d48a' }}
style={{ background: '#9fe7d0' }}
aria-hidden="true"
/>
<div className="relative mx-auto max-w-6xl px-6">
<h2 className="font-display text-sm font-bold uppercase tracking-[0.3em] text-[#9fe7d0]">
<h2 className="font-display text-3xl font-extrabold text-white md:text-4xl">
{title}
</h2>
{blurb && <p className="mt-3 max-w-2xl text-white/70">{blurb}</p>}