Add colour tokens, dark mode and drop gradients
- Colour tokens in index.css named by role (ink, body, muted, link, brand, action, surface, tint, danger), used everywhere instead of hex - Dark mode: follows the system, a header toggle (site and admin) overrides it and is remembered; set before first paint in index.html - Data colours go through src/lib/color.ts: withAlpha for tints, accentText (lighter on dark) for text in an accent, readableOn for text on one, so an admin's pale colour still reads - Migration 040 drops events.gradient: a card is its photo or plain, with its colour as the border; other decorative gradients are solid - The countdown and a hero event without a photo mix their colour toward ink behind white text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ee61568911
commit
c74ad746f5
70 changed files with 829 additions and 596 deletions
|
|
@ -38,8 +38,9 @@ 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'
|
||||
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
export default function ContentBlocks({
|
||||
blocks,
|
||||
|
|
@ -76,14 +77,14 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
switch (block.type) {
|
||||
case 'heading':
|
||||
return (
|
||||
<h3 className="text-2xl font-bold" style={{ color: accent }}>
|
||||
<h3 className="text-2xl font-bold" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</h3>
|
||||
)
|
||||
|
||||
case 'subheading':
|
||||
return (
|
||||
<h4 className="text-lg font-semibold" style={{ color: accent }}>
|
||||
<h4 className="text-lg font-semibold" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</h4>
|
||||
)
|
||||
|
|
@ -93,12 +94,12 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
<ul className="space-y-2">
|
||||
{(block.items ?? []).map((item, index) => (
|
||||
<li key={index} className="flex gap-3">
|
||||
<span aria-hidden="true" style={{ color: accent }}>
|
||||
<span aria-hidden="true" style={{ color: accentText(accent) }}>
|
||||
•
|
||||
</span>
|
||||
<span style={{ color: BODY }}>
|
||||
{item.url ? (
|
||||
<Anchor href={item.url} className="underline" style={{ color: accent }}>
|
||||
<Anchor href={item.url} className="underline" style={{ color: accentText(accent) }}>
|
||||
{item.text}
|
||||
</Anchor>
|
||||
) : (
|
||||
|
|
@ -120,8 +121,8 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
<Anchor
|
||||
key={index}
|
||||
href={item.url as string}
|
||||
className="rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
{item.text}
|
||||
</Anchor>
|
||||
|
|
@ -150,7 +151,7 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
<Inline text={text} accent={accent} />
|
||||
</blockquote>
|
||||
{block.cite && (
|
||||
<figcaption className="mt-2 text-sm font-semibold not-italic" style={{ color: accent }}>
|
||||
<figcaption className="mt-2 text-sm font-semibold not-italic" style={{ color: accentText(accent) }}>
|
||||
{block.cite}
|
||||
</figcaption>
|
||||
)}
|
||||
|
|
@ -162,7 +163,7 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
return (
|
||||
<aside
|
||||
className="space-y-3 rounded-2xl border-l-4 px-6 py-5 leading-relaxed"
|
||||
style={{ borderColor: accent, background: `color-mix(in srgb, ${accent} 8%, white)`, color: '#26454c' }}
|
||||
style={{ borderColor: accent, background: `color-mix(in srgb, ${accent} 8%, var(--color-surface))`, color: 'var(--color-body)' }}
|
||||
>
|
||||
<Paragraphs text={text} accent={accent} />
|
||||
</aside>
|
||||
|
|
@ -213,7 +214,7 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
if (!text) return null
|
||||
return block.href ? (
|
||||
<p className="leading-relaxed" style={{ color: BODY }}>
|
||||
<Anchor href={block.href} className="underline" style={{ color: accent }}>
|
||||
<Anchor href={block.href} className="underline" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</Anchor>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ function Picture({ card }: { card: FeaturedCard }) {
|
|||
const photo = card.image ? PHOTO_KINDS.has(card.image.kind) : false
|
||||
|
||||
if (!src || failed) {
|
||||
return <div className="aspect-video w-full bg-gradient-to-br from-[#eef9fb] to-[#d9f0f3]" />
|
||||
return <div className="aspect-video w-full bg-tint" />
|
||||
}
|
||||
|
||||
return photo ? (
|
||||
|
|
@ -55,7 +55,7 @@ function Picture({ card }: { card: FeaturedCard }) {
|
|||
className="aspect-video w-full object-cover"
|
||||
/>
|
||||
) : (
|
||||
<div className="flex aspect-video w-full items-center justify-center bg-[#eef9fb] p-8">
|
||||
<div className="flex aspect-video w-full items-center justify-center bg-tint p-8">
|
||||
<img
|
||||
src={src}
|
||||
alt=""
|
||||
|
|
@ -78,10 +78,10 @@ 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-[#0f7183]">{card.eyebrow}</p>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em] text-link">{card.eyebrow}</p>
|
||||
)}
|
||||
{card.title && (
|
||||
<h3 className="mt-2 font-display text-xl font-extrabold leading-snug text-[#073d4a]">
|
||||
<h3 className="mt-2 font-display text-xl font-extrabold leading-snug text-ink">
|
||||
{href ? (
|
||||
// Stretched over the whole card, so the picture and the
|
||||
// blurb are part of the click without nesting links.
|
||||
|
|
@ -96,12 +96,12 @@ function Card({ card }: { card: FeaturedCard }) {
|
|||
)}
|
||||
</h3>
|
||||
)}
|
||||
{card.blurb && <p className="mt-2 leading-relaxed text-[#4a6b72]">{card.blurb}</p>}
|
||||
{card.blurb && <p className="mt-2 leading-relaxed text-muted">{card.blurb}</p>}
|
||||
</div>
|
||||
)
|
||||
|
||||
return (
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-[#138ba0]/15 bg-white shadow-sm transition-shadow hover:shadow-lg">
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg">
|
||||
{card.kind === 'video' ? (
|
||||
// Above the stretched link, which a video card doesn't have
|
||||
// anyway, so the play button always gets the click.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
import { Fragment, type CSSProperties, type ReactNode } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TOKEN = /\*\*(.+?)\*\*|\*(.+?)\*|\[([^\]]+)\]\(([^)\s]+)\)/g
|
||||
const SAFE_URL = /^(\/(?!\/)|#|https?:\/\/|mailto:|tel:)/i
|
||||
|
|
@ -88,7 +89,7 @@ function line(text: string, accent: string, key: string): ReactNode[] {
|
|||
else if (italic != null) out.push(<em key={k}>{italic}</em>)
|
||||
else if (label != null && SAFE_URL.test(url)) {
|
||||
out.push(
|
||||
<Anchor key={k} href={url} className="underline underline-offset-2" style={{ color: accent }}>
|
||||
<Anchor key={k} href={url} className="underline underline-offset-2" style={{ color: accentText(accent) }}>
|
||||
{label}
|
||||
</Anchor>,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import Banner from "./Banner.tsx";
|
|||
import nguLogo from "../assets/logos/NGU_Logo.svg";
|
||||
import Footer from "./Footer.tsx";
|
||||
import PrivacyNotice from "./PrivacyNotice.tsx";
|
||||
import ThemeToggle from "./ThemeToggle.tsx";
|
||||
|
||||
/* ── Right-side nav actions ──────────────────────────────── */
|
||||
|
||||
|
|
@ -154,7 +155,7 @@ export default function Layout() {
|
|||
<div className="min-h-screen overflow-x-hidden">
|
||||
<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-white focus:px-4 focus:py-2 focus:font-semibold focus:text-[#073d4a]"
|
||||
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"
|
||||
>
|
||||
Skip to content
|
||||
</a>
|
||||
|
|
@ -207,6 +208,8 @@ export default function Layout() {
|
|||
))}
|
||||
</div>
|
||||
|
||||
<ThemeToggle className="text-white/80 hover:bg-white/10 hover:text-white" />
|
||||
|
||||
<button
|
||||
className="md:hidden text-white p-2"
|
||||
aria-label="Open menu"
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ export type LegalPart = {
|
|||
|
||||
export default function LegalText({ parts }: { parts: LegalPart[] }) {
|
||||
return (
|
||||
<div className="mx-auto max-w-3xl space-y-10 px-6 leading-relaxed text-[#2c4a50]">
|
||||
<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} style={{ scrollMarginTop: '6rem' }}>
|
||||
<h3 className="text-xl font-bold text-[#073d4a]">{part.heading}</h3>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
title: "Local Chapters",
|
||||
blurb: "Optional line under the section heading.",
|
||||
accent: "#0f7183", // heading, banner, rule
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
actions: <SomeButton />, // optional, right of the heading
|
||||
content: <YourStuff />,
|
||||
},
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
import { useEffect, type ReactNode } from "react";
|
||||
|
||||
import { documentTitle } from "../lib/site.ts";
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = "#0f7183";
|
||||
|
||||
|
|
@ -75,10 +76,10 @@ export function Section({ section }: { section: ShellSection }) {
|
|||
<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: accent }}>
|
||||
<h2 className="text-4xl md:text-5xl font-extrabold" style={{ color: accentText(accent) }}>
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-2 text-[#4a6b72] max-w-xl">{blurb}</p>}
|
||||
{blurb && <p className="mt-2 text-muted max-w-xl">{blurb}</p>}
|
||||
</div>
|
||||
{actions}
|
||||
</div>
|
||||
|
|
@ -101,12 +102,12 @@ export default function PageShell({ title, intro, sections }: PageShellProps) {
|
|||
return (
|
||||
<>
|
||||
{/* Page header */}
|
||||
<div className="pt-24 pb-12 px-6" style={{ background: "#eef9fb" }}>
|
||||
<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: TEAL }}>
|
||||
<h1 className="text-5xl md:text-6xl font-extrabold" style={{ color: accentText(TEAL) }}>
|
||||
{title}
|
||||
</h1>
|
||||
{intro && <p className="mt-3 text-lg text-[#4a6b72] max-w-2xl">{intro}</p>}
|
||||
{intro && <p className="mt-3 text-lg text-muted max-w-2xl">{intro}</p>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@
|
|||
|
||||
import { Link } from 'react-router-dom'
|
||||
import PageShell from './PageShell.tsx'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
export default function PageState({
|
||||
loading,
|
||||
|
|
@ -51,8 +52,8 @@ export default function PageState({
|
|||
</p>
|
||||
<Link
|
||||
to={backTo}
|
||||
className="mt-4 inline-block rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
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) }}
|
||||
>
|
||||
{backLabel}
|
||||
</Link>
|
||||
|
|
@ -66,8 +67,8 @@ export default function PageState({
|
|||
<button
|
||||
type="button"
|
||||
onClick={onRetry}
|
||||
className="mt-3 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
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) }}
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
|
|
@ -85,7 +86,7 @@ export default function PageState({
|
|||
return (
|
||||
<PageShell
|
||||
title={title}
|
||||
sections={[{ id: 'status', title: '', accent: TEAL, background: '#ffffff', content }]}
|
||||
sections={[{ id: 'status', title: '', accent: TEAL, background: 'var(--color-surface)', content }]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@
|
|||
|
||||
/* color */
|
||||
--pl-accent: #0f7183;
|
||||
--pl-frame-bg: #fff;
|
||||
--pl-frame-bg: var(--color-surface);
|
||||
--pl-frame-edge: rgba(15, 23, 42, 0.1);
|
||||
--pl-photo-bg: #e7edef;
|
||||
--pl-ink: #16262b;
|
||||
--pl-muted: #4a6b72;
|
||||
--pl-photo-bg: color-mix(in srgb, var(--color-muted) 15%, var(--color-surface));
|
||||
--pl-ink: var(--color-ink);
|
||||
--pl-muted: var(--color-muted);
|
||||
--pl-rule: rgba(45, 200, 224, 0.3);
|
||||
--pl-shadow: 0 1px 1px rgba(15, 23, 42, 0.06), 0 10px 18px -14px rgba(15, 23, 42, 0.5);
|
||||
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
padding: 1rem 1.1rem;
|
||||
border-left: 3px solid var(--pl-accent);
|
||||
border-radius: 6px;
|
||||
background: color-mix(in srgb, var(--pl-accent) 7%, #fff);
|
||||
background: color-mix(in srgb, var(--pl-accent) 7%, var(--color-surface));
|
||||
max-width: 68ch;
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
height: 1.75rem;
|
||||
border: 1px solid var(--pl-frame-edge);
|
||||
border-radius: 999px;
|
||||
background: #fff;
|
||||
background: var(--color-surface);
|
||||
color: var(--pl-muted);
|
||||
font-size: 1.1rem;
|
||||
line-height: 1;
|
||||
|
|
@ -309,7 +309,7 @@
|
|||
}
|
||||
|
||||
.pl__fact a {
|
||||
color: var(--pl-accent);
|
||||
color: color-mix(in srgb, var(--pl-accent) var(--accent-text-mix), #fff);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
|
@ -326,7 +326,7 @@
|
|||
margin-top: 0.75rem;
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 600;
|
||||
color: var(--pl-accent);
|
||||
color: color-mix(in srgb, var(--pl-accent) var(--accent-text-mix), #fff);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,19 +42,19 @@ export default function PrivacyNotice() {
|
|||
<div
|
||||
role="region"
|
||||
aria-label="Privacy notice"
|
||||
className="fixed bottom-4 left-4 right-4 z-40 mx-auto max-w-md rounded-2xl border border-[#138ba0]/20 bg-white p-4 text-sm text-[#26454c] shadow-xl sm:right-auto"
|
||||
className="fixed bottom-4 left-4 right-4 z-40 mx-auto max-w-md rounded-2xl border border-brand/20 bg-surface p-4 text-sm text-body shadow-xl sm:right-auto"
|
||||
>
|
||||
<p>
|
||||
No tracking cookies here. Videos and maps come from YouTube, Facebook or Google only when you press
|
||||
play or show them, and those services may set their own cookies then.{' '}
|
||||
<Link to="/privacy#cookies" className="font-semibold text-[#0f7183] underline underline-offset-2">
|
||||
<Link to="/privacy#cookies" className="font-semibold text-link underline underline-offset-2">
|
||||
Privacy Policy
|
||||
</Link>
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={close}
|
||||
className="mt-3 rounded-full bg-[#0f7183] px-4 py-1.5 font-semibold text-white hover:bg-[#0b5c6a]"
|
||||
className="mt-3 rounded-full bg-action px-4 py-1.5 font-semibold text-white hover:bg-action-hover"
|
||||
>
|
||||
Got it
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,9 @@ import { personHref } from '../lib/hrefs.ts'
|
|||
import { blockMedia, initials, personPhoto } from '../lib/media.ts'
|
||||
import type { ContentBlockItem } from '../lib/useContent.ts'
|
||||
import { Anchor, Paragraphs } from './InlineText.tsx'
|
||||
import { withAlpha, accentText, readableOn } from '../lib/color.ts'
|
||||
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
const WEEKDAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
|
||||
|
||||
type Day = { name: string; entries: ContentBlockItem[] }
|
||||
|
|
@ -71,7 +72,7 @@ function Avatar({ person, size }: { person: NonNullable<ContentBlockItem['person
|
|||
) : (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={`${size} flex shrink-0 items-center justify-center rounded-full bg-[#eef9fb] text-xs font-bold text-[#0f7183]`}
|
||||
className={`${size} flex shrink-0 items-center justify-center rounded-full bg-tint text-xs font-bold text-link`}
|
||||
>
|
||||
{initials(person.name)}
|
||||
</span>
|
||||
|
|
@ -88,7 +89,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
const more = Boolean(entry.description || graphic || place || entry.person)
|
||||
|
||||
const title = entry.url ? (
|
||||
<Anchor href={entry.url} className="underline-offset-2 hover:underline" style={{ color: accent }}>
|
||||
<Anchor href={entry.url} className="underline-offset-2 hover:underline" style={{ color: accentText(accent) }}>
|
||||
{entry.text}
|
||||
</Anchor>
|
||||
) : (
|
||||
|
|
@ -96,14 +97,14 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
)
|
||||
|
||||
return (
|
||||
<li className="border-b border-[#138ba0]/10 last:border-b-0">
|
||||
<li className="border-b border-brand/10 last:border-b-0">
|
||||
<div className="flex gap-4 py-4 sm:gap-6">
|
||||
<p className="w-24 shrink-0 pt-0.5 text-sm font-semibold sm:w-32" style={{ color: accent }}>
|
||||
<p className="w-24 shrink-0 pt-0.5 text-sm font-semibold sm:w-32" style={{ color: accentText(accent) }}>
|
||||
{entry.time}
|
||||
</p>
|
||||
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="font-semibold text-[#26454c]">{title}</p>
|
||||
<p className="font-semibold text-body">{title}</p>
|
||||
{(entry.location || entry.person) && (
|
||||
<p className="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm" style={{ color: BODY }}>
|
||||
{entry.location && <span>{entry.location}</span>}
|
||||
|
|
@ -129,8 +130,8 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
aria-expanded={open}
|
||||
aria-controls={panelId}
|
||||
aria-label={open ? `Less about ${entry.text}` : `More about ${entry.text}`}
|
||||
className="h-8 w-8 shrink-0 rounded-full border text-sm transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: `${accent}55`, color: accent }}
|
||||
className="h-8 w-8 shrink-0 rounded-full border text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }}
|
||||
>
|
||||
<span aria-hidden="true" className={`inline-block transition-transform ${open ? 'rotate-180' : ''}`}>
|
||||
▾
|
||||
|
|
@ -140,7 +141,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
</div>
|
||||
|
||||
{more && open && (
|
||||
<div id={panelId} className="mb-5 space-y-5 rounded-2xl bg-[#f6fbfc] p-5 sm:ml-38">
|
||||
<div id={panelId} className="mb-5 space-y-5 rounded-2xl bg-tint-soft p-5 sm:ml-38">
|
||||
{entry.person && (
|
||||
<div className="flex items-center gap-4">
|
||||
<Avatar person={entry.person} size="h-16 w-16" />
|
||||
|
|
@ -148,7 +149,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
<Link
|
||||
to={personHref(entry.person.id)}
|
||||
className="font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{entry.person.name}
|
||||
</Link>
|
||||
|
|
@ -184,7 +185,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
type="button"
|
||||
onClick={() => setShowMap(true)}
|
||||
className="flex aspect-video w-full flex-col items-center justify-center gap-1 rounded-lg border border-dashed text-sm"
|
||||
style={{ borderColor: `${accent}55`, color: BODY }}
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}`, color: BODY }}
|
||||
>
|
||||
<span className="font-semibold">Show map</span>
|
||||
<span className="text-xs">{place}, from Google Maps</span>
|
||||
|
|
@ -195,7 +196,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="mt-2 inline-block text-sm underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Open in Google Maps
|
||||
</a>
|
||||
|
|
@ -258,8 +259,8 @@ export default function ScheduleBlock({
|
|||
className="rounded-full border px-5 py-2 text-sm font-semibold transition-colors"
|
||||
style={
|
||||
selected
|
||||
? { background: accent, borderColor: accent, color: '#ffffff' }
|
||||
: { borderColor: `${accent}55`, color: accent }
|
||||
? { background: accent, borderColor: accent, color: readableOn(accent) }
|
||||
: { borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }
|
||||
}
|
||||
>
|
||||
{day.name || 'Schedule'}
|
||||
|
|
@ -273,7 +274,7 @@ export default function ScheduleBlock({
|
|||
id={`${baseId}-panel`}
|
||||
role={days.length > 1 ? 'tabpanel' : undefined}
|
||||
aria-labelledby={days.length > 1 ? `${baseId}-tab-${days.indexOf(current)}` : undefined}
|
||||
className="rounded-2xl border border-[#138ba0]/15 bg-white px-5"
|
||||
className="rounded-2xl border border-brand/15 bg-surface px-5"
|
||||
>
|
||||
{current.entries.map((entry, index) => (
|
||||
<Entry key={`${current.name}-${index}`} entry={entry} accent={accent} />
|
||||
|
|
|
|||
79
src/components/ThemeToggle.tsx
Normal file
79
src/components/ThemeToggle.tsx
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
THEME TOGGLE
|
||||
|
||||
Light or dark. The theme lives on <html data-theme>, which
|
||||
index.html sets before the first paint (from this browser's
|
||||
choice, else the system setting) so a dark visitor never sees a
|
||||
white flash. Pressing this makes an explicit choice and remembers
|
||||
it; until then the site follows the system, including a change
|
||||
made while the page is open. Colours come from the tokens in
|
||||
index.css.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
type Theme = 'light' | 'dark'
|
||||
|
||||
export const THEME_STORAGE_KEY = 'ngu-theme'
|
||||
|
||||
const current = (): Theme =>
|
||||
document.documentElement.dataset.theme === 'dark' ? 'dark' : 'light'
|
||||
|
||||
function chosen(): Theme | null {
|
||||
try {
|
||||
const value = localStorage.getItem(THEME_STORAGE_KEY)
|
||||
return value === 'dark' || value === 'light' ? value : null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
export default function ThemeToggle({ className = '' }: { className?: string }) {
|
||||
const [theme, setTheme] = useState<Theme>(current)
|
||||
|
||||
// No choice made: follow the system as it changes.
|
||||
useEffect(() => {
|
||||
const media = window.matchMedia('(prefers-color-scheme: dark)')
|
||||
const follow = () => {
|
||||
if (chosen()) return
|
||||
const next: Theme = media.matches ? 'dark' : 'light'
|
||||
document.documentElement.dataset.theme = next
|
||||
setTheme(next)
|
||||
}
|
||||
media.addEventListener('change', follow)
|
||||
return () => media.removeEventListener('change', follow)
|
||||
}, [])
|
||||
|
||||
const toggle = () => {
|
||||
const next: Theme = theme === 'dark' ? 'light' : 'dark'
|
||||
document.documentElement.dataset.theme = next
|
||||
setTheme(next)
|
||||
try {
|
||||
localStorage.setItem(THEME_STORAGE_KEY, next)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
const dark = theme === 'dark'
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={toggle}
|
||||
aria-label={dark ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||
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>
|
||||
)}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ export default function VideoPlayer({
|
|||
{image ? (
|
||||
<img src={image} alt="" loading="lazy" className={`aspect-video w-full object-cover ${className}`} />
|
||||
) : (
|
||||
<div className={`aspect-video w-full bg-gradient-to-br from-[#073d4a] to-[#04262e] ${className}`} />
|
||||
<div className={`aspect-video w-full bg-[#073d4a] ${className}`} />
|
||||
)}
|
||||
<span
|
||||
aria-hidden="true"
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ export type MediaItem = {
|
|||
};
|
||||
|
||||
const button =
|
||||
"rounded-full border border-[#138ba0] px-3 py-1 text-sm font-medium text-[#0f7183] " +
|
||||
"transition-colors hover:bg-[#eef9fb] disabled:cursor-default disabled:opacity-50";
|
||||
"rounded-full border border-brand px-3 py-1 text-sm font-medium text-link " +
|
||||
"transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||
|
||||
/* A light checkerboard, so a white logo on a transparent background
|
||||
is still visible in its thumbnail. */
|
||||
|
|
@ -166,18 +166,18 @@ export function UploadButton({
|
|||
className="hidden"
|
||||
onChange={(e) => send(e.target.files)}
|
||||
/>
|
||||
<label htmlFor={keepId} className="flex items-center gap-1.5 text-xs text-[#4a6b72]">
|
||||
<label htmlFor={keepId} className="flex items-center gap-1.5 text-xs text-muted">
|
||||
<input
|
||||
id={keepId}
|
||||
type="checkbox"
|
||||
checked={keepOriginal}
|
||||
onChange={(e) => setKeepOriginal(e.target.checked)}
|
||||
className="h-3.5 w-3.5 rounded border-[#4a6b72]/40 text-[#0f7183]"
|
||||
className="h-3.5 w-3.5 rounded border-muted/40 text-link"
|
||||
/>
|
||||
Keep original
|
||||
</label>
|
||||
</div>
|
||||
{error && <p className="mt-1 text-xs text-[#b3261e]">{error}</p>}
|
||||
{error && <p className="mt-1 text-xs text-danger">{error}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -200,7 +200,7 @@ export function MediaGrid({
|
|||
renderActions?: (item: MediaItem) => ReactNode;
|
||||
}) {
|
||||
if (items.length === 0) {
|
||||
return <p className="text-sm text-[#4a6b72]">Nothing here yet.</p>;
|
||||
return <p className="text-sm text-muted">Nothing here yet.</p>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
@ -214,7 +214,7 @@ export function MediaGrid({
|
|||
// A still of the first frame; metadata only, not the file.
|
||||
<video src={item.url} preload="metadata" muted className="h-full w-full bg-black object-contain" />
|
||||
) : item.content_type.startsWith("audio/") ? (
|
||||
<div className="flex h-full w-full items-center justify-center bg-[#eef9fb] text-3xl" aria-hidden="true">
|
||||
<div className="flex h-full w-full items-center justify-center bg-tint text-3xl" aria-hidden="true">
|
||||
♪
|
||||
</div>
|
||||
) : (
|
||||
|
|
@ -226,18 +226,18 @@ export function MediaGrid({
|
|||
/>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-1.5 truncate text-xs font-medium text-[#26454c]" title={item.original_name}>
|
||||
<p className="mt-1.5 truncate text-xs font-medium text-body" title={item.original_name}>
|
||||
{item.original_name}
|
||||
</p>
|
||||
<p className="text-xs text-[#4a6b72]/80">{mediaSize(item)}</p>
|
||||
<p className="text-xs text-muted/80">{mediaSize(item)}</p>
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<li
|
||||
key={item.id}
|
||||
className={`rounded-xl border bg-white p-2 ${
|
||||
isSelected ? "border-[#138ba0] ring-2 ring-[#138ba0]/30" : "border-[#4a6b72]/20"
|
||||
className={`rounded-xl border bg-surface p-2 ${
|
||||
isSelected ? "border-brand ring-2 ring-brand/30" : "border-muted/20"
|
||||
}`}
|
||||
>
|
||||
{onPick ? (
|
||||
|
|
@ -292,27 +292,27 @@ export function MediaPicker({
|
|||
className="w-[min(56rem,calc(100vw-2rem))] rounded-2xl p-0 backdrop:bg-[#0f2f36]/40"
|
||||
>
|
||||
<div className="flex max-h-[85vh] flex-col">
|
||||
<div className="flex flex-wrap items-center gap-3 border-b border-[#138ba0]/15 px-5 py-4">
|
||||
<h2 className="text-lg font-semibold text-[#0f7183]">Choose an image</h2>
|
||||
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
||||
<h2 className="text-lg font-semibold text-link">Choose an image</h2>
|
||||
<input
|
||||
type="search"
|
||||
value={query}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Search by file name"
|
||||
className="ml-auto w-56 rounded-lg border border-[#4a6b72]/25 px-3 py-1.5 text-sm outline-none focus:border-[#138ba0]"
|
||||
className="ml-auto w-56 rounded-lg border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
aria-label="Close"
|
||||
className="h-8 w-8 rounded-full text-[#4a6b72] hover:bg-[#eef9fb]"
|
||||
className="h-8 w-8 rounded-full text-muted hover:bg-tint"
|
||||
>
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{roleCanWrite(user) && (
|
||||
<div className="border-b border-[#138ba0]/10 px-5 py-3">
|
||||
<div className="border-b border-brand/10 px-5 py-3">
|
||||
<UploadButton
|
||||
label="Upload new"
|
||||
onUploaded={(item) => {
|
||||
|
|
@ -321,15 +321,15 @@ export function MediaPicker({
|
|||
dialogRef.current?.close();
|
||||
}}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-[#4a6b72]">{UPLOAD_HELP}</p>
|
||||
<p className="mt-1 text-xs text-muted">{UPLOAD_HELP}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="overflow-y-auto px-5 py-4">
|
||||
{error ? (
|
||||
<p className="text-sm text-[#b3261e]">{error}</p>
|
||||
<p className="text-sm text-danger">{error}</p>
|
||||
) : items === null ? (
|
||||
<p className="text-sm text-[#4a6b72]">Loading…</p>
|
||||
<p className="text-sm text-muted">Loading…</p>
|
||||
) : (
|
||||
<MediaGrid
|
||||
items={items}
|
||||
|
|
@ -375,13 +375,13 @@ export function ImageInput({
|
|||
return (
|
||||
<div className="flex gap-3">
|
||||
<div
|
||||
className="flex h-20 w-20 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-[#4a6b72]/20"
|
||||
className="flex h-20 w-20 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-muted/20"
|
||||
style={CHECKER}
|
||||
>
|
||||
{src && !broken ? (
|
||||
<img src={src} alt="" className="h-full w-full object-contain" onError={() => setBroken(true)} />
|
||||
) : (
|
||||
<span className="px-1 text-center text-[10px] text-[#4a6b72]/70">
|
||||
<span className="px-1 text-center text-[10px] text-muted/70">
|
||||
{src ? "Not found" : "No image"}
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -406,7 +406,7 @@ export function ImageInput({
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => onChange("")}
|
||||
className="px-2 py-1 text-sm text-[#4a6b72] hover:text-[#b3261e]"
|
||||
className="px-2 py-1 text-sm text-muted hover:text-danger"
|
||||
>
|
||||
Clear
|
||||
</button>
|
||||
|
|
@ -498,7 +498,7 @@ export function LinkPreviewInput({
|
|||
{busy ? "Fetching…" : "Fetch preview"}
|
||||
</button>
|
||||
{note && (
|
||||
<span className={`text-xs ${note.tone === "ok" ? "text-[#0f7183]" : "text-[#b3261e]"}`}>
|
||||
<span className={`text-xs ${note.tone === "ok" ? "text-link" : "text-danger"}`}>
|
||||
{note.text}
|
||||
</span>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ function Label({ section }: { section: EditorSection }) {
|
|||
<>
|
||||
<span className="truncate">{section.label}</span>
|
||||
{section.count != null && (
|
||||
<span className="text-xs text-[#4a6b72]/70">({section.count})</span>
|
||||
<span className="text-xs text-muted/70">({section.count})</span>
|
||||
)}
|
||||
{section.hasError && (
|
||||
<span aria-label="needs attention" className="h-1.5 w-1.5 shrink-0 rounded-full bg-[#b3261e]" />
|
||||
<span aria-label="needs attention" className="h-1.5 w-1.5 shrink-0 rounded-full bg-danger" />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
|
@ -87,10 +87,10 @@ export function SectionNav({ sections }: { sections: EditorSection[] }) {
|
|||
|
||||
return (
|
||||
<nav aria-label="Sections" className="hidden max-h-[calc(100vh-8rem)] overflow-y-auto lg:block">
|
||||
<p className="mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-[#4a6b72]/70">
|
||||
<p className="mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-muted/70">
|
||||
On this page
|
||||
</p>
|
||||
<ul className="space-y-0.5 border-l border-[#138ba0]/15">
|
||||
<ul className="space-y-0.5 border-l border-brand/15">
|
||||
{sections.map((section) => {
|
||||
const lit = section.id === active;
|
||||
return (
|
||||
|
|
@ -101,8 +101,8 @@ export function SectionNav({ sections }: { sections: EditorSection[] }) {
|
|||
aria-current={lit ? "location" : undefined}
|
||||
className={`-ml-px flex w-full items-center gap-1.5 border-l-2 px-3 py-1.5 text-left text-sm transition-colors ${
|
||||
lit
|
||||
? "border-[#138ba0] font-semibold text-[#0f7183]"
|
||||
: "border-transparent text-[#4a6b72] hover:border-[#138ba0]/40 hover:text-[#0f7183]"
|
||||
? "border-brand font-semibold text-link"
|
||||
: "border-transparent text-muted hover:border-brand/40 hover:text-link"
|
||||
}`}
|
||||
>
|
||||
<Label section={section} />
|
||||
|
|
@ -120,13 +120,13 @@ export function SectionJump({ sections }: { sections: EditorSection[] }) {
|
|||
const active = useActiveSection(sections);
|
||||
|
||||
return (
|
||||
<div className="sticky top-0 z-20 -mx-6 mt-4 mb-2 border-b border-[#138ba0]/15 bg-[#f6fbfc]/95 px-6 py-2 backdrop-blur lg:hidden">
|
||||
<label className="flex items-center gap-3 text-sm text-[#4a6b72]">
|
||||
<div className="sticky top-0 z-20 -mx-6 mt-4 mb-2 border-b border-brand/15 bg-tint-soft/95 px-6 py-2 backdrop-blur lg:hidden">
|
||||
<label className="flex items-center gap-3 text-sm text-muted">
|
||||
<span className="shrink-0">Jump to</span>
|
||||
<select
|
||||
value={active ?? ""}
|
||||
onChange={(e) => jump(e.target.value)}
|
||||
className="w-full rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-1.5 text-sm text-[#26454c] outline-none focus:border-[#138ba0]"
|
||||
className="w-full rounded-lg border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand"
|
||||
>
|
||||
{sections.map((section) => (
|
||||
<option key={section.id} value={section.id}>
|
||||
|
|
|
|||
|
|
@ -104,24 +104,24 @@ const PREVIEWS = {
|
|||
};
|
||||
|
||||
const input =
|
||||
"w-full rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-2 text-sm text-[#26454c] " +
|
||||
"outline-none transition-colors focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25";
|
||||
"w-full rounded-lg border border-muted/25 bg-surface px-3 py-2 text-sm text-body " +
|
||||
"outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||
|
||||
/* Same box, but lit by the real input nested inside it. */
|
||||
const inputShell =
|
||||
"flex w-full items-center rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-2 text-sm " +
|
||||
"text-[#26454c] transition-colors focus-within:border-[#138ba0] focus-within:ring-2 " +
|
||||
"focus-within:ring-[#138ba0]/25";
|
||||
"flex w-full items-center rounded-lg border border-muted/25 bg-surface px-3 py-2 text-sm " +
|
||||
"text-body transition-colors focus-within:border-brand focus-within:ring-2 " +
|
||||
"focus-within:ring-brand/25";
|
||||
|
||||
const inputError = "border-[#b3261e] focus:border-[#b3261e] focus:ring-[#b3261e]/20";
|
||||
const inputError = "border-danger focus:border-danger focus:ring-danger/20";
|
||||
const shellError =
|
||||
"border-[#b3261e] focus-within:border-[#b3261e] focus-within:ring-[#b3261e]/20";
|
||||
"border-danger focus-within:border-danger focus-within:ring-danger/20";
|
||||
|
||||
/* Reads as settled fact rather than as an empty box someone forgot
|
||||
to fill in. */
|
||||
const inputLocked =
|
||||
"w-full rounded-lg border border-[#4a6b72]/20 bg-[#f6fbfc] px-3 py-2 text-sm " +
|
||||
"text-[#4a6b72] outline-none cursor-default focus:border-[#4a6b72]/40";
|
||||
"w-full rounded-lg border border-muted/20 bg-tint-soft px-3 py-2 text-sm " +
|
||||
"text-muted outline-none cursor-default focus:border-muted/40";
|
||||
|
||||
/* ── Dotted paths ────────────────────────────────────────────── */
|
||||
|
||||
|
|
@ -226,21 +226,21 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
|
||||
return (
|
||||
<div className={field.full ? "sm:col-span-2" : ""}>
|
||||
<label htmlFor={id} className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor={id} className="block text-sm font-medium text-body">
|
||||
{typeof field.label === "function" ? field.label(row) : field.label}
|
||||
{field.required && !locked && <span className="ml-1 text-[#b3261e]">*</span>}
|
||||
{field.required && !locked && <span className="ml-1 text-danger">*</span>}
|
||||
</label>
|
||||
|
||||
<div className="mt-1.5">
|
||||
{widget === "checkbox" ? (
|
||||
<label className="flex items-center gap-2 text-sm text-[#4a6b72]">
|
||||
<label className="flex items-center gap-2 text-sm text-muted">
|
||||
<input
|
||||
id={id}
|
||||
type="checkbox"
|
||||
checked={value === 1 || value === true}
|
||||
disabled={locked}
|
||||
onChange={(e) => onChange(e.target.checked ? 1 : 0)}
|
||||
className="h-4 w-4 rounded border-[#4a6b72]/40 text-[#0f7183] focus:ring-[#138ba0]/40 disabled:opacity-50"
|
||||
className="h-4 w-4 rounded border-muted/40 text-link focus:ring-brand/40 disabled:opacity-50"
|
||||
/>
|
||||
{helpText(field, row) ?? "Yes"}
|
||||
</label>
|
||||
|
|
@ -277,7 +277,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
value={/^#[0-9a-f]{6}$/i.test(value ?? "") ? value : "#138ba0"}
|
||||
disabled={locked}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
className="h-9 w-12 shrink-0 rounded border border-[#4a6b72]/25 bg-white disabled:opacity-50"
|
||||
className="h-9 w-12 shrink-0 rounded border border-muted/25 bg-surface disabled:opacity-50"
|
||||
/>
|
||||
<input
|
||||
{...common}
|
||||
|
|
@ -318,7 +318,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
<span
|
||||
aria-hidden="true"
|
||||
className={`shrink-0 select-none ${
|
||||
field.prefixPending ? "text-[#4a6b72]/45" : "text-[#4a6b72]"
|
||||
field.prefixPending ? "text-muted/45" : "text-muted"
|
||||
}`}
|
||||
>
|
||||
{field.prefix}
|
||||
|
|
@ -329,7 +329,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
value={value ?? ""}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
placeholder={field.placeholder}
|
||||
className="w-full border-0 bg-transparent p-0 text-[#26454c] outline-none placeholder:text-[#4a6b72]/45"
|
||||
className="w-full border-0 bg-transparent p-0 text-body outline-none placeholder:text-muted/45"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
|
@ -347,15 +347,15 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
</div>
|
||||
|
||||
{error ? (
|
||||
<p className="mt-1 text-xs text-[#b3261e]">{error}</p>
|
||||
<p className="mt-1 text-xs text-danger">{error}</p>
|
||||
) : orphaned && !locked ? (
|
||||
<p className="mt-1 text-xs text-[#b3261e]">
|
||||
<p className="mt-1 text-xs text-danger">
|
||||
This points at something that has been deleted. Pick a replacement before saving.
|
||||
</p>
|
||||
) : (
|
||||
helpText(field, row) &&
|
||||
widget !== "checkbox" && (
|
||||
<p className="mt-1 text-xs text-[#4a6b72]">{helpText(field, row)}</p>
|
||||
<p className="mt-1 text-xs text-muted">{helpText(field, row)}</p>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -467,25 +467,25 @@ export function Repeater({
|
|||
return (
|
||||
<section className={className}>
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<h3 className="text-base font-semibold text-[#26454c]">
|
||||
<h3 className="text-base font-semibold text-body">
|
||||
{spec.label}
|
||||
{list.length > 0 && (
|
||||
<span className="ml-2 text-sm font-normal text-[#4a6b72]/80">{list.length}</span>
|
||||
<span className="ml-2 text-sm font-normal text-muted/80">{list.length}</span>
|
||||
)}
|
||||
</h3>
|
||||
{list.length > 1 && (
|
||||
<div className="flex gap-3 text-xs text-[#4a6b72]">
|
||||
<div className="flex gap-3 text-xs text-muted">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen(new Set(list.map((_, i) => i)))}
|
||||
className="hover:text-[#0f7183] hover:underline"
|
||||
className="hover:text-link hover:underline"
|
||||
>
|
||||
Expand all
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen(new Set())}
|
||||
className="hover:text-[#0f7183] hover:underline"
|
||||
className="hover:text-link hover:underline"
|
||||
>
|
||||
Collapse all
|
||||
</button>
|
||||
|
|
@ -494,15 +494,15 @@ export function Repeater({
|
|||
<button
|
||||
type="button"
|
||||
onClick={add}
|
||||
className="ml-auto rounded-full border border-[#138ba0] px-3 py-1 text-sm font-medium text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
|
||||
className="ml-auto rounded-full border border-brand px-3 py-1 text-sm font-medium text-link transition-colors hover:bg-tint"
|
||||
>
|
||||
{spec.addLabel ?? "Add"}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{spec.note && <p className="mt-1 text-sm text-[#4a6b72]">{spec.note}</p>}
|
||||
{spec.note && <p className="mt-1 text-sm text-muted">{spec.note}</p>}
|
||||
|
||||
{list.length === 0 && <p className="mt-2 text-sm text-[#4a6b72]">None yet.</p>}
|
||||
{list.length === 0 && <p className="mt-2 text-sm text-muted">None yet.</p>}
|
||||
|
||||
<div className="mt-3 space-y-3">
|
||||
{list.map((row, index) => {
|
||||
|
|
@ -533,10 +533,10 @@ export function Repeater({
|
|||
endDrag();
|
||||
}}
|
||||
className={
|
||||
`rounded-xl border bg-[#f6fbfc] ${expanded ? "p-4" : "px-4 py-2.5"} transition-colors ` +
|
||||
`rounded-xl border bg-tint-soft ${expanded ? "p-4" : "px-4 py-2.5"} transition-colors ` +
|
||||
(over
|
||||
? "border-[#138ba0] ring-2 ring-[#138ba0]/25 "
|
||||
: "border-[#4a6b72]/20 ") +
|
||||
? "border-brand ring-2 ring-brand/25 "
|
||||
: "border-muted/20 ") +
|
||||
(dragging ? "opacity-50" : "")
|
||||
}
|
||||
>
|
||||
|
|
@ -556,7 +556,7 @@ export function Repeater({
|
|||
onDragEnd={endDrag}
|
||||
title="Drag to reorder"
|
||||
aria-hidden="true"
|
||||
className="cursor-grab select-none px-1 text-[#4a6b72]/60 active:cursor-grabbing"
|
||||
className="cursor-grab select-none px-1 text-muted/60 active:cursor-grabbing"
|
||||
>
|
||||
⠿
|
||||
</span>
|
||||
|
|
@ -565,11 +565,11 @@ export function Repeater({
|
|||
type="button"
|
||||
onClick={() => toggle(index)}
|
||||
aria-expanded={expanded}
|
||||
className="flex min-w-0 flex-1 items-center gap-2 text-left text-sm font-medium text-[#26454c] hover:text-[#0f7183]"
|
||||
className="flex min-w-0 flex-1 items-center gap-2 text-left text-sm font-medium text-body hover:text-link"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={`inline-block text-xs text-[#4a6b72] transition-transform ${
|
||||
className={`inline-block text-xs text-muted transition-transform ${
|
||||
expanded ? "rotate-90" : ""
|
||||
}`}
|
||||
>
|
||||
|
|
@ -579,7 +579,7 @@ export function Repeater({
|
|||
{spec.title ? spec.title(row, options) : `#${index + 1}`}
|
||||
</span>
|
||||
{!expanded && hasError(index) && (
|
||||
<span className="text-xs text-[#b3261e]">needs attention</span>
|
||||
<span className="text-xs text-danger">needs attention</span>
|
||||
)}
|
||||
</button>
|
||||
|
||||
|
|
@ -642,7 +642,7 @@ export function Repeater({
|
|||
{(spec.children ?? [])
|
||||
.filter((nested) => fieldShown(nested, row, parentRow))
|
||||
.map((nested) => (
|
||||
<div key={nested.key} className="mt-4 border-t border-[#4a6b72]/15 pt-4">
|
||||
<div key={nested.key} className="mt-4 border-t border-muted/15 pt-4">
|
||||
<Repeater
|
||||
spec={nested}
|
||||
rows={row[nested.key]}
|
||||
|
|
@ -657,8 +657,8 @@ export function Repeater({
|
|||
))}
|
||||
|
||||
{spec.preview && PREVIEWS[spec.preview] && (
|
||||
<div className="mt-4 rounded-lg border border-dashed border-[#138ba0]/30 bg-white p-4">
|
||||
<p className="mb-3 text-xs font-semibold uppercase tracking-wider text-[#4a6b72]/70">
|
||||
<div className="mt-4 rounded-lg border border-dashed border-brand/30 bg-surface p-4">
|
||||
<p className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted/70">
|
||||
Preview
|
||||
</p>
|
||||
{PREVIEWS[spec.preview](row, options)}
|
||||
|
|
@ -685,10 +685,10 @@ function IconButton({ label, onClick, danger = false, disabled = false, children
|
|||
className={
|
||||
"h-7 w-7 rounded-full border text-sm leading-none transition-colors " +
|
||||
(disabled
|
||||
? "cursor-default border-[#4a6b72]/20 text-[#4a6b72]/40"
|
||||
? "cursor-default border-muted/20 text-muted/40"
|
||||
: danger
|
||||
? "border-[#b3261e]/30 text-[#b3261e] hover:bg-[#fdf3f2]"
|
||||
: "border-[#4a6b72]/30 text-[#4a6b72] hover:bg-white")
|
||||
? "border-danger/30 text-danger hover:bg-danger-tint"
|
||||
: "border-muted/30 text-muted hover:bg-surface")
|
||||
}
|
||||
>
|
||||
{children}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,74 @@
|
|||
@theme {
|
||||
--font-display: 'Poppins', sans-serif;
|
||||
--font-body: 'Montserrat', sans-serif;
|
||||
|
||||
/* ── Colour tokens ─────────────────────────────────────────────
|
||||
Named for what they do, not what they look like, because dark
|
||||
mode (below) swaps the values. Use them as utilities
|
||||
(text-muted, bg-surface, border-brand/20) or, in a style prop,
|
||||
as var(--color-muted). Every text colour passes WCAG AA (4.5:1)
|
||||
on surface, tint and tint-soft in both modes.
|
||||
|
||||
A colour that must stay the same in both modes (white text on
|
||||
a dark band, a platform's own colour) stays a literal. Colours
|
||||
that arrive as data (page accents, event and region colours) go
|
||||
through withAlpha() and accentText() in src/lib/color.ts. */
|
||||
--color-ink: #073d4a; /* headings */
|
||||
--color-body: #26454c; /* body text */
|
||||
--color-muted: #4a6b72; /* secondary text, quiet borders */
|
||||
--color-link: #0f7183; /* links and teal text */
|
||||
--color-brand: #138ba0; /* decoration: borders, rings, rules */
|
||||
--color-action: #0f7183; /* button fills, under white text */
|
||||
--color-action-hover: #0b5c6a;
|
||||
--color-surface: #ffffff; /* page and cards */
|
||||
--color-tint: #eef9fb; /* tinted sections and panels */
|
||||
--color-tint-soft: #f6fbfc; /* hover rows, faint panels */
|
||||
--color-danger: #b3261e;
|
||||
--color-danger-tint: #fdf3f2;
|
||||
}
|
||||
|
||||
/* How much of an accent colour its text keeps (src/lib/color.ts,
|
||||
accentText): all of it on light, half (the rest white) on dark. */
|
||||
:root {
|
||||
--accent-text-mix: 100%;
|
||||
}
|
||||
|
||||
/* Dark mode: the visitor's system setting, unless the header toggle
|
||||
chose (data-theme on <html>, set before first paint in index.html
|
||||
and by ThemeToggle). */
|
||||
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
|
||||
|
||||
@layer base {
|
||||
:root[data-theme="dark"] {
|
||||
--color-ink: #eaf6f8;
|
||||
--color-body: #cde0e4;
|
||||
--color-muted: #9fb9bf;
|
||||
--color-link: #5ccbdc;
|
||||
--color-brand: #2aa7bc;
|
||||
--color-surface: #0c1d21;
|
||||
--color-tint: #11292e;
|
||||
--color-tint-soft: #0f2428;
|
||||
--color-danger: #ff8a80;
|
||||
--color-danger-tint: #3b1714;
|
||||
--accent-text-mix: 50%;
|
||||
color-scheme: dark;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
--color-ink: #eaf6f8;
|
||||
--color-body: #cde0e4;
|
||||
--color-muted: #9fb9bf;
|
||||
--color-link: #5ccbdc;
|
||||
--color-brand: #2aa7bc;
|
||||
--color-surface: #0c1d21;
|
||||
--color-tint: #11292e;
|
||||
--color-tint-soft: #0f2428;
|
||||
--color-danger: #ff8a80;
|
||||
--color-danger-tint: #3b1714;
|
||||
--accent-text-mix: 50%;
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
|
|
@ -24,7 +92,7 @@ html {
|
|||
/* One visible focus ring for keyboard users, wherever a component
|
||||
doesn't draw its own. */
|
||||
:focus-visible {
|
||||
outline: 2px solid #0f7183;
|
||||
outline: 2px solid var(--color-link);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
|
|
@ -45,8 +113,8 @@ html {
|
|||
|
||||
body {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
background-color: #ffffff;
|
||||
color: #073d4a;
|
||||
background-color: var(--color-surface);
|
||||
color: var(--color-ink);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -722,7 +722,6 @@ const events = {
|
|||
{ path: "event_logo", label: "Event logo", widget: "image", resolve: eventLogo, full: true },
|
||||
{ path: "org_logo", label: "Org logo override", widget: "image", resolve: orgLogo, full: true },
|
||||
{ path: "color", label: "Colour", widget: "color" },
|
||||
{ path: "gradient", label: "Gradient", full: true },
|
||||
{
|
||||
path: "card_image",
|
||||
label: "Card background",
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export function RequireAuth() {
|
|||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center text-[#4a6b72]">
|
||||
<div className="flex min-h-screen items-center justify-center text-muted">
|
||||
Checking your session…
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
39
src/lib/color.ts
Normal file
39
src/lib/color.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
COLOR
|
||||
|
||||
Two helpers for colours that arrive as data (a page's accent, an
|
||||
event's or region's colour), so they work with the theme tokens
|
||||
in index.css as well as with hex.
|
||||
|
||||
withAlpha(color, 20) is that colour at 20% opacity, for tints and
|
||||
borders. It replaces `${color}33`, which only works on hex.
|
||||
|
||||
accentText(color) is that colour as text: itself in light mode,
|
||||
mixed halfway to white in dark mode (--accent-text-mix), so an
|
||||
accent picked for a white page still reads on a dark one.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
export const withAlpha = (color: string, percent: number): string =>
|
||||
`color-mix(in srgb, ${color} ${percent}%, transparent)`
|
||||
|
||||
export const accentText = (color: string): string =>
|
||||
`color-mix(in srgb, ${color} var(--accent-text-mix), #ffffff)`
|
||||
|
||||
/* Text for on top of a colour that arrives as data: white or deep
|
||||
ink, whichever has more contrast (WCAG), so a pale colour an admin
|
||||
picks still gets readable text. Anything that isn't #rrggbb (a
|
||||
CSS variable, say) gets white, which suits the site's own dark
|
||||
accents. */
|
||||
export function readableOn(color: string): string {
|
||||
const hex = /^#([0-9a-f]{6})$/i.exec(color ?? '')?.[1]
|
||||
if (!hex) return '#ffffff'
|
||||
const channel = (i: number) => {
|
||||
const c = parseInt(hex.slice(i, i + 2), 16) / 255
|
||||
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4
|
||||
}
|
||||
const lum = 0.2126 * channel(0) + 0.7152 * channel(2) + 0.0722 * channel(4)
|
||||
const INK_LUM = 0.0161 // #04262e
|
||||
const onWhite = 1.05 / (lum + 0.05)
|
||||
const onInk = (lum + 0.05) / (INK_LUM + 0.05)
|
||||
return onWhite >= onInk ? '#ffffff' : '#04262e'
|
||||
}
|
||||
|
|
@ -125,7 +125,6 @@ export type EventRecord = {
|
|||
org_logo?: string | null
|
||||
event_logo?: string | null
|
||||
color?: string | null
|
||||
gradient?: string | null
|
||||
/** Behind the card. See 029_event_card_image.sql. */
|
||||
card_image?: string | null
|
||||
/* In billing order. The first is the one `color` and `org_logo`
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ import PageState from '../components/PageState.tsx'
|
|||
import { useAward, type Recipient } from '../lib/useContent.ts'
|
||||
import { eventHref, orgHref, personHref } from '../lib/hrefs.ts'
|
||||
import { awardLogo, initials, personPhoto } from '../lib/media.ts'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
export default function AwardDetail() {
|
||||
const { id } = useParams()
|
||||
|
|
@ -61,7 +62,7 @@ export default function AwardDetail() {
|
|||
? 'Nobody has received this yet.'
|
||||
: undefined,
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||
<div className="flex flex-wrap items-center gap-x-6 gap-y-3 text-sm">
|
||||
|
|
@ -75,7 +76,7 @@ export default function AwardDetail() {
|
|||
<Link
|
||||
to={orgHref(award.org.id, award.org.kind)}
|
||||
className="font-medium hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{award.org.name}
|
||||
</Link>
|
||||
|
|
@ -131,7 +132,7 @@ function RecipientRow({ recipient, accent }: { recipient: Recipient; accent: str
|
|||
<Link
|
||||
to={personHref(recipient.id)}
|
||||
className="hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{recipient.name}
|
||||
</Link>
|
||||
|
|
@ -150,7 +151,7 @@ function RecipientRow({ recipient, accent }: { recipient: Recipient; accent: str
|
|||
<Link
|
||||
to={eventHref(recipient.event.id)}
|
||||
className="hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{recipient.event.title}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@ import ContentBlocks from '../components/ContentBlocks.tsx'
|
|||
import PeopleTiles from '../components/PeopleTiles.tsx'
|
||||
import { blogImage, personPhoto } from '../lib/media.ts'
|
||||
import { postDate, useBlogPost } from '../lib/useBlog.ts'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const ACCENT = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
/* Where "back" goes: the section on the Community page. */
|
||||
const BACK = { to: '/community#blog', label: 'Community Blog' }
|
||||
|
|
@ -66,7 +67,7 @@ export default function BlogPost() {
|
|||
id: 'post',
|
||||
title: 'Post',
|
||||
accent: ACCENT,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<article className="mx-auto max-w-3xl space-y-8 px-6">
|
||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm" style={{ color: BODY }}>
|
||||
|
|
@ -76,12 +77,12 @@ export default function BlogPost() {
|
|||
<span
|
||||
key={tag}
|
||||
className="rounded-full px-3 py-0.5 text-xs font-semibold"
|
||||
style={{ background: '#eef9fb', color: ACCENT }}
|
||||
style={{ background: 'var(--color-tint)', color: accentText(ACCENT) }}
|
||||
>
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
<Link to={BACK.to} className="ml-auto hover:underline" style={{ color: ACCENT }}>
|
||||
<Link to={BACK.to} className="ml-auto hover:underline" style={{ color: accentText(ACCENT) }}>
|
||||
{BACK.label}
|
||||
</Link>
|
||||
</div>
|
||||
|
|
@ -101,7 +102,7 @@ export default function BlogPost() {
|
|||
id: 'authors',
|
||||
title: authors.length === 1 ? 'About the author' : 'About the authors',
|
||||
accent: ACCENT,
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<PeopleTiles size="md" accent={ACCENT} people={authors} />
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const SECTIONS = [
|
|||
blurb:
|
||||
"Young adult groups meeting in person and online across the movement.",
|
||||
accent: "#0f7183",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
Component: OrgListMap,
|
||||
views: { options: ["map", "grid"], default: "map", Toggle: OrgMapToggle },
|
||||
},
|
||||
|
|
@ -41,7 +41,7 @@ const SECTIONS = [
|
|||
blurb:
|
||||
"The regional organizations that support chapters and host their own gatherings.",
|
||||
accent: "#4a6b72",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
Component: OrgListVertical,
|
||||
props: {
|
||||
kind: "region",
|
||||
|
|
@ -59,7 +59,7 @@ const SECTIONS = [
|
|||
blurb:
|
||||
"Organizations we collaborate with across the Unity movement and beyond.",
|
||||
accent: "#7a5ea8",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
Component: OrgListCards,
|
||||
props: {
|
||||
kind: "partner",
|
||||
|
|
@ -78,7 +78,7 @@ export default function CommunityPage() {
|
|||
title: blog?.title || BLOG_DEFAULT_TITLE,
|
||||
blurb: blog?.blurb ?? undefined,
|
||||
accent: "#0f7183",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
Component: CommunityBlog,
|
||||
},
|
||||
...SECTIONS,
|
||||
|
|
|
|||
|
|
@ -34,9 +34,10 @@ import { personPhoto } from '../lib/media.ts'
|
|||
import { eventTypeLabel } from '../lib/eventTypes.ts'
|
||||
import { occurrenceLabel, seriesLabel, seriesTimes, upcomingOccurrences } from '../lib/eventSeries.ts'
|
||||
import { capitalize } from '../lib/text.ts'
|
||||
import { accentText, readableOn } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
/* Billing order. A role missing from here still renders, at the
|
||||
end, under its own name, better than a speaker vanishing
|
||||
|
|
@ -94,7 +95,7 @@ export default function EventDetail() {
|
|||
title: event.theme || 'About',
|
||||
blurb: event.theme ? event.tagline ?? undefined : undefined,
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||
<Facts event={event} accent={accent} />
|
||||
|
|
@ -145,17 +146,17 @@ export default function EventDetail() {
|
|||
title: 'Upcoming dates',
|
||||
blurb: seriesLabel(event.series, event.starts_on) ?? undefined,
|
||||
accent,
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<ul className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{upcoming.map((date) => (
|
||||
<li
|
||||
key={date}
|
||||
className="rounded-xl border-l-4 bg-white px-5 py-3"
|
||||
className="rounded-xl border-l-4 bg-surface px-5 py-3"
|
||||
style={{ borderColor: accent }}
|
||||
>
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{occurrenceLabel(date)}
|
||||
</p>
|
||||
{times && (
|
||||
|
|
@ -176,7 +177,7 @@ export default function EventDetail() {
|
|||
id: 'people',
|
||||
title: 'Who’s there',
|
||||
accent,
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<PeopleTiles size="lg" groups={groups} accent={accent} />
|
||||
|
|
@ -191,7 +192,7 @@ export default function EventDetail() {
|
|||
title: 'Presented here',
|
||||
blurb: 'Awards given at this gathering.',
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
||||
{event.awards.map((entry, index) => (
|
||||
|
|
@ -201,7 +202,7 @@ export default function EventDetail() {
|
|||
style={{ borderColor: accent }}
|
||||
>
|
||||
<div>
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
<Link to={awardHref(entry.award.id)} className="hover:underline">
|
||||
{entry.award.name}
|
||||
</Link>
|
||||
|
|
@ -254,7 +255,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
|||
className="rounded-full px-3 py-1 font-semibold uppercase tracking-wide"
|
||||
style={{
|
||||
background: event.status === 'cancelled' ? '#b3261e' : accent,
|
||||
color: '#ffffff',
|
||||
color: event.status === 'cancelled' ? '#ffffff' : readableOn(accent),
|
||||
}}
|
||||
>
|
||||
{STATUS_LABEL[event.status] ?? event.status}
|
||||
|
|
@ -269,7 +270,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
|||
{event.event_type && (
|
||||
<span
|
||||
className="rounded-full px-3 py-1 font-semibold uppercase tracking-wide"
|
||||
style={{ border: `1px solid ${accent}`, color: accent }}
|
||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||
>
|
||||
{eventTypeLabel(event.event_type)}
|
||||
</span>
|
||||
|
|
@ -288,7 +289,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
|||
</span>
|
||||
)}
|
||||
|
||||
<Link to="/retreats" className="ml-auto hover:underline" style={{ color: accent }}>
|
||||
<Link to="/retreats" className="ml-auto hover:underline" style={{ color: accentText(accent) }}>
|
||||
All retreats
|
||||
</Link>
|
||||
</div>
|
||||
|
|
@ -314,7 +315,7 @@ function HostList({ hosts, accent }: { hosts: EventHost[]; accent: string }) {
|
|||
<Link
|
||||
to={to}
|
||||
className="font-medium hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{host.name}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const SECTIONS = [
|
|||
blurb:
|
||||
"Found a broken link, spotted something out of date, or want the site to do something it doesn't? This form goes straight to the people who maintain it.",
|
||||
accent: ACCENT,
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: (
|
||||
// Narrower than the usual max-w-6xl: full-width form fields
|
||||
// are unpleasant to fill in.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export default function GivingPage() {
|
|||
blurb:
|
||||
"Your giving funds scholarships, retreats, leadership development and the continued growth of the Next Generation of Unity leaders, teachers and community members.",
|
||||
accent: ACCENT,
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: <GivingPanel />,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const PAGE = sitePage("/history");
|
|||
const PROGRAM_START_YEAR = 2000;
|
||||
|
||||
const ACCENT = "#0f7183";
|
||||
const BACKGROUND = "#ffffff";
|
||||
const BACKGROUND = "var(--color-surface)";
|
||||
|
||||
export default function History() {
|
||||
const { items, loading, error, reload } = useHistory();
|
||||
|
|
@ -37,7 +37,7 @@ export default function History() {
|
|||
|
||||
if (loading) {
|
||||
content = wrap(
|
||||
<p className="py-12 text-[#4a6b72]" role="status">
|
||||
<p className="py-12 text-muted" role="status">
|
||||
Loading the timeline…
|
||||
</p>,
|
||||
);
|
||||
|
|
@ -47,11 +47,11 @@ export default function History() {
|
|||
// organization with no history.
|
||||
content = wrap(
|
||||
<div className="py-12">
|
||||
<p className="text-[#b3261e]">Couldn’t load the timeline. {error}</p>
|
||||
<p className="text-danger">Couldn’t load the timeline. {error}</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={reload}
|
||||
className="mt-3 rounded-full border border-[#138ba0] px-4 py-1.5 text-sm font-medium text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
|
||||
className="mt-3 rounded-full border border-brand px-4 py-1.5 text-sm font-medium text-link transition-colors hover:bg-tint"
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ export default function Home() {
|
|||
|
||||
{error && (
|
||||
<section className="px-6 py-24 text-center">
|
||||
<p className="text-[#b3261e]">Couldn’t load the front page. {error}</p>
|
||||
<p className="text-danger">Couldn’t load the front page. {error}</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={reload}
|
||||
className="mt-4 rounded-full border border-[#138ba0] px-5 py-2 font-semibold text-[#0f7183] hover:bg-[#eef9fb]"
|
||||
className="mt-4 rounded-full border border-brand px-5 py-2 font-semibold text-link hover:bg-tint"
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const SECTIONS = [
|
|||
title: "Board & Staff",
|
||||
blurb: "The people guiding Next Generation of Unity day to day.",
|
||||
accent: "#0f7183",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<PeopleTiles size="lg" teams={{ id: "ngu-board",}} />
|
||||
|
|
@ -23,7 +23,7 @@ const SECTIONS = [
|
|||
title: "Retreat Team",
|
||||
blurb: "Volunteers who plan and lead our gatherings throughout the year.",
|
||||
accent: "#4a7a2f",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<PeopleTiles size="lg" teams="ngu-retreat-team" />
|
||||
|
|
@ -35,7 +35,7 @@ const SECTIONS = [
|
|||
title: "Committees & Volunteers",
|
||||
blurb: "Additional roles and contributors.",
|
||||
accent: "#7a5ea8",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
{/* Other roles content */}
|
||||
|
|
@ -47,7 +47,7 @@ const SECTIONS = [
|
|||
title: "Contact Us",
|
||||
blurb: "Reach out to our staff",
|
||||
accent: "#004c52",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<a
|
||||
|
|
|
|||
|
|
@ -31,9 +31,10 @@ import {
|
|||
} from '../lib/useContent.ts'
|
||||
import { orgHref, orgListHref, teamHref } from '../lib/hrefs.ts'
|
||||
import { orgLogo, personPhoto } from '../lib/media.ts'
|
||||
import { withAlpha, accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
export default function OrganizationDetail() {
|
||||
const { id } = useParams()
|
||||
|
|
@ -78,7 +79,7 @@ export default function OrganizationDetail() {
|
|||
id: 'about',
|
||||
title: 'About',
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||
<Facts org={org} accent={accent} back={back} />
|
||||
|
|
@ -106,7 +107,7 @@ export default function OrganizationDetail() {
|
|||
id: 'leadership',
|
||||
title: 'Who runs it',
|
||||
accent,
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-12">
|
||||
{teamBlocks.map((block) => (
|
||||
|
|
@ -117,14 +118,14 @@ export default function OrganizationDetail() {
|
|||
<Link
|
||||
to={teamHref(block.teamId)}
|
||||
className="hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{block.label}
|
||||
</Link>
|
||||
</h3>
|
||||
) : (
|
||||
block.label && (
|
||||
<h3 className="text-xl font-bold" style={{ color: accent }}>
|
||||
<h3 className="text-xl font-bold" style={{ color: accentText(accent) }}>
|
||||
{block.label}
|
||||
</h3>
|
||||
)
|
||||
|
|
@ -168,19 +169,19 @@ export default function OrganizationDetail() {
|
|||
title: 'Chapters',
|
||||
blurb: org.details.map_note ?? undefined,
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{(org.details.chapters ?? []).map((chapter) => (
|
||||
<Link
|
||||
key={chapter.id}
|
||||
to={orgHref(chapter.id, 'chapter')}
|
||||
className="flex items-center gap-4 rounded-lg border p-4 transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: `${accent}40` }}
|
||||
className="flex items-center gap-4 rounded-lg border p-4 transition-colors hover:bg-tint"
|
||||
style={{ borderColor: `${withAlpha(accent, 25)}` }}
|
||||
>
|
||||
<Logo file={chapter.logo} name={chapter.name} accent={accent} />
|
||||
<span>
|
||||
<span className="block font-semibold" style={{ color: accent }}>
|
||||
<span className="block font-semibold" style={{ color: accentText(accent) }}>
|
||||
{chapter.name}
|
||||
</span>
|
||||
{chapter.location_label && (
|
||||
|
|
@ -202,17 +203,17 @@ export default function OrganizationDetail() {
|
|||
title: 'Awards',
|
||||
blurb: `Given by ${org.short_name || org.name}.`,
|
||||
accent,
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 grid gap-4 sm:grid-cols-2">
|
||||
{org.awards.map((award) => (
|
||||
<Link
|
||||
key={award.id}
|
||||
to={`/awards/${award.id}`}
|
||||
className="rounded-lg border bg-white p-5 transition-colors hover:bg-[#f6fbfc]"
|
||||
style={{ borderColor: `${accent}40` }}
|
||||
className="rounded-lg border bg-surface p-5 transition-colors hover:bg-tint-soft"
|
||||
style={{ borderColor: `${withAlpha(accent, 25)}` }}
|
||||
>
|
||||
<span className="block font-semibold" style={{ color: accent }}>
|
||||
<span className="block font-semibold" style={{ color: accentText(accent) }}>
|
||||
{award.name}
|
||||
</span>
|
||||
{award.description && (
|
||||
|
|
@ -246,7 +247,7 @@ export default function OrganizationDetail() {
|
|||
id: 'events',
|
||||
title: 'Gatherings',
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<EventListCards
|
||||
host={org.id}
|
||||
|
|
@ -304,7 +305,7 @@ function Facts({
|
|||
)}
|
||||
{org.is_online && <span style={{ color: BODY }}>Online</span>}
|
||||
|
||||
<Link to={back.to} className="ml-auto hover:underline" style={{ color: accent }}>
|
||||
<Link to={back.to} className="ml-auto hover:underline" style={{ color: accentText(accent) }}>
|
||||
{back.label}
|
||||
</Link>
|
||||
</div>
|
||||
|
|
@ -347,8 +348,8 @@ function Contact({ org, accent }: { org: OrganizationRecord; accent: string }) {
|
|||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
{link.label}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,11 @@ import { awardHref, eventHref, orgHref, teamHref } from '../lib/hrefs.ts'
|
|||
import { initials, personPhoto } from '../lib/media.ts'
|
||||
import { eventTypeLabel } from '../lib/eventTypes.ts'
|
||||
import { capitalize } from '../lib/text.ts'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BACKGROUNDS = ['#ffffff', '#eef9fb']
|
||||
const BODY = 'var(--color-muted)'
|
||||
const BACKGROUNDS = ['var(--color-surface)', 'var(--color-tint)']
|
||||
|
||||
/* affiliations.role, for a row with no title of its own. */
|
||||
const ROLE_LABEL: Record<string, string> = {
|
||||
|
|
@ -110,7 +111,7 @@ export default function PersonDetail() {
|
|||
{previous.length > 0 && (
|
||||
<div>
|
||||
{current.length > 0 && (
|
||||
<h3 className="mb-4 text-lg font-semibold" style={{ color: accent }}>
|
||||
<h3 className="mb-4 text-lg font-semibold" style={{ color: accentText(accent) }}>
|
||||
Previously
|
||||
</h3>
|
||||
)}
|
||||
|
|
@ -156,7 +157,7 @@ export default function PersonDetail() {
|
|||
className="border-l-2 pl-5"
|
||||
style={{ borderColor: accent }}
|
||||
>
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
<Link to={awardHref(entry.award.id)} className="hover:underline">
|
||||
{entry.award.name}
|
||||
</Link>
|
||||
|
|
@ -170,7 +171,7 @@ export default function PersonDetail() {
|
|||
<Link
|
||||
to={eventHref(entry.event.id)}
|
||||
className="hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{entry.event.title}
|
||||
</Link>
|
||||
|
|
@ -226,7 +227,7 @@ function Facts({ person, accent }: { person: PersonRecord; accent: string }) {
|
|||
<Link
|
||||
to={orgHref(person.org.id, person.org.kind)}
|
||||
className="font-medium hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{person.org.name}
|
||||
</Link>
|
||||
|
|
@ -234,7 +235,7 @@ function Facts({ person, accent }: { person: PersonRecord; accent: string }) {
|
|||
|
||||
{person.location_label && <span style={{ color: BODY }}>{person.location_label}</span>}
|
||||
|
||||
<Link to="/leadership" className="ml-auto hover:underline" style={{ color: accent }}>
|
||||
<Link to="/leadership" className="ml-auto hover:underline" style={{ color: accentText(accent) }}>
|
||||
Leadership
|
||||
</Link>
|
||||
</div>
|
||||
|
|
@ -274,8 +275,8 @@ function Contact({ person, accent }: { person: PersonRecord; accent: string }) {
|
|||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-[#eef9fb]"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
{link.label}
|
||||
|
|
@ -293,10 +294,10 @@ function RoleList({ roles, accent }: { roles: PersonRole[]; accent: string }) {
|
|||
{roles.map((role, index) => (
|
||||
<li
|
||||
key={`${role.org.id}:${role.team?.id ?? ''}:${role.title ?? role.role}:${index}`}
|
||||
className="rounded-xl border-l-4 bg-white px-5 py-3"
|
||||
className="rounded-xl border-l-4 bg-surface px-5 py-3"
|
||||
style={{ borderColor: accent }}
|
||||
>
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{role.title || ROLE_LABEL[role.role] || capitalize(role.role)}
|
||||
</p>
|
||||
<p className="text-sm" style={{ color: BODY }}>
|
||||
|
|
@ -344,7 +345,7 @@ function EventRow({ event, accent }: { event: PersonEvent; accent: string }) {
|
|||
|
||||
return (
|
||||
<div className="border-l-2 pl-5" style={{ borderColor: accent }}>
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
<Link to={eventHref(event.id)} className="hover:underline">
|
||||
{event.title}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const PAGE = sitePage("/privacy");
|
|||
const LAST_UPDATED = "September 28, 2026";
|
||||
const ACCENT = "#0f7183";
|
||||
|
||||
const link = "underline underline-offset-2 text-[#0f7183]";
|
||||
const link = "underline underline-offset-2 text-link";
|
||||
|
||||
const contact = PRIVACY_EMAIL ? (
|
||||
<>
|
||||
|
|
@ -169,7 +169,7 @@ const SECTIONS = [
|
|||
title: "Privacy Policy",
|
||||
blurb: `Last updated: ${LAST_UPDATED}`,
|
||||
accent: ACCENT,
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
content: <LegalText parts={PARTS} />,
|
||||
},
|
||||
{
|
||||
|
|
@ -177,7 +177,7 @@ const SECTIONS = [
|
|||
title: "Data requests",
|
||||
blurb: "Ask to see, correct or delete the information we hold about you.",
|
||||
accent: ACCENT,
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: (
|
||||
<div className="mx-auto max-w-3xl px-6">
|
||||
<FeedbackForm fixedType={DATA_REQUEST.id} />
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const SECTIONS = [
|
|||
blurb:
|
||||
'Pick a page from the main navigation, any event, organization, team, award, person or blog post, or type any link. Site pages always point at the live site. Choose what sits in the centre and the colours; a warning shows if the code might not scan.',
|
||||
accent: '#0f7183',
|
||||
background: '#eef9fb',
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<QrCodeMaker />
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const SECTIONS = [
|
|||
title: "Unity Teachings",
|
||||
blurb: "Core principles, readings, and study material from the Unity movement.",
|
||||
accent: "#0f7183",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
{/* Unity teachings content */}
|
||||
|
|
@ -22,7 +22,7 @@ const SECTIONS = [
|
|||
title: "Branding & Marketing",
|
||||
blurb: "Logos, colors, templates, and guidelines for representing NGU.",
|
||||
accent: "#4a7a2f",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
{/* Branding & marketing content */}
|
||||
|
|
@ -34,7 +34,7 @@ const SECTIONS = [
|
|||
title: "Partner Resources",
|
||||
blurb: "Material for the organizations we collaborate with.",
|
||||
accent: "#7a5ea8",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
{/* Partner resources content */}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const SECTIONS = [
|
|||
title: "National Retreats",
|
||||
blurb: "Our flagship gatherings, open to young adults across the country.",
|
||||
accent: "#0f7183",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
Component: EventListCards,
|
||||
props: { scope: "national", ...RETREATS },
|
||||
views: { ...CARD_VIEWS, default: "carousel" },
|
||||
|
|
@ -57,7 +57,7 @@ const SECTIONS = [
|
|||
title: "Regional Retreats",
|
||||
blurb: "Smaller gatherings hosted by regions throughout the year.",
|
||||
accent: "#4a7a2f",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
Component: EventListCards,
|
||||
props: { scope: "regional", ...RETREATS },
|
||||
views: { ...CARD_VIEWS, default: "grid" },
|
||||
|
|
@ -67,7 +67,7 @@ const SECTIONS = [
|
|||
title: "Partner Events",
|
||||
blurb: "Retreats hosted by organizations we collaborate with.",
|
||||
accent: "#7a5ea8",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
Component: EventListCards,
|
||||
props: { scope: "partner", ...RETREATS },
|
||||
views: { ...CARD_VIEWS, default: "grid" },
|
||||
|
|
@ -82,7 +82,7 @@ const SECTIONS = [
|
|||
title: "Local Events",
|
||||
blurb: "Hosted by individual chapters.",
|
||||
accent: "#9a5b17",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
Component: EventListCards,
|
||||
props: { scope: "local", ...RETREATS_ONLY },
|
||||
views: { ...CARD_VIEWS, default: "grid" },
|
||||
|
|
@ -92,7 +92,7 @@ const SECTIONS = [
|
|||
title: "International Events",
|
||||
blurb: "Gatherings beyond the US.",
|
||||
accent: "#2f6bb5",
|
||||
background: "#eef9fb",
|
||||
background: "var(--color-tint)",
|
||||
Component: EventListCards,
|
||||
props: { scope: "international", ...RETREATS_ONLY },
|
||||
views: { ...CARD_VIEWS, default: "grid" },
|
||||
|
|
@ -102,7 +102,7 @@ const SECTIONS = [
|
|||
title: "Other Events",
|
||||
blurb: "Everything that doesn't fit the categories above.",
|
||||
accent: "#5d6c70",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
Component: EventListCards,
|
||||
props: { scope: "other", ...RETREATS_ONLY },
|
||||
views: { ...CARD_VIEWS, default: "grid" },
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@ import ContentBlocks from '../components/ContentBlocks.tsx'
|
|||
import PeopleTiles from '../components/PeopleTiles.tsx'
|
||||
import { useTeam } from '../lib/useContent.ts'
|
||||
import { orgHref } from '../lib/hrefs.ts'
|
||||
import { accentText } from '../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
export default function TeamDetail() {
|
||||
const { id } = useParams()
|
||||
|
|
@ -53,7 +54,7 @@ export default function TeamDetail() {
|
|||
id: 'about',
|
||||
title: 'About',
|
||||
accent,
|
||||
background: '#ffffff',
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||
<Facts orgId={team.org.id} orgKind={team.org.kind} orgName={team.org.name} accent={accent} />
|
||||
|
|
@ -94,7 +95,7 @@ export default function TeamDetail() {
|
|||
id: 'members',
|
||||
title: hasAbout ? 'Members' : team.name,
|
||||
accent,
|
||||
background: hasAbout ? '#eef9fb' : '#ffffff',
|
||||
background: hasAbout ? 'var(--color-tint)' : 'var(--color-surface)',
|
||||
content: (
|
||||
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
||||
{!hasAbout && (
|
||||
|
|
@ -139,7 +140,7 @@ function Facts({
|
|||
<Link
|
||||
to={orgHref(orgId, orgKind)}
|
||||
className="font-medium hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
{orgName}
|
||||
</Link>
|
||||
|
|
@ -148,7 +149,7 @@ function Facts({
|
|||
<Link
|
||||
to={orgHref(orgId, orgKind)}
|
||||
className="ml-auto hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Back to {orgName}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const PAGE = sitePage("/terms");
|
|||
/* Change the date when the wording changes. */
|
||||
const LAST_UPDATED = "September 28, 2026";
|
||||
|
||||
const link = "underline underline-offset-2 text-[#0f7183]";
|
||||
const link = "underline underline-offset-2 text-link";
|
||||
|
||||
const PARTS: LegalPart[] = [
|
||||
{
|
||||
|
|
@ -83,7 +83,7 @@ const SECTIONS = [
|
|||
title: "Terms of Service",
|
||||
blurb: `Last updated: ${LAST_UPDATED}`,
|
||||
accent: "#0f7183",
|
||||
background: "#ffffff",
|
||||
background: "var(--color-surface)",
|
||||
content: <LegalText parts={PARTS} />,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@ import { useCallback, useEffect, useRef, useState, type ReactNode } from "react"
|
|||
import { Link } from "react-router-dom";
|
||||
|
||||
import { ApiError, del, get, post } from "../../lib/api.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
const TEAL = "#0f7183";
|
||||
const MUTED = "#4a6b72";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const POLL_MS = 2000;
|
||||
|
||||
type Job = {
|
||||
|
|
@ -81,29 +82,29 @@ function sizeOf(bytes: number | null): string {
|
|||
}
|
||||
|
||||
const button =
|
||||
"rounded-full border border-[#138ba0] px-4 py-2 text-sm font-semibold text-[#0f7183] transition-colors hover:bg-[#eef9fb] disabled:cursor-default disabled:opacity-50";
|
||||
"rounded-full border border-brand px-4 py-2 text-sm font-semibold text-link transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||
const primary =
|
||||
"rounded-full bg-[#0f7183] px-5 py-2.5 font-semibold text-white transition-colors hover:bg-[#0b5c6a] disabled:bg-[#4a6b72]/25";
|
||||
"rounded-full bg-action px-5 py-2.5 font-semibold text-white transition-colors hover:bg-action-hover disabled:bg-muted/25";
|
||||
const input =
|
||||
"rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-2 text-sm text-[#26454c] outline-none focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25";
|
||||
"rounded-lg border border-muted/25 bg-surface px-3 py-2 text-sm text-body outline-none focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||
|
||||
function Card({ title, children }: { title: string; children: ReactNode }) {
|
||||
return (
|
||||
<section className="mt-6 rounded-2xl border border-[#138ba0]/20 bg-white p-5">
|
||||
<h2 className="text-lg font-semibold text-[#26454c]">{title}</h2>
|
||||
<section className="mt-6 rounded-2xl border border-brand/20 bg-surface p-5">
|
||||
<h2 className="text-lg font-semibold text-body">{title}</h2>
|
||||
<div className="mt-4">{children}</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function Status({ job }: { job: Job }) {
|
||||
if (job.status === "failed") return <p className="text-sm text-[#b3261e]">Failed: {job.error}</p>;
|
||||
if (job.status === "failed") return <p className="text-sm text-danger">Failed: {job.error}</p>;
|
||||
if (job.status === "done") return null;
|
||||
const percent = Math.round(job.progress * 100);
|
||||
return (
|
||||
<div className="mt-2">
|
||||
<div className="h-2 overflow-hidden rounded-full bg-[#eef9fb]">
|
||||
<div className="h-full bg-[#0f7183] transition-all" style={{ width: `${job.status === "queued" ? 0 : percent}%` }} />
|
||||
<div className="h-2 overflow-hidden rounded-full bg-tint">
|
||||
<div className="h-full bg-action transition-all" style={{ width: `${job.status === "queued" ? 0 : percent}%` }} />
|
||||
</div>
|
||||
<p className="mt-1 text-xs" style={{ color: MUTED }}>
|
||||
{job.status === "queued" ? "Waiting its turn…" : `${percent}%`}
|
||||
|
|
@ -212,7 +213,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
] as const
|
||||
).map(([label, text, setText, setAt, value]) => (
|
||||
<div key={label}>
|
||||
<label className="block text-sm font-medium text-[#26454c]" htmlFor={`clip-${label}`}>
|
||||
<label className="block text-sm font-medium text-body" htmlFor={`clip-${label}`}>
|
||||
{label}
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -233,7 +234,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
<button
|
||||
type="button"
|
||||
className="text-sm underline"
|
||||
style={{ color: TEAL }}
|
||||
style={{ color: accentText(TEAL) }}
|
||||
onClick={() => {
|
||||
if (videoRef.current) videoRef.current.currentTime = value;
|
||||
}}
|
||||
|
|
@ -249,7 +250,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
</p>
|
||||
|
||||
<div>
|
||||
<p className="text-sm font-medium text-[#26454c]">Make it</p>
|
||||
<p className="text-sm font-medium text-body">Make it</p>
|
||||
<div className="mt-2 flex gap-4 text-sm">
|
||||
{[
|
||||
["video", "Video (MP4)"],
|
||||
|
|
@ -265,7 +266,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
|
||||
{format === "video" && (
|
||||
<div>
|
||||
<p className="text-sm font-medium text-[#26454c]">Shape</p>
|
||||
<p className="text-sm font-medium text-body">Shape</p>
|
||||
<div className="mt-2 grid gap-1.5 text-sm">
|
||||
{SHAPES.map(([id, label]) => (
|
||||
<label key={id} className="flex items-center gap-2">
|
||||
|
|
@ -275,7 +276,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
))}
|
||||
</div>
|
||||
{target && (
|
||||
<label className="mt-3 block text-sm text-[#26454c]">
|
||||
<label className="mt-3 block text-sm text-body">
|
||||
Where to crop
|
||||
<input
|
||||
type="range"
|
||||
|
|
@ -284,7 +285,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
step={0.01}
|
||||
value={focus}
|
||||
onChange={(e) => setFocus(Number(e.target.value))}
|
||||
className="mt-1 w-full accent-[#138ba0]"
|
||||
className="mt-1 w-full accent-brand"
|
||||
/>
|
||||
<span className="text-xs" style={{ color: MUTED }}>
|
||||
The white box on the video is what's kept.
|
||||
|
|
@ -297,7 +298,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
|||
<button type="button" className={primary} disabled={busy || end <= start} onClick={make}>
|
||||
{busy ? "Queuing…" : "Make clip"}
|
||||
</button>
|
||||
{error && <p className="text-sm text-[#b3261e]">{error}</p>}
|
||||
{error && <p className="text-sm text-danger">{error}</p>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -368,14 +369,14 @@ export default function AdminClips() {
|
|||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap items-baseline gap-3">
|
||||
<h1 className="text-2xl font-bold text-[#0f7183]">Video clips</h1>
|
||||
<h1 className="text-2xl font-bold text-link">Video clips</h1>
|
||||
<p className="text-sm" style={{ color: MUTED }}>
|
||||
Cut clips from our YouTube and Facebook videos, for Reels, Shorts, the site or a podcast.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{missing.length > 0 && (
|
||||
<p className="mt-4 rounded-xl bg-[#fdf3f2] px-4 py-3 text-sm text-[#b3261e]">
|
||||
<p className="mt-4 rounded-xl bg-danger-tint px-4 py-3 text-sm text-danger">
|
||||
{missing.join(" and ")} {missing.length > 1 ? "aren't" : "isn't"} installed on the server, so this
|
||||
won't work until {missing.length > 1 ? "they are" : "it is"}. See docs/video-clips.md.
|
||||
</p>
|
||||
|
|
@ -397,15 +398,15 @@ export default function AdminClips() {
|
|||
<p className="mt-2 text-xs" style={{ color: MUTED }}>
|
||||
YouTube and Facebook links only, and only videos NGU owns or has permission to use. Up to 4 hours long.
|
||||
</p>
|
||||
{addError && <p className="mt-2 text-sm text-[#b3261e]">{addError}</p>}
|
||||
{addError && <p className="mt-2 text-sm text-danger">{addError}</p>}
|
||||
|
||||
{data.sources.length > 0 && (
|
||||
<ul className="mt-5 divide-y divide-[#138ba0]/10">
|
||||
<ul className="mt-5 divide-y divide-brand/10">
|
||||
{data.sources.map((s) => (
|
||||
<li key={s.id} className="py-3">
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="truncate font-medium text-[#26454c]">{s.title ?? s.source_url}</p>
|
||||
<p className="truncate font-medium text-body">{s.title ?? s.source_url}</p>
|
||||
<p className="text-xs" style={{ color: MUTED }}>
|
||||
{[s.duration && clock(s.duration), sizeOf(s.bytes)].filter(Boolean).join(" · ")}
|
||||
</p>
|
||||
|
|
@ -418,7 +419,7 @@ export default function AdminClips() {
|
|||
{s.status !== "running" && (
|
||||
<button
|
||||
type="button"
|
||||
className="text-sm hover:text-[#b3261e]"
|
||||
className="text-sm hover:text-danger"
|
||||
style={{ color: MUTED }}
|
||||
onClick={() =>
|
||||
window.confirm("Delete this video and its clips from the server?") &&
|
||||
|
|
@ -444,13 +445,13 @@ export default function AdminClips() {
|
|||
|
||||
{data.clips.length > 0 && (
|
||||
<Card title="Clips">
|
||||
{rowError && <p className="mb-3 text-sm text-[#b3261e]">{rowError}</p>}
|
||||
<ul className="divide-y divide-[#138ba0]/10">
|
||||
{rowError && <p className="mb-3 text-sm text-danger">{rowError}</p>}
|
||||
<ul className="divide-y divide-brand/10">
|
||||
{data.clips.map((clip) => (
|
||||
<li key={clip.id} className="py-3">
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="truncate font-medium text-[#26454c]">{sourceTitle(clip.source_id)}</p>
|
||||
<p className="truncate font-medium text-body">{sourceTitle(clip.source_id)}</p>
|
||||
<p className="text-xs" style={{ color: MUTED }}>
|
||||
{clip.params &&
|
||||
[
|
||||
|
|
@ -480,7 +481,7 @@ export default function AdminClips() {
|
|||
</>
|
||||
)}
|
||||
{clip.saved_url && (
|
||||
<Link to="/admin/media" className="text-sm underline" style={{ color: TEAL }}>
|
||||
<Link to="/admin/media" className="text-sm underline" style={{ color: accentText(TEAL) }}>
|
||||
In the media library
|
||||
</Link>
|
||||
)}
|
||||
|
|
@ -492,7 +493,7 @@ export default function AdminClips() {
|
|||
{clip.status !== "running" && (
|
||||
<button
|
||||
type="button"
|
||||
className="text-sm hover:text-[#b3261e]"
|
||||
className="text-sm hover:text-danger"
|
||||
style={{ color: MUTED }}
|
||||
onClick={() => act(() => del(`/admin/clips/${clip.id}`))}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ import { feedbackTypeLabel } from "../../data/feedbackTypes.ts";
|
|||
const STATUSES = ["new", "read", "actioned", "archived", "spam"];
|
||||
|
||||
const STATUS_STYLE = {
|
||||
new: "bg-[#0f7183] text-white",
|
||||
read: "bg-[#eef9fb] text-[#0f7183]",
|
||||
new: "bg-action text-white",
|
||||
read: "bg-tint text-link",
|
||||
actioned: "bg-[#eaf3e2] text-[#4a6b2f]",
|
||||
archived: "bg-[#4a6b72]/10 text-[#4a6b72]",
|
||||
spam: "bg-[#fdf3f2] text-[#b3261e]",
|
||||
archived: "bg-muted/10 text-muted",
|
||||
spam: "bg-danger-tint text-danger",
|
||||
};
|
||||
|
||||
// created_at is UTC in 'YYYY-MM-DD HH:MM:SS' form, which Safari
|
||||
|
|
@ -89,9 +89,9 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
}
|
||||
|
||||
return (
|
||||
<article className="rounded-2xl border border-[#138ba0]/20 bg-white p-5">
|
||||
<article className="rounded-2xl border border-brand/20 bg-surface p-5">
|
||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm">
|
||||
<span className="font-semibold text-[#26454c]">
|
||||
<span className="font-semibold text-body">
|
||||
{feedbackTypeLabel(row.feedback_type)}
|
||||
</span>
|
||||
<span
|
||||
|
|
@ -101,15 +101,15 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
>
|
||||
{row.status}
|
||||
</span>
|
||||
<span className="text-[#4a6b72]">{locationOf(row)}</span>
|
||||
<span className="ml-auto text-xs text-[#4a6b72]">
|
||||
<span className="text-muted">{locationOf(row)}</span>
|
||||
<span className="ml-auto text-xs text-muted">
|
||||
#{row.id} · {formatDate(row.created_at)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p className="mt-4 whitespace-pre-wrap text-[#26454c]">{row.message}</p>
|
||||
<p className="mt-4 whitespace-pre-wrap text-body">{row.message}</p>
|
||||
|
||||
<p className="mt-4 text-sm text-[#4a6b72]">
|
||||
<p className="mt-4 text-sm text-muted">
|
||||
{row.name || row.email ? (
|
||||
<>
|
||||
{row.name && <span>{row.name}</span>}
|
||||
|
|
@ -117,7 +117,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
{row.email && (
|
||||
<a
|
||||
href={`mailto:${row.email}?subject=Your%20NGU%20site%20feedback`}
|
||||
className="text-[#0f7183] underline underline-offset-2"
|
||||
className="text-link underline underline-offset-2"
|
||||
>
|
||||
{row.email}
|
||||
</a>
|
||||
|
|
@ -129,11 +129,11 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
</p>
|
||||
|
||||
{canWrite && (
|
||||
<div className="mt-5 border-t border-[#4a6b72]/15 pt-4">
|
||||
<div className="mt-5 border-t border-muted/15 pt-4">
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<label
|
||||
htmlFor={`status-${row.id}`}
|
||||
className="text-sm font-medium text-[#26454c]"
|
||||
className="text-sm font-medium text-body"
|
||||
>
|
||||
Status
|
||||
</label>
|
||||
|
|
@ -142,7 +142,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
value={row.status}
|
||||
disabled={busy}
|
||||
onChange={(e) => save({ status: e.target.value })}
|
||||
className="rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-1.5 text-sm text-[#26454c] outline-none focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25"
|
||||
className="rounded-lg border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand focus:ring-2 focus:ring-brand/25"
|
||||
>
|
||||
{STATUSES.map((s) => (
|
||||
<option key={s} value={s}>
|
||||
|
|
@ -158,14 +158,14 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
disabled={busy}
|
||||
placeholder="Internal note: who's handling it, what was done"
|
||||
onChange={(e) => setNote(e.target.value)}
|
||||
className="mt-3 w-full resize-y rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-2 text-sm text-[#26454c] outline-none focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25"
|
||||
className="mt-3 w-full resize-y rounded-lg border border-muted/25 bg-surface px-3 py-2 text-sm text-body outline-none focus:border-brand focus:ring-2 focus:ring-brand/25"
|
||||
/>
|
||||
{noteDirty && (
|
||||
<button
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => save({ admin_note: note })}
|
||||
className="mt-2 rounded-full bg-[#0f7183] px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-[#0b5c6a] disabled:bg-[#4a6b72]/25"
|
||||
className="mt-2 rounded-full bg-action px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-action-hover disabled:bg-muted/25"
|
||||
>
|
||||
{busy ? "Saving…" : "Save note"}
|
||||
</button>
|
||||
|
|
@ -177,17 +177,17 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
spam or archived is the habit this defers to. Hence the
|
||||
second click rather than a window.confirm. */}
|
||||
{canRemove && (
|
||||
<div className="mt-4 flex flex-wrap items-center gap-3 border-t border-[#4a6b72]/15 pt-4">
|
||||
<div className="mt-4 flex flex-wrap items-center gap-3 border-t border-muted/15 pt-4">
|
||||
{confirming ? (
|
||||
<>
|
||||
<span className="text-sm text-[#26454c]">
|
||||
<span className="text-sm text-body">
|
||||
Delete #{row.id} for good? Marking it spam keeps it recoverable.
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={remove}
|
||||
className="rounded-full bg-[#b3261e] px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-[#8f1e18] disabled:bg-[#4a6b72]/25"
|
||||
className="rounded-full bg-danger px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-[#8f1e18] disabled:bg-muted/25"
|
||||
>
|
||||
{busy ? "Deleting…" : "Delete"}
|
||||
</button>
|
||||
|
|
@ -195,7 +195,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => setConfirming(false)}
|
||||
className="rounded-full border border-[#4a6b72]/25 px-4 py-1.5 text-sm text-[#4a6b72] transition-colors hover:border-[#4a6b72]/50"
|
||||
className="rounded-full border border-muted/25 px-4 py-1.5 text-sm text-muted transition-colors hover:border-muted/50"
|
||||
>
|
||||
Keep it
|
||||
</button>
|
||||
|
|
@ -205,7 +205,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => setConfirming(true)}
|
||||
className="rounded-full border border-[#b3261e]/30 px-4 py-1.5 text-sm font-medium text-[#b3261e] transition-colors hover:bg-[#fdf3f2]"
|
||||
className="rounded-full border border-danger/30 px-4 py-1.5 text-sm font-medium text-danger transition-colors hover:bg-danger-tint"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
|
|
@ -214,7 +214,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
)}
|
||||
|
||||
{error && (
|
||||
<p role="alert" className="mt-3 text-sm text-[#b3261e]">
|
||||
<p role="alert" className="mt-3 text-sm text-danger">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -305,8 +305,8 @@ export default function AdminFeedback() {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold text-[#0f7183]">Feedback</h1>
|
||||
<p className="mt-2 text-sm text-[#4a6b72]">
|
||||
<h1 className="text-3xl font-bold text-link">Feedback</h1>
|
||||
<p className="mt-2 text-sm text-muted">
|
||||
{canWrite
|
||||
? "Everything submitted through the site form."
|
||||
: "Read-only: your account can't change statuses or notes."}
|
||||
|
|
@ -322,8 +322,8 @@ export default function AdminFeedback() {
|
|||
className={
|
||||
"rounded-full px-4 py-1.5 text-sm transition-colors " +
|
||||
(status === tab.id
|
||||
? "bg-[#0f7183] font-semibold text-white"
|
||||
: "border border-[#4a6b72]/25 text-[#4a6b72] hover:border-[#138ba0]/50")
|
||||
? "bg-action font-semibold text-white"
|
||||
: "border border-muted/25 text-muted hover:border-brand/50")
|
||||
}
|
||||
>
|
||||
{tab.label}
|
||||
|
|
@ -340,12 +340,12 @@ export default function AdminFeedback() {
|
|||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") setSearch(query.trim());
|
||||
}}
|
||||
className="rounded-full border border-[#4a6b72]/25 bg-white px-4 py-1.5 text-sm text-[#26454c] outline-none focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25"
|
||||
className="rounded-full border border-muted/25 bg-surface px-4 py-1.5 text-sm text-body outline-none focus:border-brand focus:ring-2 focus:ring-brand/25"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setSearch(query.trim())}
|
||||
className="rounded-full border border-[#4a6b72]/25 px-4 py-1.5 text-sm text-[#4a6b72] transition-colors hover:border-[#138ba0]/50"
|
||||
className="rounded-full border border-muted/25 px-4 py-1.5 text-sm text-muted transition-colors hover:border-brand/50"
|
||||
>
|
||||
Search
|
||||
</button>
|
||||
|
|
@ -356,14 +356,14 @@ export default function AdminFeedback() {
|
|||
{error && (
|
||||
<p
|
||||
role="alert"
|
||||
className="mt-6 rounded-xl border border-[#b3261e]/30 bg-[#fdf3f2] px-4 py-3 text-sm text-[#b3261e]"
|
||||
className="mt-6 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||
>
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{!loading && rows.length === 0 && !error && (
|
||||
<p className="mt-10 text-[#4a6b72]">
|
||||
<p className="mt-10 text-muted">
|
||||
Nothing here. {status === "new" ? "The queue is clear." : "Try another filter."}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -381,13 +381,13 @@ export default function AdminFeedback() {
|
|||
))}
|
||||
</div>
|
||||
|
||||
{loading && <p className="mt-6 text-sm text-[#4a6b72]">Loading…</p>}
|
||||
{loading && <p className="mt-6 text-sm text-muted">Loading…</p>}
|
||||
|
||||
{cursor && !loading && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => load(cursor)}
|
||||
className="mt-6 rounded-full border border-[#138ba0] px-5 py-2 font-semibold text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
|
||||
className="mt-6 rounded-full border border-brand px-5 py-2 font-semibold text-link transition-colors hover:bg-tint"
|
||||
>
|
||||
Load older
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ function NavCard({ item }) {
|
|||
const extras = (item.children ?? []).filter((child) => child.to !== to);
|
||||
|
||||
return (
|
||||
<div className="group relative flex flex-col rounded-2xl border border-[#138ba0]/20 bg-white p-5 transition-all hover:border-[#138ba0]/60 hover:shadow-sm">
|
||||
<div className="group relative flex flex-col rounded-2xl border border-brand/20 bg-surface p-5 transition-all hover:border-brand/60 hover:shadow-sm">
|
||||
<div className="flex items-baseline gap-3">
|
||||
<h3 className="text-base font-semibold text-[#0f7183]">
|
||||
<h3 className="text-base font-semibold text-link">
|
||||
<Link
|
||||
to={to}
|
||||
className="after:absolute after:inset-0 after:rounded-2xl after:content-['']"
|
||||
|
|
@ -46,23 +46,23 @@ function NavCard({ item }) {
|
|||
</h3>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="ml-auto text-[#0f7183] opacity-0 transition-opacity group-hover:opacity-100"
|
||||
className="ml-auto text-link opacity-0 transition-opacity group-hover:opacity-100"
|
||||
>
|
||||
→
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{item.blurb && (
|
||||
<p className="mt-1.5 text-sm leading-relaxed text-[#4a6b72]">{item.blurb}</p>
|
||||
<p className="mt-1.5 text-sm leading-relaxed text-muted">{item.blurb}</p>
|
||||
)}
|
||||
|
||||
{extras.length > 0 && (
|
||||
<div className="relative z-10 mt-4 flex flex-wrap gap-x-4 gap-y-1 border-t border-[#138ba0]/10 pt-3 text-sm">
|
||||
<div className="relative z-10 mt-4 flex flex-wrap gap-x-4 gap-y-1 border-t border-brand/10 pt-3 text-sm">
|
||||
{extras.map((child) => (
|
||||
<Link
|
||||
key={child.to}
|
||||
to={child.to}
|
||||
className="text-[#4a6b72] underline-offset-4 transition-colors hover:text-[#0f7183] hover:underline"
|
||||
className="text-muted underline-offset-4 transition-colors hover:text-link hover:underline"
|
||||
>
|
||||
{child.label}
|
||||
</Link>
|
||||
|
|
@ -77,8 +77,8 @@ function CardBlock({ title, blurb, children }) {
|
|||
return (
|
||||
<div className="mt-10">
|
||||
<div className="flex items-baseline gap-3">
|
||||
<h2 className="text-lg font-semibold text-[#0f7183]">{title}</h2>
|
||||
{blurb && <p className="text-sm text-[#4a6b72]">{blurb}</p>}
|
||||
<h2 className="text-lg font-semibold text-link">{title}</h2>
|
||||
{blurb && <p className="text-sm text-muted">{blurb}</p>}
|
||||
</div>
|
||||
<div className="mt-4 grid gap-4 sm:grid-cols-2">{children}</div>
|
||||
</div>
|
||||
|
|
@ -87,11 +87,11 @@ function CardBlock({ title, blurb, children }) {
|
|||
|
||||
function PanelSection({ title, children }) {
|
||||
return (
|
||||
<section className="border-b border-[#138ba0]/10 px-5 py-4 last:border-b-0">
|
||||
<h2 className="text-xs font-semibold uppercase tracking-wider text-[#4a6b72]/70">
|
||||
<section className="border-b border-brand/10 px-5 py-4 last:border-b-0">
|
||||
<h2 className="text-xs font-semibold uppercase tracking-wider text-muted/70">
|
||||
{title}
|
||||
</h2>
|
||||
<div className="mt-2.5 text-sm text-[#4a6b72]">{children}</div>
|
||||
<div className="mt-2.5 text-sm text-muted">{children}</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
@ -114,10 +114,10 @@ export default function AdminHome() {
|
|||
return (
|
||||
<div className="grid gap-8 lg:grid-cols-[1fr_17rem] lg:items-start">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-[#0f7183]">
|
||||
<h1 className="text-2xl font-bold text-link">
|
||||
{user?.name ? `Welcome back, ${user.name.split(" ")[0]}.` : "Welcome back."}
|
||||
</h1>
|
||||
<p className="mt-1 text-[#4a6b72]">Pick a section to work in.</p>
|
||||
<p className="mt-1 text-muted">Pick a section to work in.</p>
|
||||
|
||||
{GROUPS.map((group) => (
|
||||
<CardBlock key={group.label} title={group.label} blurb={group.blurb}>
|
||||
|
|
@ -137,14 +137,14 @@ export default function AdminHome() {
|
|||
</div>
|
||||
|
||||
{/* Sticky so it stays put once the card column outgrows it. */}
|
||||
<aside className="divide-y divide-[#138ba0]/10 rounded-2xl border border-[#138ba0]/20 bg-white lg:sticky lg:top-6">
|
||||
<aside className="divide-y divide-brand/10 rounded-2xl border border-brand/20 bg-surface lg:sticky lg:top-6">
|
||||
<PanelSection title="Signed in">
|
||||
<p className="font-medium text-[#0f2f36]">{user?.name || user?.email}</p>
|
||||
{user?.name && user?.email && (
|
||||
<p className="mt-0.5 break-all text-xs text-[#4a6b72]/80">{user.email}</p>
|
||||
<p className="mt-0.5 break-all text-xs text-muted/80">{user.email}</p>
|
||||
)}
|
||||
{role && (
|
||||
<span className="mt-2 inline-block rounded-full bg-[#eef9fb] px-2.5 py-0.5 text-xs font-medium text-[#0f7183]">
|
||||
<span className="mt-2 inline-block rounded-full bg-tint px-2.5 py-0.5 text-xs font-medium text-link">
|
||||
{role}
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -156,7 +156,7 @@ export default function AdminHome() {
|
|||
<li key={link.to}>
|
||||
<Link
|
||||
to={link.to}
|
||||
className="underline-offset-4 transition-colors hover:text-[#0f7183] hover:underline"
|
||||
className="underline-offset-4 transition-colors hover:text-link hover:underline"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
|
|
@ -166,12 +166,12 @@ export default function AdminHome() {
|
|||
</PanelSection>
|
||||
|
||||
<PanelSection title="Site">
|
||||
<p className="font-mono text-xs text-[#4a6b72]/80">{SITE_VERSION}</p>
|
||||
<p className="font-mono text-xs text-muted/80">{SITE_VERSION}</p>
|
||||
<a
|
||||
href="/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="mt-2 inline-block underline-offset-4 transition-colors hover:text-[#0f7183] hover:underline"
|
||||
className="mt-2 inline-block underline-offset-4 transition-colors hover:text-link hover:underline"
|
||||
>
|
||||
View the public site ↗
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import { AdminWidthContext } from "../../lib/adminWidth.tsx";
|
|||
import { SITE_VERSION } from "../../lib/version.ts";
|
||||
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
|
||||
import nguLogo from "../../assets/logos/NGU_Logo.svg";
|
||||
import ThemeToggle from "../../components/ThemeToggle.tsx";
|
||||
import {
|
||||
ADMIN_HOME,
|
||||
AREA_TITLES,
|
||||
|
|
@ -45,8 +46,8 @@ import {
|
|||
function GroupMenu({ item, lit, pathname }) {
|
||||
const children = item.children ?? [];
|
||||
const link = lit
|
||||
? "font-semibold text-[#0f7183]"
|
||||
: "text-[#4a6b72] transition-colors hover:text-[#0f7183]";
|
||||
? "font-semibold text-link"
|
||||
: "text-muted transition-colors hover:text-link";
|
||||
|
||||
return (
|
||||
<div className="group relative">
|
||||
|
|
@ -61,15 +62,15 @@ function GroupMenu({ item, lit, pathname }) {
|
|||
|
||||
{children.length > 1 && (
|
||||
<div className="invisible absolute left-0 top-full z-30 pt-2 opacity-0 transition-opacity group-focus-within:visible group-focus-within:opacity-100 group-hover:visible group-hover:opacity-100">
|
||||
<ul className="min-w-52 rounded-xl border border-[#138ba0]/20 bg-white p-1.5 shadow-lg">
|
||||
<ul className="min-w-52 rounded-xl border border-brand/20 bg-surface p-1.5 shadow-lg">
|
||||
{children.map((child) => (
|
||||
<li key={child.to}>
|
||||
<NavLink
|
||||
to={child.to}
|
||||
className={`block rounded-lg px-3 py-2 text-sm transition-colors hover:bg-[#eef9fb] ${
|
||||
className={`block rounded-lg px-3 py-2 text-sm transition-colors hover:bg-tint ${
|
||||
matches(pathname, child.to)
|
||||
? "font-semibold text-[#0f7183]"
|
||||
: "text-[#26454c]"
|
||||
? "font-semibold text-link"
|
||||
: "text-body"
|
||||
}`}
|
||||
>
|
||||
{child.label}
|
||||
|
|
@ -130,11 +131,11 @@ export default function AdminLayout() {
|
|||
|
||||
const subnav = active?.children ?? [];
|
||||
|
||||
const wordmark = <span className="text-lg font-bold text-[#0f7183]">{areaTitle}</span>;
|
||||
const wordmark = <span className="text-lg font-bold text-link">{areaTitle}</span>;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col bg-[#f6fbfc]">
|
||||
<header className="border-b border-[#138ba0]/20 bg-white">
|
||||
<div className="flex min-h-screen flex-col bg-tint-soft">
|
||||
<header className="border-b border-brand/20 bg-surface">
|
||||
<div className="mx-auto flex max-w-5xl flex-wrap items-center gap-x-8 gap-y-3 px-6 py-4">
|
||||
{/* Already home, so nothing to link to. */}
|
||||
{isHome ? (
|
||||
|
|
@ -156,7 +157,7 @@ export default function AdminLayout() {
|
|||
{item.separated && (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="h-4 w-px bg-[#4a6b72]/25"
|
||||
className="h-4 w-px bg-muted/25"
|
||||
/>
|
||||
)}
|
||||
<GroupMenu item={item} lit={item === active} pathname={pathname} />
|
||||
|
|
@ -165,14 +166,15 @@ export default function AdminLayout() {
|
|||
</nav>
|
||||
)}
|
||||
|
||||
<div className="ml-auto flex items-center gap-4 text-sm text-[#4a6b72]">
|
||||
<div className="ml-auto flex items-center gap-4 text-sm text-muted">
|
||||
<ThemeToggle className="hover:bg-tint hover:text-link" />
|
||||
<span>
|
||||
{user?.name || user?.email}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleLogout}
|
||||
className="rounded-full border border-[#4a6b72]/30 px-4 py-1.5 font-medium transition-colors hover:bg-[#eef9fb] hover:text-[#0f7183]"
|
||||
className="rounded-full border border-muted/30 px-4 py-1.5 font-medium transition-colors hover:bg-tint hover:text-link"
|
||||
>
|
||||
Sign out
|
||||
</button>
|
||||
|
|
@ -182,7 +184,7 @@ export default function AdminLayout() {
|
|||
{/* Subnav. Only drawn where there is something to draw, so
|
||||
Events and People don't get an empty grey strip. */}
|
||||
{subnav.length > 0 && (
|
||||
<div className="border-t border-[#138ba0]/10 bg-[#f6fbfc]">
|
||||
<div className="border-t border-brand/10 bg-tint-soft">
|
||||
<div className="mx-auto flex max-w-5xl flex-wrap gap-6 px-6 py-2.5 text-sm">
|
||||
{subnav.map((child) => (
|
||||
<NavLink
|
||||
|
|
@ -190,8 +192,8 @@ export default function AdminLayout() {
|
|||
to={child.to}
|
||||
className={
|
||||
child === activeChild
|
||||
? "font-semibold text-[#0f7183]"
|
||||
: "text-[#4a6b72] transition-colors hover:text-[#0f7183]"
|
||||
? "font-semibold text-link"
|
||||
: "text-muted transition-colors hover:text-link"
|
||||
}
|
||||
>
|
||||
{child.label}
|
||||
|
|
@ -213,12 +215,12 @@ export default function AdminLayout() {
|
|||
</AdminTitleContext.Provider>
|
||||
</main>
|
||||
|
||||
<footer className="border-t border-[#138ba0]/15 bg-white">
|
||||
<footer className="border-t border-brand/15 bg-surface">
|
||||
<div className="mx-auto flex max-w-5xl items-center gap-4 px-6 py-3">
|
||||
<Link to={ADMIN_HOME} className="transition-opacity hover:opacity-70">
|
||||
<img src={nguLogo} alt="NGU" className="h-6 w-auto" />
|
||||
</Link>
|
||||
<span className="ml-auto font-mono text-xs text-[#4a6b72]/70">
|
||||
<span className="ml-auto font-mono text-xs text-muted/70">
|
||||
{SITE_VERSION}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ const GOOGLE_ERRORS: Record<string, string> = {
|
|||
};
|
||||
|
||||
const fieldClass =
|
||||
"w-full rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 text-[#26454c] " +
|
||||
"outline-none transition-colors focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25";
|
||||
"w-full rounded-xl border border-muted/25 bg-surface px-4 py-3 text-body " +
|
||||
"outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||
|
||||
export default function AdminLogin() {
|
||||
const { login } = useAuth();
|
||||
|
|
@ -85,23 +85,23 @@ export default function AdminLogin() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-[#eef9fb] px-6 py-16">
|
||||
<div className="flex min-h-screen items-center justify-center bg-tint px-6 py-16">
|
||||
<div className="w-full max-w-sm">
|
||||
<h1 className="text-3xl font-bold text-[#0f7183]">NGU admin</h1>
|
||||
<p className="mt-2 text-sm text-[#4a6b72]">
|
||||
<h1 className="text-3xl font-bold text-link">NGU admin</h1>
|
||||
<p className="mt-2 text-sm text-muted">
|
||||
Sign in to edit the site.
|
||||
</p>
|
||||
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
noValidate
|
||||
className="mt-8 rounded-2xl border border-[#138ba0]/20 bg-white p-6"
|
||||
className="mt-8 rounded-2xl border border-brand/20 bg-surface p-6"
|
||||
>
|
||||
{google && (
|
||||
<>
|
||||
<a
|
||||
href={`/api/auth/google?next=${encodeURIComponent(destination)}`}
|
||||
className="flex items-center justify-center gap-3 rounded-full border border-[#4a6b72]/30 px-6 py-3 font-semibold text-[#26454c] transition-colors hover:bg-[#eef9fb]"
|
||||
className="flex items-center justify-center gap-3 rounded-full border border-muted/30 px-6 py-3 font-semibold text-body transition-colors hover:bg-tint"
|
||||
>
|
||||
<svg viewBox="0 0 48 48" className="h-5 w-5" aria-hidden="true">
|
||||
<path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.4-.4-3.5z" />
|
||||
|
|
@ -111,17 +111,17 @@ export default function AdminLogin() {
|
|||
</svg>
|
||||
Sign in with Google
|
||||
</a>
|
||||
<div className="my-6 flex items-center gap-3 text-xs text-[#4a6b72]">
|
||||
<span className="h-px flex-1 bg-[#4a6b72]/20" />
|
||||
<div className="my-6 flex items-center gap-3 text-xs text-muted">
|
||||
<span className="h-px flex-1 bg-muted/20" />
|
||||
or with a password
|
||||
<span className="h-px flex-1 bg-[#4a6b72]/20" />
|
||||
<span className="h-px flex-1 bg-muted/20" />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
<label
|
||||
htmlFor="admin-email"
|
||||
className="block text-sm font-medium text-[#26454c]"
|
||||
className="block text-sm font-medium text-body"
|
||||
>
|
||||
Email
|
||||
</label>
|
||||
|
|
@ -137,7 +137,7 @@ export default function AdminLogin() {
|
|||
|
||||
<label
|
||||
htmlFor="admin-password"
|
||||
className="mt-5 block text-sm font-medium text-[#26454c]"
|
||||
className="mt-5 block text-sm font-medium text-body"
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
|
|
@ -153,7 +153,7 @@ export default function AdminLogin() {
|
|||
{error && (
|
||||
<p
|
||||
role="alert"
|
||||
className="mt-5 rounded-xl border border-[#b3261e]/30 bg-[#fdf3f2] px-4 py-3 text-sm text-[#b3261e]"
|
||||
className="mt-5 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||
>
|
||||
{error}
|
||||
</p>
|
||||
|
|
@ -162,14 +162,14 @@ export default function AdminLogin() {
|
|||
<button
|
||||
type="submit"
|
||||
disabled={busy || !email || !password}
|
||||
className="mt-6 w-full rounded-full bg-[#0f7183] px-6 py-3 font-semibold text-white transition-colors hover:bg-[#0b5c6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40 disabled:cursor-not-allowed disabled:bg-[#4a6b72]/25"
|
||||
className="mt-6 w-full rounded-full bg-action px-6 py-3 font-semibold text-white transition-colors hover:bg-action-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 disabled:cursor-not-allowed disabled:bg-muted/25"
|
||||
>
|
||||
{busy ? "Signing in…" : "Sign in"}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
<p className="mt-6 text-center text-xs text-[#4a6b72]">
|
||||
<p className="mt-6 text-center text-xs text-muted">
|
||||
Accounts are created on the server. Ask whoever runs the box.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -64,17 +64,17 @@ function DeleteControl({ item, onDeleted }: { item: MediaItem; onDeleted: () =>
|
|||
type="button"
|
||||
onClick={ask}
|
||||
disabled={busy}
|
||||
className="text-xs text-[#4a6b72] hover:text-[#b3261e]"
|
||||
className="text-xs text-muted hover:text-danger"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
{error && <p className="mt-1 text-xs text-[#b3261e]">{error}</p>}
|
||||
{error && <p className="mt-1 text-xs text-danger">{error}</p>}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="rounded-lg bg-[#fdf3f2] p-2 text-xs text-[#26454c]">
|
||||
<div className="rounded-lg bg-danger-tint p-2 text-xs text-body">
|
||||
{uses.length > 0 ? (
|
||||
<p>
|
||||
Still used by{" "}
|
||||
|
|
@ -89,15 +89,15 @@ function DeleteControl({ item, onDeleted }: { item: MediaItem; onDeleted: () =>
|
|||
type="button"
|
||||
onClick={remove}
|
||||
disabled={busy}
|
||||
className="font-medium text-[#b3261e] hover:underline"
|
||||
className="font-medium text-danger hover:underline"
|
||||
>
|
||||
{busy ? "Deleting…" : "Delete for good"}
|
||||
</button>
|
||||
<button type="button" onClick={() => setUses(null)} className="text-[#4a6b72] hover:underline">
|
||||
<button type="button" onClick={() => setUses(null)} className="text-muted hover:underline">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
{error && <p className="mt-1 text-[#b3261e]">{error}</p>}
|
||||
{error && <p className="mt-1 text-danger">{error}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ function CopyPath({ url }: { url: string }) {
|
|||
setTimeout(() => setCopied(false), 1500);
|
||||
});
|
||||
}}
|
||||
className="text-xs text-[#0f7183] hover:underline"
|
||||
className="text-xs text-link hover:underline"
|
||||
>
|
||||
{copied ? "Copied" : "Copy path"}
|
||||
</button>
|
||||
|
|
@ -128,8 +128,8 @@ export default function AdminMedia() {
|
|||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap items-baseline gap-3">
|
||||
<h1 className="text-2xl font-bold text-[#0f7183]">Media</h1>
|
||||
<p className="text-sm text-[#4a6b72]">
|
||||
<h1 className="text-2xl font-bold text-link">Media</h1>
|
||||
<p className="text-sm text-muted">
|
||||
Uploaded images. Image fields in every editor pick from here.
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -142,7 +142,7 @@ export default function AdminMedia() {
|
|||
label="Upload images"
|
||||
onUploaded={(item) => setItems((current) => [item, ...(current ?? [])])}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-[#4a6b72]">{UPLOAD_HELP}</p>
|
||||
<p className="mt-1 text-xs text-muted">{UPLOAD_HELP}</p>
|
||||
</div>
|
||||
)}
|
||||
<input
|
||||
|
|
@ -150,15 +150,15 @@ export default function AdminMedia() {
|
|||
value={query}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Search by file name"
|
||||
className="ml-auto w-64 rounded-lg border border-[#4a6b72]/25 px-3 py-2 text-sm outline-none focus:border-[#138ba0]"
|
||||
className="ml-auto w-64 rounded-lg border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-6">
|
||||
{error ? (
|
||||
<p className="text-sm text-[#b3261e]">{error}</p>
|
||||
<p className="text-sm text-danger">{error}</p>
|
||||
) : items === null ? (
|
||||
<p className="text-sm text-[#4a6b72]">Loading…</p>
|
||||
<p className="text-sm text-muted">Loading…</p>
|
||||
) : (
|
||||
<MediaGrid
|
||||
items={items}
|
||||
|
|
@ -169,7 +169,7 @@ export default function AdminMedia() {
|
|||
href={item.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="text-xs text-[#0f7183] hover:underline"
|
||||
className="text-xs text-link hover:underline"
|
||||
>
|
||||
Open
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ function Block({ title, note, children }: any) {
|
|||
return (
|
||||
<section className="mt-8 first:mt-0">
|
||||
<div className="flex items-baseline gap-3">
|
||||
<h2 className="text-lg font-semibold text-[#0f7183]">{title}</h2>
|
||||
{note && <p className="text-sm text-[#4a6b72]">{note}</p>}
|
||||
<h2 className="text-lg font-semibold text-link">{title}</h2>
|
||||
{note && <p className="text-sm text-muted">{note}</p>}
|
||||
</div>
|
||||
<div className="mt-3">{children}</div>
|
||||
</section>
|
||||
|
|
@ -64,8 +64,8 @@ function Block({ title, note, children }: any) {
|
|||
|
||||
function Stat({ label, value }) {
|
||||
return (
|
||||
<div className="rounded-xl border border-[#138ba0]/20 bg-white px-4 py-3">
|
||||
<div className="text-xs font-medium uppercase tracking-wider text-[#4a6b72]/70">
|
||||
<div className="rounded-xl border border-brand/20 bg-surface px-4 py-3">
|
||||
<div className="text-xs font-medium uppercase tracking-wider text-muted/70">
|
||||
{label}
|
||||
</div>
|
||||
<div className="mt-1 break-words text-sm font-medium text-[#0f2f36]">{value}</div>
|
||||
|
|
@ -143,7 +143,7 @@ export default function AdminPanel() {
|
|||
|
||||
if (loading) {
|
||||
return (
|
||||
<p className="py-12 text-[#4a6b72]" role="status">
|
||||
<p className="py-12 text-muted" role="status">
|
||||
Loading the panel…
|
||||
</p>
|
||||
);
|
||||
|
|
@ -152,11 +152,11 @@ export default function AdminPanel() {
|
|||
if (error) {
|
||||
return (
|
||||
<div className="py-12">
|
||||
<p className="text-[#b3261e]">{error}</p>
|
||||
<p className="text-danger">{error}</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={load}
|
||||
className="mt-3 rounded-full border border-[#138ba0] px-4 py-1.5 text-sm font-medium text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
|
||||
className="mt-3 rounded-full border border-brand px-4 py-1.5 text-sm font-medium text-link transition-colors hover:bg-tint"
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
|
|
@ -171,8 +171,8 @@ export default function AdminPanel() {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-[#0f7183]">Panel</h1>
|
||||
<p className="mt-1 text-[#4a6b72]">
|
||||
<h1 className="text-2xl font-bold text-link">Panel</h1>
|
||||
<p className="mt-1 text-muted">
|
||||
Accounts and server state. Everything here is superadmin-only.
|
||||
</p>
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ export default function AdminPanel() {
|
|||
<Stat label="Live sessions" value={system.sessions} />
|
||||
</div>
|
||||
{system.dbPath && (
|
||||
<p className="mt-3 font-mono text-xs text-[#4a6b72]/70">{system.dbPath}</p>
|
||||
<p className="mt-3 font-mono text-xs text-muted/70">{system.dbPath}</p>
|
||||
)}
|
||||
</Block>
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ export default function AdminPanel() {
|
|||
{content.map((row) => (
|
||||
<span
|
||||
key={row.label}
|
||||
className="rounded-full border border-[#138ba0]/20 bg-white px-3 py-1 text-sm text-[#4a6b72]"
|
||||
className="rounded-full border border-brand/20 bg-surface px-3 py-1 text-sm text-muted"
|
||||
>
|
||||
{row.label}{" "}
|
||||
<strong className="font-semibold text-[#0f2f36]">
|
||||
|
|
@ -210,9 +210,9 @@ export default function AdminPanel() {
|
|||
title="Accounts"
|
||||
note="Changing a role or disabling an account signs that person out."
|
||||
>
|
||||
<div className="overflow-x-auto rounded-2xl border border-[#138ba0]/20 bg-white">
|
||||
<div className="overflow-x-auto rounded-2xl border border-brand/20 bg-surface">
|
||||
<table className="w-full min-w-[46rem] text-left text-sm">
|
||||
<thead className="border-b border-[#138ba0]/15 text-xs uppercase tracking-wider text-[#4a6b72]/70">
|
||||
<thead className="border-b border-brand/15 text-xs uppercase tracking-wider text-muted/70">
|
||||
<tr>
|
||||
<th className="px-4 py-3 font-medium">Account</th>
|
||||
<th className="px-4 py-3 font-medium">Role</th>
|
||||
|
|
@ -221,7 +221,7 @@ export default function AdminPanel() {
|
|||
<th className="px-4 py-3 font-medium">Access</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-[#138ba0]/10">
|
||||
<tbody className="divide-y divide-brand/10">
|
||||
{users.map((row) => {
|
||||
const isMe = row.id === me?.id;
|
||||
const lastSuper =
|
||||
|
|
@ -230,21 +230,21 @@ export default function AdminPanel() {
|
|||
const busy = busyId === row.id;
|
||||
|
||||
return (
|
||||
<tr key={row.id} className={row.is_active ? "" : "bg-[#f6fbfc]"}>
|
||||
<tr key={row.id} className={row.is_active ? "" : "bg-tint-soft"}>
|
||||
<td className="px-4 py-3">
|
||||
<div className="font-medium text-[#0f2f36]">
|
||||
{row.name || row.email}
|
||||
{isMe && (
|
||||
<span className="ml-2 text-xs font-normal text-[#4a6b72]/70">
|
||||
<span className="ml-2 text-xs font-normal text-muted/70">
|
||||
you
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{row.name && (
|
||||
<div className="text-xs text-[#4a6b72]/80">{row.email}</div>
|
||||
<div className="text-xs text-muted/80">{row.email}</div>
|
||||
)}
|
||||
{rowError?.id === row.id && (
|
||||
<div className="mt-1 text-xs text-[#b3261e]">
|
||||
<div className="mt-1 text-xs text-danger">
|
||||
{rowError.message}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -255,7 +255,7 @@ export default function AdminPanel() {
|
|||
value={row.role}
|
||||
disabled={locked || busy}
|
||||
onChange={(e) => changeRole(row, e.target.value)}
|
||||
className="rounded-lg border border-[#138ba0]/30 bg-white px-2 py-1 text-sm text-[#0f2f36] disabled:cursor-not-allowed disabled:bg-[#f6fbfc] disabled:text-[#4a6b72]/60"
|
||||
className="rounded-lg border border-brand/30 bg-surface px-2 py-1 text-sm text-[#0f2f36] disabled:cursor-not-allowed disabled:bg-tint-soft disabled:text-muted/60"
|
||||
title={
|
||||
isMe
|
||||
? "You can't change your own role."
|
||||
|
|
@ -272,16 +272,16 @@ export default function AdminPanel() {
|
|||
</select>
|
||||
</td>
|
||||
|
||||
<td className="px-4 py-3 text-[#4a6b72]">{when(row.last_login_at)}</td>
|
||||
<td className="px-4 py-3 text-muted">{when(row.last_login_at)}</td>
|
||||
|
||||
<td className="px-4 py-3">
|
||||
<span className="text-[#4a6b72]">{row.sessions}</span>
|
||||
<span className="text-muted">{row.sessions}</span>
|
||||
{row.sessions > 0 && (
|
||||
<button
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => revoke(row)}
|
||||
className="ml-3 text-xs font-medium text-[#0f7183] underline-offset-4 hover:underline disabled:opacity-50"
|
||||
className="ml-3 text-xs font-medium text-link underline-offset-4 hover:underline disabled:opacity-50"
|
||||
>
|
||||
Sign out
|
||||
</button>
|
||||
|
|
@ -295,8 +295,8 @@ export default function AdminPanel() {
|
|||
onClick={() => setActive(row, row.is_active ? 0 : 1)}
|
||||
className={`rounded-full border px-3 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${
|
||||
row.is_active
|
||||
? "border-[#4a6b72]/30 text-[#4a6b72] hover:border-[#b3261e]/50 hover:text-[#b3261e]"
|
||||
: "border-[#138ba0]/40 text-[#0f7183] hover:bg-[#eef9fb]"
|
||||
? "border-muted/30 text-muted hover:border-danger/50 hover:text-danger"
|
||||
: "border-brand/40 text-link hover:bg-tint"
|
||||
}`}
|
||||
>
|
||||
{row.is_active ? "Disable" : "Enable"}
|
||||
|
|
@ -317,12 +317,12 @@ export default function AdminPanel() {
|
|||
<dt className="shrink-0 font-medium text-[#0f2f36]">
|
||||
{ROLE_LABELS[role]}
|
||||
</dt>
|
||||
<dd className="text-[#4a6b72]">{ROLE_NOTES[role]}</dd>
|
||||
<dd className="text-muted">{ROLE_NOTES[role]}</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
|
||||
<p className="mt-4 text-xs text-[#4a6b72]/80">
|
||||
<p className="mt-4 text-xs text-muted/80">
|
||||
New accounts are still created with <code>admin-cli.js</code> on the server.
|
||||
</p>
|
||||
</Block>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ import {
|
|||
|
||||
/* One card per section. scroll-mt clears the sticky "Jump to" bar
|
||||
below lg, and leaves a little air above the card on desktop. */
|
||||
const CARD = "mt-6 scroll-mt-16 rounded-2xl border border-[#138ba0]/20 bg-white p-5 lg:scroll-mt-6";
|
||||
const CARD = "mt-6 scroll-mt-16 rounded-2xl border border-brand/20 bg-surface p-5 lg:scroll-mt-6";
|
||||
|
||||
const sectionId = (name) => `section-${slugify(name)}`;
|
||||
|
||||
|
|
@ -225,8 +225,8 @@ export default function EntityEdit() {
|
|||
return () => window.removeEventListener("beforeunload", warn);
|
||||
}, [dirty]);
|
||||
|
||||
if (!manifest) return <p className="text-[#4a6b72]">No such thing to edit.</p>;
|
||||
if (loading || !form) return <p className="text-[#4a6b72]">Loading…</p>;
|
||||
if (!manifest) return <p className="text-muted">No such thing to edit.</p>;
|
||||
if (loading || !form) return <p className="text-muted">Loading…</p>;
|
||||
|
||||
/* ── Heading ───────────────────────────────────────────────── */
|
||||
|
||||
|
|
@ -356,13 +356,13 @@ export default function EntityEdit() {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => leave(`/admin/${manifest.key}`)}
|
||||
className="text-sm text-[#4a6b72] hover:text-[#0f7183]"
|
||||
className="text-sm text-muted hover:text-link"
|
||||
>
|
||||
← {manifest.label}
|
||||
</button>
|
||||
)}
|
||||
|
||||
<h1 className="mt-2 text-3xl font-bold text-[#0f7183]">
|
||||
<h1 className="mt-2 text-3xl font-bold text-link">
|
||||
{isNew ? `New ${manifest.singular}` : heading}
|
||||
</h1>
|
||||
|
||||
|
|
@ -385,13 +385,13 @@ export default function EntityEdit() {
|
|||
{singleton ? (
|
||||
updatedAt && (
|
||||
<div className={CARD}>
|
||||
<p className="text-sm text-[#4a6b72]">Last saved {updatedAt}</p>
|
||||
<p className="text-sm text-muted">Last saved {updatedAt}</p>
|
||||
</div>
|
||||
)
|
||||
) : autoId ? (
|
||||
!isNew && (
|
||||
<div id="section-url-id" className={CARD}>
|
||||
<p className="text-sm text-[#4a6b72]">
|
||||
<p className="text-sm text-muted">
|
||||
{manifest.idLabel} #{form.id}
|
||||
{form.updated_at && <> · last saved {form.updated_at}</>}
|
||||
</p>
|
||||
|
|
@ -421,7 +421,7 @@ export default function EntityEdit() {
|
|||
}}
|
||||
/>
|
||||
{!isNew && form.updated_at && (
|
||||
<p className="mt-2 text-xs text-[#4a6b72]">
|
||||
<p className="mt-2 text-xs text-muted">
|
||||
Last saved {form.updated_at}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -431,8 +431,8 @@ export default function EntityEdit() {
|
|||
{/* Field groups */}
|
||||
{groups.map((group) => (
|
||||
<section key={group.legend} id={sectionId(group.legend)} className={CARD}>
|
||||
<h2 className="text-lg font-semibold text-[#26454c]">{group.legend}</h2>
|
||||
{group.note && <p className="mt-1 text-sm text-[#4a6b72]">{group.note}</p>}
|
||||
<h2 className="text-lg font-semibold text-body">{group.legend}</h2>
|
||||
{group.note && <p className="mt-1 text-sm text-muted">{group.note}</p>}
|
||||
<div className="mt-4">
|
||||
<FieldGrid>
|
||||
{group.fields.map((field) => (
|
||||
|
|
@ -470,7 +470,7 @@ export default function EntityEdit() {
|
|||
</div>
|
||||
|
||||
{/* Sticky action bar */}
|
||||
<div className="fixed inset-x-0 bottom-0 border-t border-[#138ba0]/20 bg-white/95 backdrop-blur">
|
||||
<div className="fixed inset-x-0 bottom-0 border-t border-brand/20 bg-white/95 backdrop-blur">
|
||||
<div className="mx-auto flex max-w-5xl flex-wrap items-center gap-4 px-6 py-3">
|
||||
{canWrite ? (
|
||||
<>
|
||||
|
|
@ -478,7 +478,7 @@ export default function EntityEdit() {
|
|||
type="button"
|
||||
onClick={save}
|
||||
disabled={saving || !dirty}
|
||||
className="rounded-full bg-[#0f7183] px-6 py-2 font-semibold text-white transition-colors hover:bg-[#0b5c6a] disabled:bg-[#4a6b72]/25"
|
||||
className="rounded-full bg-action px-6 py-2 font-semibold text-white transition-colors hover:bg-action-hover disabled:bg-muted/25"
|
||||
>
|
||||
{saving ? "Saving…" : isNew ? "Create" : "Save changes"}
|
||||
</button>
|
||||
|
|
@ -486,27 +486,27 @@ export default function EntityEdit() {
|
|||
<button
|
||||
type="button"
|
||||
onClick={remove}
|
||||
className="rounded-full border border-[#b3261e]/40 px-4 py-2 text-sm font-medium text-[#b3261e] transition-colors hover:bg-[#fdf3f2]"
|
||||
className="rounded-full border border-danger/40 px-4 py-2 text-sm font-medium text-danger transition-colors hover:bg-danger-tint"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<span className="text-sm text-[#4a6b72]">
|
||||
<span className="text-sm text-muted">
|
||||
Read-only: your account can view this but not change it.
|
||||
</span>
|
||||
)}
|
||||
|
||||
{dirty && !saving && (
|
||||
<span className="text-sm text-[#4a6b72]">Unsaved changes</span>
|
||||
<span className="text-sm text-muted">Unsaved changes</span>
|
||||
)}
|
||||
|
||||
{message && (
|
||||
<span
|
||||
role="status"
|
||||
className={`flex items-center gap-2 text-sm ${
|
||||
message.tone === "ok" ? "text-[#0f7183]" : "text-[#b3261e]"
|
||||
message.tone === "ok" ? "text-link" : "text-danger"
|
||||
}`}
|
||||
>
|
||||
{message.text}
|
||||
|
|
@ -514,7 +514,7 @@ export default function EntityEdit() {
|
|||
<button
|
||||
type="button"
|
||||
onClick={load}
|
||||
className="rounded-full border border-[#b3261e]/40 px-3 py-1 text-xs font-medium"
|
||||
className="rounded-full border border-danger/40 px-3 py-1 text-xs font-medium"
|
||||
>
|
||||
Reload
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default function EntityList() {
|
|||
}, [load]);
|
||||
|
||||
if (!manifest) {
|
||||
return <p className="text-[#4a6b72]">No such thing to edit.</p>;
|
||||
return <p className="text-muted">No such thing to edit.</p>;
|
||||
}
|
||||
|
||||
// One row, so no list: the tab opens the row.
|
||||
|
|
@ -92,11 +92,11 @@ export default function EntityList() {
|
|||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap items-center gap-4">
|
||||
<h1 className="text-3xl font-bold text-[#0f7183]">{manifest.label}</h1>
|
||||
<h1 className="text-3xl font-bold text-link">{manifest.label}</h1>
|
||||
{canWrite && (
|
||||
<Link
|
||||
to={`/admin/${manifest.key}/new`}
|
||||
className="ml-auto rounded-full bg-[#0f7183] px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-[#0b5c6a]"
|
||||
className="ml-auto rounded-full bg-action px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-action-hover"
|
||||
>
|
||||
New {manifest.singular}
|
||||
</Link>
|
||||
|
|
@ -106,12 +106,12 @@ export default function EntityList() {
|
|||
{/* Filters */}
|
||||
<div className="mt-6 flex flex-wrap items-end gap-3">
|
||||
{manifest.list.filters.map((filter) => (
|
||||
<label key={filter.key} className="text-xs text-[#4a6b72]">
|
||||
<label key={filter.key} className="text-xs text-muted">
|
||||
<span className="block">{filter.label}</span>
|
||||
<select
|
||||
value={params.get(filter.key) ?? ""}
|
||||
onChange={(e) => setParam(filter.key, e.target.value)}
|
||||
className="mt-1 rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-1.5 text-sm text-[#26454c] outline-none focus:border-[#138ba0]"
|
||||
className="mt-1 rounded-lg border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand"
|
||||
>
|
||||
<option value="">All</option>
|
||||
{labelFor(filter).map(([value, label]) => (
|
||||
|
|
@ -130,12 +130,12 @@ export default function EntityList() {
|
|||
placeholder="Search"
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
onKeyDown={(e) => e.key === "Enter" && setParam("q", query.trim())}
|
||||
className="rounded-full border border-[#4a6b72]/25 bg-white px-4 py-1.5 text-sm text-[#26454c] outline-none focus:border-[#138ba0]"
|
||||
className="rounded-full border border-muted/25 bg-surface px-4 py-1.5 text-sm text-body outline-none focus:border-brand"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setParam("q", query.trim())}
|
||||
className="rounded-full border border-[#4a6b72]/25 px-4 py-1.5 text-sm text-[#4a6b72] hover:border-[#138ba0]/50"
|
||||
className="rounded-full border border-muted/25 px-4 py-1.5 text-sm text-muted hover:border-brand/50"
|
||||
>
|
||||
Search
|
||||
</button>
|
||||
|
|
@ -145,16 +145,16 @@ export default function EntityList() {
|
|||
{error && (
|
||||
<p
|
||||
role="alert"
|
||||
className="mt-6 rounded-xl border border-[#b3261e]/30 bg-[#fdf3f2] px-4 py-3 text-sm text-[#b3261e]"
|
||||
className="mt-6 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||
>
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{/* Rows */}
|
||||
<div className="mt-6 overflow-x-auto rounded-2xl border border-[#138ba0]/20 bg-white">
|
||||
<div className="mt-6 overflow-x-auto rounded-2xl border border-brand/20 bg-surface">
|
||||
<table className="w-full text-left text-sm">
|
||||
<thead className="border-b border-[#4a6b72]/15 text-xs text-[#4a6b72]">
|
||||
<thead className="border-b border-muted/15 text-xs text-muted">
|
||||
<tr>
|
||||
{manifest.list.columns.map((column) => (
|
||||
<th key={column.key} className="px-4 py-3 font-medium">
|
||||
|
|
@ -170,14 +170,14 @@ export default function EntityList() {
|
|||
{rows.map((row) => (
|
||||
<tr
|
||||
key={row.id}
|
||||
className="cursor-pointer border-b border-[#4a6b72]/10 last:border-0 hover:bg-[#f6fbfc]"
|
||||
className="cursor-pointer border-b border-muted/10 last:border-0 hover:bg-tint-soft"
|
||||
onClick={() => navigate(`/admin/${manifest.key}/${row.id}`)}
|
||||
>
|
||||
{manifest.list.columns.map((column) => (
|
||||
<td
|
||||
key={column.key}
|
||||
className={`px-4 py-3 ${
|
||||
column.primary ? "font-medium text-[#26454c]" : "text-[#4a6b72]"
|
||||
column.primary ? "font-medium text-body" : "text-muted"
|
||||
}`}
|
||||
>
|
||||
{column.key === linkKey ? (
|
||||
|
|
@ -199,16 +199,16 @@ export default function EntityList() {
|
|||
)}
|
||||
</td>
|
||||
))}
|
||||
<td className="px-4 py-3 font-mono text-xs text-[#4a6b72]">{row.id}</td>
|
||||
<td className="px-4 py-3 font-mono text-xs text-muted">{row.id}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{!loading && rows.length === 0 && (
|
||||
<p className="px-4 py-8 text-center text-[#4a6b72]">Nothing matches.</p>
|
||||
<p className="px-4 py-8 text-center text-muted">Nothing matches.</p>
|
||||
)}
|
||||
{loading && <p className="px-4 py-8 text-center text-[#4a6b72]">Loading…</p>}
|
||||
{loading && <p className="px-4 py-8 text-center text-muted">Loading…</p>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import { blogImage } 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'
|
||||
|
||||
/* Headings for a half the admin didn't title. */
|
||||
const DEFAULTS = {
|
||||
|
|
@ -40,19 +41,19 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
|
|||
const authors = post.authors.map((author) => author.name).join(', ')
|
||||
|
||||
return (
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-[#138ba0]/15 bg-white shadow-sm transition-shadow hover:shadow-lg">
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg">
|
||||
{cover ? (
|
||||
<img src={cover} alt="" loading="lazy" className="aspect-video w-full object-cover" />
|
||||
) : (
|
||||
<div className="aspect-video w-full bg-gradient-to-br from-[#eef9fb] to-[#d9f0f3]" />
|
||||
<div className="aspect-video w-full bg-tint" />
|
||||
)}
|
||||
<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: accent }}>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accentText(accent) }}>
|
||||
{[date, ...post.tags].filter(Boolean).join(' · ')}
|
||||
</p>
|
||||
)}
|
||||
<h4 className="mt-2 font-display text-xl font-extrabold leading-snug text-[#073d4a]">
|
||||
<h4 className="mt-2 font-display text-xl font-extrabold leading-snug text-ink">
|
||||
<Link
|
||||
to={blogHref(post.id)}
|
||||
className="after:absolute after:inset-0 after:rounded-2xl after:content-[''] hover:underline"
|
||||
|
|
@ -61,9 +62,9 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
|
|||
</Link>
|
||||
</h4>
|
||||
{post.excerpt && (
|
||||
<p className="mt-2 leading-relaxed text-[#4a6b72]">{preview(post.excerpt, EXCERPT_CHARS)}</p>
|
||||
<p className="mt-2 leading-relaxed text-muted">{preview(post.excerpt, EXCERPT_CHARS)}</p>
|
||||
)}
|
||||
{authors && <p className="mt-auto pt-4 text-sm font-medium text-[#26454c]">By {authors}</p>}
|
||||
{authors && <p className="mt-auto pt-4 text-sm font-medium text-body">By {authors}</p>}
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
|
|
@ -71,7 +72,7 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
|
|||
|
||||
function Subheading({ children, accent }: { children: string; accent: string }) {
|
||||
return (
|
||||
<h3 className="text-2xl font-extrabold" style={{ color: accent }}>
|
||||
<h3 className="text-2xl font-extrabold" style={{ color: accentText(accent) }}>
|
||||
{children}
|
||||
</h3>
|
||||
)
|
||||
|
|
@ -82,13 +83,13 @@ export default function CommunityBlog({ accent = '#0f7183' }: { accent?: string
|
|||
|
||||
if (!blog) {
|
||||
return (
|
||||
<div className="mx-auto max-w-6xl px-6 text-[#4a6b72]">
|
||||
<div className="mx-auto max-w-6xl px-6 text-muted">
|
||||
{loading ? (
|
||||
'Loading…'
|
||||
) : (
|
||||
<>
|
||||
Couldn’t load the blog. {error}{' '}
|
||||
<button type="button" onClick={reload} className="underline" style={{ color: accent }}>
|
||||
<button type="button" onClick={reload} className="underline" style={{ color: accentText(accent) }}>
|
||||
Try again
|
||||
</button>
|
||||
</>
|
||||
|
|
@ -102,7 +103,7 @@ export default function CommunityBlog({ accent = '#0f7183' }: { accent?: string
|
|||
const hasExternal = external.cards.length > 0 || Boolean(external.url)
|
||||
|
||||
if (!hasInternal && !hasExternal) {
|
||||
return <p className="mx-auto max-w-6xl px-6 text-center text-[#4a6b72]">· Posts coming soon ·</p>
|
||||
return <p className="mx-auto max-w-6xl px-6 text-center text-muted">· Posts coming soon ·</p>
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -47,6 +47,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'
|
||||
|
||||
export type CalendarControl = 'scope' | 'type' | 'online' | 'search'
|
||||
export type CalendarView = 'month' | 'list'
|
||||
|
|
@ -57,8 +58,8 @@ const ALL_CONTROLS: CalendarControl[] = ['scope', 'type', 'online', 'search']
|
|||
const MAX_LANES = 3
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const INK = '#073d4a'
|
||||
const BODY = '#4a6b72'
|
||||
const INK = 'var(--color-ink)'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
const WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
||||
|
||||
|
|
@ -326,8 +327,8 @@ export default function EventCalendar({
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => go(monthKey(today))}
|
||||
className="rounded-full border px-3 py-1 text-sm font-semibold hover:bg-white"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="rounded-full border px-3 py-1 text-sm font-semibold hover:bg-surface"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
Today
|
||||
</button>
|
||||
|
|
@ -348,8 +349,8 @@ export default function EventCalendar({
|
|||
className="px-4 py-1.5 text-sm font-semibold capitalize transition-colors"
|
||||
style={
|
||||
view === option
|
||||
? { background: accent, color: '#ffffff' }
|
||||
: { color: accent }
|
||||
? { background: accent, color: readableOn(accent) }
|
||||
: { color: accentText(accent) }
|
||||
}
|
||||
>
|
||||
{option}
|
||||
|
|
@ -380,7 +381,7 @@ export default function EventCalendar({
|
|||
/>
|
||||
)}
|
||||
{show('online') && (
|
||||
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-[#138ba0]/25 bg-white px-4 py-2 text-sm">
|
||||
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={onlineOnly}
|
||||
|
|
@ -398,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-[#138ba0]/25 bg-white px-4 py-2 text-sm outline-none focus:border-[#0f7183] focus:ring-2 focus:ring-[#0f7183]/40 md:max-w-xs"
|
||||
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"
|
||||
/>
|
||||
)}
|
||||
{filtering && (
|
||||
|
|
@ -406,7 +407,7 @@ export default function EventCalendar({
|
|||
type="button"
|
||||
onClick={clearFilters}
|
||||
className="text-sm font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Clear filters
|
||||
</button>
|
||||
|
|
@ -417,7 +418,7 @@ export default function EventCalendar({
|
|||
{/* ── Body ── */}
|
||||
<div className="mt-6">
|
||||
{error ? (
|
||||
<p className="rounded-2xl bg-white p-6 text-[#b3261e]">
|
||||
<p className="rounded-2xl bg-surface p-6 text-danger">
|
||||
Couldn’t load events. {error.message}
|
||||
</p>
|
||||
) : loading ? (
|
||||
|
|
@ -457,7 +458,7 @@ export default function EventCalendar({
|
|||
type="button"
|
||||
onClick={() => go(monthKey(next))}
|
||||
className="font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Jump to the next event, {monthTitle(monthKey(next))} →
|
||||
</button>
|
||||
|
|
@ -494,8 +495,8 @@ type MonthGridProps = {
|
|||
|
||||
function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accent }: MonthGridProps) {
|
||||
return (
|
||||
<div className="overflow-hidden rounded-3xl border border-[#138ba0]/15 bg-white shadow-sm">
|
||||
<div className="grid grid-cols-7 border-b border-[#138ba0]/10 bg-[#f6fbfc]">
|
||||
<div className="overflow-hidden rounded-3xl border border-brand/15 bg-surface shadow-sm">
|
||||
<div className="grid grid-cols-7 border-b border-brand/10 bg-tint-soft">
|
||||
{WEEKDAYS.map((day) => (
|
||||
<div
|
||||
key={day}
|
||||
|
|
@ -516,7 +517,7 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
|
|||
segments.filter((s) => s.col <= col && s.col + s.span > col).length
|
||||
|
||||
return (
|
||||
<div key={week[0]} className="relative min-h-[8rem] border-b border-[#138ba0]/10 last:border-b-0">
|
||||
<div key={week[0]} className="relative min-h-[8rem] border-b border-brand/10 last:border-b-0">
|
||||
{/* Day cells: the click targets, and the numbers. */}
|
||||
<div className="absolute inset-0 grid grid-cols-7">
|
||||
{week.map((date, col) => {
|
||||
|
|
@ -532,23 +533,23 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
|
|||
onClick={() => onSelect(date)}
|
||||
aria-pressed={isSelected}
|
||||
aria-label={`${longDay(date)}${count ? `, ${count} event${count === 1 ? '' : 's'}` : ''}`}
|
||||
className="relative flex flex-col items-start border-r border-[#138ba0]/10 p-2 text-left transition-colors last:border-r-0 hover:bg-[#f6fbfc]"
|
||||
className="relative flex flex-col items-start border-r border-brand/10 p-2 text-left transition-colors last:border-r-0 hover:bg-tint-soft"
|
||||
style={{
|
||||
background: isSelected ? `${accent}14` : outside ? '#fbfdfd' : undefined,
|
||||
background: isSelected ? `${withAlpha(accent, 8)}` : outside ? 'var(--color-tint-soft)' : undefined,
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className="flex h-7 w-7 items-center justify-center rounded-full text-sm font-semibold"
|
||||
style={
|
||||
isToday
|
||||
? { background: accent, color: '#ffffff' }
|
||||
: { color: outside ? '#b8c6c9' : INK }
|
||||
? { background: accent, color: readableOn(accent) }
|
||||
: { color: outside ? withAlpha('var(--color-muted)', 60) : INK }
|
||||
}
|
||||
>
|
||||
{Number(date.slice(8))}
|
||||
</span>
|
||||
{hidden > 0 && (
|
||||
<span className="mt-auto text-xs font-semibold" style={{ color: accent }}>
|
||||
<span className="mt-auto text-xs font-semibold" style={{ color: accentText(accent) }}>
|
||||
+{hidden} more
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -620,14 +621,14 @@ function DayPanel({
|
|||
onClose: () => void
|
||||
}) {
|
||||
return (
|
||||
<div className="mt-4 rounded-3xl border bg-white p-6" style={{ borderColor: `${accent}40` }}>
|
||||
<div className="mt-4 rounded-3xl border bg-surface p-6" style={{ borderColor: `${withAlpha(accent, 25)}` }}>
|
||||
<div className="flex items-center gap-4">
|
||||
<h4 className="font-display text-lg font-bold">{longDay(date)}</h4>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onClose}
|
||||
className="ml-auto text-sm font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
|
|
@ -664,7 +665,7 @@ function MonthList({
|
|||
}) {
|
||||
if (items.length === 0) {
|
||||
return (
|
||||
<p className="rounded-3xl bg-white p-10 text-center" style={{ color: BODY }}>
|
||||
<p className="rounded-3xl bg-surface p-10 text-center" style={{ color: BODY }}>
|
||||
Nothing on the calendar this month.
|
||||
</p>
|
||||
)
|
||||
|
|
@ -683,9 +684,9 @@ function MonthList({
|
|||
{[...byDay.entries()].map(([day, list]) => {
|
||||
const d = parse(day)
|
||||
return (
|
||||
<li key={day} className="flex gap-5 rounded-3xl bg-white p-5 shadow-sm">
|
||||
<li key={day} className="flex gap-5 rounded-3xl bg-surface p-5 shadow-sm">
|
||||
<div className="w-14 shrink-0 text-center">
|
||||
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accent }}>
|
||||
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accentText(accent) }}>
|
||||
{d.toLocaleDateString(undefined, { weekday: 'short' })}
|
||||
</p>
|
||||
<p className="font-display text-3xl font-extrabold leading-none">{d.getDate()}</p>
|
||||
|
|
@ -715,13 +716,13 @@ function EventLine({ item, accent }: { item: Occurrence; accent: string }) {
|
|||
return (
|
||||
<Link
|
||||
to={eventHref(event.id)}
|
||||
className="group flex items-start gap-3 rounded-xl p-2 transition-colors hover:bg-[#f6fbfc]"
|
||||
className="group flex items-start gap-3 rounded-xl p-2 transition-colors hover:bg-tint-soft"
|
||||
>
|
||||
<span className="mt-1.5 h-3 w-3 shrink-0 rounded-full" style={{ background: color }} aria-hidden="true" />
|
||||
<span className="min-w-0">
|
||||
<span className={`block font-semibold group-hover:underline ${cancelled ? 'line-through' : ''}`}>
|
||||
{event.title}
|
||||
{cancelled && <span className="ml-2 text-xs font-bold uppercase text-[#b3261e] no-underline">Cancelled</span>}
|
||||
{cancelled && <span className="ml-2 text-xs font-bold uppercase text-danger no-underline">Cancelled</span>}
|
||||
</span>
|
||||
<span className="block text-sm" style={{ color: BODY }}>
|
||||
{[
|
||||
|
|
@ -755,8 +756,8 @@ function NavButton({
|
|||
type="button"
|
||||
onClick={onClick}
|
||||
aria-label={label}
|
||||
className="flex h-10 w-10 items-center justify-center rounded-full border text-xl transition-colors hover:bg-white"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="flex h-10 w-10 items-center justify-center rounded-full border text-xl transition-colors hover:bg-surface"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
|
@ -781,7 +782,7 @@ function FilterSelect({
|
|||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
aria-label={label}
|
||||
className="rounded-full border border-[#138ba0]/25 bg-white px-4 py-2 text-sm outline-none focus:border-[#0f7183] focus:ring-2 focus:ring-[#0f7183]/40"
|
||||
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"
|
||||
>
|
||||
<option value="">{all}</option>
|
||||
{options.map(([id, name]) => (
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { EVENT_TYPES, eventTypeLabel } from "../../lib/eventTypes.ts";
|
|||
import { seriesLabel } from "../../lib/eventSeries.ts";
|
||||
import PlatformIcon from "../../components/PlatformIcon.tsx";
|
||||
import { eventBackground, eventLogo as eventLogoSrc, orgLogo as orgLogoSrc } from "../../lib/media.ts";
|
||||
import { accentText, withAlpha, readableOn } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
EVENT LIST: CARDS
|
||||
|
|
@ -50,20 +51,19 @@ function Logo({ src, alt = "", className }) {
|
|||
}
|
||||
|
||||
const TEAL = "#0f7183"; // last-resort card color
|
||||
const INK = "#073d4a"; // button text: the card colour is only a border
|
||||
const CARD_BG = "#ffffff"; // sits under every card, gradient or not
|
||||
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
|
||||
|
||||
/* Laid over a card's background image so black text reads on any
|
||||
photo. Heavier at the top, where the title and dates are, and
|
||||
lighter lower down so more of the picture shows through. */
|
||||
const CARD_IMAGE_VEIL =
|
||||
"linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0.78))";
|
||||
"linear-gradient(to bottom, color-mix(in srgb, var(--color-surface) 90%, transparent), color-mix(in srgb, var(--color-surface) 78%, transparent))";
|
||||
|
||||
/* The card's background layers, top first: its gradient if it has
|
||||
one, then the veil and photo if it has one, then white. */
|
||||
/* The card's background layers, top first: the veil and photo if it
|
||||
has one, then the plain surface. */
|
||||
function cardBackground(ev) {
|
||||
const layers: string[] = [];
|
||||
if (ev.gradient) layers.push(ev.gradient);
|
||||
const image = eventBackground(ev.card_image);
|
||||
if (image) {
|
||||
layers.push(CARD_IMAGE_VEIL, `url(${JSON.stringify(image)}) center / cover no-repeat`);
|
||||
|
|
@ -192,7 +192,7 @@ export function Card({
|
|||
|
||||
return (
|
||||
<div
|
||||
className={`rounded-3xl text-black overflow-hidden shadow-2xl h-full flex flex-col ${
|
||||
className={`rounded-3xl text-ink overflow-hidden shadow-2xl h-full flex flex-col ${
|
||||
compact ? "ev-card" : ""
|
||||
}`}
|
||||
style={{
|
||||
|
|
@ -278,7 +278,7 @@ export function Card({
|
|||
doesn't. */}
|
||||
<div className={`mt-auto ${compact ? "pt-6" : "pt-8"}`}>
|
||||
{links.length === 0 && (
|
||||
<p className="text-center font-semibold" style={{ color: accent }}>
|
||||
<p className="text-center font-semibold" style={{ color: accentText(accent) }}>
|
||||
{past
|
||||
? "This event has concluded. Thank you to everyone who joined us!"
|
||||
: igHandle
|
||||
|
|
@ -320,7 +320,7 @@ export function Card({
|
|||
className={`ig-link flex items-center justify-center rounded-xl font-bold transition-all duration-200 hover:scale-[1.02] gap-3 ${
|
||||
compact ? "py-2.5 px-5" : "py-3 px-6"
|
||||
}`}
|
||||
style={{ border: `1px solid ${accent}`, color: accent }}
|
||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||
>
|
||||
<PlatformIcon platform="instagram" className="w-6 h-6" />
|
||||
{igHandle}
|
||||
|
|
@ -362,7 +362,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
|
|||
const chip = on => ({
|
||||
border: `1px solid ${accent}`,
|
||||
background: on ? accent : "transparent",
|
||||
color: on ? "#ffffff" : accent,
|
||||
color: on ? readableOn(accent) : accentText(accent),
|
||||
});
|
||||
|
||||
const button = (id, label) => (
|
||||
|
|
@ -396,7 +396,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
|
|||
export function EventCardsToggle({ view, setView, accent }) {
|
||||
const btn = active => ({
|
||||
background: active ? accent : "transparent",
|
||||
color: active ? "#ffffff" : accent,
|
||||
color: active ? readableOn(accent) : accentText(accent),
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -522,14 +522,14 @@ export default function EventListCards({
|
|||
// Arrows and dots follow the section accent, not the active card.
|
||||
const arrowStyle = enabled => ({
|
||||
border: `1px solid ${accent}`,
|
||||
background: "rgba(255,255,255,0.85)",
|
||||
color: enabled ? accent : "#b8c6c9",
|
||||
background: "color-mix(in srgb, var(--color-surface) 85%, transparent)",
|
||||
color: enabled ? accentText(accent) : withAlpha("var(--color-muted)", 50),
|
||||
cursor: enabled ? "pointer" : "default",
|
||||
opacity: enabled ? 1 : 0.4,
|
||||
});
|
||||
|
||||
const notice = text => (
|
||||
<p className="max-w-6xl mx-auto px-6 font-semibold" style={{ color: accent }}>
|
||||
<p className="max-w-6xl mx-auto px-6 font-semibold" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</p>
|
||||
);
|
||||
|
|
@ -600,7 +600,7 @@ export default function EventListCards({
|
|||
<div className="mt-12">
|
||||
<h3
|
||||
className="text-2xl font-extrabold mb-6"
|
||||
style={{ color: accent, opacity: 0.85 }}
|
||||
style={{ color: accentText(accent), opacity: 0.85 }}
|
||||
>
|
||||
Past Events
|
||||
</h3>
|
||||
|
|
@ -640,7 +640,7 @@ export default function EventListCards({
|
|||
onClick={() => setShowPast(v => !v)}
|
||||
aria-expanded={showPast}
|
||||
className="flex items-center gap-2 py-2.5 px-6 rounded-xl font-bold transition-all duration-200 hover:scale-105"
|
||||
style={{ border: `1px solid ${accent}`, color: accent }}
|
||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||
>
|
||||
{showPast
|
||||
? "Hide past events"
|
||||
|
|
@ -737,7 +737,7 @@ export default function EventListCards({
|
|||
className="h-2.5 rounded-full transition-all duration-200"
|
||||
style={{
|
||||
width: i === index ? "1.5rem" : "0.625rem",
|
||||
background: i === index ? accent : "#b8c6c9",
|
||||
background: i === index ? accent : withAlpha("var(--color-muted)", 40),
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ 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'
|
||||
|
||||
const ACCENT = "#0f7183";
|
||||
const MUTED = "#4a6b72";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const MAX_CHARS = 1500;
|
||||
const MIN_MESSAGE = 10; // matches the server
|
||||
|
||||
|
|
@ -34,17 +35,17 @@ const WHOLE_PAGE = "";
|
|||
/* ── Shared field chrome ─────────────────────────────────────── */
|
||||
|
||||
const fieldClass =
|
||||
"w-full rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 text-[#26454c] " +
|
||||
"placeholder:text-[#4a6b72]/50 outline-none transition-colors " +
|
||||
"focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25";
|
||||
"w-full rounded-xl border border-muted/25 bg-surface px-4 py-3 text-body " +
|
||||
"placeholder:text-muted/50 outline-none transition-colors " +
|
||||
"focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||
|
||||
const errorFieldClass = "border-[#b3261e] focus:border-[#b3261e] focus:ring-[#b3261e]/20";
|
||||
const errorFieldClass = "border-danger focus:border-danger focus:ring-danger/20";
|
||||
|
||||
const selectClass = `${fieldClass} appearance-none pr-10`;
|
||||
|
||||
function OptionalTag() {
|
||||
return (
|
||||
<span className="ml-2 rounded-full bg-[#eef9fb] px-2 py-0.5 text-xs font-medium text-[#0f7183]">
|
||||
<span className="ml-2 rounded-full bg-tint px-2 py-0.5 text-xs font-medium text-link">
|
||||
Optional
|
||||
</span>
|
||||
);
|
||||
|
|
@ -53,7 +54,7 @@ function OptionalTag() {
|
|||
function FieldError({ id, children }) {
|
||||
if (!children) return null;
|
||||
return (
|
||||
<p id={id} className="mt-2 text-sm text-[#b3261e]">
|
||||
<p id={id} className="mt-2 text-sm text-danger">
|
||||
{children}
|
||||
</p>
|
||||
);
|
||||
|
|
@ -63,7 +64,7 @@ function FieldError({ id, children }) {
|
|||
function Select({ id, label, value, onChange, children }) {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={id} className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor={id} className="block text-sm font-medium text-body">
|
||||
{label}
|
||||
</label>
|
||||
<div className="relative mt-2">
|
||||
|
|
@ -100,7 +101,7 @@ function Select({ id, label, value, onChange, children }) {
|
|||
function TypePicker({ value, onChange }) {
|
||||
return (
|
||||
<fieldset>
|
||||
<legend className="text-base font-semibold text-[#26454c]">
|
||||
<legend className="text-base font-semibold text-body">
|
||||
What kind of feedback is this?
|
||||
</legend>
|
||||
<p className="mt-1 text-sm" style={{ color: MUTED }}>
|
||||
|
|
@ -123,21 +124,21 @@ function TypePicker({ value, onChange }) {
|
|||
<span
|
||||
className={
|
||||
"flex h-full flex-col gap-1 rounded-xl border p-4 transition-colors " +
|
||||
"peer-focus-visible:ring-2 peer-focus-visible:ring-[#138ba0]/40 " +
|
||||
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand/40 " +
|
||||
(selected
|
||||
? "border-[#138ba0] bg-[#eef9fb]"
|
||||
: "border-[#4a6b72]/20 bg-white hover:border-[#138ba0]/50")
|
||||
? "border-brand bg-tint"
|
||||
: "border-muted/20 bg-surface hover:border-brand/50")
|
||||
}
|
||||
>
|
||||
<span className="flex items-start justify-between gap-2">
|
||||
<span className="font-semibold text-[#26454c]">{type.label}</span>
|
||||
<span className="font-semibold text-body">{type.label}</span>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={
|
||||
"mt-0.5 h-4 w-4 shrink-0 rounded-full border-2 transition-colors " +
|
||||
(selected
|
||||
? "border-[#138ba0] bg-[#0f7183] ring-2 ring-inset ring-white"
|
||||
: "border-[#4a6b72]/30")
|
||||
? "border-brand bg-action ring-2 ring-inset ring-white"
|
||||
: "border-muted/30")
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
|
|
@ -161,7 +162,7 @@ function LocationPicker({ page, section, onPageChange, onSectionChange }) {
|
|||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap items-center">
|
||||
<h3 className="text-base font-semibold text-[#26454c]">
|
||||
<h3 className="text-base font-semibold text-body">
|
||||
Where did you run into it?
|
||||
</h3>
|
||||
<OptionalTag />
|
||||
|
|
@ -294,9 +295,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
return (
|
||||
<div
|
||||
aria-live="polite"
|
||||
className="rounded-2xl border border-[#138ba0]/20 bg-white p-8 sm:p-10"
|
||||
className="rounded-2xl border border-brand/20 bg-surface p-8 sm:p-10"
|
||||
>
|
||||
<h3 className="text-2xl font-bold" style={{ color: ACCENT }}>
|
||||
<h3 className="text-2xl font-bold" style={{ color: accentText(ACCENT) }}>
|
||||
Thanks, we've got it
|
||||
</h3>
|
||||
{where && (
|
||||
|
|
@ -314,7 +315,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<button
|
||||
type="button"
|
||||
onClick={reset}
|
||||
className="mt-6 rounded-full border border-[#138ba0] px-5 py-2.5 font-semibold text-[#0f7183] transition-colors hover:bg-[#eef9fb] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40"
|
||||
className="mt-6 rounded-full border border-brand px-5 py-2.5 font-semibold text-link transition-colors hover:bg-tint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40"
|
||||
>
|
||||
{request ? "Send another request" : "Send more feedback"}
|
||||
</button>
|
||||
|
|
@ -326,7 +327,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<form
|
||||
onSubmit={handleSubmit}
|
||||
noValidate
|
||||
className="rounded-2xl border border-[#138ba0]/20 bg-white p-6 sm:p-8"
|
||||
className="rounded-2xl border border-brand/20 bg-surface p-6 sm:p-8"
|
||||
>
|
||||
{!fixedType && (
|
||||
<>
|
||||
|
|
@ -347,7 +348,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<div className={fixedType ? "" : "mt-10"}>
|
||||
<label
|
||||
htmlFor="feedback-message"
|
||||
className="text-base font-semibold text-[#26454c]"
|
||||
className="text-base font-semibold text-body"
|
||||
>
|
||||
{request ? "Your request" : "Tell us more"}
|
||||
</label>
|
||||
|
|
@ -385,9 +386,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
</div>
|
||||
|
||||
{/* Optional contact details */}
|
||||
<div className="mt-8 rounded-xl border border-dashed border-[#4a6b72]/30 bg-[#eef9fb]/60 p-5 sm:p-6">
|
||||
<div className="mt-8 rounded-xl border border-dashed border-muted/30 bg-tint/60 p-5 sm:p-6">
|
||||
<div className="flex flex-wrap items-center">
|
||||
<h3 className="text-base font-semibold text-[#26454c]">
|
||||
<h3 className="text-base font-semibold text-body">
|
||||
{request ? "How we reach you" : "Your details"}
|
||||
</h3>
|
||||
{!request && <OptionalTag />}
|
||||
|
|
@ -402,9 +403,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<div>
|
||||
<label
|
||||
htmlFor="feedback-name"
|
||||
className="block text-sm font-medium text-[#26454c]"
|
||||
className="block text-sm font-medium text-body"
|
||||
>
|
||||
Name <span className="font-normal text-[#4a6b72]">(optional)</span>
|
||||
Name <span className="font-normal text-muted">(optional)</span>
|
||||
</label>
|
||||
<input
|
||||
id="feedback-name"
|
||||
|
|
@ -418,10 +419,10 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<div>
|
||||
<label
|
||||
htmlFor="feedback-email"
|
||||
className="block text-sm font-medium text-[#26454c]"
|
||||
className="block text-sm font-medium text-body"
|
||||
>
|
||||
Email{" "}
|
||||
<span className="font-normal text-[#4a6b72]">{request ? "(required)" : "(optional)"}</span>
|
||||
<span className="font-normal text-muted">{request ? "(required)" : "(optional)"}</span>
|
||||
</label>
|
||||
<input
|
||||
id="feedback-email"
|
||||
|
|
@ -459,7 +460,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
{formError && (
|
||||
<p
|
||||
role="alert"
|
||||
className="mt-8 rounded-xl border border-[#b3261e]/30 bg-[#fdf3f2] px-4 py-3 text-sm text-[#b3261e]"
|
||||
className="mt-8 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||
>
|
||||
{formError}
|
||||
</p>
|
||||
|
|
@ -469,7 +470,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<button
|
||||
type="submit"
|
||||
disabled={!ready || sending}
|
||||
className="rounded-full bg-[#0f7183] px-7 py-3 font-semibold text-white transition-colors hover:bg-[#0b5c6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40 disabled:cursor-not-allowed disabled:bg-[#4a6b72]/25 disabled:text-white/80"
|
||||
className="rounded-full bg-action px-7 py-3 font-semibold text-white transition-colors hover:bg-action-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 disabled:cursor-not-allowed disabled:bg-muted/25 disabled:text-white/80"
|
||||
>
|
||||
{sending ? "Sending…" : request ? "Send request" : "Send feedback"}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
useOrganizations,
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: CARDS
|
||||
|
|
@ -23,8 +24,8 @@ import {
|
|||
array, only the short card description.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* Wide enough for a logo beside two lines of text, narrow enough
|
||||
|
|
@ -70,7 +71,7 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
|||
return (
|
||||
<div
|
||||
className="rounded-2xl p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
|
||||
style={{ border: `1px solid ${color}`, background: "#ffffff" }}
|
||||
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
|
||||
>
|
||||
<div className="flex items-start gap-4">
|
||||
<OrgMark org={org} color={color} />
|
||||
|
|
@ -195,7 +196,7 @@ export default function OrgListCards({
|
|||
|
||||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
@ -203,7 +204,7 @@ export default function OrgListCards({
|
|||
|
||||
if (organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{empty}
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import ArrowLink from "../../components/ArrowLink.tsx";
|
|||
import { orgLogo } from "../../lib/media.ts";
|
||||
import { initialsFor, orgPath } from "../../lib/organizations.ts";
|
||||
import { AREAS, AREA_NAMES } from "../../data/mapGrid.ts";
|
||||
import { withAlpha, accentText, readableOn } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: MAP
|
||||
|
|
@ -40,9 +41,9 @@ const ROWS = 7;
|
|||
// stays at max-w-6xl, so this deliberately breaks out past it.
|
||||
const CONTENT_MAX = "88rem";
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const RULE = "#cfe3e7";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* organizations.color is nullable; an SVG fill left undefined paints
|
||||
|
|
@ -214,7 +215,7 @@ function Tile({
|
|||
height={size}
|
||||
rx={14}
|
||||
fill="none"
|
||||
stroke={active ? colorOf(primary) : "#ffffff"}
|
||||
stroke={active ? colorOf(primary) : "var(--color-surface)"}
|
||||
strokeOpacity={active ? 1 : 0.55}
|
||||
strokeWidth={active ? 4 : 2}
|
||||
className="transition-all duration-200"
|
||||
|
|
@ -227,7 +228,7 @@ function Tile({
|
|||
dominantBaseline="middle"
|
||||
fontSize={fontSize}
|
||||
fontWeight="800"
|
||||
fill={count ? "#ffffff" : colorOf(primary)}
|
||||
fill={count ? "var(--color-surface)" : colorOf(primary)}
|
||||
style={{ pointerEvents: "none" }}
|
||||
>
|
||||
{label || code}
|
||||
|
|
@ -292,7 +293,7 @@ function LegendButton({ region, selected, setSelected, hovered, setHovered }) {
|
|||
style={{
|
||||
border: `1px solid ${colorOf(region)}`,
|
||||
background: on ? colorOf(region) : "transparent",
|
||||
color: on ? "#ffffff" : INK,
|
||||
color: on ? readableOn(colorOf(region)) : INK,
|
||||
opacity: selected && selected !== region.id ? 0.45 : 1,
|
||||
}}
|
||||
>
|
||||
|
|
@ -496,7 +497,7 @@ function ChapterCard({ chapter, color, open, onOpen }) {
|
|||
className="rounded-2xl p-4 flex items-start gap-4 transition-all duration-200"
|
||||
style={{
|
||||
border: `1px solid ${color}`,
|
||||
background: open ? `${color}14` : "transparent",
|
||||
background: open ? `${withAlpha(color, 8)}` : "transparent",
|
||||
}}
|
||||
>
|
||||
<OrgLogo org={chapter} color={color} />
|
||||
|
|
@ -574,7 +575,7 @@ function ChapterDetail({ chapter, region, onClose }) {
|
|||
return (
|
||||
<div
|
||||
className="rounded-2xl p-6 mb-6"
|
||||
style={{ border: `2px solid ${colorOf(region)}`, background: `${colorOf(region)}0f` }}
|
||||
style={{ border: `2px solid ${colorOf(region)}`, background: `${withAlpha(colorOf(region), 6)}` }}
|
||||
>
|
||||
<div className="flex items-start gap-4">
|
||||
<OrgLogo org={chapter} color={colorOf(region)} size="h-20 w-20" />
|
||||
|
|
@ -616,7 +617,7 @@ function ChapterDetail({ chapter, region, onClose }) {
|
|||
<Link
|
||||
to={orgPath(chapter)!}
|
||||
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||
style={{ background: colorOf(region), color: "#ffffff" }}
|
||||
style={{ background: colorOf(region), color: readableOn(colorOf(region)) }}
|
||||
>
|
||||
Chapter page
|
||||
</Link>
|
||||
|
|
@ -723,7 +724,7 @@ function ChapterGrid({ regions, chapters, chaptersIn, subtextFor, openId, setOpe
|
|||
export function OrgMapToggle({ view, setView, accent }) {
|
||||
const btn = active => ({
|
||||
background: active ? accent : "transparent",
|
||||
color: active ? "#ffffff" : accent,
|
||||
color: active ? readableOn(accent) : accentText(accent),
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -834,7 +835,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
|
||||
if (error && regions.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· Chapters couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
useOrganizations,
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: VERTICAL
|
||||
|
|
@ -38,9 +39,9 @@ import {
|
|||
a partner row simply doesn't have them.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const RULE = "#cfe3e7";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* ── Row button ───────────────────────────────────────────────
|
||||
|
|
@ -290,7 +291,7 @@ export default function OrgListVertical({
|
|||
|
||||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
@ -298,7 +299,7 @@ export default function OrgListVertical({
|
|||
|
||||
if (organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{empty}
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -38,9 +38,10 @@ 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'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const MUTED = '#4a6b72'
|
||||
const MUTED = 'var(--color-muted)'
|
||||
|
||||
/* PNG download size in pixels. Plenty for print at a few inches;
|
||||
anything bigger should use the SVG. */
|
||||
|
|
@ -316,7 +317,7 @@ export default function QrCodeMaker() {
|
|||
|
||||
{kind === 'custom' ? (
|
||||
<div>
|
||||
<label htmlFor="qr-custom" className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor="qr-custom" className="block text-sm font-medium text-body">
|
||||
Link
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -337,7 +338,7 @@ export default function QrCodeMaker() {
|
|||
) : needsDirectory && loading && !directory ? (
|
||||
<p style={{ color: MUTED }}>Loading the list…</p>
|
||||
) : needsDirectory && error ? (
|
||||
<p className="text-[#b3261e]">Couldn't load the list of pages. {error}</p>
|
||||
<p className="text-danger">Couldn't load the list of pages. {error}</p>
|
||||
) : choices.length === 0 ? (
|
||||
<p style={{ color: MUTED }}>Nothing published here yet.</p>
|
||||
) : (
|
||||
|
|
@ -390,7 +391,7 @@ export default function QrCodeMaker() {
|
|||
</Select>
|
||||
|
||||
<fieldset>
|
||||
<legend className="text-sm font-medium text-[#26454c]">Colours</legend>
|
||||
<legend className="text-sm font-medium text-body">Colours</legend>
|
||||
<div className="mt-2 flex flex-wrap items-end gap-5">
|
||||
<ColourInput id="qr-ink" label="Code" value={ink} onChange={setInk} />
|
||||
<ColourInput id="qr-paper" label="Background" value={paper} onChange={setPaper} />
|
||||
|
|
@ -406,14 +407,14 @@ export default function QrCodeMaker() {
|
|||
setDoveColor(QR_DOVE)
|
||||
}}
|
||||
className="pb-2 text-sm underline"
|
||||
style={{ color: TEAL }}
|
||||
style={{ color: accentText(TEAL) }}
|
||||
>
|
||||
Reset colours
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{warning && (
|
||||
<p role="status" className="mt-2 rounded-lg bg-[#fdf3f2] px-3 py-2 text-sm text-[#b3261e]">
|
||||
<p role="status" className="mt-2 rounded-lg bg-danger-tint px-3 py-2 text-sm text-danger">
|
||||
{warning}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -421,16 +422,16 @@ export default function QrCodeMaker() {
|
|||
|
||||
{url && (
|
||||
<div>
|
||||
<p className="text-sm font-medium text-[#26454c]">Links to</p>
|
||||
<p className="text-sm font-medium text-body">Links to</p>
|
||||
<div className="mt-2 flex flex-wrap items-center gap-3">
|
||||
<code className="break-all rounded-lg bg-white px-3 py-2 text-sm text-[#26454c] ring-1 ring-[#4a6b72]/20">
|
||||
<code className="break-all rounded-lg bg-surface px-3 py-2 text-sm text-body ring-1 ring-muted/20">
|
||||
{url}
|
||||
</code>
|
||||
<button
|
||||
type="button"
|
||||
onClick={copy}
|
||||
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-[#138ba0]/10"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-brand/10"
|
||||
style={{ borderColor: TEAL, color: accentText(TEAL) }}
|
||||
>
|
||||
{copied ? 'Copied ✓' : 'Copy link'}
|
||||
</button>
|
||||
|
|
@ -442,7 +443,7 @@ export default function QrCodeMaker() {
|
|||
<div className="flex flex-col items-center gap-5">
|
||||
{url ? (
|
||||
<>
|
||||
<div className="w-full max-w-sm rounded-3xl bg-white p-6 shadow-lg ring-1 ring-[#4a6b72]/10">
|
||||
<div className="w-full max-w-sm rounded-3xl bg-white p-6 shadow-lg ring-1 ring-muted/10">
|
||||
<QrCode
|
||||
ref={svgRef}
|
||||
value={url}
|
||||
|
|
@ -467,7 +468,7 @@ export default function QrCodeMaker() {
|
|||
</p>
|
||||
</>
|
||||
) : (
|
||||
<div className="aspect-square w-full max-w-sm rounded-3xl bg-white/60 ring-1 ring-[#4a6b72]/10" />
|
||||
<div className="aspect-square w-full max-w-sm rounded-3xl bg-white/60 ring-1 ring-muted/10" />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -479,7 +480,7 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
|
|||
<button
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
className="rounded-full bg-[#0f7183] px-6 py-3 font-semibold text-white transition-colors hover:bg-[#0b5c6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40"
|
||||
className="rounded-full bg-action px-6 py-3 font-semibold text-white transition-colors hover:bg-action-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40"
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
|
@ -487,8 +488,8 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
|
|||
}
|
||||
|
||||
const inputClass =
|
||||
'w-full rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 text-[#26454c] ' +
|
||||
'outline-none transition-colors focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25'
|
||||
'w-full rounded-xl border border-muted/25 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. */
|
||||
function ColourInput({
|
||||
|
|
@ -515,7 +516,7 @@ function ColourInput({
|
|||
type="color"
|
||||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
className="h-9 w-11 cursor-pointer rounded border border-[#4a6b72]/25 bg-white"
|
||||
className="h-9 w-11 cursor-pointer rounded border border-muted/25 bg-white"
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
|
|
@ -525,7 +526,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-[#4a6b72]/25 bg-white px-2 py-1.5 font-mono text-sm text-[#26454c] outline-none focus:border-[#138ba0]"
|
||||
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"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -533,8 +534,8 @@ function ColourInput({
|
|||
}
|
||||
|
||||
const selectClass =
|
||||
'w-full appearance-none rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 pr-10 text-[#26454c] ' +
|
||||
'outline-none transition-colors focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25'
|
||||
'w-full appearance-none rounded-xl border border-muted/25 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({
|
||||
id,
|
||||
|
|
@ -551,7 +552,7 @@ function Select({
|
|||
}) {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={id} className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor={id} className="block text-sm font-medium text-body">
|
||||
{label}
|
||||
</label>
|
||||
<div className="relative mt-2">
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
.ngu-tl {
|
||||
/* Defaults match the site palette; History.tsx overrides accent and
|
||||
surface per section so the rail sits on the right background. */
|
||||
--tl-ink: #16343a;
|
||||
--tl-muted: #4a6b72;
|
||||
--tl-faint: #8aa7ad;
|
||||
--tl-rail: #cfe4e8;
|
||||
--tl-surface: #ffffff;
|
||||
--tl-ink: var(--color-ink);
|
||||
--tl-muted: var(--color-muted);
|
||||
--tl-faint: color-mix(in srgb, var(--color-muted) 70%, transparent);
|
||||
--tl-rail: color-mix(in srgb, var(--color-brand) 20%, transparent);
|
||||
--tl-surface: var(--color-surface);
|
||||
--tl-accent: #0f7183;
|
||||
--tl-accent-soft: color-mix(in srgb, var(--tl-accent) 12%, transparent);
|
||||
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
line-height: 1.1;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: sideways;
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__decade--pre .ngu-tl__decadeNum {
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
}
|
||||
|
||||
.ngu-tl__yearBtn:hover .ngu-tl__yearLabel {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__yearBtn:focus-visible {
|
||||
|
|
@ -323,7 +323,7 @@ a.ngu-tl__entry:focus-visible {
|
|||
}
|
||||
|
||||
a.ngu-tl__entry:hover .ngu-tl__entryTitle {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__entryMeta {
|
||||
|
|
@ -441,7 +441,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
}
|
||||
|
||||
.ngu-tl__toolbarBtn:hover {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
border-color: var(--tl-accent);
|
||||
}
|
||||
|
||||
|
|
@ -505,7 +505,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
}
|
||||
|
||||
.ngu-tl__upcomingBtn:hover {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__upcomingBtn:focus-visible {
|
||||
|
|
@ -629,7 +629,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
font-size: 0.625rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__personName {
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ type CalendarBandProps = { id: string; title: string; blurb?: string | null }
|
|||
|
||||
export default function CalendarBand({ id, title, blurb }: CalendarBandProps) {
|
||||
return (
|
||||
<section id={id} className="py-24" style={{ background: '#f6fbfc' }}>
|
||||
<section id={id} className="py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||
<div className="mx-auto mb-10 max-w-6xl px-6">
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||
</div>
|
||||
|
||||
<EventCalendar />
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ type FeaturedBandProps = {
|
|||
|
||||
export default function FeaturedBand({ id, title, blurb, cards }: FeaturedBandProps) {
|
||||
return (
|
||||
<section id={id} className="py-24" style={{ background: '#f6fbfc' }}>
|
||||
<section id={id} className="py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">{title}</h2>
|
||||
{blurb && <p className="mt-4 max-w-2xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">{title}</h2>
|
||||
{blurb && <p className="mt-4 max-w-2xl text-lg text-muted">{blurb}</p>}
|
||||
<div className="mt-12">
|
||||
<FeaturedCards cards={cards} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ 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'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const DRAG_SLOP = 6
|
||||
|
|
@ -77,10 +78,10 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
<section id={id} className="overflow-hidden py-24" style={{ background: '#f4faf7' }}>
|
||||
<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-[#073d4a] md:text-5xl">
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||
</div>
|
||||
|
||||
{featured.length > 1 && (
|
||||
|
|
@ -94,8 +95,8 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
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-white"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
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) }}
|
||||
>
|
||||
{glyph}
|
||||
</button>
|
||||
|
|
@ -105,7 +106,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
</div>
|
||||
|
||||
{error ? (
|
||||
<p className="mx-auto mt-10 max-w-6xl px-6 text-[#b3261e]">
|
||||
<p className="mx-auto mt-10 max-w-6xl px-6 text-danger">
|
||||
Couldn’t load the timeline. {error}{' '}
|
||||
<button type="button" onClick={reload} className="underline">
|
||||
Try again
|
||||
|
|
@ -114,7 +115,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-white" />
|
||||
<div key={i} className="h-72 w-80 shrink-0 animate-pulse rounded-3xl bg-surface" />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
|
|
@ -154,7 +155,7 @@ 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: `linear-gradient(150deg, ${TEAL}, #073d4a)` }}
|
||||
style={{ background: TEAL }}
|
||||
>
|
||||
<span className="font-display text-2xl font-extrabold">The whole story</span>
|
||||
<span className="mt-2 text-white/75">Every year, every milestone.</span>
|
||||
|
|
@ -195,18 +196,18 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
className="mb-5 h-14 w-14 object-contain"
|
||||
/>
|
||||
)}
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: TEAL }}>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accentText(TEAL) }}>
|
||||
{dateLabel(item)}
|
||||
</p>
|
||||
<p className="mt-2 font-display text-xl font-bold leading-snug text-[#073d4a]">
|
||||
<p className="mt-2 font-display text-xl font-bold leading-snug text-ink">
|
||||
{item.title}
|
||||
</p>
|
||||
{item.meta && <p className="mt-1 text-sm text-[#4a6b72]">{item.meta}</p>}
|
||||
{item.meta && <p className="mt-1 text-sm text-muted">{item.meta}</p>}
|
||||
{item.blurb && (
|
||||
<p className="mt-3 line-clamp-4 text-sm leading-relaxed text-[#4a6b72]">{item.blurb}</p>
|
||||
<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: TEAL }}>
|
||||
<span className="mt-auto pt-5 text-sm font-semibold" style={{ color: accentText(TEAL) }}>
|
||||
Read more →
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -214,15 +215,15 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
)
|
||||
|
||||
const card =
|
||||
'flex flex-1 flex-col rounded-3xl border border-[#138ba0]/15 bg-white p-7 shadow-sm'
|
||||
'flex flex-1 flex-col rounded-3xl border border-brand/15 bg-surface p-7 shadow-sm'
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col">
|
||||
{/* The line, its dot, and the year where it changes. */}
|
||||
<div className="relative mb-4 h-8">
|
||||
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-[#138ba0]/30" />
|
||||
<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-white"
|
||||
className="absolute left-0 top-1/2 h-3 w-3 -translate-y-1/2 rounded-full border-2 bg-surface"
|
||||
style={{ borderColor: TEAL }}
|
||||
/>
|
||||
{showYear && (
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import { eventBackground, heroPhoto } 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'
|
||||
|
||||
|
|
@ -187,7 +188,7 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
|||
<HomeLink
|
||||
url={hero.primary.url}
|
||||
className="rounded-full px-8 py-4 text-lg font-bold text-[#04262e] shadow-xl transition-transform duration-300 hover:-translate-y-0.5 hover:scale-[1.03]"
|
||||
style={{ background: 'linear-gradient(120deg, #9fe7d0, #5ce7ff)' }}
|
||||
style={{ background: '#9fe7d0' }}
|
||||
>
|
||||
{hero.primary.label}
|
||||
</HomeLink>
|
||||
|
|
@ -461,7 +462,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 ${color}66` }}
|
||||
style={{ boxShadow: `0 30px 80px -20px ${withAlpha(color, 40)}` }}
|
||||
>
|
||||
{photo ? (
|
||||
<img src={photo} alt="" className="aspect-[16/7] w-full object-cover" />
|
||||
|
|
@ -469,7 +470,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
<div
|
||||
aria-hidden="true"
|
||||
className="aspect-[16/7] w-full"
|
||||
style={{ background: `linear-gradient(135deg, ${color}, #04262e)` }}
|
||||
style={{ background: `color-mix(in srgb, ${color} 35%, #04262e)` }}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
@ -496,7 +497,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
className={`inline-flex items-center gap-2 rounded-full px-6 py-3 font-semibold transition-transform hover:scale-105 ${
|
||||
index === 0 ? 'text-[#04262e]' : 'border border-white/35 text-white hover:bg-white/10'
|
||||
}`}
|
||||
style={index === 0 ? { background: 'linear-gradient(120deg, #9fe7d0, #5ce7ff)' } : undefined}
|
||||
style={index === 0 ? { background: '#9fe7d0' } : undefined}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
{link.label}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ 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'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
|
||||
|
|
@ -86,16 +87,16 @@ 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"
|
||||
style={{ borderColor: `${accent}55` }}
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}` }}
|
||||
>
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-xs font-bold uppercase tracking-[0.25em]" style={{ color: accent }}>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.25em]" style={{ color: accentText(accent) }}>
|
||||
{live ? 'Happening now' : 'Next up'}
|
||||
</p>
|
||||
<p className="mt-1 truncate font-display text-2xl font-extrabold text-[#073d4a] md:text-3xl">
|
||||
<p className="mt-1 truncate font-display text-2xl font-extrabold text-ink md:text-3xl">
|
||||
{event.title}
|
||||
</p>
|
||||
<p className="mt-1 text-sm text-[#4a6b72]">
|
||||
<p className="mt-1 text-sm text-muted">
|
||||
{[event.theme && `“${event.theme}”`, event.date_label, where]
|
||||
.filter(Boolean)
|
||||
.join(' · ')}
|
||||
|
|
@ -108,7 +109,7 @@ export default function NextEventCountdown({
|
|||
<div
|
||||
key={label}
|
||||
className="flex w-16 flex-col items-center rounded-2xl py-3 text-white md:w-20"
|
||||
style={{ background: `linear-gradient(160deg, ${accent}, #073d4a)` }}
|
||||
style={{ background: `color-mix(in srgb, ${accent} 35%, #04262e)` }}
|
||||
>
|
||||
<span className="font-display text-2xl font-bold tabular-nums md:text-3xl">
|
||||
{String(value).padStart(2, '0')}
|
||||
|
|
@ -123,7 +124,7 @@ export default function NextEventCountdown({
|
|||
|
||||
<span
|
||||
className="self-start text-sm font-semibold transition-transform group-hover:translate-x-1 md:self-center"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Details →
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ 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'
|
||||
|
||||
type PathfinderProps = {
|
||||
id: string
|
||||
|
|
@ -62,17 +63,17 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
}
|
||||
|
||||
return (
|
||||
<section id={id} className="py-24" style={{ background: '#ffffff' }}>
|
||||
<section id={id} className="py-24" style={{ background: 'var(--color-surface)' }}>
|
||||
<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-[#0f7183]">
|
||||
<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-[#073d4a] md:text-5xl">
|
||||
<h2 className="mt-3 font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-4 text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-4 text-lg text-muted">{blurb}</p>}
|
||||
|
||||
<div
|
||||
role="tablist"
|
||||
|
|
@ -100,18 +101,18 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
className="group flex items-center gap-4 rounded-2xl border-2 px-5 py-4 text-left transition-all duration-300"
|
||||
style={{
|
||||
borderColor: on ? color : 'rgba(19,139,160,0.12)',
|
||||
background: on ? `${color}12` : '#ffffff',
|
||||
background: on ? `${withAlpha(color, 7)}` : 'var(--color-surface)',
|
||||
transform: on ? 'translateX(8px)' : undefined,
|
||||
}}
|
||||
>
|
||||
<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 : `${color}1f` }}
|
||||
style={{ background: on ? color : `${withAlpha(color, 12)}` }}
|
||||
aria-hidden="true"
|
||||
>
|
||||
{option.icon || '•'}
|
||||
</span>
|
||||
<span className="font-display text-xl font-bold" style={{ color: on ? color : '#073d4a' }}>
|
||||
<span className="font-display text-xl font-bold" style={{ color: on ? accentText(color) : 'var(--color-ink)' }}>
|
||||
{option.label}
|
||||
</span>
|
||||
<span
|
||||
|
|
@ -133,7 +134,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
role="tabpanel"
|
||||
aria-labelledby={`${base}-tab-${selected}`}
|
||||
className="relative overflow-hidden rounded-[2rem] p-8 md:p-10 lg:col-span-7"
|
||||
style={{ background: `linear-gradient(155deg, ${accent}14, ${accent}05 60%, #ffffff)` }}
|
||||
style={{ background: withAlpha(accent, 5) }}
|
||||
>
|
||||
<span
|
||||
className="pointer-events-none absolute -right-6 -top-10 select-none text-[10rem] leading-none opacity-10"
|
||||
|
|
@ -143,7 +144,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
</span>
|
||||
|
||||
{path.blurb && (
|
||||
<p className="hp-pop relative max-w-md font-display text-2xl font-semibold leading-snug text-[#073d4a]">
|
||||
<p className="hp-pop relative max-w-md font-display text-2xl font-semibold leading-snug text-ink">
|
||||
{path.blurb}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -157,20 +158,20 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
>
|
||||
<HomeLink
|
||||
url={action.url}
|
||||
className="group flex h-full flex-col rounded-2xl bg-white p-6 shadow-sm ring-1 ring-black/5 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
|
||||
className="group flex h-full flex-col rounded-2xl bg-surface p-6 shadow-sm ring-1 ring-black/5 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
|
||||
>
|
||||
<span className="flex items-start gap-2 font-display text-lg font-bold text-[#073d4a]">
|
||||
<span className="flex items-start gap-2 font-display text-lg font-bold text-ink">
|
||||
{action.label}
|
||||
<span
|
||||
className="ml-auto transition-transform group-hover:translate-x-1"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
aria-hidden="true"
|
||||
>
|
||||
{isExternal(action.url) ? '↗' : '→'}
|
||||
</span>
|
||||
</span>
|
||||
{action.description && (
|
||||
<span className="mt-2 text-sm leading-relaxed text-[#4a6b72]">
|
||||
<span className="mt-2 text-sm leading-relaxed text-muted">
|
||||
{action.description}
|
||||
</span>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
import { Link } from 'react-router-dom'
|
||||
|
||||
import EventListCards from '../EventList-Cards.tsx'
|
||||
import { accentText } from '../../../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
|
||||
|
|
@ -17,18 +18,18 @@ type RetreatsBandProps = { id: string; title: string; blurb?: string | null }
|
|||
|
||||
export default function RetreatsBand({ id, title, blurb }: RetreatsBandProps) {
|
||||
return (
|
||||
<section id={id} className="overflow-hidden py-24" style={{ background: '#eef9fb' }}>
|
||||
<section id={id} className="overflow-hidden py-24" style={{ background: 'var(--color-tint)' }}>
|
||||
<div className="mx-auto mb-12 flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
||||
<div>
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||
</div>
|
||||
<Link
|
||||
to="/retreats"
|
||||
className="ml-auto rounded-full border px-5 py-2 text-sm font-semibold transition-colors hover:bg-white"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
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) }}
|
||||
>
|
||||
All retreats →
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
|
|||
id={id}
|
||||
ref={ref}
|
||||
className="relative overflow-hidden py-24"
|
||||
style={{ background: 'linear-gradient(160deg, #073d4a 0%, #04262e 70%)' }}
|
||||
style={{ background: '#073d4a' }}
|
||||
>
|
||||
<div
|
||||
className="pointer-events-none absolute -left-40 -top-40 h-[32rem] w-[32rem] rounded-full opacity-25 blur-3xl"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue