Compare commits
No commits in common. "dd33ee2da0d1deddfd7bfbef5e4ccaa51c5b5364" and "ecdcd4ec3764d3c99d8642307e3d6b3bce34c96b" have entirely different histories.
dd33ee2da0
...
ecdcd4ec37
79 changed files with 813 additions and 1029 deletions
|
|
@ -71,9 +71,7 @@ In dev, Vite proxies `/api` to the target set in `vite.config.ts`, so the API mu
|
||||||
- **Don't use `fallback: EMPTY` in api.ts hooks.** It silently returns empty arrays and hides server errors; let the error state surface.
|
- **Don't use `fallback: EMPTY` in api.ts hooks.** It silently returns empty arrays and hides server errors; let the error state surface.
|
||||||
- **Colors are tokens, not hex.** Admins can override any token (Panel → Site settings → Colors). The defaults are `server/src/themeDefaults.js` plus the same values as CSS in `src/index.css`; the build fails if they differ (`themeDefaultsCheck` in `vite.config.ts`), and migration 041's CHECK lists the token names. Use the utilities from `src/index.css` (`text-ink`, `text-body`, `text-muted`, `text-link`, `bg-surface`, `bg-tint`, `bg-action`, `border-brand/20`...) so dark mode works; a literal only for something that must look the same in both modes (white on a dark band, a platform's color). Data colors (accents, event and region colors) go through `withAlpha`, `accentText` and `readableOn` in `src/lib/color.ts`, never `${color}55`.
|
- **Colors are tokens, not hex.** Admins can override any token (Panel → Site settings → Colors). The defaults are `server/src/themeDefaults.js` plus the same values as CSS in `src/index.css`; the build fails if they differ (`themeDefaultsCheck` in `vite.config.ts`), and migration 041's CHECK lists the token names. Use the utilities from `src/index.css` (`text-ink`, `text-body`, `text-muted`, `text-link`, `bg-surface`, `bg-tint`, `bg-action`, `border-brand/20`...) so dark mode works; a literal only for something that must look the same in both modes (white on a dark band, a platform's color). Data colors (accents, event and region colors) go through `withAlpha`, `accentText` and `readableOn` in `src/lib/color.ts`, never `${color}55`.
|
||||||
- **Icons are Phosphor** (`@phosphor-icons/react`), weight `bold` (or `fill` for play/star). No hand-drawn `<svg>` icons and no Unicode glyphs as icons (× › ▶ →). Brand marks are the exception: `DoveMark`, `PlatformIcon`, the Google logo, the group map.
|
- **Icons are Phosphor** (`@phosphor-icons/react`), weight `bold` (or `fill` for play/star). No hand-drawn `<svg>` icons and no Unicode glyphs as icons (× › ▶ →). Brand marks are the exception: `DoveMark`, `PlatformIcon`, the Google logo, the group map.
|
||||||
- **Accents come from `src/lib/color.ts`:** `BRAND` (the teal, via the button token so the admin palette reaches it) and `ACCENTS` (deep, green, olive), all from `PALETTE` (the site's 16-color grid). Not a new hex in a page.
|
- **Accents come from `src/lib/color.ts`:** `BRAND` (the teal, via the button token so the admin palette reaches it) and `ACCENTS` (deep, green, mint). Not a new hex in a page.
|
||||||
- **No rounded corners.** Everything is square except buttons, which use the `btn` utility (Poppins Bold, a superellipse via `corner-shape`; `var(--btn-radius)` in plain CSS), and things round by nature (dots, radio marks). A note in place of content (empty section, "coming soon") uses the `notice` utility, not a dashed border. Nothing glows: no blur blobs, no glow shadows.
|
|
||||||
- **Sections paint no background.** `PageBackdrop` (in Layout) draws the page's palette circles behind every public page; a band that needs its own color (the hero, the stats band, the footer) is a deliberate exception.
|
|
||||||
- **No em-dashes** (U+2014) anywhere: UI text, help text, comments, docs, commit messages. Use a colon, comma or parentheses. An empty table cell shows `-`.
|
- **No em-dashes** (U+2014) anywhere: UI text, help text, comments, docs, commit messages. Use a colon, comma or parentheses. An empty table cell shows `-`.
|
||||||
- **Admin editor text:** blank select options read `Default: …` (what blank means), examples in help text start with `eg.`, and record ids are called "URL ID". Cut-off preview text uses `preview()` from `src/lib/text.ts`, which ends it with an ellipsis. See `docs/updating-data-in-code.md`.
|
- **Admin editor text:** blank select options read `Default: …` (what blank means), examples in help text start with `eg.`, and record ids are called "URL ID". Cut-off preview text uses `preview()` from `src/lib/text.ts`, which ends it with an ellipsis. See `docs/updating-data-in-code.md`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -277,8 +277,6 @@ The numbers band's "Number Source" dropdown works the same way:
|
||||||
| The site's colors, light and dark | the database over `src/index.css` | Admin → Panel → Site settings → Colors (superadmins): pick a color, set its light and/or dark value; saving refuses anything that makes text hard to read. The defaults are `THEME_DEFAULTS` in `server/src/themeDefaults.js` (the admin and the contrast check read it) and the same values as CSS in `src/index.css`; the build stops if the two differ. The admin's labels for them are `THEME_LABELS` in `src/lib/adminSchema/siteSettings.ts`. Change a token's value in both modes and every use follows. Use the token utilities (`text-muted`, `bg-surface`, `border-brand/20`) or `var(--color-…)`, not hex. A color that arrives as data (a page accent, an event's or region's color) goes through `src/lib/color.ts`: `withAlpha` for tints, `accentText` for text in it, `readableOn` for text on it. |
|
| The site's colors, light and dark | the database over `src/index.css` | Admin → Panel → Site settings → Colors (superadmins): pick a color, set its light and/or dark value; saving refuses anything that makes text hard to read. The defaults are `THEME_DEFAULTS` in `server/src/themeDefaults.js` (the admin and the contrast check read it) and the same values as CSS in `src/index.css`; the build stops if the two differ. The admin's labels for them are `THEME_LABELS` in `src/lib/adminSchema/siteSettings.ts`. Change a token's value in both modes and every use follows. Use the token utilities (`text-muted`, `bg-surface`, `border-brand/20`) or `var(--color-…)`, not hex. A color that arrives as data (a page accent, an event's or region's color) goes through `src/lib/color.ts`: `withAlpha` for tints, `accentText` for text in it, `readableOn` for text on it. |
|
||||||
| The icons a Front page "Find your way in" path can pick | `src/data/pathIcons.ts` (keys and labels) **and** `ICONS` in `src/pages/sections/home/Pathfinder.tsx` (the Phosphor icon for each key) | Add a line to both. A path saved with an emoji from before the list shows it as it is. |
|
| The icons a Front page "Find your way in" path can pick | `src/data/pathIcons.ts` (keys and labels) **and** `ICONS` in `src/pages/sections/home/Pathfinder.tsx` (the Phosphor icon for each key) | Add a line to both. A path saved with an emoji from before the list shows it as it is. |
|
||||||
| A page section's accent color | `BRAND` and `ACCENTS` in `src/lib/color.ts` | Pages pick from these (`accent: ACCENTS.green`); add a color there, not a hex in a page. Each is readable as text on white and the tints. |
|
| A page section's accent color | `BRAND` and `ACCENTS` in `src/lib/color.ts` | Pages pick from these (`accent: ACCENTS.green`); add a color there, not a hex in a page. Each is readable as text on white and the tints. |
|
||||||
| The palette (the 16-color grid the theme is drawn from) | `PALETTE` in `src/lib/color.ts` | Four families, a column each. `PALETTE_LIGHT` / `PALETTE_DARK` are the fills things colored by data use (a person's initials tile, `paletteFill`); the page background's circles and tones are in `src/components/PageBackdrop.css`; the admin home's group colors are `GROUPS` in `src/pages/admin/AdminHome.tsx`. |
|
|
||||||
| Timeline leaf colors (green now, autumn going back) | `leafColor` in `src/lib/color.ts` | The green, gold and autumn stops, and `LEAF_TURNED_BY` (2000), the year before which every leaf is fully turned. |
|
|
||||||
| Privacy Policy and Terms wording | `src/pages/Privacy.tsx`, `src/pages/Terms.tsx` | The `PARTS` list, and `LAST_UPDATED` whenever the wording changes. The Privacy page must stay true of the code: what the feedback form stores, what the browser keeps, which embeds wait for a click. |
|
| Privacy Policy and Terms wording | `src/pages/Privacy.tsx`, `src/pages/Terms.tsx` | The `PARTS` list, and `LAST_UPDATED` whenever the wording changes. The Privacy page must stay true of the code: what the feedback form stores, what the browser keeps, which embeds wait for a click. |
|
||||||
| Event type labels and plurals (public site) | `src/lib/eventTypes.ts` | Also the order of the type filter chips. |
|
| Event type labels and plurals (public site) | `src/lib/eventTypes.ts` | Also the order of the type filter chips. |
|
||||||
| Event and person role labels (public site) | `ROLE_LABEL` in `src/pages/EventDetail.tsx` and `src/pages/PersonDetail.tsx` | |
|
| Event and person role labels (public site) | `ROLE_LABEL` in `src/pages/EventDetail.tsx` and `src/pages/PersonDetail.tsx` | |
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,16 @@
|
||||||
|
|
||||||
// light dark
|
// light dark
|
||||||
export const THEME_DEFAULTS = {
|
export const THEME_DEFAULTS = {
|
||||||
ink: ["#001011", "#fcfffd"],
|
ink: ["#073d4a", "#eaf6f8"],
|
||||||
body: ["#004552", "#c2f6ff"],
|
body: ["#26454c", "#cde0e4"],
|
||||||
muted: ["#004c52", "#aac992"],
|
muted: ["#4a6b72", "#9fb9bf"],
|
||||||
link: ["#004552", "#5ce7ff"],
|
link: ["#0f7183", "#5ccbdc"],
|
||||||
brand: ["#008fa8", "#008fa8"],
|
brand: ["#138ba0", "#2aa7bc"],
|
||||||
action: ["#004552", "#004c52"],
|
action: ["#0f7183", "#0f7183"],
|
||||||
"action-hover": ["#001011", "#004552"],
|
"action-hover": ["#0b5c6a", "#0b5c6a"],
|
||||||
surface: ["#fcfffd", "#001011"],
|
surface: ["#ffffff", "#0c1d21"],
|
||||||
tint: ["#c2f6ff", "#004552"],
|
tint: ["#eef9fb", "#11292e"],
|
||||||
"tint-soft": ["#dfebd6", "#27371b"],
|
"tint-soft": ["#f6fbfc", "#0f2428"],
|
||||||
danger: ["#b3261e", "#ff8a80"],
|
danger: ["#b3261e", "#ff8a80"],
|
||||||
"danger-tint": ["#fdf3f2", "#3b1714"],
|
"danger-tint": ["#fdf3f2", "#3b1714"],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export default function ArrowLink({ to, label, color, size = "h-9 w-9" }) {
|
||||||
to={to}
|
to={to}
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
title={label}
|
title={label}
|
||||||
className={`${size} shrink-0 btn flex items-center justify-center transition-transform duration-200 hover:scale-110`}
|
className={`${size} shrink-0 rounded-full flex items-center justify-center transition-transform duration-200 hover:scale-110`}
|
||||||
style={{ border: `1px solid ${color}`, color }}
|
style={{ border: `1px solid ${color}`, color }}
|
||||||
>
|
>
|
||||||
<ArrowRight className="h-4 w-4" weight="bold" aria-hidden="true" />
|
<ArrowRight className="h-4 w-4" weight="bold" aria-hidden="true" />
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ export default function Banner() {
|
||||||
<button
|
<button
|
||||||
onClick={dismiss}
|
onClick={dismiss}
|
||||||
aria-label="Dismiss announcement"
|
aria-label="Dismiss announcement"
|
||||||
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 text-white/50 hover:text-white hover:bg-white/10 transition-colors"
|
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 rounded-md text-white/50 hover:text-white hover:bg-white/10 transition-colors"
|
||||||
>
|
>
|
||||||
<X className="w-4 h-4" weight="bold" aria-hidden="true" />
|
<X className="w-4 h-4" weight="bold" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ const CONTACT = 'info@nextgenerationofunity.org'
|
||||||
export default function ComingSoon({ what }: { what: string }) {
|
export default function ComingSoon({ what }: { what: string }) {
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto max-w-6xl px-6">
|
<div className="mx-auto max-w-6xl px-6">
|
||||||
<p className="notice max-w-xl p-6 text-body">
|
<p className="max-w-xl rounded-2xl border border-dashed border-brand/30 bg-surface/60 p-6 text-body">
|
||||||
We’re putting {what} together. In the meantime, ask us at{' '}
|
We’re putting {what} together. In the meantime, ask us at{' '}
|
||||||
<a href={`mailto:${CONTACT}`} className="font-semibold text-link underline underline-offset-2">
|
<a href={`mailto:${CONTACT}`} className="font-semibold text-link underline underline-offset-2">
|
||||||
{CONTACT}
|
{CONTACT}
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ function LinkCard({ item }: { item: ContentBlockItem }) {
|
||||||
return (
|
return (
|
||||||
<Anchor
|
<Anchor
|
||||||
href={url}
|
href={url}
|
||||||
className="group flex h-full flex-col overflow-hidden border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg"
|
className="group flex h-full flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg"
|
||||||
>
|
>
|
||||||
{!img.failed && (
|
{!img.failed && (
|
||||||
<img src={img.src} alt="" loading="lazy" onError={img.onError} className="aspect-video w-full object-cover" />
|
<img src={img.src} alt="" loading="lazy" onError={img.onError} className="aspect-video w-full object-cover" />
|
||||||
|
|
@ -147,7 +147,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
|
|
||||||
case 'subheading':
|
case 'subheading':
|
||||||
return (
|
return (
|
||||||
<h4 id={anchor} className="text-lg font-normal" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
|
<h4 id={anchor} className="text-lg font-semibold" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
|
||||||
{text}
|
{text}
|
||||||
</h4>
|
</h4>
|
||||||
)
|
)
|
||||||
|
|
@ -184,7 +184,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
<Anchor
|
<Anchor
|
||||||
key={index}
|
key={index}
|
||||||
href={item.url as string}
|
href={item.url as string}
|
||||||
className="btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
className="rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||||
style={{ borderColor: accent, color: accentText(accent) }}
|
style={{ borderColor: accent, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
{item.text}
|
{item.text}
|
||||||
|
|
@ -199,7 +199,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
<div>
|
<div>
|
||||||
<Anchor
|
<Anchor
|
||||||
href={block.href}
|
href={block.href}
|
||||||
className="inline-block btn px-6 py-2.5 text-white transition-transform hover:scale-105"
|
className="inline-block rounded-full px-6 py-2.5 font-semibold text-white transition-transform hover:scale-105"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
|
|
@ -245,7 +245,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
return (
|
return (
|
||||||
// Wide tables scroll sideways inside their box on a phone
|
// Wide tables scroll sideways inside their box on a phone
|
||||||
// rather than squeezing every column to a word.
|
// rather than squeezing every column to a word.
|
||||||
<div className="overflow-x-auto border border-brand/15">
|
<div className="overflow-x-auto rounded-2xl border border-brand/15">
|
||||||
<table className="min-w-full text-left text-sm leading-snug">
|
<table className="min-w-full text-left text-sm leading-snug">
|
||||||
<thead className="bg-tint">
|
<thead className="bg-tint">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -282,7 +282,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
if (!text) return null
|
if (!text) return null
|
||||||
return (
|
return (
|
||||||
<aside
|
<aside
|
||||||
className="space-y-3 border-l-4 px-6 py-5 leading-relaxed"
|
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%, var(--color-surface))`, color: 'var(--color-body)' }}
|
style={{ borderColor: accent, background: `color-mix(in srgb, ${accent} 8%, var(--color-surface))`, color: 'var(--color-body)' }}
|
||||||
>
|
>
|
||||||
<Paragraphs text={text} accent={accent} />
|
<Paragraphs text={text} accent={accent} />
|
||||||
|
|
@ -300,7 +300,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
alt={block.alt ?? ''}
|
alt={block.alt ?? ''}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
className="w-full"
|
className="w-full rounded-lg"
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
|
|
@ -315,7 +315,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
||||||
if (!block.href) return null
|
if (!block.href) return null
|
||||||
return (
|
return (
|
||||||
<figure>
|
<figure>
|
||||||
<div className="overflow-hidden">
|
<div className="overflow-hidden rounded-lg">
|
||||||
<VideoPlayer url={block.href} still={mediaUrl(block.media)} title={text || null} />
|
<VideoPlayer url={block.href} still={mediaUrl(block.media)} title={text || null} />
|
||||||
</div>
|
</div>
|
||||||
<Caption text={text} />
|
<Caption text={text} />
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,6 @@
|
||||||
|
|
||||||
A photo fills the picture area; a logo sits inside it on a soft
|
A photo fills the picture area; a logo sits inside it on a soft
|
||||||
panel instead, since cropping a logo to 16:9 cuts it off.
|
panel instead, since cropping a logo to 16:9 cuts it off.
|
||||||
|
|
||||||
The grid is one continuous block: no gaps and no frame, only a
|
|
||||||
colored rule between cards (each card's right and bottom border,
|
|
||||||
with the grid pulled past its clipping wrapper so the outer ones
|
|
||||||
fall outside). With three or more cards the first is the large
|
|
||||||
one, two rows tall, and the next two stack beside it, so it no
|
|
||||||
longer stretches its neighbor.
|
|
||||||
═══════════════════════════════════════════════════════════════ */
|
═══════════════════════════════════════════════════════════════ */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -78,24 +71,22 @@ function VideoPicture({ card }: { card: FeaturedCard }) {
|
||||||
return <VideoPlayer url={card.url} still={own} title={card.title} />
|
return <VideoPlayer url={card.url} still={own} title={card.title} />
|
||||||
}
|
}
|
||||||
|
|
||||||
const RULE = 'border-brand'
|
function Card({ card }: { card: FeaturedCard }) {
|
||||||
|
|
||||||
function Card({ card, large }: { card: FeaturedCard; large: boolean }) {
|
|
||||||
const href = hrefFor(card)
|
const href = hrefFor(card)
|
||||||
|
|
||||||
const text = (
|
const text = (
|
||||||
<div className={`flex flex-1 flex-col ${large ? 'p-8 md:p-10' : 'p-7'}`}>
|
<div className="flex flex-1 flex-col p-6">
|
||||||
{card.eyebrow && (
|
{card.eyebrow && (
|
||||||
<p className="text-sm font-semibold text-link">{card.eyebrow}</p>
|
<p className="text-sm font-semibold text-link">{card.eyebrow}</p>
|
||||||
)}
|
)}
|
||||||
{card.title && (
|
{card.title && (
|
||||||
<h3 className={`mt-2 font-display font-bold leading-snug text-ink ${large ? 'text-2xl md:text-3xl' : 'text-lg'}`}>
|
<h3 className="mt-2 font-display text-xl font-extrabold leading-snug text-ink">
|
||||||
{href ? (
|
{href ? (
|
||||||
// Stretched over the whole card, so the picture and the
|
// Stretched over the whole card, so the picture and the
|
||||||
// blurb are part of the click without nesting links.
|
// blurb are part of the click without nesting links.
|
||||||
<HomeLink
|
<HomeLink
|
||||||
url={href}
|
url={href}
|
||||||
className="after:absolute after:inset-0 after:content-[''] hover:underline"
|
className="after:absolute after:inset-0 after:rounded-2xl after:content-[''] hover:underline"
|
||||||
>
|
>
|
||||||
{card.title}
|
{card.title}
|
||||||
</HomeLink>
|
</HomeLink>
|
||||||
|
|
@ -104,18 +95,12 @@ function Card({ card, large }: { card: FeaturedCard; large: boolean }) {
|
||||||
)}
|
)}
|
||||||
</h3>
|
</h3>
|
||||||
)}
|
)}
|
||||||
{card.blurb && (
|
{card.blurb && <p className="mt-2 leading-relaxed text-muted">{card.blurb}</p>}
|
||||||
<p className={`mt-2 leading-relaxed text-muted ${large ? '' : 'line-clamp-3 text-sm'}`}>{card.blurb}</p>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li
|
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg">
|
||||||
className={`relative flex flex-col overflow-hidden border-r-2 border-b-2 ${RULE} bg-surface transition-colors hover:bg-tint-soft ${
|
|
||||||
large ? 'lg:col-span-2 lg:row-span-2' : ''
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{card.kind === 'video' ? (
|
{card.kind === 'video' ? (
|
||||||
// Above the stretched link, which a video card doesn't have
|
// Above the stretched link, which a video card doesn't have
|
||||||
// anyway, so the play button always gets the click.
|
// anyway, so the play button always gets the click.
|
||||||
|
|
@ -131,18 +116,11 @@ function Card({ card, large }: { card: FeaturedCard; large: boolean }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function FeaturedCards({ cards }: { cards: FeaturedCard[] }) {
|
export default function FeaturedCards({ cards }: { cards: FeaturedCard[] }) {
|
||||||
const leadLarge = cards.length >= 3
|
|
||||||
return (
|
return (
|
||||||
<div className="overflow-hidden">
|
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3 lg:[&>li:first-child]:col-span-2">
|
||||||
<ul className="-mr-[2px] -mb-[2px] grid sm:grid-cols-2 lg:grid-cols-3">
|
{cards.map((card, index) => (
|
||||||
{cards.map((card, index) => (
|
<Card key={`${card.kind}-${card.ref?.id ?? card.url}-${index}`} card={card} />
|
||||||
<Card
|
))}
|
||||||
key={`${card.kind}-${card.ref?.id ?? card.url}-${index}`}
|
</ul>
|
||||||
card={card}
|
|
||||||
large={leadLarge && index === 0}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,29 +53,15 @@ const headingClass = "text-white/90 text-sm font-semibold mb-4";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
<footer className="py-16 px-6" style={{ background: "#001011" }}>
|
<footer className="py-16 px-6" style={{ background: "rgba(0, 47, 58, 0.92)" }}>
|
||||||
<div className="max-w-6xl mx-auto">
|
<div className="max-w-6xl mx-auto">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-8 mb-12">
|
<div className="grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-8 mb-12">
|
||||||
{/* Brand and details on top, the site map across the full
|
{/* Brand and details on top, the site map across the full
|
||||||
width below them. */}
|
width below them. */}
|
||||||
<div className="md:col-span-9 text-center md:text-left">
|
<div className="md:col-span-9 text-center md:text-left">
|
||||||
{/* The logo, and Give beside it. */}
|
<Link to="/" className="inline-block">
|
||||||
<div className="flex flex-wrap items-center justify-center gap-6 md:justify-start">
|
<img src={siteLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
|
||||||
<Link to="/" className="inline-block">
|
</Link>
|
||||||
<img src={siteLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
|
|
||||||
</Link>
|
|
||||||
{giveAction && (
|
|
||||||
<a
|
|
||||||
href={giveAction.to}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="btn inline-block whitespace-nowrap px-6 py-2.5 text-sm text-white transition-transform duration-200 hover:-translate-y-0.5"
|
|
||||||
style={{ background: "var(--color-action)" }}
|
|
||||||
>
|
|
||||||
{giveAction.label}
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<address className="mt-5 not-italic text-sm leading-relaxed text-white/60">
|
<address className="mt-5 not-italic text-sm leading-relaxed text-white/60">
|
||||||
{Organization_Details.street}
|
{Organization_Details.street}
|
||||||
|
|
@ -120,6 +106,17 @@ export default function Footer() {
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
{giveAction && (
|
||||||
|
<a
|
||||||
|
href={giveAction.to}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="inline-block mt-8 px-6 py-2.5 rounded-full text-sm font-bold text-white whitespace-nowrap transition-all duration-200 hover:scale-105"
|
||||||
|
style={{ background: "var(--color-action)" }}
|
||||||
|
>
|
||||||
|
{giveAction.label}
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Socials + get in touch */}
|
{/* Socials + get in touch */}
|
||||||
|
|
@ -132,7 +129,7 @@ export default function Footer() {
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
className="footer-icons w-10 h-10 btn flex items-center justify-center text-white/70 transition-colors"
|
className="footer-icons w-10 h-10 rounded-full flex items-center justify-center text-white/70 transition-colors"
|
||||||
style={{ background: "rgba(255,255,255,0.08)", border: "1px solid rgba(255,255,255,0.15)" }}
|
style={{ background: "rgba(255,255,255,0.08)", border: "1px solid rgba(255,255,255,0.15)" }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={platform} className="w-6 h-6" />
|
<PlatformIcon platform={platform} className="w-6 h-6" />
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import Banner from "./Banner.tsx";
|
||||||
import siteLogo from "../assets/logos/NGU_Logo.svg";
|
import siteLogo from "../assets/logos/NGU_Logo.svg";
|
||||||
import Footer from "./Footer.tsx";
|
import Footer from "./Footer.tsx";
|
||||||
import PrivacyNotice from "./PrivacyNotice.tsx";
|
import PrivacyNotice from "./PrivacyNotice.tsx";
|
||||||
import PageBackdrop from "./PageBackdrop.tsx";
|
|
||||||
import ThemeToggle from "./ThemeToggle.tsx";
|
import ThemeToggle from "./ThemeToggle.tsx";
|
||||||
import { scrollBehavior } from "../lib/motion.ts";
|
import { scrollBehavior } from "../lib/motion.ts";
|
||||||
|
|
||||||
|
|
@ -49,7 +48,7 @@ function NavAction({
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
}) {
|
}) {
|
||||||
const v = ACTION_VARIANTS[item.variant] ?? ACTION_VARIANTS.ghost;
|
const v = ACTION_VARIANTS[item.variant] ?? ACTION_VARIANTS.ghost;
|
||||||
const className = `inline-block whitespace-nowrap btn transition-all duration-200 active:scale-[0.98] ${ACTION_SIZES[size]} ${v.className}`;
|
const className = `inline-block whitespace-nowrap rounded-full transition-all duration-200 active:scale-[0.98] ${ACTION_SIZES[size]} ${v.className}`;
|
||||||
|
|
||||||
return item.external ? (
|
return item.external ? (
|
||||||
<a
|
<a
|
||||||
|
|
@ -168,7 +167,7 @@ export default function Layout() {
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="#main"
|
href="#main"
|
||||||
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:bg-surface focus:px-4 focus:py-2 focus:font-semibold focus:text-ink"
|
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
|
Skip to content
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -187,7 +186,7 @@ export default function Layout() {
|
||||||
<nav
|
<nav
|
||||||
className="flex items-center justify-between px-6 py-4"
|
className="flex items-center justify-between px-6 py-4"
|
||||||
aria-label="Site"
|
aria-label="Site"
|
||||||
style={{ background: "rgba(0, 69, 82, 0.92)" }}
|
style={{ background: "rgba(0, 69, 82,0.92)" }}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-8">
|
<div className="flex items-center gap-8">
|
||||||
<Link to="/" aria-label="Next Generation of Unity home" className="inline-block">
|
<Link to="/" aria-label="Next Generation of Unity home" className="inline-block">
|
||||||
|
|
@ -240,8 +239,8 @@ export default function Layout() {
|
||||||
className="hidden md:flex items-center px-6 py-2"
|
className="hidden md:flex items-center px-6 py-2"
|
||||||
aria-label={`On this page: ${activePage?.label}`}
|
aria-label={`On this page: ${activePage?.label}`}
|
||||||
style={{
|
style={{
|
||||||
background: "rgba(0, 16, 17, 0.92)",
|
background: "rgba(0, 47, 57, 0.92)",
|
||||||
borderBottom: "1px solid rgba(92, 231, 255, 0.15)",
|
borderBottom: "1px solid rgba(45,200,224,0.15)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="text-xs text-white/65">{activePage?.label}</span>
|
<span className="text-xs text-white/65">{activePage?.label}</span>
|
||||||
|
|
@ -250,7 +249,7 @@ export default function Layout() {
|
||||||
<span
|
<span
|
||||||
aria-hidden
|
aria-hidden
|
||||||
className="mx-5 h-4 w-px"
|
className="mx-5 h-4 w-px"
|
||||||
style={{ background: "rgba(92, 231, 255, 0.3)" }}
|
style={{ background: "rgba(45,200,224,0.3)" }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="flex items-center gap-6">
|
<div className="flex items-center gap-6">
|
||||||
|
|
@ -273,8 +272,6 @@ export default function Layout() {
|
||||||
)}
|
)}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<PageBackdrop />
|
|
||||||
|
|
||||||
{/* Keeps page content clear of the fixed header */}
|
{/* Keeps page content clear of the fixed header */}
|
||||||
<div aria-hidden className="print:hidden" style={{ height: headerHeight }} />
|
<div aria-hidden className="print:hidden" style={{ height: headerHeight }} />
|
||||||
|
|
||||||
|
|
@ -295,7 +292,7 @@ export default function Layout() {
|
||||||
{mobileMenuOpen && (
|
{mobileMenuOpen && (
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 z-[60] flex flex-col items-center justify-center overflow-y-auto py-16"
|
className="fixed inset-0 z-[60] flex flex-col items-center justify-center overflow-y-auto py-16"
|
||||||
style={{ background: "rgba(0, 69, 82, 0.97)" }}
|
style={{ background: "rgba(7,61,74,0.97)" }}
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
aria-label="Menu"
|
aria-label="Menu"
|
||||||
|
|
@ -321,7 +318,7 @@ export default function Layout() {
|
||||||
end={page.path === "/"}
|
end={page.path === "/"}
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
`block text-2xl font-bold py-3 transition-colors ${
|
`block text-2xl font-bold py-3 transition-colors ${
|
||||||
isActive ? "text-[#aac992]" : "text-white hover:text-[#c2ffd6]"
|
isActive ? "text-[#aac992]" : "text-white hover:text-[#9fe7d0]"
|
||||||
}`
|
}`
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -338,7 +335,7 @@ export default function Layout() {
|
||||||
<a
|
<a
|
||||||
key={section.hash}
|
key={section.hash}
|
||||||
href={section.hash}
|
href={section.hash}
|
||||||
className="text-white/80 text-lg py-2 hover:text-[#c2ffd6] transition-colors"
|
className="text-white/80 text-lg py-2 hover:text-[#9fe7d0] transition-colors"
|
||||||
onClick={() => setMobileMenuOpen(false)}
|
onClick={() => setMobileMenuOpen(false)}
|
||||||
>
|
>
|
||||||
{section.label}
|
{section.label}
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@ export default function OrgLogo({
|
||||||
return (
|
return (
|
||||||
<Logo
|
<Logo
|
||||||
src={mediaUrl(org.logo)}
|
src={mediaUrl(org.logo)}
|
||||||
className={`${size} object-contain shrink-0`}
|
className={`${size} object-contain rounded-xl shrink-0`}
|
||||||
fallback={
|
fallback={
|
||||||
<span
|
<span
|
||||||
className={`${size} shrink-0 flex items-center justify-center font-display font-bold`}
|
className={`${size} rounded-xl shrink-0 flex items-center justify-center font-extrabold`}
|
||||||
style={{ border: `1px solid ${color}`, color: accentText(color) }}
|
style={{ border: `1px solid ${color}`, color: accentText(color) }}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
/* ═══════════════════════════════════════════════════════════════
|
|
||||||
PAGE BACKDROP: the circles and their tones (PageBackdrop.tsx)
|
|
||||||
|
|
||||||
Flat fills only: no blur, no gradient, no glow. Light mode uses
|
|
||||||
the palette's four palest shades, dark mode its dark shades at
|
|
||||||
half opacity over the ink background. Every text token reads at
|
|
||||||
5:1 or better on any of them, where two overlap included (the
|
|
||||||
lowest is the danger red in dark mode).
|
|
||||||
═══════════════════════════════════════════════════════════════ */
|
|
||||||
|
|
||||||
.page-backdrop {
|
|
||||||
position: fixed;
|
|
||||||
inset: 0;
|
|
||||||
z-index: -1;
|
|
||||||
overflow: hidden;
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
--pb-opacity: 0.75;
|
|
||||||
--pb-a: #c2f6ff;
|
|
||||||
--pb-b: #dfebd6;
|
|
||||||
--pb-c: #c2ffd6;
|
|
||||||
--pb-d: #c2fbff;
|
|
||||||
--pb-e: #dfebd6;
|
|
||||||
--pb-shift: 0vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-backdrop__circle {
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 50%;
|
|
||||||
opacity: var(--pb-opacity);
|
|
||||||
transform: translateX(var(--pb-shift));
|
|
||||||
transition: background-color 1.4s cubic-bezier(0.16, 1, 0.3, 1),
|
|
||||||
transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-backdrop__circle--a { width: 70vmax; height: 70vmax; left: -22vmax; top: -18vmax; background: var(--pb-a); }
|
|
||||||
.page-backdrop__circle--b { width: 52vmax; height: 52vmax; right: -16vmax; top: 8vh; background: var(--pb-b); }
|
|
||||||
.page-backdrop__circle--c { width: 44vmax; height: 44vmax; left: 30vw; bottom: -20vmax; background: var(--pb-c); }
|
|
||||||
.page-backdrop__circle--d { width: 30vmax; height: 30vmax; left: 12vw; top: 46vh; background: var(--pb-d); }
|
|
||||||
.page-backdrop__circle--e { width: 24vmax; height: 24vmax; right: 18vw; bottom: 6vh; background: var(--pb-e); }
|
|
||||||
|
|
||||||
/* Tones, one per section in turn: the same shades, moved around. */
|
|
||||||
.page-backdrop[data-tone="1"] { --pb-a: #dfebd6; --pb-b: #c2ffd6; --pb-c: #c2f6ff; --pb-d: #dfebd6; --pb-e: #c2fbff; --pb-shift: 4vw; }
|
|
||||||
.page-backdrop[data-tone="2"] { --pb-a: #c2ffd6; --pb-b: #c2fbff; --pb-c: #dfebd6; --pb-d: #c2f6ff; --pb-e: #c2ffd6; --pb-shift: -3vw; }
|
|
||||||
.page-backdrop[data-tone="3"] { --pb-a: #c2fbff; --pb-b: #c2f6ff; --pb-c: #c2ffd6; --pb-d: #dfebd6; --pb-e: #c2f6ff; --pb-shift: 2vw; }
|
|
||||||
|
|
||||||
/* Dark mode: the dark shades, the same turns. Two blocks as in
|
|
||||||
index.css: the toggle's choice, or the system's when there is none. */
|
|
||||||
:root[data-theme="dark"] .page-backdrop { --pb-opacity: 0.5; --pb-a: #004552; --pb-b: #27371b; --pb-c: #004c52; --pb-d: #00521b; --pb-e: #27371b; }
|
|
||||||
:root[data-theme="dark"] .page-backdrop[data-tone="1"] { --pb-a: #27371b; --pb-b: #004c52; --pb-c: #004552; --pb-d: #27371b; --pb-e: #00521b; }
|
|
||||||
:root[data-theme="dark"] .page-backdrop[data-tone="2"] { --pb-a: #004c52; --pb-b: #00521b; --pb-c: #27371b; --pb-d: #004552; --pb-e: #004c52; }
|
|
||||||
:root[data-theme="dark"] .page-backdrop[data-tone="3"] { --pb-a: #00521b; --pb-b: #004552; --pb-c: #004c52; --pb-d: #27371b; --pb-e: #004552; }
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root:not([data-theme="light"]) .page-backdrop { --pb-opacity: 0.5; --pb-a: #004552; --pb-b: #27371b; --pb-c: #004c52; --pb-d: #00521b; --pb-e: #27371b; }
|
|
||||||
:root:not([data-theme="light"]) .page-backdrop[data-tone="1"] { --pb-a: #27371b; --pb-b: #004c52; --pb-c: #004552; --pb-d: #27371b; --pb-e: #00521b; }
|
|
||||||
:root:not([data-theme="light"]) .page-backdrop[data-tone="2"] { --pb-a: #004c52; --pb-b: #00521b; --pb-c: #27371b; --pb-d: #004552; --pb-e: #004c52; }
|
|
||||||
:root:not([data-theme="light"]) .page-backdrop[data-tone="3"] { --pb-a: #00521b; --pb-b: #004552; --pb-c: #004c52; --pb-d: #27371b; --pb-e: #004552; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
.page-backdrop { display: none; }
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
/* ═══════════════════════════════════════════════════════════════
|
|
||||||
PAGE BACKDROP
|
|
||||||
|
|
||||||
One background behind every public page: large flat circles in
|
|
||||||
the palette's light shades (its dark ones in dark mode), fixed to
|
|
||||||
the window and overlapping. Sections paint nothing of their own,
|
|
||||||
so it runs behind all of them; cards keep their solid surface.
|
|
||||||
|
|
||||||
As the visitor moves through a page the circles change tone: the
|
|
||||||
section crossing the middle of the window picks one of TONES (its
|
|
||||||
place on the page, in turn), and the circles ease to that tone's
|
|
||||||
colors and a slightly shifted position. Watched with an
|
|
||||||
IntersectionObserver, so nothing runs while the page sits still;
|
|
||||||
the colors are in PageBackdrop.css. Under reduced motion the
|
|
||||||
change is instant (index.css stops every transition).
|
|
||||||
|
|
||||||
Every text color passes 4.5:1 on every shade used here, overlaps
|
|
||||||
included, in both modes: the light shades are the palette's
|
|
||||||
palest, and the dark ones sit at partial opacity.
|
|
||||||
═══════════════════════════════════════════════════════════════ */
|
|
||||||
|
|
||||||
import { useEffect, useRef } from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
|
||||||
import './PageBackdrop.css'
|
|
||||||
|
|
||||||
/** How many tones PageBackdrop.css defines (data-tone 0 to 3). */
|
|
||||||
const TONES = 4
|
|
||||||
const CIRCLES = ['a', 'b', 'c', 'd', 'e']
|
|
||||||
|
|
||||||
export default function PageBackdrop() {
|
|
||||||
const ref = useRef<HTMLDivElement>(null)
|
|
||||||
const { pathname } = useLocation()
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const main = document.getElementById('main')
|
|
||||||
const backdrop = ref.current
|
|
||||||
if (!main || !backdrop) return undefined
|
|
||||||
|
|
||||||
backdrop.dataset.tone = '0'
|
|
||||||
let watched: Element[] = []
|
|
||||||
|
|
||||||
// The band crossing the window's middle line sets the tone.
|
|
||||||
const observer = new IntersectionObserver(
|
|
||||||
(entries) => {
|
|
||||||
for (const entry of entries) {
|
|
||||||
if (!entry.isIntersecting) continue
|
|
||||||
const index = watched.indexOf(entry.target)
|
|
||||||
if (index >= 0) backdrop.dataset.tone = String(index % TONES)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ rootMargin: '-50% 0px -50% 0px', threshold: 0 },
|
|
||||||
)
|
|
||||||
|
|
||||||
// Pages draw their sections as their data arrives, so the list
|
|
||||||
// is gathered again whenever main's content changes.
|
|
||||||
const collect = () => {
|
|
||||||
observer.disconnect()
|
|
||||||
watched = Array.from(main.querySelectorAll('section'))
|
|
||||||
watched.forEach((section) => observer.observe(section))
|
|
||||||
}
|
|
||||||
collect()
|
|
||||||
let frame = 0
|
|
||||||
const mutations = new MutationObserver(() => {
|
|
||||||
cancelAnimationFrame(frame)
|
|
||||||
frame = requestAnimationFrame(collect)
|
|
||||||
})
|
|
||||||
mutations.observe(main, { childList: true, subtree: true })
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
cancelAnimationFrame(frame)
|
|
||||||
mutations.disconnect()
|
|
||||||
observer.disconnect()
|
|
||||||
}
|
|
||||||
}, [pathname])
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div ref={ref} className="page-backdrop" aria-hidden="true">
|
|
||||||
{CIRCLES.map((name) => (
|
|
||||||
<span key={name} className={`page-backdrop__circle page-backdrop__circle--${name}`} />
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
/* ═══════════════════════════════════════════════════════════════
|
/* ═══════════════════════════════════════════════════════════════
|
||||||
PAGE SHELL
|
PAGE SHELL
|
||||||
Just the chrome that makes pages look alike: a page header, then
|
Just the chrome that makes pages look alike: a page header, then
|
||||||
sections with a thin accent banner between them and a left-aligned
|
sections with a thin accent banner between them, alternating
|
||||||
heading with a blurb and rule. Sections paint no background of
|
backgrounds, and a left-aligned heading with a blurb and rule.
|
||||||
their own: the page's (PageBackdrop.tsx) runs behind all of them.
|
|
||||||
|
|
||||||
Whatever goes inside a section is passed as `content`, the shell
|
Whatever goes inside a section is passed as `content`, the shell
|
||||||
doesn't care what it is.
|
doesn't care what it is.
|
||||||
|
|
@ -22,6 +21,7 @@
|
||||||
title: "Local Groups",
|
title: "Local Groups",
|
||||||
blurb: "Optional line under the section heading.",
|
blurb: "Optional line under the section heading.",
|
||||||
accent: BRAND, // heading, banner, rule
|
accent: BRAND, // heading, banner, rule
|
||||||
|
background: "var(--color-tint)",
|
||||||
actions: <SomeButton />, // optional, right of the heading
|
actions: <SomeButton />, // optional, right of the heading
|
||||||
content: <YourStuff />,
|
content: <YourStuff />,
|
||||||
},
|
},
|
||||||
|
|
@ -40,6 +40,7 @@ export type ShellSection = {
|
||||||
title: string;
|
title: string;
|
||||||
blurb?: string;
|
blurb?: string;
|
||||||
accent: string;
|
accent: string;
|
||||||
|
background: string;
|
||||||
actions?: ReactNode;
|
actions?: ReactNode;
|
||||||
content: ReactNode;
|
content: ReactNode;
|
||||||
};
|
};
|
||||||
|
|
@ -56,6 +57,7 @@ export function Section({ section }: { section: ShellSection }) {
|
||||||
title,
|
title,
|
||||||
blurb,
|
blurb,
|
||||||
accent,
|
accent,
|
||||||
|
background,
|
||||||
// Optional action bar for this section's heading row, a view
|
// Optional action bar for this section's heading row, a view
|
||||||
// toggle, a filter, a link. Whatever the section needs; the
|
// toggle, a filter, a link. Whatever the section needs; the
|
||||||
// shell just gives it a place to sit.
|
// shell just gives it a place to sit.
|
||||||
|
|
@ -69,13 +71,13 @@ export function Section({ section }: { section: ShellSection }) {
|
||||||
className="py-20"
|
className="py-20"
|
||||||
// Clear of the fixed header, whatever it holds today (Layout
|
// Clear of the fixed header, whatever it holds today (Layout
|
||||||
// sets --header-h from its measured height).
|
// sets --header-h from its measured height).
|
||||||
style={{ scrollMarginTop: "calc(var(--header-h, 5rem) + 1rem)" }}
|
style={{ background, scrollMarginTop: "calc(var(--header-h, 5rem) + 1rem)" }}
|
||||||
>
|
>
|
||||||
{/* Heading, left aligned, optional actions on the right */}
|
{/* Heading, left aligned, optional actions on the right */}
|
||||||
<div className="max-w-6xl mx-auto px-6 mb-10">
|
<div className="max-w-6xl mx-auto px-6 mb-10">
|
||||||
<div className="flex flex-wrap items-end justify-between gap-4">
|
<div className="flex flex-wrap items-end justify-between gap-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-3xl md:text-4xl font-bold" style={{ color: accentText(accent) }}>
|
<h2 className="text-3xl md:text-4xl font-extrabold" style={{ color: accentText(accent) }}>
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
{blurb && <p className="mt-2 text-muted max-w-xl">{blurb}</p>}
|
{blurb && <p className="mt-2 text-muted max-w-xl">{blurb}</p>}
|
||||||
|
|
@ -100,9 +102,9 @@ export default function PageShell({ title, intro, sections }: PageShellProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Page header */}
|
{/* Page header */}
|
||||||
<div className="pt-24 pb-12 px-6">
|
<div className="pt-24 pb-12 px-6" style={{ background: "var(--color-tint)" }}>
|
||||||
<div className="max-w-6xl mx-auto">
|
<div className="max-w-6xl mx-auto">
|
||||||
<h1 className="text-5xl md:text-6xl font-bold" style={{ color: accentText(BRAND) }}>
|
<h1 className="text-5xl md:text-6xl font-extrabold" style={{ color: accentText(BRAND) }}>
|
||||||
{title}
|
{title}
|
||||||
</h1>
|
</h1>
|
||||||
{intro && <p className="mt-3 text-lg text-muted max-w-2xl">{intro}</p>}
|
{intro && <p className="mt-3 text-lg text-muted max-w-2xl">{intro}</p>}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ export default function PageState({
|
||||||
</p>
|
</p>
|
||||||
<Link
|
<Link
|
||||||
to={backTo}
|
to={backTo}
|
||||||
className="mt-4 inline-block btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
className="mt-4 inline-block rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||||
>
|
>
|
||||||
{backLabel}
|
{backLabel}
|
||||||
|
|
@ -66,7 +66,7 @@ export default function PageState({
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onRetry}
|
onClick={onRetry}
|
||||||
className="mt-3 btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
className="mt-3 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||||
>
|
>
|
||||||
Try again
|
Try again
|
||||||
|
|
@ -79,9 +79,9 @@ export default function PageState({
|
||||||
<div className="max-w-6xl mx-auto px-6" role="status">
|
<div className="max-w-6xl mx-auto px-6" role="status">
|
||||||
<span className="sr-only">Loading this {noun}…</span>
|
<span className="sr-only">Loading this {noun}…</span>
|
||||||
<div aria-hidden="true" className="space-y-4">
|
<div aria-hidden="true" className="space-y-4">
|
||||||
<div className="skeleton !min-h-0 h-8 w-2/3" />
|
<div className="skeleton !min-h-0 h-8 w-2/3 !rounded-xl" />
|
||||||
<div className="skeleton !min-h-0 h-4 w-full" />
|
<div className="skeleton !min-h-0 h-4 w-full !rounded-lg" />
|
||||||
<div className="skeleton !min-h-0 h-4 w-5/6" />
|
<div className="skeleton !min-h-0 h-4 w-5/6 !rounded-lg" />
|
||||||
<div className="skeleton !min-h-0 mt-8 aspect-video w-full max-w-3xl" />
|
<div className="skeleton !min-h-0 mt-8 aspect-video w-full max-w-3xl" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -91,7 +91,7 @@ export default function PageState({
|
||||||
return (
|
return (
|
||||||
<PageShell
|
<PageShell
|
||||||
title={title}
|
title={title}
|
||||||
sections={[{ id: 'status', title: '', accent: BRAND, content }]}
|
sections={[{ id: 'status', title: '', accent: BRAND, background: 'var(--color-surface)', content }]}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,17 @@
|
||||||
--pl-gap: calc(0.875rem * var(--pl-scale));
|
--pl-gap: calc(0.875rem * var(--pl-scale));
|
||||||
--pl-pad: calc(0.5rem * var(--pl-scale));
|
--pl-pad: calc(0.5rem * var(--pl-scale));
|
||||||
--pl-photo-ratio: 1;
|
--pl-photo-ratio: 1;
|
||||||
|
--pl-radius: 3px;
|
||||||
|
|
||||||
/* color */
|
/* color */
|
||||||
--pl-accent: var(--color-link);
|
--pl-accent: #0f7183;
|
||||||
--pl-frame-bg: var(--color-surface);
|
--pl-frame-bg: var(--color-surface);
|
||||||
--pl-frame-edge: color-mix(in srgb, var(--color-brand) 45%, transparent);
|
--pl-frame-edge: color-mix(in srgb, var(--color-muted) 20%, transparent);
|
||||||
--pl-photo-bg: color-mix(in srgb, var(--color-muted) 15%, var(--color-surface));
|
--pl-photo-bg: color-mix(in srgb, var(--color-muted) 15%, var(--color-surface));
|
||||||
--pl-ink: var(--color-ink);
|
--pl-ink: var(--color-ink);
|
||||||
--pl-muted: var(--color-muted);
|
--pl-muted: var(--color-muted);
|
||||||
--pl-rule: color-mix(in srgb, var(--color-brand) 35%, transparent);
|
--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);
|
||||||
|
|
||||||
container-type: inline-size;
|
container-type: inline-size;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -29,10 +31,12 @@
|
||||||
|
|
||||||
.pl[data-size="sm"] {
|
.pl[data-size="sm"] {
|
||||||
--pl-base-w: 104px;
|
--pl-base-w: 104px;
|
||||||
|
--pl-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl[data-size="lg"] {
|
.pl[data-size="lg"] {
|
||||||
--pl-base-w: 164px;
|
--pl-base-w: 164px;
|
||||||
|
--pl-photo-ratio: 4 / 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* groups --------------------------------------------------------------- */
|
/* groups --------------------------------------------------------------- */
|
||||||
|
|
@ -137,8 +141,10 @@
|
||||||
padding: var(--pl-pad);
|
padding: var(--pl-pad);
|
||||||
padding-bottom: calc(var(--pl-pad) * 1.6);
|
padding-bottom: calc(var(--pl-pad) * 1.6);
|
||||||
background: var(--pl-frame-bg);
|
background: var(--pl-frame-bg);
|
||||||
border: 2px solid var(--pl-frame-edge);
|
border: 1px solid var(--pl-frame-edge);
|
||||||
transition: transform 160ms ease, border-color 160ms ease;
|
border-radius: var(--pl-radius);
|
||||||
|
box-shadow: var(--pl-shadow);
|
||||||
|
transition: transform 160ms ease, box-shadow 160ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl[data-tilt="on"] .pl__item:nth-child(odd) .pl__frame {
|
.pl[data-tilt="on"] .pl__item:nth-child(odd) .pl__frame {
|
||||||
|
|
@ -154,7 +160,7 @@
|
||||||
.pl__tile--link:hover .pl__frame,
|
.pl__tile--link:hover .pl__frame,
|
||||||
.pl__tile--link:focus-visible .pl__frame {
|
.pl__tile--link:focus-visible .pl__frame {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
border-color: var(--pl-accent);
|
box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06), 0 16px 24px -16px rgba(15, 23, 42, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__tile--button:focus-visible,
|
.pl__tile--button:focus-visible,
|
||||||
|
|
@ -170,6 +176,7 @@
|
||||||
|
|
||||||
.pl__tile[aria-expanded="true"] .pl__frame {
|
.pl__tile[aria-expanded="true"] .pl__frame {
|
||||||
border-color: var(--pl-accent);
|
border-color: var(--pl-accent);
|
||||||
|
box-shadow: 0 0 0 1px var(--pl-accent), 0 14px 22px -16px rgba(15, 23, 42, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__photo {
|
.pl__photo {
|
||||||
|
|
@ -178,6 +185,7 @@
|
||||||
aspect-ratio: var(--pl-photo-ratio);
|
aspect-ratio: var(--pl-photo-ratio);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--pl-photo-bg);
|
background: var(--pl-photo-bg);
|
||||||
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__img {
|
.pl__img {
|
||||||
|
|
@ -188,55 +196,30 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__initials {
|
.pl__initials {
|
||||||
display: grid;
|
font-size: calc(1.25rem * var(--pl-scale));
|
||||||
place-items: center;
|
font-weight: 600;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
font-family: var(--font-display);
|
|
||||||
font-size: calc(1.5rem * var(--pl-scale));
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.03em;
|
letter-spacing: 0.03em;
|
||||||
|
color: var(--pl-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A fixed height, two lines of name and two of title, so every card
|
|
||||||
in a row is the same height; longer text is cut with an ellipsis
|
|
||||||
(and the tile gets the chevron, PeopleTiles.tsx). The right padding
|
|
||||||
keeps the text clear of the chevron. */
|
|
||||||
.pl__caption {
|
.pl__caption {
|
||||||
--pl-name-lh: calc(0.875rem * var(--pl-scale) * 1.25);
|
|
||||||
--pl-title-lh: calc(0.75rem * var(--pl-scale) * 1.3);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.15rem;
|
gap: 0.1rem;
|
||||||
padding: 0 calc(1.25rem * var(--pl-scale)) 0 calc(var(--pl-pad) * 0.25);
|
padding: 0 calc(var(--pl-pad) * 0.25);
|
||||||
height: calc(var(--pl-name-lh) * 2);
|
min-height: calc(1.1rem * var(--pl-scale));
|
||||||
}
|
|
||||||
|
|
||||||
.pl__caption[data-title="on"] {
|
|
||||||
height: calc(var(--pl-name-lh) * 2 + 0.15rem + var(--pl-title-lh) * 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pl__name,
|
|
||||||
.pl__title {
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__name {
|
.pl__name {
|
||||||
font-size: calc(0.875rem * var(--pl-scale));
|
font-size: calc(0.875rem * var(--pl-scale));
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
max-height: calc(var(--pl-name-lh) * 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__title {
|
.pl__title {
|
||||||
font-size: calc(0.75rem * var(--pl-scale));
|
font-size: calc(0.75rem * var(--pl-scale));
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
color: var(--pl-muted);
|
color: var(--pl-muted);
|
||||||
max-height: calc(var(--pl-title-lh) * 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pl__badge {
|
.pl__badge {
|
||||||
|
|
@ -247,6 +230,7 @@
|
||||||
place-items: center;
|
place-items: center;
|
||||||
width: calc(1.25rem * var(--pl-scale));
|
width: calc(1.25rem * var(--pl-scale));
|
||||||
height: calc(1.25rem * var(--pl-scale));
|
height: calc(1.25rem * var(--pl-scale));
|
||||||
|
border-radius: 999px;
|
||||||
background: var(--pl-accent);
|
background: var(--pl-accent);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
transition: transform 160ms ease;
|
transition: transform 160ms ease;
|
||||||
|
|
@ -264,6 +248,7 @@
|
||||||
gap: 0.65rem;
|
gap: 0.65rem;
|
||||||
padding: 1rem 1.1rem;
|
padding: 1rem 1.1rem;
|
||||||
border-left: 3px solid var(--pl-accent);
|
border-left: 3px solid var(--pl-accent);
|
||||||
|
border-radius: 6px;
|
||||||
background: color-mix(in srgb, var(--pl-accent) 7%, var(--color-surface));
|
background: color-mix(in srgb, var(--pl-accent) 7%, var(--color-surface));
|
||||||
max-width: 68ch;
|
max-width: 68ch;
|
||||||
}
|
}
|
||||||
|
|
@ -292,8 +277,7 @@
|
||||||
width: 1.75rem;
|
width: 1.75rem;
|
||||||
height: 1.75rem;
|
height: 1.75rem;
|
||||||
border: 1px solid var(--pl-frame-edge);
|
border: 1px solid var(--pl-frame-edge);
|
||||||
border-radius: var(--btn-radius);
|
border-radius: 999px;
|
||||||
corner-shape: squircle;
|
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
color: var(--pl-muted);
|
color: var(--pl-muted);
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { ArrowRight, CaretDown, X } from "@phosphor-icons/react";
|
||||||
import {
|
import {
|
||||||
useEffect,
|
useEffect,
|
||||||
useId,
|
useId,
|
||||||
useLayoutEffect,
|
|
||||||
useMemo,
|
useMemo,
|
||||||
useRef,
|
useRef,
|
||||||
useState,
|
useState,
|
||||||
|
|
@ -16,7 +15,6 @@ import { get } from "../lib/api.ts";
|
||||||
import { isBadId, personHref } from "../lib/hrefs.ts";
|
import { isBadId, personHref } from "../lib/hrefs.ts";
|
||||||
import { mediaUrl, initials } from "../lib/media.ts";
|
import { mediaUrl, initials } from "../lib/media.ts";
|
||||||
import { useSmallImage } from "../lib/useSmallImage.ts";
|
import { useSmallImage } from "../lib/useSmallImage.ts";
|
||||||
import { paletteFill } from "../lib/color.ts";
|
|
||||||
import "./PeopleTiles.css";
|
import "./PeopleTiles.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,13 +47,6 @@ import "./PeopleTiles.css";
|
||||||
* public email or a bio. Not bio alone, the details panel is
|
* public email or a bio. Not bio alone, the details panel is
|
||||||
* worth opening before anyone has written prose.
|
* worth opening before anyone has written prose.
|
||||||
*
|
*
|
||||||
* At every size the photo is square and the caption a fixed two
|
|
||||||
* lines of name (and two of title), so a row's cards are one
|
|
||||||
* height. What doesn't fit ends in an ellipsis, and that tile gets
|
|
||||||
* the chevron too, opening the details with it in full. A person
|
|
||||||
* with no photo gets their initials on a palette color
|
|
||||||
* (paletteFill in color.ts).
|
|
||||||
*
|
|
||||||
* Field names follow the API (is_owner, location_label), so a row
|
* Field names follow the API (is_owner, location_label), so a row
|
||||||
* from /api/teams/:id/people drops in unchanged.
|
* from /api/teams/:id/people drops in unchanged.
|
||||||
*
|
*
|
||||||
|
|
@ -403,9 +394,6 @@ export function PeopleTilesView({
|
||||||
}) {
|
}) {
|
||||||
const baseId = useId().replace(/:/g, "");
|
const baseId = useId().replace(/:/g, "");
|
||||||
const [openKey, setOpenKey] = useState<string | null>(null);
|
const [openKey, setOpenKey] = useState<string | null>(null);
|
||||||
// Tiles whose name or title didn't fit and was cut off: they get
|
|
||||||
// the down arrow, and the details panel shows it whole.
|
|
||||||
const [clipped, setClipped] = useState<ReadonlySet<string>>(() => new Set());
|
|
||||||
const rootRef = useRef<HTMLDivElement>(null);
|
const rootRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
const resolvedSize: PeopleTilesSize = SIZE_FEATURES[size] ? size : "md";
|
const resolvedSize: PeopleTilesSize = SIZE_FEATURES[size] ? size : "md";
|
||||||
|
|
@ -440,17 +428,7 @@ export function PeopleTilesView({
|
||||||
return emptyMessage ? <p className="pl__empty">{emptyMessage}</p> : null;
|
return emptyMessage ? <p className="pl__empty">{emptyMessage}</p> : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = openKey ? findByKey(resolvedGroups, openKey) : null;
|
const open = features.details ? findByKey(resolvedGroups, openKey) : null;
|
||||||
|
|
||||||
function markClipped(key: string, isClipped: boolean) {
|
|
||||||
setClipped((current) => {
|
|
||||||
if (current.has(key) === isClipped) return current;
|
|
||||||
const next = new Set(current);
|
|
||||||
if (isClipped) next.add(key);
|
|
||||||
else next.delete(key);
|
|
||||||
return next;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggle(group: PeopleGroup, person: Person, index: number) {
|
function toggle(group: PeopleGroup, person: Person, index: number) {
|
||||||
const key = keyFor(group, person, index);
|
const key = keyFor(group, person, index);
|
||||||
|
|
@ -508,7 +486,7 @@ export function PeopleTilesView({
|
||||||
<ul className="pl__row">
|
<ul className="pl__row">
|
||||||
{group.people.map((person, index) => {
|
{group.people.map((person, index) => {
|
||||||
const key = keyFor(group, person, index);
|
const key = keyFor(group, person, index);
|
||||||
const expandable = (features.details && hasDetails(person)) || clipped.has(key);
|
const expandable = features.details && hasDetails(person);
|
||||||
const isOpen = expandable && openKey === key;
|
const isOpen = expandable && openKey === key;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -528,7 +506,6 @@ export function PeopleTilesView({
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
panelId={`${baseId}-bio`}
|
panelId={`${baseId}-bio`}
|
||||||
onToggle={() => toggle(group, person, index)}
|
onToggle={() => toggle(group, person, index)}
|
||||||
onClip={(isClipped) => markClipped(key, isClipped)}
|
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|
@ -560,7 +537,6 @@ function Tile({
|
||||||
isOpen,
|
isOpen,
|
||||||
panelId,
|
panelId,
|
||||||
onToggle,
|
onToggle,
|
||||||
onClip,
|
|
||||||
}: {
|
}: {
|
||||||
person: Person;
|
person: Person;
|
||||||
showTitle: boolean;
|
showTitle: boolean;
|
||||||
|
|
@ -568,36 +544,15 @@ function Tile({
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
panelId: string;
|
panelId: string;
|
||||||
onToggle: () => void;
|
onToggle: () => void;
|
||||||
onClip: (isClipped: boolean) => void;
|
|
||||||
}) {
|
}) {
|
||||||
const title = titleOf(person);
|
const title = titleOf(person);
|
||||||
const captionRef = useRef<HTMLSpanElement>(null);
|
|
||||||
|
|
||||||
// Every caption is the same height (two lines of name, two of
|
|
||||||
// title), so the row stays even; a name or title that needs more
|
|
||||||
// is cut with an ellipsis. Checked again whenever the tile resizes,
|
|
||||||
// which is also when the web font arrives.
|
|
||||||
useLayoutEffect(() => {
|
|
||||||
const caption = captionRef.current;
|
|
||||||
if (!caption) return undefined;
|
|
||||||
const check = () =>
|
|
||||||
onClip(
|
|
||||||
Array.from(caption.children).some((line) => line.scrollHeight > line.clientHeight + 1),
|
|
||||||
);
|
|
||||||
check();
|
|
||||||
const observer = new ResizeObserver(check);
|
|
||||||
observer.observe(caption);
|
|
||||||
return () => observer.disconnect();
|
|
||||||
// onClip is a fresh closure each render; the name and title are
|
|
||||||
// what can change the answer.
|
|
||||||
}, [person.name, title, showTitle]);
|
|
||||||
|
|
||||||
const content = (
|
const content = (
|
||||||
<span className="pl__frame">
|
<span className="pl__frame">
|
||||||
<span className="pl__photo">
|
<span className="pl__photo">
|
||||||
<Photo src={mediaUrl(person.photo)} name={person.name} />
|
<Photo src={mediaUrl(person.photo)} name={person.name} />
|
||||||
</span>
|
</span>
|
||||||
<span ref={captionRef} className="pl__caption" data-title={showTitle ? "on" : "off"}>
|
<span className="pl__caption">
|
||||||
<span className="pl__name">{person.name}</span>
|
<span className="pl__name">{person.name}</span>
|
||||||
{showTitle && title && <span className="pl__title">{title}</span>}
|
{showTitle && title && <span className="pl__title">{title}</span>}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -637,10 +592,9 @@ function Tile({
|
||||||
function Photo({ src, name }: { src?: string | null; name: string }) {
|
function Photo({ src, name }: { src?: string | null; name: string }) {
|
||||||
const img = useSmallImage(src);
|
const img = useSmallImage(src);
|
||||||
|
|
||||||
// No photo: the initials on a palette color picked by the name.
|
|
||||||
if (img.failed) {
|
if (img.failed) {
|
||||||
return (
|
return (
|
||||||
<span className="pl__initials" style={paletteFill(name)} aria-hidden="true">
|
<span className="pl__initials" aria-hidden="true">
|
||||||
{initials(name)}
|
{initials(name)}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ function List({ entries, lit }: { entries: ContentsEntry[]; lit: string | null }
|
||||||
onClick={(event) => jump(event, entry.id)}
|
onClick={(event) => jump(event, entry.id)}
|
||||||
aria-current={entry.id === lit ? 'location' : undefined}
|
aria-current={entry.id === lit ? 'location' : undefined}
|
||||||
className={
|
className={
|
||||||
'block border-l-2 px-3 py-1.5 transition-colors ' +
|
'block rounded-lg border-l-2 px-3 py-1.5 transition-colors ' +
|
||||||
(entry.id === lit
|
(entry.id === lit
|
||||||
? 'border-link bg-tint font-semibold text-link'
|
? 'border-link bg-tint font-semibold text-link'
|
||||||
: 'border-transparent text-muted hover:text-link')
|
: 'border-transparent text-muted hover:text-link')
|
||||||
|
|
@ -74,7 +74,7 @@ export default function PostContents({ entries }: { entries: ContentsEntry[] })
|
||||||
const lit = useLit(entries)
|
const lit = useLit(entries)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<details className="border border-brand/20 bg-tint-soft p-4 lg:hidden print:hidden">
|
<details className="rounded-2xl border border-brand/20 bg-tint-soft p-4 lg:hidden print:hidden">
|
||||||
<summary className="cursor-pointer font-semibold text-ink">On this page</summary>
|
<summary className="cursor-pointer font-semibold text-ink">On this page</summary>
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
<List entries={entries} lit={lit} />
|
<List entries={entries} lit={lit} />
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ export default function PrivacyNotice() {
|
||||||
<div
|
<div
|
||||||
role="region"
|
role="region"
|
||||||
aria-label="Privacy notice"
|
aria-label="Privacy notice"
|
||||||
className="fixed bottom-4 left-4 right-4 z-40 mx-auto max-w-md border border-brand/20 bg-surface p-4 text-sm text-body 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>
|
<p>
|
||||||
No tracking cookies here. Videos and maps come from YouTube, Facebook or Google only when you press
|
No tracking cookies here. Videos and maps come from YouTube, Facebook or Google only when you press
|
||||||
|
|
@ -54,7 +54,7 @@ export default function PrivacyNotice() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={close}
|
onClick={close}
|
||||||
className="mt-3 btn bg-action px-4 py-1.5 text-white hover:bg-action-hover"
|
className="mt-3 rounded-full bg-action px-4 py-1.5 font-semibold text-white hover:bg-action-hover"
|
||||||
>
|
>
|
||||||
Got it
|
Got it
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@ import { qrMatrix, qrPath } from '../lib/qr.ts'
|
||||||
const MARGIN = 4
|
const MARGIN = 4
|
||||||
|
|
||||||
/* Dark enough to scan as black; the site's deep teal. */
|
/* Dark enough to scan as black; the site's deep teal. */
|
||||||
export const QR_INK = '#001011'
|
export const QR_INK = '#04262e'
|
||||||
export const QR_PAPER = '#ffffff'
|
export const QR_PAPER = '#ffffff'
|
||||||
export const QR_DOVE = '#008fa8'
|
export const QR_DOVE = '#138ba0'
|
||||||
|
|
||||||
/* Badge side as a share of the code's width. */
|
/* Badge side as a share of the code's width. */
|
||||||
const BADGE = 0.24
|
const BADGE = 0.24
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export default function RequestLink({ type, label, className = "" }: { type: str
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
to={requestLink(type)}
|
to={requestLink(type)}
|
||||||
className={`inline-flex items-center gap-2 btn border border-brand/40 px-4 py-2 text-sm text-link transition-colors hover:bg-tint print:hidden ${className}`}
|
className={`inline-flex items-center gap-2 rounded-full border border-brand/40 px-4 py-2 text-sm font-semibold text-link transition-colors hover:bg-tint print:hidden ${className}`}
|
||||||
>
|
>
|
||||||
<PaperPlaneTilt aria-hidden="true" weight="bold" className="h-4 w-4" />
|
<PaperPlaneTilt aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||||
{label}
|
{label}
|
||||||
|
|
|
||||||
|
|
@ -69,11 +69,11 @@ const mapLink = (place: string) =>
|
||||||
function Avatar({ person, size }: { person: NonNullable<ContentBlockItem['person']>; size: string }) {
|
function Avatar({ person, size }: { person: NonNullable<ContentBlockItem['person']>; size: string }) {
|
||||||
const img = useSmallImage(mediaUrl(person.photo))
|
const img = useSmallImage(mediaUrl(person.photo))
|
||||||
return !img.failed ? (
|
return !img.failed ? (
|
||||||
<img src={img.src} alt="" onError={img.onError} className={`${size} shrink-0 object-cover`} />
|
<img src={img.src} alt="" onError={img.onError} className={`${size} shrink-0 rounded-full object-cover`} />
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className={`${size} flex shrink-0 items-center justify-center bg-tint text-xs font-bold text-link`}
|
className={`${size} flex shrink-0 items-center justify-center rounded-full bg-tint text-xs font-bold text-link`}
|
||||||
>
|
>
|
||||||
{initials(person.name)}
|
{initials(person.name)}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -131,7 +131,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
aria-controls={panelId}
|
aria-controls={panelId}
|
||||||
aria-label={open ? `Less about ${entry.text}` : `More about ${entry.text}`}
|
aria-label={open ? `Less about ${entry.text}` : `More about ${entry.text}`}
|
||||||
className="h-8 w-8 shrink-0 btn border text-sm transition-colors hover:bg-tint"
|
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) }}
|
style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
<CaretDown
|
<CaretDown
|
||||||
|
|
@ -144,7 +144,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{more && open && (
|
{more && open && (
|
||||||
<div id={panelId} className="mb-5 space-y-5 bg-tint-soft 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 && (
|
{entry.person && (
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<Avatar person={entry.person} size="h-16 w-16" />
|
<Avatar person={entry.person} size="h-16 w-16" />
|
||||||
|
|
@ -171,7 +171,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{graphic && <img src={graphic} alt={entry.media_alt ?? ""} loading="lazy" className="w-full" />}
|
{graphic && <img src={graphic} alt={entry.media_alt ?? ""} loading="lazy" className="w-full rounded-lg" />}
|
||||||
|
|
||||||
{place && (
|
{place && (
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -181,13 +181,13 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
||||||
title={`Map: ${place}`}
|
title={`Map: ${place}`}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
referrerPolicy="no-referrer-when-downgrade"
|
referrerPolicy="no-referrer-when-downgrade"
|
||||||
className="aspect-video w-full border-0"
|
className="aspect-video w-full rounded-lg border-0"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowMap(true)}
|
onClick={() => setShowMap(true)}
|
||||||
className="flex aspect-video w-full flex-col items-center justify-center gap-1 bg-tint-soft text-sm"
|
className="flex aspect-video w-full flex-col items-center justify-center gap-1 rounded-lg border border-dashed text-sm"
|
||||||
style={{ borderColor: `${withAlpha(accent, 33)}`, color: BODY }}
|
style={{ borderColor: `${withAlpha(accent, 33)}`, color: BODY }}
|
||||||
>
|
>
|
||||||
<span className="font-semibold">Show map</span>
|
<span className="font-semibold">Show map</span>
|
||||||
|
|
@ -265,7 +265,7 @@ export default function ScheduleBlock({
|
||||||
tabIndex={selected ? 0 : -1}
|
tabIndex={selected ? 0 : -1}
|
||||||
onClick={() => setActive(index)}
|
onClick={() => setActive(index)}
|
||||||
onKeyDown={onKey}
|
onKeyDown={onKey}
|
||||||
className="btn border px-5 py-2 text-sm transition-colors"
|
className="rounded-full border px-5 py-2 text-sm font-semibold transition-colors"
|
||||||
style={
|
style={
|
||||||
selected
|
selected
|
||||||
? { background: accent, borderColor: accent, color: readableOn(accent) }
|
? { background: accent, borderColor: accent, color: readableOn(accent) }
|
||||||
|
|
@ -283,7 +283,7 @@ export default function ScheduleBlock({
|
||||||
id={`${baseId}-panel`}
|
id={`${baseId}-panel`}
|
||||||
role={days.length > 1 ? 'tabpanel' : undefined}
|
role={days.length > 1 ? 'tabpanel' : undefined}
|
||||||
aria-labelledby={days.length > 1 ? `${baseId}-tab-${days.indexOf(current)}` : undefined}
|
aria-labelledby={days.length > 1 ? `${baseId}-tab-${days.indexOf(current)}` : undefined}
|
||||||
className="border border-brand/15 bg-surface px-5"
|
className="rounded-2xl border border-brand/15 bg-surface px-5"
|
||||||
>
|
>
|
||||||
{current.entries.map((entry, index) => (
|
{current.entries.map((entry, index) => (
|
||||||
<Entry key={`${current.name}-${index}`} entry={entry} accent={accent} />
|
<Entry key={`${current.name}-${index}`} entry={entry} accent={accent} />
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ export default function ThemeToggle({ className = '' }: { className?: string })
|
||||||
onClick={toggle}
|
onClick={toggle}
|
||||||
aria-label={dark ? 'Switch to light mode' : 'Switch to dark mode'}
|
aria-label={dark ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||||
title={dark ? 'Light mode' : 'Dark mode'}
|
title={dark ? 'Light mode' : 'Dark mode'}
|
||||||
className={`flex h-9 w-9 items-center justify-center btn transition-colors ${className}`}
|
className={`flex h-9 w-9 items-center justify-center rounded-full transition-colors ${className}`}
|
||||||
>
|
>
|
||||||
{dark ? <Sun size={20} weight="bold" aria-hidden="true" /> : <Moon size={20} weight="bold" aria-hidden="true" />}
|
{dark ? <Sun size={20} weight="bold" aria-hidden="true" /> : <Moon size={20} weight="bold" aria-hidden="true" />}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -56,13 +56,13 @@ export default function VideoPlayer({
|
||||||
{image ? (
|
{image ? (
|
||||||
<img src={image} alt="" loading="lazy" className={`aspect-video w-full object-cover ${className}`} />
|
<img src={image} alt="" loading="lazy" className={`aspect-video w-full object-cover ${className}`} />
|
||||||
) : (
|
) : (
|
||||||
<div className={`aspect-video w-full bg-[#004552] ${className}`} />
|
<div className={`aspect-video w-full bg-[#073d4a] ${className}`} />
|
||||||
)}
|
)}
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/25"
|
className="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/25"
|
||||||
>
|
>
|
||||||
<span className="flex h-16 w-16 items-center justify-center btn bg-white/90 shadow-lg transition-transform group-hover:scale-110">
|
<span className="flex h-16 w-16 items-center justify-center rounded-full bg-white/90 shadow-lg transition-transform group-hover:scale-110">
|
||||||
<Play className="ml-1 h-7 w-7" weight="fill" style={{ color: BRAND }} aria-hidden="true" />
|
<Play className="ml-1 h-7 w-7" weight="fill" style={{ color: BRAND }} aria-hidden="true" />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ export function DriveFolderTabs({ folders, value, onChange }: { folders: string[
|
||||||
aria-selected={value === tab}
|
aria-selected={value === tab}
|
||||||
onClick={() => onChange(tab)}
|
onClick={() => onChange(tab)}
|
||||||
className={
|
className={
|
||||||
"btn px-3 py-1 text-sm transition-colors " +
|
"rounded-full px-3 py-1 text-sm transition-colors " +
|
||||||
(value === tab ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
(value === tab ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -82,7 +82,7 @@ export function DriveFolderTabs({ folders, value, onChange }: { folders: string[
|
||||||
}
|
}
|
||||||
|
|
||||||
const button =
|
const button =
|
||||||
"btn border border-brand px-3 py-1 text-sm text-link " +
|
"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";
|
"transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||||
|
|
||||||
export const FILE_HELP =
|
export const FILE_HELP =
|
||||||
|
|
@ -205,7 +205,7 @@ export function FileList({
|
||||||
const isSelected = selected === file.url;
|
const isSelected = selected === file.url;
|
||||||
const body = (
|
const body = (
|
||||||
<span className="flex items-center gap-3">
|
<span className="flex items-center gap-3">
|
||||||
<span className="flex h-16 w-14 shrink-0 items-center justify-center overflow-hidden border border-muted/20 bg-tint">
|
<span className="flex h-16 w-14 shrink-0 items-center justify-center overflow-hidden rounded-md border border-muted/20 bg-tint">
|
||||||
{file.preview ? (
|
{file.preview ? (
|
||||||
<img src={file.preview} alt="" loading="lazy" className="h-full w-full object-cover object-top" />
|
<img src={file.preview} alt="" loading="lazy" className="h-full w-full object-cover object-top" />
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -223,7 +223,7 @@ export function FileList({
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={file.id}
|
key={file.id}
|
||||||
className={`border bg-surface p-2 ${isSelected ? "border-brand ring-2 ring-brand/30": "border-muted/20"}`}
|
className={`rounded-xl border bg-surface p-2 ${isSelected ? "border-brand ring-2 ring-brand/30" : "border-muted/20"}`}
|
||||||
>
|
>
|
||||||
{onPick ? (
|
{onPick ? (
|
||||||
<button type="button" onClick={() => onPick(file)} className="block w-full text-left" aria-pressed={isSelected}>
|
<button type="button" onClick={() => onPick(file)} className="block w-full text-left" aria-pressed={isSelected}>
|
||||||
|
|
@ -273,23 +273,23 @@ export function FilePicker({
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (e.target === dialogRef.current) dialogRef.current?.close();
|
if (e.target === dialogRef.current) dialogRef.current?.close();
|
||||||
}}
|
}}
|
||||||
className="m-auto w-[min(48rem,calc(100vw-2rem))] p-0 backdrop:bg-[#001011]/40"
|
className="m-auto w-[min(48rem,calc(100vw-2rem))] rounded-2xl p-0 backdrop:bg-[#0f2f36]/40"
|
||||||
>
|
>
|
||||||
<div className="flex max-h-[85vh] flex-col">
|
<div className="flex max-h-[85vh] flex-col">
|
||||||
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
||||||
<h2 className="text-lg font-bold text-link">Choose a file</h2>
|
<h2 className="text-lg font-semibold text-link">Choose a file</h2>
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
value={query}
|
value={query}
|
||||||
onChange={(e) => setQuery(e.target.value)}
|
onChange={(e) => setQuery(e.target.value)}
|
||||||
placeholder="Search by file name"
|
placeholder="Search by file name"
|
||||||
className="ml-auto w-56 border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
className="ml-auto w-56 rounded-lg border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => dialogRef.current?.close()}
|
onClick={() => dialogRef.current?.close()}
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
className="flex h-8 w-8 items-center justify-center btn text-muted hover:bg-tint"
|
className="flex h-8 w-8 items-center justify-center rounded-full text-muted hover:bg-tint"
|
||||||
>
|
>
|
||||||
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ export function FolderTabs({
|
||||||
aria-selected={value === folder}
|
aria-selected={value === folder}
|
||||||
onClick={() => onChange(folder)}
|
onClick={() => onChange(folder)}
|
||||||
className={
|
className={
|
||||||
"btn px-3 py-1 text-sm transition-colors " +
|
"rounded-full px-3 py-1 text-sm transition-colors " +
|
||||||
(value === folder ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
(value === folder ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -103,7 +103,7 @@ export function FolderTabs({
|
||||||
}
|
}
|
||||||
|
|
||||||
const button =
|
const button =
|
||||||
"btn border border-brand px-3 py-1 text-sm text-link " +
|
"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";
|
"transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||||
|
|
||||||
/* A light checkerboard, so a white logo on a transparent background
|
/* A light checkerboard, so a white logo on a transparent background
|
||||||
|
|
@ -111,8 +111,8 @@ const button =
|
||||||
const CHECKER = {
|
const CHECKER = {
|
||||||
backgroundColor: "#fff",
|
backgroundColor: "#fff",
|
||||||
backgroundImage:
|
backgroundImage:
|
||||||
"linear-gradient(45deg,#c2fbff 25%,transparent 25%),linear-gradient(-45deg,#c2fbff 25%,transparent 25%)," +
|
"linear-gradient(45deg,#e6eef0 25%,transparent 25%),linear-gradient(-45deg,#e6eef0 25%,transparent 25%)," +
|
||||||
"linear-gradient(45deg,transparent 75%,#c2fbff 75%),linear-gradient(-45deg,transparent 75%,#c2fbff 75%)",
|
"linear-gradient(45deg,transparent 75%,#e6eef0 75%),linear-gradient(-45deg,transparent 75%,#e6eef0 75%)",
|
||||||
backgroundSize: "12px 12px",
|
backgroundSize: "12px 12px",
|
||||||
backgroundPosition: "0 0,0 6px,6px -6px,-6px 0",
|
backgroundPosition: "0 0,0 6px,6px -6px,-6px 0",
|
||||||
};
|
};
|
||||||
|
|
@ -231,7 +231,7 @@ export function UploadButton({
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={keepOriginal}
|
checked={keepOriginal}
|
||||||
onChange={(e) => setKeepOriginal(e.target.checked)}
|
onChange={(e) => setKeepOriginal(e.target.checked)}
|
||||||
className="h-3.5 w-3.5 border-muted/40 text-link"
|
className="h-3.5 w-3.5 rounded border-muted/40 text-link"
|
||||||
/>
|
/>
|
||||||
Keep original
|
Keep original
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -268,7 +268,7 @@ export function MediaGrid({
|
||||||
const isSelected = selected === item.url;
|
const isSelected = selected === item.url;
|
||||||
const thumb = (
|
const thumb = (
|
||||||
<>
|
<>
|
||||||
<div className="aspect-[4/3] overflow-hidden" style={CHECKER}>
|
<div className="aspect-[4/3] overflow-hidden rounded-lg" style={CHECKER}>
|
||||||
{item.content_type.startsWith("video/") ? (
|
{item.content_type.startsWith("video/") ? (
|
||||||
// A still of the first frame; metadata only, not the file.
|
// 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" />
|
<video src={item.url} preload="metadata" muted className="h-full w-full bg-black object-contain" />
|
||||||
|
|
@ -295,7 +295,7 @@ export function MediaGrid({
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={item.id}
|
key={item.id}
|
||||||
className={`border bg-surface p-2 ${
|
className={`rounded-xl border bg-surface p-2 ${
|
||||||
isSelected ? "border-brand ring-2 ring-brand/30" : "border-muted/20"
|
isSelected ? "border-brand ring-2 ring-brand/30" : "border-muted/20"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -362,9 +362,9 @@ function RequestImages({ folder, onPick }: { folder?: string; onPick: (item: Med
|
||||||
{error && <p className="mb-3 text-sm text-danger">{error}</p>}
|
{error && <p className="mb-3 text-sm text-danger">{error}</p>}
|
||||||
<ul className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4">
|
<ul className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4">
|
||||||
{files.map((file) => (
|
{files.map((file) => (
|
||||||
<li key={file.id} className="border border-muted/20 bg-surface p-2">
|
<li key={file.id} className="rounded-xl border border-muted/20 bg-surface p-2">
|
||||||
<button type="button" disabled={busy !== null} onClick={() => pick(file)} className="block w-full text-left disabled:opacity-60">
|
<button type="button" disabled={busy !== null} onClick={() => pick(file)} className="block w-full text-left disabled:opacity-60">
|
||||||
<div className="aspect-[4/3] overflow-hidden" style={CHECKER}>
|
<div className="aspect-[4/3] overflow-hidden rounded-lg" style={CHECKER}>
|
||||||
{/* Straight from Drive through the server; private to the admin. */}
|
{/* Straight from Drive through the server; private to the admin. */}
|
||||||
<img
|
<img
|
||||||
src={`/api/admin/feedback/${file.feedback_id}/files/${file.id}`}
|
src={`/api/admin/feedback/${file.feedback_id}/files/${file.id}`}
|
||||||
|
|
@ -422,23 +422,23 @@ export function MediaPicker({
|
||||||
// A click on the backdrop lands on the dialog itself.
|
// A click on the backdrop lands on the dialog itself.
|
||||||
if (e.target === dialogRef.current) dialogRef.current?.close();
|
if (e.target === dialogRef.current) dialogRef.current?.close();
|
||||||
}}
|
}}
|
||||||
className="m-auto w-[min(56rem,calc(100vw-2rem))] p-0 backdrop:bg-[#001011]/40"
|
className="m-auto 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 max-h-[85vh] flex-col">
|
||||||
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
||||||
<h2 className="text-lg font-bold text-link">Choose an image</h2>
|
<h2 className="text-lg font-semibold text-link">Choose an image</h2>
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
value={query}
|
value={query}
|
||||||
onChange={(e) => setQuery(e.target.value)}
|
onChange={(e) => setQuery(e.target.value)}
|
||||||
placeholder="Search by file name"
|
placeholder="Search by file name"
|
||||||
className="ml-auto w-56 border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
className="ml-auto w-56 rounded-lg border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => dialogRef.current?.close()}
|
onClick={() => dialogRef.current?.close()}
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
className="flex h-8 w-8 items-center justify-center btn text-muted hover:bg-tint"
|
className="flex h-8 w-8 items-center justify-center rounded-full text-muted hover:bg-tint"
|
||||||
>
|
>
|
||||||
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -525,7 +525,7 @@ export function ImageInput({
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
<div
|
<div
|
||||||
className="flex h-20 w-20 shrink-0 items-center justify-center overflow-hidden border border-muted/20"
|
className="flex h-20 w-20 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-muted/20"
|
||||||
style={CHECKER}
|
style={CHECKER}
|
||||||
>
|
>
|
||||||
{src && !broken ? (
|
{src && !broken ? (
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ export function SectionJump({ sections }: { sections: EditorSection[] }) {
|
||||||
<select
|
<select
|
||||||
value={active ?? ""}
|
value={active ?? ""}
|
||||||
onChange={(e) => jump(e.target.value)}
|
onChange={(e) => jump(e.target.value)}
|
||||||
className="w-full border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand"
|
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) => (
|
{sections.map((section) => (
|
||||||
<option key={section.id} value={section.id}>
|
<option key={section.id} value={section.id}>
|
||||||
|
|
|
||||||
|
|
@ -119,12 +119,12 @@ const PREVIEWS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const input =
|
const input =
|
||||||
"w-full border border-muted/25 bg-surface px-3 py-2 text-sm text-body "+
|
"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";
|
"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. */
|
/* Same box, but lit by the real input nested inside it. */
|
||||||
const inputShell =
|
const inputShell =
|
||||||
"flex w-full items-center border border-muted/25 bg-surface px-3 py-2 text-sm "+
|
"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 " +
|
"text-body transition-colors focus-within:border-brand focus-within:ring-2 " +
|
||||||
"focus-within:ring-brand/25";
|
"focus-within:ring-brand/25";
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ const shellError =
|
||||||
/* Reads as settled fact rather than as an empty box someone forgot
|
/* Reads as settled fact rather than as an empty box someone forgot
|
||||||
to fill in. */
|
to fill in. */
|
||||||
const inputLocked =
|
const inputLocked =
|
||||||
"w-full border border-muted/20 bg-tint-soft px-3 py-2 text-sm "+
|
"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";
|
"text-muted outline-none cursor-default focus:border-muted/40";
|
||||||
|
|
||||||
/* ── Dotted paths ────────────────────────────────────────────── */
|
/* ── Dotted paths ────────────────────────────────────────────── */
|
||||||
|
|
@ -145,7 +145,7 @@ const inputLocked =
|
||||||
else the brand teal. */
|
else the brand teal. */
|
||||||
function colorPlaceholder(field, row): string {
|
function colorPlaceholder(field, row): string {
|
||||||
const own = typeof field.placeholder === "function" ? field.placeholder(row) : field.placeholder;
|
const own = typeof field.placeholder === "function" ? field.placeholder(row) : field.placeholder;
|
||||||
return own || "#008fa8";
|
return own || "#138ba0";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPath(object, path) {
|
export function getPath(object, path) {
|
||||||
|
|
@ -278,7 +278,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
||||||
checked={value === 1 || value === true}
|
checked={value === 1 || value === true}
|
||||||
disabled={locked}
|
disabled={locked}
|
||||||
onChange={(e) => onChange(e.target.checked ? 1 : 0)}
|
onChange={(e) => onChange(e.target.checked ? 1 : 0)}
|
||||||
className="h-4 w-4 border-muted/40 text-link focus:ring-brand/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"}
|
{helpText(field, row) ?? "Yes"}
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -315,7 +315,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
||||||
value={/^#[0-9a-f]{6}$/i.test(value ?? "") ? value : colorPlaceholder(field, row)}
|
value={/^#[0-9a-f]{6}$/i.test(value ?? "") ? value : colorPlaceholder(field, row)}
|
||||||
disabled={locked}
|
disabled={locked}
|
||||||
onChange={(e) => onChange(e.target.value)}
|
onChange={(e) => onChange(e.target.value)}
|
||||||
className="h-9 w-12 shrink-0 border border-muted/25 bg-surface disabled:opacity-50"
|
className="h-9 w-12 shrink-0 rounded border border-muted/25 bg-surface disabled:opacity-50"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
{...common}
|
{...common}
|
||||||
|
|
@ -520,7 +520,7 @@ export function Repeater({
|
||||||
return (
|
return (
|
||||||
<section className={className}>
|
<section className={className}>
|
||||||
<div className="flex flex-wrap items-center gap-3">
|
<div className="flex flex-wrap items-center gap-3">
|
||||||
<h3 className="text-base font-bold text-body">
|
<h3 className="text-base font-semibold text-body">
|
||||||
{spec.label}
|
{spec.label}
|
||||||
{list.length > 0 && (
|
{list.length > 0 && (
|
||||||
<span className="ml-2 text-sm font-normal text-muted/80">{list.length}</span>
|
<span className="ml-2 text-sm font-normal text-muted/80">{list.length}</span>
|
||||||
|
|
@ -547,7 +547,7 @@ export function Repeater({
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={add}
|
onClick={add}
|
||||||
className="ml-auto btn border border-brand px-3 py-1 text-sm text-link transition-colors hover:bg-tint"
|
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"}
|
{spec.addLabel ?? "Add"}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -586,7 +586,7 @@ export function Repeater({
|
||||||
endDrag();
|
endDrag();
|
||||||
}}
|
}}
|
||||||
className={
|
className={
|
||||||
`border bg-tint-soft ${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
|
(over
|
||||||
? "border-brand ring-2 ring-brand/25 "
|
? "border-brand ring-2 ring-brand/25 "
|
||||||
: "border-muted/20 ") +
|
: "border-muted/20 ") +
|
||||||
|
|
@ -710,7 +710,7 @@ export function Repeater({
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{spec.preview && PREVIEWS[spec.preview] && (
|
{spec.preview && PREVIEWS[spec.preview] && (
|
||||||
<div className="notice mt-4 p-4">
|
<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">
|
<p className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted/70">
|
||||||
Preview
|
Preview
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -736,7 +736,7 @@ function IconButton({ label, onClick, danger = false, disabled = false, children
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
title={label}
|
title={label}
|
||||||
className={
|
className={
|
||||||
"flex h-7 w-7 items-center justify-center btn border text-sm leading-none transition-colors " +
|
"flex h-7 w-7 items-center justify-center rounded-full border text-sm leading-none transition-colors " +
|
||||||
(disabled
|
(disabled
|
||||||
? "cursor-default border-muted/20 text-muted/40"
|
? "cursor-default border-muted/20 text-muted/40"
|
||||||
: danger
|
: danger
|
||||||
|
|
@ -796,7 +796,7 @@ function TestNoticeInput({
|
||||||
type="button"
|
type="button"
|
||||||
disabled={busy || !value?.trim()}
|
disabled={busy || !value?.trim()}
|
||||||
onClick={send}
|
onClick={send}
|
||||||
className="btn border border-brand px-3 py-1 text-sm text-link transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50"
|
className="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"
|
||||||
>
|
>
|
||||||
{busy ? "Sending…" : "Send a test notice"}
|
{busy ? "Sending…" : "Send a test notice"}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
* reasoning that keeps the map grid config in code. A table for four
|
* reasoning that keeps the map grid config in code. A table for four
|
||||||
* rows that nobody edits is a migration and an admin page for nothing.
|
* rows that nobody edits is a migration and an admin page for nothing.
|
||||||
*
|
*
|
||||||
* `preProgram` is what draws the gap: a fainter rail
|
* `preProgram` is what draws the gap: a dashed rail, hollow year dots,
|
||||||
* and the "before the program" marker. It lives on the decade rather
|
* and the "before the program" marker. It lives on the decade rather
|
||||||
* than being a hardcoded year check, so the gap moves if the founding
|
* than being a hardcoded year check, so the gap moves if the founding
|
||||||
* date is ever revised.
|
* date is ever revised.
|
||||||
|
|
|
||||||
136
src/index.css
136
src/index.css
|
|
@ -4,7 +4,7 @@
|
||||||
@import '@fontsource/poppins/400.css';
|
@import '@fontsource/poppins/400.css';
|
||||||
@import '@fontsource/poppins/600.css';
|
@import '@fontsource/poppins/600.css';
|
||||||
@import '@fontsource/poppins/700.css';
|
@import '@fontsource/poppins/700.css';
|
||||||
@import '@fontsource/poppins/800.css'; /* the front page's stat numbers only */
|
@import '@fontsource/poppins/800.css';
|
||||||
|
|
||||||
@import 'tailwindcss';
|
@import 'tailwindcss';
|
||||||
|
|
||||||
|
|
@ -23,28 +23,28 @@
|
||||||
a dark band, a platform's own color) stays a literal. Colors
|
a dark band, a platform's own color) stays a literal. Colors
|
||||||
that arrive as data (page accents, event and region colors) go
|
that arrive as data (page accents, event and region colors) go
|
||||||
through withAlpha() and accentText() in src/lib/color.ts. */
|
through withAlpha() and accentText() in src/lib/color.ts. */
|
||||||
--color-ink: #001011; /* headings */
|
--color-ink: #073d4a; /* headings */
|
||||||
--color-body: #004552; /* body text */
|
--color-body: #26454c; /* body text */
|
||||||
--color-muted: #004c52; /* secondary text, quiet borders */
|
--color-muted: #4a6b72; /* secondary text, quiet borders */
|
||||||
--color-link: #004552; /* links and teal text */
|
--color-link: #0f7183; /* links and teal text */
|
||||||
--color-brand: #008fa8; /* decoration: borders, rings, rules */
|
--color-brand: #138ba0; /* decoration: borders, rings, rules */
|
||||||
--color-action: #004552; /* button fills, under white text */
|
--color-action: #0f7183; /* button fills, under white text */
|
||||||
--color-action-hover: #001011;
|
--color-action-hover: #0b5c6a;
|
||||||
--color-surface: #fcfffd; /* page and cards */
|
--color-surface: #ffffff; /* page and cards */
|
||||||
--color-tint: #c2f6ff; /* tinted sections and panels */
|
--color-tint: #eef9fb; /* tinted sections and panels */
|
||||||
--color-tint-soft: #dfebd6; /* hover rows, faint panels */
|
--color-tint-soft: #f6fbfc; /* hover rows, faint panels */
|
||||||
--color-danger: #b3261e;
|
--color-danger: #b3261e;
|
||||||
--color-danger-tint: #fdf3f2;
|
--color-danger-tint: #fdf3f2;
|
||||||
|
|
||||||
/* Tailwind's shadows, tinted with the site's deep ink instead of
|
/* Tailwind's shadows, tinted with the site's deep ink instead of
|
||||||
black, so a card's shadow belongs to the page. */
|
black, so a card's shadow belongs to the page. */
|
||||||
--shadow-2xs: 0 1px rgb(0 16 17 / 0.05);
|
--shadow-2xs: 0 1px rgb(4 38 46 / 0.05);
|
||||||
--shadow-xs: 0 1px 2px 0 rgb(0 16 17 / 0.05);
|
--shadow-xs: 0 1px 2px 0 rgb(4 38 46 / 0.05);
|
||||||
--shadow-sm: 0 1px 3px 0 rgb(0 16 17 / 0.1), 0 1px 2px -1px rgb(0 16 17 / 0.1);
|
--shadow-sm: 0 1px 3px 0 rgb(4 38 46 / 0.1), 0 1px 2px -1px rgb(4 38 46 / 0.1);
|
||||||
--shadow-md: 0 4px 6px -1px rgb(0 16 17 / 0.1), 0 2px 4px -2px rgb(0 16 17 / 0.1);
|
--shadow-md: 0 4px 6px -1px rgb(4 38 46 / 0.1), 0 2px 4px -2px rgb(4 38 46 / 0.1);
|
||||||
--shadow-lg: 0 10px 15px -3px rgb(0 16 17 / 0.12), 0 4px 6px -4px rgb(0 16 17 / 0.1);
|
--shadow-lg: 0 10px 15px -3px rgb(4 38 46 / 0.12), 0 4px 6px -4px rgb(4 38 46 / 0.1);
|
||||||
--shadow-xl: 0 20px 25px -5px rgb(0 16 17 / 0.12), 0 8px 10px -6px rgb(0 16 17 / 0.1);
|
--shadow-xl: 0 20px 25px -5px rgb(4 38 46 / 0.12), 0 8px 10px -6px rgb(4 38 46 / 0.1);
|
||||||
--shadow-2xl: 0 25px 50px -12px rgb(0 16 17 / 0.3);
|
--shadow-2xl: 0 25px 50px -12px rgb(4 38 46 / 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* How much of an accent color its text keeps (src/lib/color.ts,
|
/* How much of an accent color its text keeps (src/lib/color.ts,
|
||||||
|
|
@ -60,16 +60,14 @@
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
:root[data-theme="dark"] {
|
:root[data-theme="dark"] {
|
||||||
--color-ink: #fcfffd;
|
--color-ink: #eaf6f8;
|
||||||
--color-body: #c2f6ff;
|
--color-body: #cde0e4;
|
||||||
--color-muted: #aac992;
|
--color-muted: #9fb9bf;
|
||||||
--color-link: #5ce7ff;
|
--color-link: #5ccbdc;
|
||||||
--color-brand: #008fa8;
|
--color-brand: #2aa7bc;
|
||||||
--color-action: #004c52;
|
--color-surface: #0c1d21;
|
||||||
--color-action-hover: #004552;
|
--color-tint: #11292e;
|
||||||
--color-surface: #001011;
|
--color-tint-soft: #0f2428;
|
||||||
--color-tint: #004552;
|
|
||||||
--color-tint-soft: #27371b;
|
|
||||||
--color-danger: #ff8a80;
|
--color-danger: #ff8a80;
|
||||||
--color-danger-tint: #3b1714;
|
--color-danger-tint: #3b1714;
|
||||||
--accent-text-mix: 50%;
|
--accent-text-mix: 50%;
|
||||||
|
|
@ -77,16 +75,14 @@
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root:not([data-theme="light"]) {
|
:root:not([data-theme="light"]) {
|
||||||
--color-ink: #fcfffd;
|
--color-ink: #eaf6f8;
|
||||||
--color-body: #c2f6ff;
|
--color-body: #cde0e4;
|
||||||
--color-muted: #aac992;
|
--color-muted: #9fb9bf;
|
||||||
--color-link: #5ce7ff;
|
--color-link: #5ccbdc;
|
||||||
--color-brand: #008fa8;
|
--color-brand: #2aa7bc;
|
||||||
--color-action: #004c52;
|
--color-surface: #0c1d21;
|
||||||
--color-action-hover: #004552;
|
--color-tint: #11292e;
|
||||||
--color-surface: #001011;
|
--color-tint-soft: #0f2428;
|
||||||
--color-tint: #004552;
|
|
||||||
--color-tint-soft: #27371b;
|
|
||||||
--color-danger: #ff8a80;
|
--color-danger: #ff8a80;
|
||||||
--color-danger-tint: #3b1714;
|
--color-danger-tint: #3b1714;
|
||||||
--accent-text-mix: 50%;
|
--accent-text-mix: 50%;
|
||||||
|
|
@ -132,9 +128,6 @@ body {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Type: Poppins Bold for titles, headings and buttons (the btn
|
|
||||||
utility), Poppins at regular weight for subheadings, Montserrat
|
|
||||||
for everything else. */
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
@ -144,12 +137,14 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
transparent background) and would vanish. .logo-plate gives them
|
transparent background) and would vanish. .logo-plate gives them
|
||||||
a small light backing in dark mode only. */
|
a small light backing in dark mode only. */
|
||||||
:root[data-theme="dark"] .logo-plate {
|
:root[data-theme="dark"] .logo-plate {
|
||||||
background: #fcfffd;
|
background: #eef9fb;
|
||||||
|
border-radius: 0.75rem;
|
||||||
padding: 0.25rem;
|
padding: 0.25rem;
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root:not([data-theme="light"]) .logo-plate {
|
:root:not([data-theme="light"]) .logo-plate {
|
||||||
background: #fcfffd;
|
background: #eef9fb;
|
||||||
|
border-radius: 0.75rem;
|
||||||
padding: 0.25rem;
|
padding: 0.25rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -161,14 +156,14 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
@media print {
|
@media print {
|
||||||
:root,
|
:root,
|
||||||
:root[data-theme="dark"] {
|
:root[data-theme="dark"] {
|
||||||
--color-ink: #001011;
|
--color-ink: #073d4a;
|
||||||
--color-body: #004552;
|
--color-body: #26454c;
|
||||||
--color-muted: #004c52;
|
--color-muted: #4a6b72;
|
||||||
--color-link: #004552;
|
--color-link: #0f7183;
|
||||||
--color-brand: #008fa8;
|
--color-brand: #138ba0;
|
||||||
--color-surface: #fcfffd;
|
--color-surface: #ffffff;
|
||||||
--color-tint: #c2f6ff;
|
--color-tint: #eef9fb;
|
||||||
--color-tint-soft: #dfebd6;
|
--color-tint-soft: #f6fbfc;
|
||||||
--color-danger: #b3261e;
|
--color-danger: #b3261e;
|
||||||
--color-danger-tint: #fdf3f2;
|
--color-danger-tint: #fdf3f2;
|
||||||
--accent-text-mix: 100%;
|
--accent-text-mix: 100%;
|
||||||
|
|
@ -194,42 +189,16 @@ iframe[src*="churchcenter"] {
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Corners, one rule for the site: none. Everything is square except
|
/* Corners, one rule for the site: actions (buttons, pills, chips)
|
||||||
buttons, which get a superellipse (the btn utility below, or
|
are rounded-full; cards and panels are rounded-3xl when large and
|
||||||
var(--btn-radius) with corner-shape in plain CSS), and things that
|
rounded-2xl when small; media and logos inside a card are
|
||||||
are round by nature: dots and radio marks. Browsers without
|
rounded-xl. PeopleTiles' 2-3px photo frame is its own deliberate
|
||||||
corner-shape draw the button corner as a small plain radius. */
|
exception. */
|
||||||
:root {
|
|
||||||
--btn-radius: 0.5rem;
|
|
||||||
}
|
|
||||||
@supports (corner-shape: squircle) {
|
|
||||||
:root {
|
|
||||||
--btn-radius: 1.25rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* A notice where content would be (an empty section, a form's
|
|
||||||
note, "coming soon"): a flat tinted panel with a solid bar down
|
|
||||||
its left edge. It replaces the dashed outlines these used to have.
|
|
||||||
Padding stays with each use. */
|
|
||||||
@utility notice {
|
|
||||||
background: var(--color-tint-soft);
|
|
||||||
border-left: 4px solid var(--color-brand);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Buttons, and links drawn as buttons: Poppins Bold, superellipse
|
|
||||||
corners. Color, size and border stay with each button. */
|
|
||||||
@utility btn {
|
|
||||||
font-family: var(--font-display);
|
|
||||||
font-weight: 700;
|
|
||||||
border-radius: var(--btn-radius);
|
|
||||||
corner-shape: squircle;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Scrollbar hide */
|
/* Scrollbar hide */
|
||||||
::-webkit-scrollbar { width: 6px; }
|
::-webkit-scrollbar { width: 6px; }
|
||||||
::-webkit-scrollbar-track { background: transparent; }
|
::-webkit-scrollbar-track { background: transparent; }
|
||||||
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--color-brand) 40%, transparent); }
|
::-webkit-scrollbar-thumb { background: rgba(19, 139, 160, 0.4); border-radius: 3px; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -300,6 +269,7 @@ iframe[src*="churchcenter"] {
|
||||||
═══════════════════════════════════════════════════════════════ */
|
═══════════════════════════════════════════════════════════════ */
|
||||||
|
|
||||||
.skeleton {
|
.skeleton {
|
||||||
|
border-radius: 1.5rem;
|
||||||
min-height: 22rem;
|
min-height: 22rem;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
100deg,
|
100deg,
|
||||||
|
|
|
||||||
|
|
@ -32,81 +32,23 @@ export function readableOn(color: string): string {
|
||||||
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4
|
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 lum = 0.2126 * channel(0) + 0.7152 * channel(2) + 0.0722 * channel(4)
|
||||||
const INK_LUM = 0.0041 // #001011
|
const INK_LUM = 0.0161 // #04262e
|
||||||
const onWhite = 1.05 / (lum + 0.05)
|
const onWhite = 1.05 / (lum + 0.05)
|
||||||
const onInk = (lum + 0.05) / (INK_LUM + 0.05)
|
const onInk = (lum + 0.05) / (INK_LUM + 0.05)
|
||||||
return onWhite >= onInk ? '#ffffff' : '#001011'
|
return onWhite >= onInk ? '#ffffff' : '#04262e'
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── The site's accents ──────────────────────────────────────────
|
/* ── The site's accents ──────────────────────────────────────────
|
||||||
BRAND is the teal every page uses as its accent; it's the button
|
BRAND is the teal every page uses as its accent; it's the button
|
||||||
token, so the admin's palette (Site settings → Colors) reaches it.
|
token, so the admin's palette (Site settings → Colors) reaches it.
|
||||||
ACCENTS are the other section colors a page may give a band: the
|
ACCENTS are the other section colors a page may give a band, all
|
||||||
palette's dark shades, all readable as text on its light ones
|
from the same family and all readable as text on white and on the
|
||||||
(7:1 or better). Use these rather than a new hex. */
|
tints (5:1 or better). Use these rather than a new hex. */
|
||||||
export const BRAND = 'var(--color-action)'
|
export const BRAND = 'var(--color-action)'
|
||||||
|
|
||||||
export const ACCENTS = {
|
export const ACCENTS = {
|
||||||
teal: BRAND,
|
teal: BRAND,
|
||||||
deep: '#004c52',
|
deep: '#004c52',
|
||||||
green: '#00521b',
|
green: '#56733f',
|
||||||
olive: '#27371b',
|
mint: '#1b6f5e',
|
||||||
}
|
|
||||||
|
|
||||||
/* ── The palette ─────────────────────────────────────────────────
|
|
||||||
The site's 16 colors: four families, each a column of the grid
|
|
||||||
(its primary first). The theme tokens above are chosen from these;
|
|
||||||
so is anything drawn from the palette as data (a person's initials
|
|
||||||
tile, the page background, the admin home's sections). Light
|
|
||||||
shades are for fills behind text, dark shades for text and fills
|
|
||||||
under white text; the primaries are for decoration only (#008fa8
|
|
||||||
is 3.8:1 on the page, #88b668 2.3:1). */
|
|
||||||
export const PALETTE = {
|
|
||||||
teal: ['#008fa8', '#004552', '#5ce7ff', '#c2f6ff'],
|
|
||||||
green: ['#88b668', '#dfebd6', '#aac992', '#27371b'],
|
|
||||||
mint: ['#fcfffd', '#c2ffd6', '#00b83d', '#00521b'],
|
|
||||||
ink: ['#001011', '#004c52', '#5cf4ff', '#c2fbff'],
|
|
||||||
} as const
|
|
||||||
|
|
||||||
/* Fills that take the page's ink text (#001011, 15:1 or better) and
|
|
||||||
fills that take white text (9:1 or better), for things colored
|
|
||||||
from the palette by data, like an initials tile. */
|
|
||||||
export const PALETTE_LIGHT = ['#c2f6ff', '#dfebd6', '#c2ffd6', '#c2fbff', '#aac992', '#5ce7ff'] as const
|
|
||||||
export const PALETTE_DARK = ['#004552', '#27371b', '#00521b', '#004c52'] as const
|
|
||||||
|
|
||||||
/* A palette fill for something colored by its name, like the
|
|
||||||
initials tile of a person with no photo: the same name always gets
|
|
||||||
the same fill, and each fill comes with its readable text (ink on
|
|
||||||
the light ones, white on the dark ones). */
|
|
||||||
const NAMED_FILLS = [
|
|
||||||
...PALETTE_LIGHT.map((background) => ({ background, color: '#001011' })),
|
|
||||||
...PALETTE_DARK.map((background) => ({ background, color: '#ffffff' })),
|
|
||||||
]
|
|
||||||
|
|
||||||
export function paletteFill(name: string): { background: string; color: string } {
|
|
||||||
let hash = 0
|
|
||||||
for (const char of name.trim().toLowerCase()) hash = (hash * 31 + char.charCodeAt(0)) >>> 0
|
|
||||||
return NAMED_FILLS[hash % NAMED_FILLS.length]
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Timeline leaves ─────────────────────────────────────────────
|
|
||||||
Each year on a timeline is a leaf, green for this year and
|
|
||||||
turning autumn as the years go back: gold, then orange, reaching
|
|
||||||
full autumn at 2000; every year before 2000 is fully turned. The
|
|
||||||
green is the palette's, deepened so a leaf stands out on the
|
|
||||||
page; the autumn shades are the one set of colors outside the
|
|
||||||
palette, since the palette has none. */
|
|
||||||
const LEAF_GREEN = 'color-mix(in oklch, #00b83d 60%, #00521b)'
|
|
||||||
const LEAF_GOLD = '#c98a0b'
|
|
||||||
const LEAF_AUTUMN = '#b8461b'
|
|
||||||
const LEAF_TURNED_BY = 2000
|
|
||||||
|
|
||||||
export function leafColor(year: number, thisYear = new Date().getFullYear()): string {
|
|
||||||
if (year < LEAF_TURNED_BY) return LEAF_AUTUMN
|
|
||||||
const span = Math.max(1, thisYear - LEAF_TURNED_BY)
|
|
||||||
const turned = Math.min(1, Math.max(0, (thisYear - year) / span))
|
|
||||||
// Green to gold over the first half of the span, gold to autumn over the second.
|
|
||||||
return turned <= 0.5
|
|
||||||
? `color-mix(in oklch, ${LEAF_GOLD} ${Math.round(turned * 200)}%, ${LEAF_GREEN})`
|
|
||||||
: `color-mix(in oklch, ${LEAF_AUTUMN} ${Math.round((turned - 0.5) * 200)}%, ${LEAF_GOLD})`
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ export default function AwardDetail() {
|
||||||
? 'Nobody has received this yet.'
|
? 'Nobody has received this yet.'
|
||||||
: undefined,
|
: undefined,
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
<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">
|
<div className="flex flex-wrap items-center gap-x-6 gap-y-3 text-sm">
|
||||||
|
|
@ -113,12 +114,12 @@ function RecipientRow({ recipient, accent }: { recipient: Recipient; accent: str
|
||||||
alt=""
|
alt=""
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
className="h-16 w-16 shrink-0 object-cover"
|
className="h-16 w-16 shrink-0 rounded-full object-cover"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="flex h-16 w-16 shrink-0 items-center justify-center text-sm font-bold text-white"
|
className="flex h-16 w-16 shrink-0 items-center justify-center rounded-full text-sm font-bold text-white"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
{initials(recipient.name)}
|
{initials(recipient.name)}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ export default function BlogPost() {
|
||||||
id: "post",
|
id: "post",
|
||||||
title: "Post",
|
title: "Post",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-surface)",
|
||||||
content: (
|
content: (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
|
|
@ -112,7 +113,7 @@ export default function BlogPost() {
|
||||||
{post.tags.map((tag) => (
|
{post.tags.map((tag) => (
|
||||||
<span
|
<span
|
||||||
key={tag}
|
key={tag}
|
||||||
className="px-3 py-0.5 text-xs font-semibold"
|
className="rounded-full px-3 py-0.5 text-xs font-semibold"
|
||||||
style={{
|
style={{
|
||||||
background: "var(--color-tint)",
|
background: "var(--color-tint)",
|
||||||
color: accentText(BRAND),
|
color: accentText(BRAND),
|
||||||
|
|
@ -124,7 +125,7 @@ export default function BlogPost() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => window.print()}
|
onClick={() => window.print()}
|
||||||
className="ml-auto inline-flex items-center gap-1.5 btn border border-link px-3 py-1 text-link transition-colors hover:bg-tint print:hidden"
|
className="ml-auto inline-flex items-center gap-1.5 rounded-full border border-link px-3 py-1 font-semibold text-link transition-colors hover:bg-tint print:hidden"
|
||||||
>
|
>
|
||||||
<FilePdf size={16} weight="bold" aria-hidden="true" />
|
<FilePdf size={16} weight="bold" aria-hidden="true" />
|
||||||
Download PDF
|
Download PDF
|
||||||
|
|
@ -142,7 +143,7 @@ export default function BlogPost() {
|
||||||
<img
|
<img
|
||||||
src={cover}
|
src={cover}
|
||||||
alt={post.cover_alt ?? ""}
|
alt={post.cover_alt ?? ""}
|
||||||
className="aspect-video w-full object-cover"
|
className="aspect-video w-full rounded-2xl object-cover"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -174,6 +175,7 @@ export default function BlogPost() {
|
||||||
id: "authors",
|
id: "authors",
|
||||||
title: authors.length === 1 ? "About the author" : "About the authors",
|
title: authors.length === 1 ? "About the author" : "About the authors",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: (
|
content: (
|
||||||
<div className="mx-auto max-w-6xl px-6">
|
<div className="mx-auto max-w-6xl px-6">
|
||||||
<PeopleTiles size="md" accent={BRAND} people={authors} />
|
<PeopleTiles size="md" accent={BRAND} people={authors} />
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ const SECTIONS = [
|
||||||
blurb:
|
blurb:
|
||||||
"Young adult groups meeting in person and online across the movement.",
|
"Young adult groups meeting in person and online across the movement.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
Component: OrgListMap,
|
Component: OrgListMap,
|
||||||
request: { type: "group", label: "Add or update a group" },
|
request: { type: "group", label: "Add or update a group" },
|
||||||
views: { options: ["map", "grid"], default: "map", Toggle: OrgMapToggle },
|
views: { options: ["map", "grid"], default: "map", Toggle: OrgMapToggle },
|
||||||
|
|
@ -41,7 +42,8 @@ const SECTIONS = [
|
||||||
title: "Unity Regions",
|
title: "Unity Regions",
|
||||||
blurb:
|
blurb:
|
||||||
"The regional organizations that support groups and host their own gatherings.",
|
"The regional organizations that support groups and host their own gatherings.",
|
||||||
accent: "#004c52",
|
accent: "#4a6b72",
|
||||||
|
background: "var(--color-surface)",
|
||||||
Component: OrgListVertical,
|
Component: OrgListVertical,
|
||||||
request: { type: "region", label: "Update a region" },
|
request: { type: "region", label: "Update a region" },
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -59,7 +61,8 @@ const SECTIONS = [
|
||||||
title: "Partner Organizations",
|
title: "Partner Organizations",
|
||||||
blurb:
|
blurb:
|
||||||
"Organizations we collaborate with across the Unity movement and beyond.",
|
"Organizations we collaborate with across the Unity movement and beyond.",
|
||||||
accent: ACCENTS.olive,
|
accent: ACCENTS.mint,
|
||||||
|
background: "var(--color-tint)",
|
||||||
Component: OrgListCards,
|
Component: OrgListCards,
|
||||||
request: { type: "partner", label: "Add or update a partner" },
|
request: { type: "partner", label: "Add or update a partner" },
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -79,6 +82,7 @@ export default function CommunityPage() {
|
||||||
title: blog?.title || BLOG_DEFAULT_TITLE,
|
title: blog?.title || BLOG_DEFAULT_TITLE,
|
||||||
blurb: blog?.blurb ?? undefined,
|
blurb: blog?.blurb ?? undefined,
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-surface)",
|
||||||
Component: CommunityBlog,
|
Component: CommunityBlog,
|
||||||
request: { type: "blog", label: "Write for the blog" },
|
request: { type: "blog", label: "Write for the blog" },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ export default function EventDetail() {
|
||||||
title: event.theme || 'About',
|
title: event.theme || 'About',
|
||||||
blurb: event.theme ? event.tagline ?? undefined : undefined,
|
blurb: event.theme ? event.tagline ?? undefined : undefined,
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||||
<Facts event={event} accent={accent} />
|
<Facts event={event} accent={accent} />
|
||||||
|
|
@ -116,7 +117,7 @@ export default function EventDetail() {
|
||||||
href={link.url}
|
href={link.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="inline-flex items-center gap-2 btn px-5 py-2 text-sm text-white transition-transform hover:scale-105"
|
className="inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-semibold text-white transition-transform hover:scale-105"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
|
|
@ -144,13 +145,14 @@ export default function EventDetail() {
|
||||||
title: 'Upcoming dates',
|
title: 'Upcoming dates',
|
||||||
blurb: seriesLabel(event.series, event.starts_on) ?? undefined,
|
blurb: seriesLabel(event.series, event.starts_on) ?? undefined,
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-tint)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<ul className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
<ul className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||||
{upcoming.map((date) => (
|
{upcoming.map((date) => (
|
||||||
<li
|
<li
|
||||||
key={date}
|
key={date}
|
||||||
className="border-l-4 bg-surface px-5 py-3"
|
className="rounded-xl border-l-4 bg-surface px-5 py-3"
|
||||||
style={{ borderColor: accent }}
|
style={{ borderColor: accent }}
|
||||||
>
|
>
|
||||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||||
|
|
@ -174,6 +176,7 @@ export default function EventDetail() {
|
||||||
id: 'people',
|
id: 'people',
|
||||||
title: 'Who’s there',
|
title: 'Who’s there',
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-tint)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<PeopleTiles size="lg" groups={groups} accent={accent} />
|
<PeopleTiles size="lg" groups={groups} accent={accent} />
|
||||||
|
|
@ -188,6 +191,7 @@ export default function EventDetail() {
|
||||||
title: 'Presented here',
|
title: 'Presented here',
|
||||||
blurb: 'Awards given at this gathering.',
|
blurb: 'Awards given at this gathering.',
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
||||||
{event.awards.map((entry, index) => (
|
{event.awards.map((entry, index) => (
|
||||||
|
|
@ -247,7 +251,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-wrap items-center gap-x-6 gap-y-3 text-sm">
|
<div className="flex flex-wrap items-center gap-x-6 gap-y-3 text-sm">
|
||||||
<span
|
<span
|
||||||
className="px-3 py-1 font-semibold uppercase tracking-wide"
|
className="rounded-full px-3 py-1 font-semibold uppercase tracking-wide"
|
||||||
style={{
|
style={{
|
||||||
background: event.status === 'cancelled' ? '#b3261e' : accent,
|
background: event.status === 'cancelled' ? '#b3261e' : accent,
|
||||||
color: event.status === 'cancelled' ? '#ffffff' : readableOn(accent),
|
color: event.status === 'cancelled' ? '#ffffff' : readableOn(accent),
|
||||||
|
|
@ -264,7 +268,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
||||||
redundant. */}
|
redundant. */}
|
||||||
{event.event_type && (
|
{event.event_type && (
|
||||||
<span
|
<span
|
||||||
className="px-3 py-1 font-semibold uppercase tracking-wide"
|
className="rounded-full px-3 py-1 font-semibold uppercase tracking-wide"
|
||||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
{eventTypeLabel(event.event_type)}
|
{eventTypeLabel(event.event_type)}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ const SECTIONS = [
|
||||||
blurb:
|
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.",
|
"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: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: (
|
content: (
|
||||||
// Narrower than the usual max-w-6xl: full-width form fields
|
// Narrower than the usual max-w-6xl: full-width form fields
|
||||||
// are unpleasant to fill in.
|
// are unpleasant to fill in.
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ function GivingPanel() {
|
||||||
href={GIVING_URL}
|
href={GIVING_URL}
|
||||||
className="
|
className="
|
||||||
mt-8 inline-flex items-center justify-center
|
mt-8 inline-flex items-center justify-center
|
||||||
btn px-10 py-4
|
rounded-full px-10 py-4
|
||||||
text-base font-semibold tracking-wide text-white
|
text-base font-semibold tracking-wide text-white
|
||||||
shadow-sm transition
|
shadow-sm transition
|
||||||
hover:brightness-110 hover:shadow-md
|
hover:brightness-110 hover:shadow-md
|
||||||
|
|
@ -78,6 +78,7 @@ export default function GivingPage() {
|
||||||
blurb:
|
blurb:
|
||||||
"Your giving funds scholarships, retreats, leadership development and the continued growth of the Next Generation of Unity leaders, teachers and community members.",
|
"Your giving funds scholarships, retreats, leadership development and the continued growth of the Next Generation of Unity leaders, teachers and community members.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: <GivingPanel />,
|
content: <GivingPanel />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ export default function History() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={reload}
|
onClick={reload}
|
||||||
className="mt-3 btn border border-brand px-4 py-1.5 text-sm text-link transition-colors hover:bg-tint"
|
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
|
Try again
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -79,6 +79,7 @@ export default function History() {
|
||||||
blurb:
|
blurb:
|
||||||
"Open a year to see what happened.",
|
"Open a year to see what happened.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: BACKGROUND,
|
||||||
content,
|
content,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ export default function Home() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={reload}
|
onClick={reload}
|
||||||
className="mt-4 btn border border-brand px-5 py-2 text-link hover:bg-tint"
|
className="mt-4 rounded-full border border-brand px-5 py-2 font-semibold text-link hover:bg-tint"
|
||||||
>
|
>
|
||||||
Try again
|
Try again
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ const SECTIONS = [
|
||||||
title: "Board & Staff",
|
title: "Board & Staff",
|
||||||
blurb: "The people guiding Next Generation of Unity day to day.",
|
blurb: "The people guiding Next Generation of Unity day to day.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<PeopleTiles size="lg" teams={{ id: "ngu-board",}} />
|
<PeopleTiles size="lg" teams={{ id: "ngu-board",}} />
|
||||||
|
|
@ -24,6 +25,7 @@ const SECTIONS = [
|
||||||
title: "Retreat Team",
|
title: "Retreat Team",
|
||||||
blurb: "Volunteers who plan and lead our gatherings throughout the year.",
|
blurb: "Volunteers who plan and lead our gatherings throughout the year.",
|
||||||
accent: ACCENTS.green,
|
accent: ACCENTS.green,
|
||||||
|
background: "var(--color-surface)",
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<PeopleTiles size="lg" teams="ngu-retreat-team" />
|
<PeopleTiles size="lg" teams="ngu-retreat-team" />
|
||||||
|
|
@ -34,7 +36,8 @@ const SECTIONS = [
|
||||||
id: "committees",
|
id: "committees",
|
||||||
title: "Committees & Volunteers",
|
title: "Committees & Volunteers",
|
||||||
blurb: "Additional roles and contributors.",
|
blurb: "Additional roles and contributors.",
|
||||||
accent: ACCENTS.olive,
|
accent: ACCENTS.mint,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: <ComingSoon what="this list of committees and volunteers" />,
|
content: <ComingSoon what="this list of committees and volunteers" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -42,11 +45,12 @@ const SECTIONS = [
|
||||||
title: "Contact Us",
|
title: "Contact Us",
|
||||||
blurb: "Reach out to our staff",
|
blurb: "Reach out to our staff",
|
||||||
accent: ACCENTS.deep,
|
accent: ACCENTS.deep,
|
||||||
|
background: "var(--color-surface)",
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<a
|
<a
|
||||||
href="mailto:info@nextgenerationofunity.org"
|
href="mailto:info@nextgenerationofunity.org"
|
||||||
className="inline-block py-2.5 px-6 btn border border-link text-link transition-all duration-200 hover:scale-105 active:scale-[0.98]"
|
className="inline-block py-2.5 px-6 rounded-full border border-link text-link font-bold transition-all duration-200 hover:scale-105 active:scale-[0.98]"
|
||||||
>
|
>
|
||||||
info@nextgenerationofunity.org
|
info@nextgenerationofunity.org
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ export default function OrganizationDetail() {
|
||||||
id: 'about',
|
id: 'about',
|
||||||
title: 'About',
|
title: 'About',
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||||
<Facts org={org} accent={accent} back={back} />
|
<Facts org={org} accent={accent} back={back} />
|
||||||
|
|
@ -107,6 +108,7 @@ export default function OrganizationDetail() {
|
||||||
id: 'leadership',
|
id: 'leadership',
|
||||||
title: 'Who runs it',
|
title: 'Who runs it',
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-tint)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-12">
|
<div className="max-w-6xl mx-auto px-6 space-y-12">
|
||||||
{teamBlocks.map((block) => (
|
{teamBlocks.map((block) => (
|
||||||
|
|
@ -168,13 +170,14 @@ export default function OrganizationDetail() {
|
||||||
title: 'Groups',
|
title: 'Groups',
|
||||||
blurb: org.details.map_note ?? undefined,
|
blurb: org.details.map_note ?? undefined,
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
<div className="max-w-6xl mx-auto px-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||||
{(org.details.groups ?? []).map((group) => (
|
{(org.details.groups ?? []).map((group) => (
|
||||||
<Link
|
<Link
|
||||||
key={group.id}
|
key={group.id}
|
||||||
to={orgHref(group.id, 'group')}
|
to={orgHref(group.id, 'group')}
|
||||||
className="flex items-center gap-4 border p-4 transition-colors hover:bg-tint"
|
className="flex items-center gap-4 rounded-lg border p-4 transition-colors hover:bg-tint"
|
||||||
style={{ borderColor: `${withAlpha(accent, 25)}` }}
|
style={{ borderColor: `${withAlpha(accent, 25)}` }}
|
||||||
>
|
>
|
||||||
<GroupMark file={group.logo} name={group.name} accent={accent} />
|
<GroupMark file={group.logo} name={group.name} accent={accent} />
|
||||||
|
|
@ -201,13 +204,14 @@ export default function OrganizationDetail() {
|
||||||
title: 'Awards',
|
title: 'Awards',
|
||||||
blurb: `Given by ${org.short_name || org.name}.`,
|
blurb: `Given by ${org.short_name || org.name}.`,
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-tint)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 grid gap-4 sm:grid-cols-2">
|
<div className="max-w-6xl mx-auto px-6 grid gap-4 sm:grid-cols-2">
|
||||||
{org.awards.map((award) => (
|
{org.awards.map((award) => (
|
||||||
<Link
|
<Link
|
||||||
key={award.id}
|
key={award.id}
|
||||||
to={`/awards/${award.id}`}
|
to={`/awards/${award.id}`}
|
||||||
className="border bg-surface p-5 transition-colors hover:bg-tint-soft"
|
className="rounded-lg border bg-surface p-5 transition-colors hover:bg-tint-soft"
|
||||||
style={{ borderColor: `${withAlpha(accent, 25)}` }}
|
style={{ borderColor: `${withAlpha(accent, 25)}` }}
|
||||||
>
|
>
|
||||||
<span className="block font-semibold" style={{ color: accentText(accent) }}>
|
<span className="block font-semibold" style={{ color: accentText(accent) }}>
|
||||||
|
|
@ -244,6 +248,7 @@ export default function OrganizationDetail() {
|
||||||
id: 'events',
|
id: 'events',
|
||||||
title: 'Gatherings',
|
title: 'Gatherings',
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<EventListCards
|
<EventListCards
|
||||||
host={org.id}
|
host={org.id}
|
||||||
|
|
@ -322,7 +327,7 @@ function Contact({ org, accent }: { org: OrganizationRecord; accent: string }) {
|
||||||
href={link.url}
|
href={link.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="inline-flex items-center gap-2 btn px-5 py-2 text-sm text-white transition-transform hover:scale-105"
|
className="inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-semibold text-white transition-transform hover:scale-105"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
|
|
@ -344,7 +349,7 @@ function Contact({ org, accent }: { org: OrganizationRecord; accent: string }) {
|
||||||
href={link.url}
|
href={link.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="inline-flex items-center gap-2 btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
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) }}
|
style={{ borderColor: accent, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
|
|
@ -363,7 +368,7 @@ function GroupMark({ file, name, accent }: { file?: string | null; name: string;
|
||||||
fallback={
|
fallback={
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="flex h-10 w-10 shrink-0 items-center justify-center text-xs font-bold"
|
className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-xs font-bold"
|
||||||
style={{ background: accent, color: readableOn(accent) }}
|
style={{ background: accent, color: readableOn(accent) }}
|
||||||
>
|
>
|
||||||
{initialsFor(name)}
|
{initialsFor(name)}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ import { capitalize } from '../lib/text.ts'
|
||||||
import { accentText, BRAND } from '../lib/color.ts'
|
import { accentText, BRAND } from '../lib/color.ts'
|
||||||
|
|
||||||
const BODY = 'var(--color-muted)'
|
const BODY = 'var(--color-muted)'
|
||||||
|
const BACKGROUNDS = ['var(--color-surface)', 'var(--color-tint)']
|
||||||
|
|
||||||
/* affiliations.role, for a row with no title of its own. */
|
/* affiliations.role, for a row with no title of its own. */
|
||||||
const ROLE_LABEL: Record<string, string> = {
|
const ROLE_LABEL: Record<string, string> = {
|
||||||
|
|
@ -76,6 +77,7 @@ export default function PersonDetail() {
|
||||||
id: 'about',
|
id: 'about',
|
||||||
title: 'About',
|
title: 'About',
|
||||||
accent,
|
accent,
|
||||||
|
background: BACKGROUNDS[0],
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||||
<Facts person={person} accent={accent} />
|
<Facts person={person} accent={accent} />
|
||||||
|
|
@ -101,6 +103,7 @@ export default function PersonDetail() {
|
||||||
id: 'roles',
|
id: 'roles',
|
||||||
title: 'Roles',
|
title: 'Roles',
|
||||||
accent,
|
accent,
|
||||||
|
background: BACKGROUNDS[sections.length % 2],
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||||
{current.length > 0 && <RoleList roles={current} accent={accent} />}
|
{current.length > 0 && <RoleList roles={current} accent={accent} />}
|
||||||
|
|
@ -108,7 +111,7 @@ export default function PersonDetail() {
|
||||||
{previous.length > 0 && (
|
{previous.length > 0 && (
|
||||||
<div>
|
<div>
|
||||||
{current.length > 0 && (
|
{current.length > 0 && (
|
||||||
<h3 className="mb-4 text-lg font-bold" style={{ color: accentText(accent) }}>
|
<h3 className="mb-4 text-lg font-semibold" style={{ color: accentText(accent) }}>
|
||||||
Previously
|
Previously
|
||||||
</h3>
|
</h3>
|
||||||
)}
|
)}
|
||||||
|
|
@ -125,6 +128,7 @@ export default function PersonDetail() {
|
||||||
id: 'events',
|
id: 'events',
|
||||||
title: 'Events',
|
title: 'Events',
|
||||||
accent,
|
accent,
|
||||||
|
background: BACKGROUNDS[sections.length % 2],
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<ul className="space-y-5">
|
<ul className="space-y-5">
|
||||||
|
|
@ -144,6 +148,7 @@ export default function PersonDetail() {
|
||||||
id: 'awards',
|
id: 'awards',
|
||||||
title: 'Awards',
|
title: 'Awards',
|
||||||
accent,
|
accent,
|
||||||
|
background: BACKGROUNDS[sections.length % 2],
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
||||||
{person.awards.map((entry, index) => (
|
{person.awards.map((entry, index) => (
|
||||||
|
|
@ -191,6 +196,7 @@ export default function PersonDetail() {
|
||||||
id: 'posts',
|
id: 'posts',
|
||||||
title: 'Blog posts',
|
title: 'Blog posts',
|
||||||
accent,
|
accent,
|
||||||
|
background: BACKGROUNDS[sections.length % 2],
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6">
|
<div className="max-w-6xl mx-auto px-6">
|
||||||
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||||
|
|
@ -221,12 +227,12 @@ function Facts({ person, accent }: { person: PersonRecord; accent: string }) {
|
||||||
alt=""
|
alt=""
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
className="h-24 w-24 shrink-0 object-cover"
|
className="h-24 w-24 shrink-0 rounded-full object-cover"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="flex h-24 w-24 shrink-0 items-center justify-center text-2xl font-bold text-white"
|
className="flex h-24 w-24 shrink-0 items-center justify-center rounded-full text-2xl font-bold text-white"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
{initials(person.name)}
|
{initials(person.name)}
|
||||||
|
|
@ -273,7 +279,7 @@ function Contact({ person, accent }: { person: PersonRecord; accent: string }) {
|
||||||
href={link.url}
|
href={link.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="inline-flex items-center gap-2 btn px-5 py-2 text-sm text-white transition-transform hover:scale-105"
|
className="inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-semibold text-white transition-transform hover:scale-105"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
|
|
@ -287,7 +293,7 @@ function Contact({ person, accent }: { person: PersonRecord; accent: string }) {
|
||||||
href={link.url}
|
href={link.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="inline-flex items-center gap-2 btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
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) }}
|
style={{ borderColor: accent, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
|
|
@ -306,7 +312,7 @@ function RoleList({ roles, accent }: { roles: PersonRole[]; accent: string }) {
|
||||||
{roles.map((role, index) => (
|
{roles.map((role, index) => (
|
||||||
<li
|
<li
|
||||||
key={`${role.org.id}:${role.team?.id ?? ''}:${role.title ?? role.role}:${index}`}
|
key={`${role.org.id}:${role.team?.id ?? ''}:${role.title ?? role.role}:${index}`}
|
||||||
className="border-l-4 bg-surface px-5 py-3"
|
className="rounded-xl border-l-4 bg-surface px-5 py-3"
|
||||||
style={{ borderColor: accent }}
|
style={{ borderColor: accent }}
|
||||||
>
|
>
|
||||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,7 @@ const SECTIONS = [
|
||||||
title: "Privacy Policy",
|
title: "Privacy Policy",
|
||||||
blurb: `Last updated: ${LAST_UPDATED}`,
|
blurb: `Last updated: ${LAST_UPDATED}`,
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-surface)",
|
||||||
content: <LegalText parts={PARTS} />,
|
content: <LegalText parts={PARTS} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -180,6 +181,7 @@ const SECTIONS = [
|
||||||
title: "Data requests",
|
title: "Data requests",
|
||||||
blurb: "Ask to see, correct or delete the information we hold about you.",
|
blurb: "Ask to see, correct or delete the information we hold about you.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: (
|
content: (
|
||||||
<div className="mx-auto max-w-3xl px-6">
|
<div className="mx-auto max-w-3xl px-6">
|
||||||
<FeedbackForm fixedType={DATA_REQUEST.id} />
|
<FeedbackForm fixedType={DATA_REQUEST.id} />
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ const SECTIONS = [
|
||||||
blurb:
|
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 center and the colors; a warning shows if the code might not scan.',
|
'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 center and the colors; a warning shows if the code might not scan.',
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: 'var(--color-tint)',
|
||||||
content: (
|
content: (
|
||||||
<div className="mx-auto max-w-6xl px-6">
|
<div className="mx-auto max-w-6xl px-6">
|
||||||
<QrCodeMaker />
|
<QrCodeMaker />
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ const SECTIONS = [
|
||||||
blurb:
|
blurb:
|
||||||
"Tell us what you'd like on the site, or what should change. Attach a Word document with the details and we'll take it from there.",
|
"Tell us what you'd like on the site, or what should change. Attach a Word document with the details and we'll take it from there.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: (
|
content: (
|
||||||
<div className="mx-auto max-w-3xl px-6">
|
<div className="mx-auto max-w-3xl px-6">
|
||||||
<RequestForm />
|
<RequestForm />
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ const SECTIONS = [
|
||||||
title: "Unity Teachings",
|
title: "Unity Teachings",
|
||||||
blurb: "Core principles, readings, and study material from the Unity movement.",
|
blurb: "Core principles, readings, and study material from the Unity movement.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: <ComingSoon what="our Unity teachings" />,
|
content: <ComingSoon what="our Unity teachings" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -19,13 +20,15 @@ const SECTIONS = [
|
||||||
title: "Branding & Marketing",
|
title: "Branding & Marketing",
|
||||||
blurb: "Logos, colors, templates, and guidelines for representing NGU.",
|
blurb: "Logos, colors, templates, and guidelines for representing NGU.",
|
||||||
accent: ACCENTS.green,
|
accent: ACCENTS.green,
|
||||||
|
background: "var(--color-surface)",
|
||||||
content: <ComingSoon what="our branding and marketing kit" />,
|
content: <ComingSoon what="our branding and marketing kit" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "partner",
|
id: "partner",
|
||||||
title: "Partner Resources",
|
title: "Partner Resources",
|
||||||
blurb: "Material for the organizations we collaborate with.",
|
blurb: "Material for the organizations we collaborate with.",
|
||||||
accent: ACCENTS.olive,
|
accent: ACCENTS.mint,
|
||||||
|
background: "var(--color-tint)",
|
||||||
content: <ComingSoon what="resources for partners" />,
|
content: <ComingSoon what="resources for partners" />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ const SECTIONS = [
|
||||||
title: "National Retreats",
|
title: "National Retreats",
|
||||||
blurb: "Our flagship gatherings, open to young adults across the country.",
|
blurb: "Our flagship gatherings, open to young adults across the country.",
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-tint)",
|
||||||
Component: EventListCards,
|
Component: EventListCards,
|
||||||
props: { scope: "national", ...RETREATS },
|
props: { scope: "national", ...RETREATS },
|
||||||
views: { ...CARD_VIEWS, default: "carousel" },
|
views: { ...CARD_VIEWS, default: "carousel" },
|
||||||
|
|
@ -58,6 +59,7 @@ const SECTIONS = [
|
||||||
title: "Regional Retreats",
|
title: "Regional Retreats",
|
||||||
blurb: "Smaller gatherings hosted by regions throughout the year.",
|
blurb: "Smaller gatherings hosted by regions throughout the year.",
|
||||||
accent: ACCENTS.green,
|
accent: ACCENTS.green,
|
||||||
|
background: "var(--color-surface)",
|
||||||
Component: EventListCards,
|
Component: EventListCards,
|
||||||
props: { scope: "regional", ...RETREATS },
|
props: { scope: "regional", ...RETREATS },
|
||||||
views: { ...CARD_VIEWS, default: "grid" },
|
views: { ...CARD_VIEWS, default: "grid" },
|
||||||
|
|
@ -66,7 +68,8 @@ const SECTIONS = [
|
||||||
id: "partner",
|
id: "partner",
|
||||||
title: "Partner Events",
|
title: "Partner Events",
|
||||||
blurb: "Retreats hosted by organizations we collaborate with.",
|
blurb: "Retreats hosted by organizations we collaborate with.",
|
||||||
accent: ACCENTS.olive,
|
accent: ACCENTS.mint,
|
||||||
|
background: "var(--color-tint)",
|
||||||
Component: EventListCards,
|
Component: EventListCards,
|
||||||
props: { scope: "partner", ...RETREATS },
|
props: { scope: "partner", ...RETREATS },
|
||||||
views: { ...CARD_VIEWS, default: "grid" },
|
views: { ...CARD_VIEWS, default: "grid" },
|
||||||
|
|
@ -81,6 +84,7 @@ const SECTIONS = [
|
||||||
title: "Local Events",
|
title: "Local Events",
|
||||||
blurb: "Hosted by individual groups.",
|
blurb: "Hosted by individual groups.",
|
||||||
accent: ACCENTS.green,
|
accent: ACCENTS.green,
|
||||||
|
background: "var(--color-surface)",
|
||||||
Component: EventListCards,
|
Component: EventListCards,
|
||||||
props: { scope: "local", ...RETREATS_ONLY },
|
props: { scope: "local", ...RETREATS_ONLY },
|
||||||
views: { ...CARD_VIEWS, default: "grid" },
|
views: { ...CARD_VIEWS, default: "grid" },
|
||||||
|
|
@ -90,6 +94,7 @@ const SECTIONS = [
|
||||||
title: "International Events",
|
title: "International Events",
|
||||||
blurb: "Gatherings beyond the US.",
|
blurb: "Gatherings beyond the US.",
|
||||||
accent: ACCENTS.deep,
|
accent: ACCENTS.deep,
|
||||||
|
background: "var(--color-tint)",
|
||||||
Component: EventListCards,
|
Component: EventListCards,
|
||||||
props: { scope: "international", ...RETREATS_ONLY },
|
props: { scope: "international", ...RETREATS_ONLY },
|
||||||
views: { ...CARD_VIEWS, default: "grid" },
|
views: { ...CARD_VIEWS, default: "grid" },
|
||||||
|
|
@ -98,7 +103,8 @@ const SECTIONS = [
|
||||||
id: "other",
|
id: "other",
|
||||||
title: "Other Events",
|
title: "Other Events",
|
||||||
blurb: "Everything that doesn't fit the categories above.",
|
blurb: "Everything that doesn't fit the categories above.",
|
||||||
accent: ACCENTS.olive,
|
accent: ACCENTS.mint,
|
||||||
|
background: "var(--color-surface)",
|
||||||
Component: EventListCards,
|
Component: EventListCards,
|
||||||
props: { scope: "other", ...RETREATS_ONLY },
|
props: { scope: "other", ...RETREATS_ONLY },
|
||||||
views: { ...CARD_VIEWS, default: "grid" },
|
views: { ...CARD_VIEWS, default: "grid" },
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ export default function TeamDetail() {
|
||||||
id: 'about',
|
id: 'about',
|
||||||
title: 'About',
|
title: 'About',
|
||||||
accent,
|
accent,
|
||||||
|
background: 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
<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} />
|
<Facts orgId={team.org.id} orgKind={team.org.kind} orgName={team.org.name} accent={accent} />
|
||||||
|
|
@ -75,7 +76,7 @@ export default function TeamDetail() {
|
||||||
href={link.url}
|
href={link.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="inline-flex items-center gap-2 btn px-5 py-2 text-sm text-white transition-transform hover:scale-105"
|
className="inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-semibold text-white transition-transform hover:scale-105"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
|
|
@ -93,6 +94,7 @@ export default function TeamDetail() {
|
||||||
id: 'members',
|
id: 'members',
|
||||||
title: hasAbout ? 'Members' : team.name,
|
title: hasAbout ? 'Members' : team.name,
|
||||||
accent,
|
accent,
|
||||||
|
background: hasAbout ? 'var(--color-tint)' : 'var(--color-surface)',
|
||||||
content: (
|
content: (
|
||||||
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
<div className="max-w-6xl mx-auto px-6 space-y-6">
|
||||||
{!hasAbout && (
|
{!hasAbout && (
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ const SECTIONS = [
|
||||||
title: "Terms of Service",
|
title: "Terms of Service",
|
||||||
blurb: `Last updated: ${LAST_UPDATED}`,
|
blurb: `Last updated: ${LAST_UPDATED}`,
|
||||||
accent: BRAND,
|
accent: BRAND,
|
||||||
|
background: "var(--color-surface)",
|
||||||
content: <LegalText parts={PARTS} />,
|
content: <LegalText parts={PARTS} />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,11 @@ function sizeOf(bytes: number | null): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
const button =
|
const button =
|
||||||
"btn border border-brand px-4 py-2 text-sm text-link transition-colors hover:bg-tint 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 =
|
const primary =
|
||||||
"btn bg-action px-5 py-2.5 text-white transition-colors hover:bg-action-hover disabled:bg-muted/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 =
|
const input =
|
||||||
"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";
|
"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";
|
||||||
|
|
||||||
/* Save to Drive: a folder under Media (Tools → Media → Files), then
|
/* Save to Drive: a folder under Media (Tools → Media → Files), then
|
||||||
the clip goes there as a Files entry. Opens on a folder named for
|
the clip goes there as a Files entry. Opens on a folder named for
|
||||||
|
|
@ -141,7 +141,7 @@ function SaveToDrive({ clip, onSaved }: { clip: Job; onSaved: () => void }) {
|
||||||
value={folder}
|
value={folder}
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onChange={(e) => setFolder(e.target.value)}
|
onChange={(e) => setFolder(e.target.value)}
|
||||||
className="border border-muted/25 bg-surface px-2 py-1 text-sm text-body"
|
className="rounded-lg border border-muted/25 bg-surface px-2 py-1 text-sm text-body"
|
||||||
>
|
>
|
||||||
<option value="">Media (not in a folder)</option>
|
<option value="">Media (not in a folder)</option>
|
||||||
{folders.map((f) => (
|
{folders.map((f) => (
|
||||||
|
|
@ -165,8 +165,8 @@ function SaveToDrive({ clip, onSaved }: { clip: Job; onSaved: () => void }) {
|
||||||
|
|
||||||
function Card({ title, children }: { title: string; children: ReactNode }) {
|
function Card({ title, children }: { title: string; children: ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<section className="mt-6 border border-brand/20 bg-surface p-5">
|
<section className="mt-6 rounded-2xl border border-brand/20 bg-surface p-5">
|
||||||
<h2 className="text-lg font-bold text-body">{title}</h2>
|
<h2 className="text-lg font-semibold text-body">{title}</h2>
|
||||||
<div className="mt-4">{children}</div>
|
<div className="mt-4">{children}</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|
@ -178,7 +178,7 @@ function Status({ job }: { job: Job }) {
|
||||||
const percent = Math.round(job.progress * 100);
|
const percent = Math.round(job.progress * 100);
|
||||||
return (
|
return (
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<div className="h-2 overflow-hidden bg-tint">
|
<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 className="h-full bg-action transition-all" style={{ width: `${job.status === "queued" ? 0 : percent}%` }} />
|
||||||
</div>
|
</div>
|
||||||
<p className="mt-1 text-xs" style={{ color: MUTED }}>
|
<p className="mt-1 text-xs" style={{ color: MUTED }}>
|
||||||
|
|
@ -244,7 +244,7 @@ function Editor({ source, onMade }: { source: Job; onMade: () => void }) {
|
||||||
<div className="grid gap-6 lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)]">
|
<div className="grid gap-6 lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)]">
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
className="relative overflow-hidden bg-black"
|
className="relative overflow-hidden rounded-xl bg-black"
|
||||||
style={{ aspectRatio: aspect ? String(aspect) : "16 / 9" }}
|
style={{ aspectRatio: aspect ? String(aspect) : "16 / 9" }}
|
||||||
>
|
>
|
||||||
<video
|
<video
|
||||||
|
|
@ -451,7 +451,7 @@ export default function AdminClips() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{missing.length > 0 && (
|
{missing.length > 0 && (
|
||||||
<p className="mt-4 bg-danger-tint px-4 py-3 text-sm text-danger">
|
<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
|
{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.
|
won't work until {missing.length > 1 ? "they are" : "it is"}. See docs/video-clips.md.
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ function RequestFiles({ row, canWrite, canRemove }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (files.length === 0) return null;
|
if (files.length === 0) return null;
|
||||||
const small = "btn border px-3 py-0.5 text-xs transition-colors disabled:opacity-60";
|
const small = "rounded-full border px-3 py-0.5 text-xs font-semibold transition-colors disabled:opacity-60";
|
||||||
return (
|
return (
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<ul className="space-y-2">
|
<ul className="space-y-2">
|
||||||
|
|
@ -107,7 +107,7 @@ function RequestFiles({ row, canWrite, canRemove }) {
|
||||||
)}
|
)}
|
||||||
<span className="text-xs text-muted">{sizeOf(file.size)}</span>
|
<span className="text-xs text-muted">{sizeOf(file.size)}</span>
|
||||||
{file.missing && (
|
{file.missing && (
|
||||||
<span className="bg-danger-tint px-2 py-0.5 text-xs font-medium text-danger">
|
<span className="rounded-full bg-danger-tint px-2 py-0.5 text-xs font-medium text-danger">
|
||||||
Missing from Drive
|
Missing from Drive
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
@ -191,7 +191,7 @@ function RequestRecord({ row }) {
|
||||||
|
|
||||||
const state = { fromRequest: fromRequest(row) };
|
const state = { fromRequest: fromRequest(row) };
|
||||||
const button =
|
const button =
|
||||||
"btn border border-link px-4 py-1.5 text-sm text-link transition-colors hover:bg-tint disabled:opacity-60";
|
"rounded-full border border-link px-4 py-1.5 text-sm font-semibold text-link transition-colors hover:bg-tint disabled:opacity-60";
|
||||||
|
|
||||||
if (row.request_action === "new") {
|
if (row.request_action === "new") {
|
||||||
return (
|
return (
|
||||||
|
|
@ -241,7 +241,7 @@ function RequestRecord({ row }) {
|
||||||
id={`record-${row.id}`}
|
id={`record-${row.id}`}
|
||||||
value={picked}
|
value={picked}
|
||||||
onChange={(e) => setPicked(e.target.value)}
|
onChange={(e) => setPicked(e.target.value)}
|
||||||
className="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"
|
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"
|
||||||
>
|
>
|
||||||
{candidates.map((c) => (
|
{candidates.map((c) => (
|
||||||
<option key={c.id} value={c.id}>
|
<option key={c.id} value={c.id}>
|
||||||
|
|
@ -308,7 +308,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article className="border border-brand/20 bg-surface 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">
|
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm">
|
||||||
<span className="font-semibold text-body">
|
<span className="font-semibold text-body">
|
||||||
{row.feedback_type === "content"
|
{row.feedback_type === "content"
|
||||||
|
|
@ -316,7 +316,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
: feedbackTypeLabel(row.feedback_type)}
|
: feedbackTypeLabel(row.feedback_type)}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
className={` px-2.5 py-0.5 text-xs font-medium ${
|
className={`rounded-full px-2.5 py-0.5 text-xs font-medium ${
|
||||||
STATUS_STYLE[row.status] ?? ""
|
STATUS_STYLE[row.status] ?? ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -328,7 +328,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{row.subject && <h2 className="mt-4 text-lg font-bold text-body">{row.subject}</h2>}
|
{row.subject && <h2 className="mt-4 text-lg font-semibold text-body">{row.subject}</h2>}
|
||||||
<p className={`${row.subject ? "mt-2" : "mt-4"} whitespace-pre-wrap text-body`}>{row.message}</p>
|
<p className={`${row.subject ? "mt-2" : "mt-4"} whitespace-pre-wrap text-body`}>{row.message}</p>
|
||||||
{row.feedback_type === "content" && <RequestDetails row={row} />}
|
{row.feedback_type === "content" && <RequestDetails row={row} />}
|
||||||
{row.files?.length > 0 && <RequestFiles row={row} canWrite={canWrite} canRemove={canRemove} />}
|
{row.files?.length > 0 && <RequestFiles row={row} canWrite={canWrite} canRemove={canRemove} />}
|
||||||
|
|
@ -367,7 +367,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
value={row.status}
|
value={row.status}
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onChange={(e) => save({ status: e.target.value })}
|
onChange={(e) => save({ status: e.target.value })}
|
||||||
className="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"
|
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) => (
|
{STATUSES.map((s) => (
|
||||||
<option key={s} value={s}>
|
<option key={s} value={s}>
|
||||||
|
|
@ -383,14 +383,14 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
placeholder="Internal note: who's handling it, what was done"
|
placeholder="Internal note: who's handling it, what was done"
|
||||||
onChange={(e) => setNote(e.target.value)}
|
onChange={(e) => setNote(e.target.value)}
|
||||||
className="mt-3 w-full resize-y 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"
|
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 && (
|
{noteDirty && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onClick={() => save({ admin_note: note })}
|
onClick={() => save({ admin_note: note })}
|
||||||
className="mt-2 btn bg-action px-4 py-1.5 text-sm text-white transition-colors hover:bg-action-hover disabled:bg-muted/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"}
|
{busy ? "Saving…" : "Save note"}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -412,7 +412,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
type="button"
|
type="button"
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onClick={remove}
|
onClick={remove}
|
||||||
className="btn bg-danger px-4 py-1.5 text-sm text-white transition-colors hover:bg-[#8f1e18] disabled:bg-muted/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"}
|
{busy ? "Deleting…" : "Delete"}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -420,7 +420,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
type="button"
|
type="button"
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onClick={() => setConfirming(false)}
|
onClick={() => setConfirming(false)}
|
||||||
className="btn border border-muted/25 px-4 py-1.5 text-sm text-muted transition-colors hover:border-muted/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
|
Keep it
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -430,7 +430,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
||||||
type="button"
|
type="button"
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onClick={() => setConfirming(true)}
|
onClick={() => setConfirming(true)}
|
||||||
className="btn border border-danger/30 px-4 py-1.5 text-sm text-danger transition-colors hover:bg-danger-tint"
|
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
|
Delete
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -586,7 +586,7 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setStatus(tab.id)}
|
onClick={() => setStatus(tab.id)}
|
||||||
className={
|
className={
|
||||||
"btn px-4 py-1.5 text-sm transition-colors " +
|
"rounded-full px-4 py-1.5 text-sm transition-colors " +
|
||||||
(status === tab.id
|
(status === tab.id
|
||||||
? "bg-action font-semibold text-white"
|
? "bg-action font-semibold text-white"
|
||||||
: "border border-muted/25 text-muted hover:border-brand/50")
|
: "border border-muted/25 text-muted hover:border-brand/50")
|
||||||
|
|
@ -606,12 +606,12 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter") setSearch(query.trim());
|
if (e.key === "Enter") setSearch(query.trim());
|
||||||
}}
|
}}
|
||||||
className="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"
|
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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setSearch(query.trim())}
|
onClick={() => setSearch(query.trim())}
|
||||||
className="btn border border-muted/25 px-4 py-1.5 text-sm text-muted transition-colors hover:border-brand/50"
|
className="rounded-full border border-muted/25 px-4 py-1.5 text-sm text-muted transition-colors hover:border-brand/50"
|
||||||
>
|
>
|
||||||
Search
|
Search
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -622,7 +622,7 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
||||||
{error && (
|
{error && (
|
||||||
<p
|
<p
|
||||||
role="alert"
|
role="alert"
|
||||||
className="mt-6 border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
className="mt-6 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||||
>
|
>
|
||||||
{error}
|
{error}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -653,7 +653,7 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => load(cursor)}
|
onClick={() => load(cursor)}
|
||||||
className="mt-6 btn border border-brand px-5 py-2 text-link transition-colors hover:bg-tint"
|
className="mt-6 rounded-full border border-brand px-5 py-2 font-semibold text-link transition-colors hover:bg-tint"
|
||||||
>
|
>
|
||||||
Load older
|
Load older
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@
|
||||||
Forms, Tools, and Panel, which only exists for superadmins.
|
Forms, Tools, and Panel, which only exists for superadmins.
|
||||||
|
|
||||||
It asks for the wide admin column (adminWidth.tsx), like the
|
It asks for the wide admin column (adminWidth.tsx), like the
|
||||||
editor, so the cards run three across on a wide screen. Each
|
editor, so the cards run three across on a wide screen.
|
||||||
block takes a color from the palette (GROUPS), tinting its
|
|
||||||
cards and drawing its bar, so the groups read apart at a glance.
|
|
||||||
|
|
||||||
The right-hand panel is deliberately inert. Nothing here
|
The right-hand panel is deliberately inert. Nothing here
|
||||||
fetches, so the landing page can't be slow or half-broken on
|
fetches, so the landing page can't be slow or half-broken on
|
||||||
|
|
@ -27,17 +25,13 @@ import { useAuth } from "../../lib/auth.tsx";
|
||||||
import { useWideAdminPage } from "../../lib/adminWidth.tsx";
|
import { useWideAdminPage } from "../../lib/adminWidth.tsx";
|
||||||
import { SITE_VERSION } from "../../lib/version.ts";
|
import { SITE_VERSION } from "../../lib/version.ts";
|
||||||
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
|
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
|
||||||
import { PALETTE } from "../../lib/color.ts";
|
|
||||||
import { DATA_NAV, FORMS_NAV, PAGES_NAV, PANEL_NAV, TOOLS_NAV, target, visibleItems } from "./adminNav.ts";
|
import { DATA_NAV, FORMS_NAV, PAGES_NAV, PANEL_NAV, TOOLS_NAV, target, visibleItems } from "./adminNav.ts";
|
||||||
|
|
||||||
/* One card. The title link is stretched over the whole card with
|
/* One card. The title link is stretched over the whole card with
|
||||||
`after:absolute`, which makes the card clickable without nesting
|
`after:absolute`, which makes the card clickable without nesting
|
||||||
an anchor inside an anchor; the sub-links sit above it on z-10 so
|
an anchor inside an anchor; the sub-links sit above it on z-10 so
|
||||||
they stay separately clickable. */
|
they stay separately clickable. */
|
||||||
/* A card's fill: its group's color, faint, over the surface. */
|
function NavCard({ item }) {
|
||||||
const tintOf = (color: string) => `color-mix(in srgb, ${color} 12%, var(--color-surface))`;
|
|
||||||
|
|
||||||
function NavCard({ item, color }) {
|
|
||||||
const to = target(item);
|
const to = target(item);
|
||||||
|
|
||||||
// Drop the child that just repeats the card's own destination:
|
// Drop the child that just repeats the card's own destination:
|
||||||
|
|
@ -45,15 +39,12 @@ function NavCard({ item, color }) {
|
||||||
const extras = (item.children ?? []).filter((child) => child.to !== to);
|
const extras = (item.children ?? []).filter((child) => child.to !== to);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<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">
|
||||||
className="group relative flex flex-col border-l-4 p-5 transition-colors hover:brightness-[0.97]"
|
|
||||||
style={{ borderColor: color, background: tintOf(color) }}
|
|
||||||
>
|
|
||||||
<div className="flex items-baseline gap-3">
|
<div className="flex items-baseline gap-3">
|
||||||
<h3 className="text-base font-bold text-link">
|
<h3 className="text-base font-semibold text-link">
|
||||||
<Link
|
<Link
|
||||||
to={to}
|
to={to}
|
||||||
className="after:absolute after:inset-0 after:content-['']"
|
className="after:absolute after:inset-0 after:rounded-2xl after:content-['']"
|
||||||
>
|
>
|
||||||
{item.label}
|
{item.label}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -87,11 +78,11 @@ function NavCard({ item, color }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CardBlock({ title, blurb, color, children }) {
|
function CardBlock({ title, blurb, children }) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-10">
|
<div className="mt-10">
|
||||||
<div className="flex items-baseline gap-3 border-b-4 pb-2" style={{ borderColor: color }}>
|
<div className="flex items-baseline gap-3">
|
||||||
<h2 className="text-lg font-bold text-link">{title}</h2>
|
<h2 className="text-lg font-semibold text-link">{title}</h2>
|
||||||
{blurb && <p className="text-sm text-muted">{blurb}</p>}
|
{blurb && <p className="text-sm text-muted">{blurb}</p>}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 grid gap-4 sm:grid-cols-2 xl:grid-cols-3">{children}</div>
|
<div className="mt-4 grid gap-4 sm:grid-cols-2 xl:grid-cols-3">{children}</div>
|
||||||
|
|
@ -102,7 +93,7 @@ function CardBlock({ title, blurb, color, children }) {
|
||||||
function PanelSection({ title, children }) {
|
function PanelSection({ title, children }) {
|
||||||
return (
|
return (
|
||||||
<section className="border-b border-brand/10 px-5 py-4 last:border-b-0">
|
<section className="border-b border-brand/10 px-5 py-4 last:border-b-0">
|
||||||
<h2 className="text-xs font-bold uppercase tracking-wider text-muted/70">
|
<h2 className="text-xs font-semibold uppercase tracking-wider text-muted/70">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
<div className="mt-2.5 text-sm text-muted">{children}</div>
|
<div className="mt-2.5 text-sm text-muted">{children}</div>
|
||||||
|
|
@ -110,15 +101,9 @@ function PanelSection({ title, children }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The header's groups, in its order, each with its palette color.
|
/* The header's groups, in its order. Panel is drawn separately
|
||||||
Panel is drawn separately below, since only superadmins get it. */
|
below, since only superadmins get it. */
|
||||||
const GROUPS = [
|
const GROUPS = [DATA_NAV, PAGES_NAV, FORMS_NAV, TOOLS_NAV];
|
||||||
{ nav: DATA_NAV, color: PALETTE.teal[0] },
|
|
||||||
{ nav: PAGES_NAV, color: PALETTE.green[0] },
|
|
||||||
{ nav: FORMS_NAV, color: PALETTE.mint[2] },
|
|
||||||
{ nav: TOOLS_NAV, color: PALETTE.ink[2] },
|
|
||||||
];
|
|
||||||
const PANEL_COLOR = PALETTE.ink[1];
|
|
||||||
|
|
||||||
const QUICK_ADD = [
|
const QUICK_ADD = [
|
||||||
{ to: "/admin/events/new", label: "New event" },
|
{ to: "/admin/events/new", label: "New event" },
|
||||||
|
|
@ -140,32 +125,32 @@ export default function AdminHome() {
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 text-muted">Pick a section to work in.</p>
|
<p className="mt-1 text-muted">Pick a section to work in.</p>
|
||||||
|
|
||||||
{GROUPS.map(({ nav, color }) => (
|
{GROUPS.map((group) => (
|
||||||
<CardBlock key={nav.label} title={nav.label} blurb={nav.blurb} color={color}>
|
<CardBlock key={group.label} title={group.label} blurb={group.blurb}>
|
||||||
{visibleItems(nav.children, user).map((item) => (
|
{visibleItems(group.children, user).map((item) => (
|
||||||
<NavCard key={item.to} item={item} color={color} />
|
<NavCard key={item.to} item={item} />
|
||||||
))}
|
))}
|
||||||
</CardBlock>
|
</CardBlock>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{isSuper(user) && (
|
{isSuper(user) && (
|
||||||
<CardBlock title={PANEL_NAV.label} blurb={PANEL_NAV.blurb} color={PANEL_COLOR}>
|
<CardBlock title={PANEL_NAV.label} blurb={PANEL_NAV.blurb}>
|
||||||
{PANEL_NAV.children.map((item) => (
|
{PANEL_NAV.children.map((item) => (
|
||||||
<NavCard key={item.to} item={item} color={PANEL_COLOR} />
|
<NavCard key={item.to} item={item} />
|
||||||
))}
|
))}
|
||||||
</CardBlock>
|
</CardBlock>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Sticky so it stays put once the card column outgrows it. */}
|
{/* Sticky so it stays put once the card column outgrows it. */}
|
||||||
<aside className="divide-y divide-brand/10 border border-brand/20 bg-surface 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">
|
<PanelSection title="Signed in">
|
||||||
<p className="font-medium text-ink">{user?.name || user?.email}</p>
|
<p className="font-medium text-ink">{user?.name || user?.email}</p>
|
||||||
{user?.name && user?.email && (
|
{user?.name && user?.email && (
|
||||||
<p className="mt-0.5 break-all text-xs text-muted/80">{user.email}</p>
|
<p className="mt-0.5 break-all text-xs text-muted/80">{user.email}</p>
|
||||||
)}
|
)}
|
||||||
{role && (
|
{role && (
|
||||||
<span className="mt-2 inline-block bg-tint px-2.5 py-0.5 text-xs font-medium text-link">
|
<span className="mt-2 inline-block rounded-full bg-tint px-2.5 py-0.5 text-xs font-medium text-link">
|
||||||
{role}
|
{role}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -61,12 +61,12 @@ function GroupMenu({ item, lit, pathname }) {
|
||||||
|
|
||||||
{children.length > 1 && (
|
{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">
|
<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 border border-brand/20 bg-surface 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) => (
|
{children.map((child) => (
|
||||||
<li key={child.to}>
|
<li key={child.to}>
|
||||||
<NavLink
|
<NavLink
|
||||||
to={child.to}
|
to={child.to}
|
||||||
className={`block px-3 py-2 text-sm transition-colors hover:bg-tint ${
|
className={`block rounded-lg px-3 py-2 text-sm transition-colors hover:bg-tint ${
|
||||||
matches(pathname, child.to)
|
matches(pathname, child.to)
|
||||||
? "font-semibold text-link"
|
? "font-semibold text-link"
|
||||||
: "text-body"
|
: "text-body"
|
||||||
|
|
@ -142,7 +142,7 @@ export default function AdminLayout() {
|
||||||
) : (
|
) : (
|
||||||
<Link
|
<Link
|
||||||
to={ADMIN_HOME}
|
to={ADMIN_HOME}
|
||||||
className="transition-opacity hover:opacity-70"
|
className="rounded transition-opacity hover:opacity-70"
|
||||||
title="Back to the admin home"
|
title="Back to the admin home"
|
||||||
>
|
>
|
||||||
{wordmark}
|
{wordmark}
|
||||||
|
|
@ -173,7 +173,7 @@ export default function AdminLayout() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
className="btn border border-muted/30 px-4 py-1.5 transition-colors hover:bg-tint hover:text-link"
|
className="rounded-full border border-muted/30 px-4 py-1.5 font-medium transition-colors hover:bg-tint hover:text-link"
|
||||||
>
|
>
|
||||||
Sign out
|
Sign out
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ const GOOGLE_ERRORS: Record<string, string> = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fieldClass =
|
const fieldClass =
|
||||||
"w-full border border-muted/50 bg-surface px-4 py-3 text-body "+
|
"w-full rounded-xl border border-muted/50 bg-surface px-4 py-3 text-body " +
|
||||||
"outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25";
|
"outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||||
|
|
||||||
export default function AdminLogin() {
|
export default function AdminLogin() {
|
||||||
|
|
@ -98,13 +98,13 @@ export default function AdminLogin() {
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
noValidate
|
noValidate
|
||||||
className="mt-8 border border-brand/20 bg-surface p-6"
|
className="mt-8 rounded-2xl border border-brand/20 bg-surface p-6"
|
||||||
>
|
>
|
||||||
{google && (
|
{google && (
|
||||||
<>
|
<>
|
||||||
<a
|
<a
|
||||||
href={`/api/auth/google?next=${encodeURIComponent(destination)}`}
|
href={`/api/auth/google?next=${encodeURIComponent(destination)}`}
|
||||||
className="flex items-center justify-center gap-3 btn border border-muted/30 px-6 py-3 text-body transition-colors hover:bg-tint"
|
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">
|
<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" />
|
<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" />
|
||||||
|
|
@ -156,7 +156,7 @@ export default function AdminLogin() {
|
||||||
{error && (
|
{error && (
|
||||||
<p
|
<p
|
||||||
role="alert"
|
role="alert"
|
||||||
className="mt-5 border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
className="mt-5 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||||
>
|
>
|
||||||
{error}
|
{error}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -165,7 +165,7 @@ export default function AdminLogin() {
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={busy || !email || !password}
|
disabled={busy || !email || !password}
|
||||||
className="mt-6 w-full btn bg-action px-6 py-3 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"
|
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"}
|
{busy ? "Signing in…" : "Sign in"}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ function DeleteControl({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-danger-tint p-2 text-xs text-body">
|
<div className="rounded-lg bg-danger-tint p-2 text-xs text-body">
|
||||||
{uses.length > 0 ? (
|
{uses.length > 0 ? (
|
||||||
<p>
|
<p>
|
||||||
Still used by{" "}
|
Still used by{" "}
|
||||||
|
|
@ -158,7 +158,7 @@ function FolderControls({ tab, onChanged }: { tab: string; onChanged: (tab: stri
|
||||||
const [busy, setBusy] = useState(false);
|
const [busy, setBusy] = useState(false);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
const inside = tab === ALL_FOLDERS ? "" : tab;
|
const inside = tab === ALL_FOLDERS ? "" : tab;
|
||||||
const button = "btn border border-brand px-3 py-1 text-xs text-link transition-colors hover:bg-tint disabled:opacity-50";
|
const button = "rounded-full border border-brand px-3 py-1 text-xs font-medium text-link transition-colors hover:bg-tint disabled:opacity-50";
|
||||||
|
|
||||||
async function run(work: () => Promise<string>) {
|
async function run(work: () => Promise<string>) {
|
||||||
setBusy(true);
|
setBusy(true);
|
||||||
|
|
@ -204,7 +204,7 @@ function FolderControls({ tab, onChanged }: { tab: string; onChanged: (tab: stri
|
||||||
if (e.key === "Escape") setMode(null);
|
if (e.key === "Escape") setMode(null);
|
||||||
}}
|
}}
|
||||||
placeholder={mode === "new" ? "New folder's name" : "New name"}
|
placeholder={mode === "new" ? "New folder's name" : "New name"}
|
||||||
className="border border-muted/25 bg-surface px-3 py-1 text-sm text-body outline-none focus:border-brand"
|
className="rounded-lg border border-muted/25 bg-surface px-3 py-1 text-sm text-body outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
<button type="button" className={button} disabled={busy || !name.trim()} onClick={submit}>
|
<button type="button" className={button} disabled={busy || !name.trim()} onClick={submit}>
|
||||||
{mode === "new" ? (inside ? `Make it in ${inside}` : "Make folder") : "Rename"}
|
{mode === "new" ? (inside ? `Make it in ${inside}` : "Make folder") : "Rename"}
|
||||||
|
|
@ -264,7 +264,7 @@ function MoveControl({ file, folders, onMoved }: { file: DriveFile; folders: str
|
||||||
setBusy(false);
|
setBusy(false);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className="border border-muted/25 bg-surface px-1.5 py-0.5 text-xs text-body"
|
className="rounded border border-muted/25 bg-surface px-1.5 py-0.5 text-xs text-body"
|
||||||
>
|
>
|
||||||
<option value="">Not in a folder</option>
|
<option value="">Not in a folder</option>
|
||||||
{folders.map((f) => (
|
{folders.map((f) => (
|
||||||
|
|
@ -304,7 +304,7 @@ function FilesTab() {
|
||||||
value={query}
|
value={query}
|
||||||
onChange={(e) => setQuery(e.target.value)}
|
onChange={(e) => setQuery(e.target.value)}
|
||||||
placeholder="Search by file name"
|
placeholder="Search by file name"
|
||||||
className="ml-auto w-64 border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
|
className="ml-auto w-64 rounded-lg border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{!ready && (
|
{!ready && (
|
||||||
|
|
@ -406,7 +406,7 @@ function RequestFilesTab() {
|
||||||
aria-selected={folder === id}
|
aria-selected={folder === id}
|
||||||
onClick={() => setFolder(id)}
|
onClick={() => setFolder(id)}
|
||||||
className={
|
className={
|
||||||
"btn px-3 py-1 text-sm transition-colors " +
|
"rounded-full px-3 py-1 text-sm transition-colors " +
|
||||||
(folder === id ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
(folder === id ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -423,7 +423,7 @@ function RequestFilesTab() {
|
||||||
{shown.length === 0 ? (
|
{shown.length === 0 ? (
|
||||||
<p className="mt-6 text-sm text-muted">No request files here.</p>
|
<p className="mt-6 text-sm text-muted">No request files here.</p>
|
||||||
) : (
|
) : (
|
||||||
<ul className="mt-6 divide-y divide-brand/10 border border-brand/20 bg-surface">
|
<ul className="mt-6 divide-y divide-brand/10 rounded-2xl border border-brand/20 bg-surface">
|
||||||
{shown.map((file) => (
|
{shown.map((file) => (
|
||||||
<li key={file.id} className="flex flex-wrap items-center gap-x-4 gap-y-1 px-4 py-3 text-sm">
|
<li key={file.id} className="flex flex-wrap items-center gap-x-4 gap-y-1 px-4 py-3 text-sm">
|
||||||
{file.missing ? (
|
{file.missing ? (
|
||||||
|
|
@ -439,7 +439,7 @@ function RequestFilesTab() {
|
||||||
)}
|
)}
|
||||||
<span className="text-xs text-muted">{formatBytes(file.size)}</span>
|
<span className="text-xs text-muted">{formatBytes(file.size)}</span>
|
||||||
{file.missing && (
|
{file.missing && (
|
||||||
<span className="bg-danger-tint px-2 py-0.5 text-xs font-medium text-danger">Missing from Drive</span>
|
<span className="rounded-full bg-danger-tint px-2 py-0.5 text-xs font-medium text-danger">Missing from Drive</span>
|
||||||
)}
|
)}
|
||||||
<Link to="/admin/requests" className="text-xs text-muted hover:text-link hover:underline">
|
<Link to="/admin/requests" className="text-xs text-muted hover:text-link hover:underline">
|
||||||
Request #{file.feedback_id}
|
Request #{file.feedback_id}
|
||||||
|
|
@ -453,7 +453,7 @@ function RequestFilesTab() {
|
||||||
type="button"
|
type="button"
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
onClick={() => remove(file)}
|
onClick={() => remove(file)}
|
||||||
className="btn bg-danger px-3 py-0.5 text-xs text-white disabled:opacity-60"
|
className="rounded-full bg-danger px-3 py-0.5 text-xs font-semibold text-white disabled:opacity-60"
|
||||||
>
|
>
|
||||||
{busy ? "Removing…" : "Remove it"}
|
{busy ? "Removing…" : "Remove it"}
|
||||||
</button>{" "}
|
</button>{" "}
|
||||||
|
|
@ -548,7 +548,7 @@ export default function AdminMedia() {
|
||||||
value={query}
|
value={query}
|
||||||
onChange={(e) => setQuery(e.target.value)}
|
onChange={(e) => setQuery(e.target.value)}
|
||||||
placeholder="Search by file name"
|
placeholder="Search by file name"
|
||||||
className="ml-auto w-64 border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
|
className="ml-auto w-64 rounded-lg border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ function Block({ title, note, children }: any) {
|
||||||
return (
|
return (
|
||||||
<section className="mt-8 first:mt-0">
|
<section className="mt-8 first:mt-0">
|
||||||
<div className="flex items-baseline gap-3">
|
<div className="flex items-baseline gap-3">
|
||||||
<h2 className="text-lg font-bold text-link">{title}</h2>
|
<h2 className="text-lg font-semibold text-link">{title}</h2>
|
||||||
{note && <p className="text-sm text-muted">{note}</p>}
|
{note && <p className="text-sm text-muted">{note}</p>}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3">{children}</div>
|
<div className="mt-3">{children}</div>
|
||||||
|
|
@ -69,7 +69,7 @@ function Block({ title, note, children }: any) {
|
||||||
|
|
||||||
function Stat({ label, value }) {
|
function Stat({ label, value }) {
|
||||||
return (
|
return (
|
||||||
<div className="border border-brand/20 bg-surface px-4 py-3">
|
<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">
|
<div className="text-xs font-medium uppercase tracking-wider text-muted/70">
|
||||||
{label}
|
{label}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,7 +119,7 @@ function AccessGroups({ access, onSynced }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const button =
|
const button =
|
||||||
"btn border border-brand px-4 py-1.5 text-sm text-link transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
"rounded-full border border-brand px-4 py-1.5 text-sm font-medium text-link transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Block
|
<Block
|
||||||
|
|
@ -154,7 +154,7 @@ function AccessGroups({ access, onSynced }) {
|
||||||
value={email}
|
value={email}
|
||||||
placeholder="someone@nextgenerationofunity.org"
|
placeholder="someone@nextgenerationofunity.org"
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
className="min-w-0 flex-1 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 sm:max-w-sm"
|
className="min-w-0 flex-1 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 sm:max-w-sm"
|
||||||
/>
|
/>
|
||||||
<button type="button" className={button} disabled={busy !== null || !email.trim()} onClick={() => send("check")}>
|
<button type="button" className={button} disabled={busy !== null || !email.trim()} onClick={() => send("check")}>
|
||||||
{busy === "check" ? "Checking…" : "Check their groups"}
|
{busy === "check" ? "Checking…" : "Check their groups"}
|
||||||
|
|
@ -272,7 +272,7 @@ export default function AdminPanel() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={load}
|
onClick={load}
|
||||||
className="mt-3 btn border border-brand px-4 py-1.5 text-sm text-link transition-colors hover:bg-tint"
|
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
|
Try again
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -311,7 +311,7 @@ export default function AdminPanel() {
|
||||||
{content.map((row) => (
|
{content.map((row) => (
|
||||||
<span
|
<span
|
||||||
key={row.label}
|
key={row.label}
|
||||||
className="border border-brand/20 bg-surface px-3 py-1 text-sm text-muted"
|
className="rounded-full border border-brand/20 bg-surface px-3 py-1 text-sm text-muted"
|
||||||
>
|
>
|
||||||
{row.label}{" "}
|
{row.label}{" "}
|
||||||
<strong className="font-semibold text-ink">
|
<strong className="font-semibold text-ink">
|
||||||
|
|
@ -326,7 +326,7 @@ export default function AdminPanel() {
|
||||||
title="Accounts"
|
title="Accounts"
|
||||||
note="Changing a role or disabling an account signs that person out."
|
note="Changing a role or disabling an account signs that person out."
|
||||||
>
|
>
|
||||||
<div className="overflow-x-auto border border-brand/20 bg-surface">
|
<div className="overflow-x-auto rounded-2xl border border-brand/20 bg-surface">
|
||||||
<table className="w-full min-w-[46rem] text-left text-sm">
|
<table className="w-full min-w-[46rem] text-left text-sm">
|
||||||
<thead className="border-b border-brand/15 text-xs uppercase tracking-wider text-muted/70">
|
<thead className="border-b border-brand/15 text-xs uppercase tracking-wider text-muted/70">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -378,7 +378,7 @@ export default function AdminPanel() {
|
||||||
value={row.role}
|
value={row.role}
|
||||||
disabled={locked || busy || fromGroup}
|
disabled={locked || busy || fromGroup}
|
||||||
onChange={(e) => changeRole(row, e.target.value)}
|
onChange={(e) => changeRole(row, e.target.value)}
|
||||||
className="border border-brand/30 bg-surface px-2 py-1 text-sm text-ink disabled:cursor-not-allowed disabled:bg-tint-soft disabled:text-muted/60"
|
className="rounded-lg border border-brand/30 bg-surface px-2 py-1 text-sm text-ink disabled:cursor-not-allowed disabled:bg-tint-soft disabled:text-muted/60"
|
||||||
title={
|
title={
|
||||||
fromGroup
|
fromGroup
|
||||||
? "The role comes from this person's Google group."
|
? "The role comes from this person's Google group."
|
||||||
|
|
@ -418,7 +418,7 @@ export default function AdminPanel() {
|
||||||
type="button"
|
type="button"
|
||||||
disabled={locked || busy}
|
disabled={locked || busy}
|
||||||
onClick={() => setActive(row, row.is_active ? 0 : 1)}
|
onClick={() => setActive(row, row.is_active ? 0 : 1)}
|
||||||
className={`btn border px-3 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${
|
className={`rounded-full border px-3 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${
|
||||||
row.is_active
|
row.is_active
|
||||||
? "border-muted/30 text-muted hover:border-danger/50 hover:text-danger"
|
? "border-muted/30 text-muted hover:border-danger/50 hover:text-danger"
|
||||||
: "border-brand/40 text-link hover:bg-tint"
|
: "border-brand/40 text-link hover:bg-tint"
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ import {
|
||||||
|
|
||||||
/* One card per section. scroll-mt clears the sticky "Jump to" bar
|
/* One card per section. scroll-mt clears the sticky "Jump to" bar
|
||||||
below lg, and leaves a little air above the card on desktop. */
|
below lg, and leaves a little air above the card on desktop. */
|
||||||
const CARD = "mt-6 scroll-mt-16 border border-brand/20 bg-surface 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)}`;
|
const sectionId = (name) => `section-${slugify(name)}`;
|
||||||
|
|
||||||
|
|
@ -458,7 +458,7 @@ export default function EntityEdit() {
|
||||||
{/* Field groups */}
|
{/* Field groups */}
|
||||||
{groups.map((group) => (
|
{groups.map((group) => (
|
||||||
<section key={group.legend} id={sectionId(group.legend)} className={CARD}>
|
<section key={group.legend} id={sectionId(group.legend)} className={CARD}>
|
||||||
<h2 className="text-lg font-bold text-body">{group.legend}</h2>
|
<h2 className="text-lg font-semibold text-body">{group.legend}</h2>
|
||||||
{group.note && <p className="mt-1 text-sm text-muted">{group.note}</p>}
|
{group.note && <p className="mt-1 text-sm text-muted">{group.note}</p>}
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<FieldGrid>
|
<FieldGrid>
|
||||||
|
|
@ -505,7 +505,7 @@ export default function EntityEdit() {
|
||||||
type="button"
|
type="button"
|
||||||
onClick={save}
|
onClick={save}
|
||||||
disabled={saving || !dirty}
|
disabled={saving || !dirty}
|
||||||
className="btn bg-action px-6 py-2 text-white transition-colors hover:bg-action-hover disabled:bg-muted/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"}
|
{saving ? "Saving…" : isNew ? "Create" : "Save changes"}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -513,7 +513,7 @@ export default function EntityEdit() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={remove}
|
onClick={remove}
|
||||||
className="btn border border-danger/40 px-4 py-2 text-sm text-danger transition-colors hover:bg-danger-tint"
|
className="rounded-full border border-danger/40 px-4 py-2 text-sm font-medium text-danger transition-colors hover:bg-danger-tint"
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -541,7 +541,7 @@ export default function EntityEdit() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={load}
|
onClick={load}
|
||||||
className="btn border border-danger/40 px-3 py-1 text-xs"
|
className="rounded-full border border-danger/40 px-3 py-1 text-xs font-medium"
|
||||||
>
|
>
|
||||||
Reload
|
Reload
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -566,7 +566,7 @@ function ImportedNote() {
|
||||||
`${summary.tables} tables`,
|
`${summary.tables} tables`,
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<p role="status" className="mt-4 border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
<p role="status" className="mt-4 rounded-xl border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
||||||
Imported from Word: {parts.join(", ")}.
|
Imported from Word: {parts.join(", ")}.
|
||||||
{summary.skipped?.images
|
{summary.skipped?.images
|
||||||
? ` ${summary.skipped.images} image${summary.skipped.images === 1 ? " was" : "s were"} not carried over; add them as Image blocks.`
|
? ` ${summary.skipped.images} image${summary.skipped.images === 1 ? " was" : "s were"} not carried over; add them as Image blocks.`
|
||||||
|
|
@ -583,11 +583,11 @@ function ImportedNote() {
|
||||||
function RequestedChanges({ request, isNew, form, onUse, onAdd }: any) {
|
function RequestedChanges({ request, isNew, form, onUse, onAdd }: any) {
|
||||||
const [done, setDone] = useState<Set<string>>(() => new Set());
|
const [done, setDone] = useState<Set<string>>(() => new Set());
|
||||||
const mark = (key: string) => setDone((prev) => new Set(prev).add(key));
|
const mark = (key: string) => setDone((prev) => new Set(prev).add(key));
|
||||||
const button = "btn border border-link px-3 py-0.5 text-xs text-link transition-colors hover:bg-tint";
|
const button = "rounded-full border border-link px-3 py-0.5 text-xs font-semibold text-link transition-colors hover:bg-tint";
|
||||||
|
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
return (
|
return (
|
||||||
<p role="status" className="mt-4 border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
<p role="status" className="mt-4 rounded-xl border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
||||||
Filled in from content request #{request.request}. Check it, fill in the rest, then Create. It isn't saved yet.
|
Filled in from content request #{request.request}. Check it, fill in the rest, then Create. It isn't saved yet.
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
|
|
@ -599,14 +599,14 @@ function RequestedChanges({ request, isNew, form, onUse, onAdd }: any) {
|
||||||
];
|
];
|
||||||
if (items.length === 0) {
|
if (items.length === 0) {
|
||||||
return (
|
return (
|
||||||
<p className="mt-4 border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
<p className="mt-4 rounded-xl border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
||||||
Content request #{request.request} has no details to copy; its message is in Forms → Content requests.
|
Content request #{request.request} has no details to copy; its message is in Forms → Content requests.
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-4 border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
<div className="mt-4 rounded-xl border border-brand/20 bg-tint px-4 py-3 text-sm text-body">
|
||||||
<p className="font-semibold">Requested in content request #{request.request}</p>
|
<p className="font-semibold">Requested in content request #{request.request}</p>
|
||||||
<p className="mt-0.5 text-xs text-muted">Use what should change, then Save changes.</p>
|
<p className="mt-0.5 text-xs text-muted">Use what should change, then Save changes.</p>
|
||||||
<ul className="mt-3 space-y-2">
|
<ul className="mt-3 space-y-2">
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export default function EntityList() {
|
||||||
{canWrite && (
|
{canWrite && (
|
||||||
<Link
|
<Link
|
||||||
to={`/admin/${manifest.key}/new`}
|
to={`/admin/${manifest.key}/new`}
|
||||||
className={`${manifest.importer ? "" : "ml-auto "}btn bg-action px-4 py-2 text-sm text-white transition-colors hover:bg-action-hover`}
|
className={`${manifest.importer ? "" : "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}
|
New {manifest.singular}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -112,7 +112,7 @@ export default function EntityList() {
|
||||||
<select
|
<select
|
||||||
value={params.get(filter.key) ?? ""}
|
value={params.get(filter.key) ?? ""}
|
||||||
onChange={(e) => setParam(filter.key, e.target.value)}
|
onChange={(e) => setParam(filter.key, e.target.value)}
|
||||||
className="mt-1 border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand"
|
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>
|
<option value="">All</option>
|
||||||
{labelFor(filter).map(([value, label]) => (
|
{labelFor(filter).map(([value, label]) => (
|
||||||
|
|
@ -131,12 +131,12 @@ export default function EntityList() {
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
onChange={(e) => setQuery(e.target.value)}
|
onChange={(e) => setQuery(e.target.value)}
|
||||||
onKeyDown={(e) => e.key === "Enter" && setParam("q", query.trim())}
|
onKeyDown={(e) => e.key === "Enter" && setParam("q", query.trim())}
|
||||||
className="border border-muted/25 bg-surface px-4 py-1.5 text-sm text-body outline-none focus:border-brand"
|
className="rounded-full border border-muted/25 bg-surface px-4 py-1.5 text-sm text-body outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setParam("q", query.trim())}
|
onClick={() => setParam("q", query.trim())}
|
||||||
className="btn border border-muted/25 px-4 py-1.5 text-sm text-muted hover:border-brand/50"
|
className="rounded-full border border-muted/25 px-4 py-1.5 text-sm text-muted hover:border-brand/50"
|
||||||
>
|
>
|
||||||
Search
|
Search
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -146,14 +146,14 @@ export default function EntityList() {
|
||||||
{error && (
|
{error && (
|
||||||
<p
|
<p
|
||||||
role="alert"
|
role="alert"
|
||||||
className="mt-6 border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
className="mt-6 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||||
>
|
>
|
||||||
{error}
|
{error}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Rows */}
|
{/* Rows */}
|
||||||
<div className="mt-6 overflow-x-auto border border-brand/20 bg-surface">
|
<div className="mt-6 overflow-x-auto rounded-2xl border border-brand/20 bg-surface">
|
||||||
<table className="w-full text-left text-sm">
|
<table className="w-full text-left text-sm">
|
||||||
<thead className="border-b border-muted/15 text-xs text-muted">
|
<thead className="border-b border-muted/15 text-xs text-muted">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -245,7 +245,7 @@ function ImportButton({ manifest }: { manifest: any }) {
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<label
|
<label
|
||||||
className={`cursor-pointer btn border border-link px-4 py-2 text-sm text-link transition-colors hover:bg-tint ${
|
className={`cursor-pointer rounded-full border border-link px-4 py-2 text-sm font-semibold text-link transition-colors hover:bg-tint ${
|
||||||
busy ? "pointer-events-none opacity-60" : ""
|
busy ? "pointer-events-none opacity-60" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export function PostCard({ post, accent }: { post: BlogPostSummary; accent: stri
|
||||||
const authors = post.authors.map((author) => author.name).join(', ')
|
const authors = post.authors.map((author) => author.name).join(', ')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li className="relative flex flex-col overflow-hidden border border-brand/15 bg-surface 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.failed ? (
|
{!cover.failed ? (
|
||||||
<img src={cover.src} alt="" loading="lazy" onError={cover.onError} className="aspect-video w-full object-cover" />
|
<img src={cover.src} alt="" loading="lazy" onError={cover.onError} className="aspect-video w-full object-cover" />
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -55,10 +55,10 @@ export function PostCard({ post, accent }: { post: BlogPostSummary; accent: stri
|
||||||
{[date, ...post.tags].filter(Boolean).join(' · ')}
|
{[date, ...post.tags].filter(Boolean).join(' · ')}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<h4 className="mt-2 font-display text-xl font-bold leading-snug text-ink">
|
<h4 className="mt-2 font-display text-xl font-extrabold leading-snug text-ink">
|
||||||
<Link
|
<Link
|
||||||
to={blogHref(post.id)}
|
to={blogHref(post.id)}
|
||||||
className="after:absolute after:inset-0 after:content-[''] hover:underline"
|
className="after:absolute after:inset-0 after:rounded-2xl after:content-[''] hover:underline"
|
||||||
>
|
>
|
||||||
{post.title}
|
{post.title}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -74,7 +74,7 @@ export function PostCard({ post, accent }: { post: BlogPostSummary; accent: stri
|
||||||
|
|
||||||
function Subheading({ children, accent }: { children: string; accent: string }) {
|
function Subheading({ children, accent }: { children: string; accent: string }) {
|
||||||
return (
|
return (
|
||||||
<h3 className="text-2xl font-bold" style={{ color: accentText(accent) }}>
|
<h3 className="text-2xl font-extrabold" style={{ color: accentText(accent) }}>
|
||||||
{children}
|
{children}
|
||||||
</h3>
|
</h3>
|
||||||
)
|
)
|
||||||
|
|
@ -128,7 +128,7 @@ export default function CommunityBlog({ accent = BRAND }: { accent?: string }) {
|
||||||
{external.url && (
|
{external.url && (
|
||||||
<HomeLink
|
<HomeLink
|
||||||
url={external.url}
|
url={external.url}
|
||||||
className="ml-auto inline-flex items-center gap-2 btn px-5 py-2 text-sm text-white transition-transform hover:scale-105"
|
className="ml-auto inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-semibold text-white transition-transform hover:scale-105"
|
||||||
style={{ background: accent }}
|
style={{ background: accent }}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={/substack\.com/i.test(external.url) ? 'substack' : null} />
|
<PlatformIcon platform={/substack\.com/i.test(external.url) ? 'substack' : null} />
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@ export default function EventCalendar({
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => go(monthKey(today))}
|
onClick={() => go(monthKey(today))}
|
||||||
className="btn border px-3 py-1 text-sm hover:bg-surface"
|
className="rounded-full border px-3 py-1 text-sm font-semibold hover:bg-surface"
|
||||||
style={{ borderColor: accent, color: accentText(accent) }}
|
style={{ borderColor: accent, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
Today
|
Today
|
||||||
|
|
@ -335,7 +335,7 @@ export default function EventCalendar({
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="ml-auto hidden overflow-hidden btn border md:flex"
|
className="ml-auto hidden overflow-hidden rounded-full border md:flex"
|
||||||
style={{ borderColor: accent }}
|
style={{ borderColor: accent }}
|
||||||
role="group"
|
role="group"
|
||||||
aria-label="Calendar view"
|
aria-label="Calendar view"
|
||||||
|
|
@ -381,12 +381,12 @@ export default function EventCalendar({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{show('online') && (
|
{show('online') && (
|
||||||
<label className="flex cursor-pointer items-center gap-2 btn border border-brand/50 bg-surface px-4 py-2 text-sm">
|
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={onlineOnly}
|
checked={onlineOnly}
|
||||||
onChange={(e) => setOnlineOnly(e.target.checked)}
|
onChange={(e) => setOnlineOnly(e.target.checked)}
|
||||||
className="h-4 w-4"
|
className="h-4 w-4 rounded"
|
||||||
style={{ accentColor: accent }}
|
style={{ accentColor: accent }}
|
||||||
/>
|
/>
|
||||||
Online only
|
Online only
|
||||||
|
|
@ -399,7 +399,7 @@ export default function EventCalendar({
|
||||||
onChange={(e) => setQuery(e.target.value)}
|
onChange={(e) => setQuery(e.target.value)}
|
||||||
placeholder="Search events"
|
placeholder="Search events"
|
||||||
aria-label="Search events"
|
aria-label="Search events"
|
||||||
className="min-w-[12rem] flex-1 border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
|
className="min-w-[12rem] flex-1 rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{filtering && (
|
{filtering && (
|
||||||
|
|
@ -418,11 +418,11 @@ export default function EventCalendar({
|
||||||
{/* ── Body ── */}
|
{/* ── Body ── */}
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
{error ? (
|
{error ? (
|
||||||
<p className="bg-surface p-6 text-danger">
|
<p className="rounded-2xl bg-surface p-6 text-danger">
|
||||||
Couldn’t load events. {error.message}
|
Couldn’t load events. {error.message}
|
||||||
</p>
|
</p>
|
||||||
) : loading ? (
|
) : loading ? (
|
||||||
<div className="h-[32rem] animate-pulse bg-tint" aria-hidden="true" />
|
<div className="h-[32rem] animate-pulse rounded-3xl bg-tint" aria-hidden="true" />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{view === 'month' && (
|
{view === 'month' && (
|
||||||
|
|
@ -495,7 +495,7 @@ type MonthGridProps = {
|
||||||
|
|
||||||
function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accent }: MonthGridProps) {
|
function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accent }: MonthGridProps) {
|
||||||
return (
|
return (
|
||||||
<div className="overflow-hidden border border-brand/15 bg-surface shadow-sm">
|
<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">
|
<div className="grid grid-cols-7 border-b border-brand/10 bg-tint-soft">
|
||||||
{WEEKDAYS.map((day) => (
|
{WEEKDAYS.map((day) => (
|
||||||
<div
|
<div
|
||||||
|
|
@ -539,7 +539,7 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="flex h-7 w-7 items-center justify-center text-sm font-semibold"
|
className="flex h-7 w-7 items-center justify-center rounded-full text-sm font-semibold"
|
||||||
style={
|
style={
|
||||||
isToday
|
isToday
|
||||||
? { background: accent, color: readableOn(accent) }
|
? { background: accent, color: readableOn(accent) }
|
||||||
|
|
@ -583,8 +583,8 @@ function Bar({ seg, accent }: { seg: Segment; accent: string }) {
|
||||||
to={eventHref(seg.event.id)}
|
to={eventHref(seg.event.id)}
|
||||||
title={`${seg.event.title}${seg.time ? ` · ${seg.time}` : ''}`}
|
title={`${seg.event.title}${seg.time ? ` · ${seg.time}` : ''}`}
|
||||||
className={`pointer-events-auto flex items-center gap-1 truncate px-2 text-xs font-semibold text-white transition-[filter] hover:brightness-110 ${
|
className={`pointer-events-auto flex items-center gap-1 truncate px-2 text-xs font-semibold text-white transition-[filter] hover:brightness-110 ${
|
||||||
seg.continuesBefore ? 'ml-0' : 'ml-1'
|
seg.continuesBefore ? 'ml-0 rounded-l-none' : 'ml-1 rounded-l-md'
|
||||||
} ${seg.continuesAfter ? 'mr-0' : 'mr-1'} ${
|
} ${seg.continuesAfter ? 'mr-0 rounded-r-none' : 'mr-1 rounded-r-md'} ${
|
||||||
canceled ? 'line-through opacity-60' : ''
|
canceled ? 'line-through opacity-60' : ''
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -621,7 +621,7 @@ function DayPanel({
|
||||||
onClose: () => void
|
onClose: () => void
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-4 border bg-surface p-6" style={{ borderColor: `${withAlpha(accent, 25)}`}}>
|
<div className="mt-4 rounded-3xl border bg-surface p-6" style={{ borderColor: `${withAlpha(accent, 25)}` }}>
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<h4 className="font-display text-lg font-bold">{longDay(date)}</h4>
|
<h4 className="font-display text-lg font-bold">{longDay(date)}</h4>
|
||||||
<button
|
<button
|
||||||
|
|
@ -665,7 +665,7 @@ function MonthList({
|
||||||
}) {
|
}) {
|
||||||
if (items.length === 0) {
|
if (items.length === 0) {
|
||||||
return (
|
return (
|
||||||
<p className="bg-surface 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.
|
Nothing on the calendar this month.
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
|
|
@ -684,12 +684,12 @@ function MonthList({
|
||||||
{[...byDay.entries()].map(([day, list]) => {
|
{[...byDay.entries()].map(([day, list]) => {
|
||||||
const d = parse(day)
|
const d = parse(day)
|
||||||
return (
|
return (
|
||||||
<li key={day} className="flex gap-5 bg-surface 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">
|
<div className="w-14 shrink-0 text-center">
|
||||||
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accentText(accent) }}>
|
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accentText(accent) }}>
|
||||||
{d.toLocaleDateString(undefined, { weekday: 'short' })}
|
{d.toLocaleDateString(undefined, { weekday: 'short' })}
|
||||||
</p>
|
</p>
|
||||||
<p className="font-display text-3xl font-bold leading-none">{d.getDate()}</p>
|
<p className="font-display text-3xl font-extrabold leading-none">{d.getDate()}</p>
|
||||||
</div>
|
</div>
|
||||||
<ul className="min-w-0 flex-1 space-y-3">
|
<ul className="min-w-0 flex-1 space-y-3">
|
||||||
{list.map((item) => (
|
{list.map((item) => (
|
||||||
|
|
@ -716,7 +716,7 @@ function EventLine({ item, accent }: { item: Occurrence; accent: string }) {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
to={eventHref(event.id)}
|
to={eventHref(event.id)}
|
||||||
className="group flex items-start gap-3 p-2 transition-colors hover:bg-tint-soft"
|
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="mt-1.5 h-3 w-3 shrink-0 rounded-full" style={{ background: color }} aria-hidden="true" />
|
||||||
<span className="min-w-0">
|
<span className="min-w-0">
|
||||||
|
|
@ -756,7 +756,7 @@ function NavButton({
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
className="flex h-10 w-10 items-center justify-center btn border text-xl transition-colors hover:bg-surface"
|
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) }}
|
style={{ borderColor: accent, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
@ -782,7 +782,7 @@ function FilterSelect({
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(e) => onChange(e.target.value)}
|
onChange={(e) => onChange(e.target.value)}
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
className="border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
|
className="rounded-full border border-brand/50 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
|
||||||
>
|
>
|
||||||
<option value="">{all}</option>
|
<option value="">{all}</option>
|
||||||
{options.map(([id, name]) => (
|
{options.map(([id, name]) => (
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ export function Card({
|
||||||
const typeBadge =
|
const typeBadge =
|
||||||
showType && ev.event_type ? (
|
showType && ev.event_type ? (
|
||||||
<span
|
<span
|
||||||
className="inline-block px-3 py-0.5 mb-2 text-xs font-bold uppercase tracking-wide"
|
className="inline-block rounded-full px-3 py-0.5 mb-2 text-xs font-bold uppercase tracking-wide"
|
||||||
style={{ border: `1px solid ${color}`, color: INK }}
|
style={{ border: `1px solid ${color}`, color: INK }}
|
||||||
>
|
>
|
||||||
{eventTypeLabel(ev.event_type)}
|
{eventTypeLabel(ev.event_type)}
|
||||||
|
|
@ -177,7 +177,7 @@ export function Card({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`text-ink 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" : ""
|
compact ? "ev-card" : ""
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -197,7 +197,7 @@ export function Card({
|
||||||
<Logo src={orgLogo} className="ev-org h-11 w-auto mb-4" />
|
<Logo src={orgLogo} className="ev-org h-11 w-auto mb-4" />
|
||||||
<div className="ev-info">
|
<div className="ev-info">
|
||||||
{typeBadge}
|
{typeBadge}
|
||||||
<h3 className="text-3xl font-bold leading-tight">
|
<h3 className="text-3xl font-extrabold leading-tight">
|
||||||
<TitleLink ev={ev} linked={linked}>
|
<TitleLink ev={ev} linked={linked}>
|
||||||
{ev.title}
|
{ev.title}
|
||||||
</TitleLink>
|
</TitleLink>
|
||||||
|
|
@ -225,7 +225,7 @@ export function Card({
|
||||||
<div className="md:col-span-2">
|
<div className="md:col-span-2">
|
||||||
<Logo src={orgLogo} className="h-15 w-auto mb-6" />
|
<Logo src={orgLogo} className="h-15 w-auto mb-6" />
|
||||||
{typeBadge}
|
{typeBadge}
|
||||||
<h3 className="text-4xl font-bold">
|
<h3 className="text-4xl font-extrabold">
|
||||||
<TitleLink ev={ev} linked={linked}>
|
<TitleLink ev={ev} linked={linked}>
|
||||||
{ev.title}
|
{ev.title}
|
||||||
</TitleLink>
|
</TitleLink>
|
||||||
|
|
@ -284,7 +284,7 @@ export function Card({
|
||||||
<a
|
<a
|
||||||
key={item.label}
|
key={item.label}
|
||||||
href={item.url}
|
href={item.url}
|
||||||
className={`inline-flex items-center justify-center gap-2 font-bold transition-all duration-200 hover:scale-105 text-center ${
|
className={`inline-flex items-center justify-center gap-2 rounded-xl font-bold transition-all duration-200 hover:scale-105 text-center ${
|
||||||
compact ? "py-2.5 px-5" : "py-2.5 px-6"
|
compact ? "py-2.5 px-5" : "py-2.5 px-6"
|
||||||
}`}
|
}`}
|
||||||
style={{ border: `1px solid ${color}`, color: INK }}
|
style={{ border: `1px solid ${color}`, color: INK }}
|
||||||
|
|
@ -302,7 +302,7 @@ export function Card({
|
||||||
href={igUrl}
|
href={igUrl}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className={`ig-link flex items-center justify-center font-bold transition-all duration-200 hover:scale-[1.02] gap-3 ${
|
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"
|
compact ? "py-2.5 px-5" : "py-3 px-6"
|
||||||
}`}
|
}`}
|
||||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||||
|
|
@ -316,7 +316,7 @@ export function Card({
|
||||||
{linked && (
|
{linked && (
|
||||||
<Link
|
<Link
|
||||||
to={eventHref(ev.id)}
|
to={eventHref(ev.id)}
|
||||||
className={`font-bold transition-all duration-200 hover:scale-105 text-center ${
|
className={`rounded-xl font-bold transition-all duration-200 hover:scale-105 text-center ${
|
||||||
compact ? "py-2.5 px-5" : "py-2.5 px-6"
|
compact ? "py-2.5 px-5" : "py-2.5 px-6"
|
||||||
}`}
|
}`}
|
||||||
style={{ border: `1px solid ${color}`, color: INK }}
|
style={{ border: `1px solid ${color}`, color: INK }}
|
||||||
|
|
@ -355,7 +355,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
|
||||||
key={id}
|
key={id}
|
||||||
onClick={() => setActive(id)}
|
onClick={() => setActive(id)}
|
||||||
aria-pressed={active === id}
|
aria-pressed={active === id}
|
||||||
className="btn py-1.5 px-4 text-sm transition-colors duration-200"
|
className="rounded-full py-1.5 px-4 text-sm font-bold transition-colors duration-200"
|
||||||
style={chip(active === id)}
|
style={chip(active === id)}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
|
|
@ -386,7 +386,7 @@ export function EventCardsToggle({ view, setView, accent }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="inline-flex overflow-hidden shrink-0"
|
className="inline-flex rounded-xl overflow-hidden shrink-0"
|
||||||
style={{ border: `1px solid ${accent}` }}
|
style={{ border: `1px solid ${accent}` }}
|
||||||
role="group"
|
role="group"
|
||||||
aria-label="Change how events are displayed"
|
aria-label="Change how events are displayed"
|
||||||
|
|
@ -576,7 +576,7 @@ export default function EventListCards({
|
||||||
{pastEvents.length > 0 && (
|
{pastEvents.length > 0 && (
|
||||||
<div className="mt-12">
|
<div className="mt-12">
|
||||||
<h3
|
<h3
|
||||||
className="text-2xl font-display font-bold mb-6"
|
className="text-2xl font-extrabold mb-6"
|
||||||
style={{ color: accentText(accent), opacity: 0.85 }}
|
style={{ color: accentText(accent), opacity: 0.85 }}
|
||||||
>
|
>
|
||||||
Past Events
|
Past Events
|
||||||
|
|
@ -616,7 +616,7 @@ export default function EventListCards({
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowPast(v => !v)}
|
onClick={() => setShowPast(v => !v)}
|
||||||
aria-expanded={showPast}
|
aria-expanded={showPast}
|
||||||
className="flex items-center gap-2 py-2.5 px-6 font-bold transition-all duration-200 hover:scale-105"
|
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: accentText(accent) }}
|
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||||
>
|
>
|
||||||
{showPast
|
{showPast
|
||||||
|
|
@ -673,7 +673,7 @@ export default function EventListCards({
|
||||||
onClick={prev}
|
onClick={prev}
|
||||||
disabled={index === 0}
|
disabled={index === 0}
|
||||||
aria-label="Previous event"
|
aria-label="Previous event"
|
||||||
className="absolute left-2 md:left-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 btn flex items-center justify-center text-2xl shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
|
className="absolute left-2 md:left-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-bold shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
|
||||||
style={arrowStyle(index > 0)}
|
style={arrowStyle(index > 0)}
|
||||||
>
|
>
|
||||||
<CaretLeft size={20} weight="bold" aria-hidden="true" />
|
<CaretLeft size={20} weight="bold" aria-hidden="true" />
|
||||||
|
|
@ -682,7 +682,7 @@ export default function EventListCards({
|
||||||
onClick={next}
|
onClick={next}
|
||||||
disabled={index === events.length - 1}
|
disabled={index === events.length - 1}
|
||||||
aria-label="Next event"
|
aria-label="Next event"
|
||||||
className="absolute right-2 md:right-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 btn flex items-center justify-center text-2xl shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
|
className="absolute right-2 md:right-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-bold shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
|
||||||
style={arrowStyle(index < events.length - 1)}
|
style={arrowStyle(index < events.length - 1)}
|
||||||
>
|
>
|
||||||
<CaretRight size={20} weight="bold" aria-hidden="true" />
|
<CaretRight size={20} weight="bold" aria-hidden="true" />
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const WHOLE_PAGE = "";
|
||||||
/* ── Shared field chrome ─────────────────────────────────────── */
|
/* ── Shared field chrome ─────────────────────────────────────── */
|
||||||
|
|
||||||
export const fieldClass =
|
export const fieldClass =
|
||||||
"w-full border border-muted/50 bg-surface px-4 py-3 text-body "+
|
"w-full rounded-xl border border-muted/50 bg-surface px-4 py-3 text-body " +
|
||||||
"placeholder:text-muted outline-none transition-colors " +
|
"placeholder:text-muted outline-none transition-colors " +
|
||||||
"focus:border-brand focus:ring-2 focus:ring-brand/25";
|
"focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ const selectClass = `${fieldClass} appearance-none pr-10`;
|
||||||
|
|
||||||
export function OptionalTag() {
|
export function OptionalTag() {
|
||||||
return (
|
return (
|
||||||
<span className="ml-2 bg-tint px-2 py-0.5 text-xs font-medium text-link">
|
<span className="ml-2 rounded-full bg-tint px-2 py-0.5 text-xs font-medium text-link">
|
||||||
Optional
|
Optional
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
@ -54,7 +54,7 @@ export function OptionalTag() {
|
||||||
/* On a field the send button waits for. */
|
/* On a field the send button waits for. */
|
||||||
export function RequiredTag() {
|
export function RequiredTag() {
|
||||||
return (
|
return (
|
||||||
<span className="ml-2 bg-danger-tint px-2 py-0.5 text-xs font-medium text-danger">
|
<span className="ml-2 rounded-full bg-danger-tint px-2 py-0.5 text-xs font-medium text-danger">
|
||||||
Required
|
Required
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
@ -141,7 +141,7 @@ export function TilePicker({
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
className={
|
className={
|
||||||
"flex h-full flex-col gap-1 border p-4 transition-colors "+
|
"flex h-full flex-col gap-1 rounded-xl border p-4 transition-colors " +
|
||||||
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand/40 " +
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand/40 " +
|
||||||
(selected
|
(selected
|
||||||
? "border-brand bg-tint"
|
? "border-brand bg-tint"
|
||||||
|
|
@ -180,7 +180,7 @@ function LocationPicker({ page, section, onPageChange, onSectionChange }) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="flex flex-wrap items-center">
|
<div className="flex flex-wrap items-center">
|
||||||
<h3 className="text-base font-bold text-body">
|
<h3 className="text-base font-semibold text-body">
|
||||||
Where did you run into it?
|
Where did you run into it?
|
||||||
</h3>
|
</h3>
|
||||||
<OptionalTag />
|
<OptionalTag />
|
||||||
|
|
@ -313,7 +313,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
aria-live="polite"
|
aria-live="polite"
|
||||||
className="border border-brand/20 bg-surface 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: accentText(BRAND) }}>
|
<h3 className="text-2xl font-bold" style={{ color: accentText(BRAND) }}>
|
||||||
Thanks, we've got it
|
Thanks, we've got it
|
||||||
|
|
@ -333,7 +333,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={reset}
|
onClick={reset}
|
||||||
className="mt-6 btn border border-brand px-5 py-2.5 text-link transition-colors hover:bg-tint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/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"}
|
{request ? "Send another request" : "Send more feedback"}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -345,7 +345,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
noValidate
|
noValidate
|
||||||
className="border border-brand/20 bg-surface p-6 sm:p-8"
|
className="rounded-2xl border border-brand/20 bg-surface p-6 sm:p-8"
|
||||||
>
|
>
|
||||||
{!fixedType && (
|
{!fixedType && (
|
||||||
<>
|
<>
|
||||||
|
|
@ -413,9 +413,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Optional contact details */}
|
{/* Optional contact details */}
|
||||||
<div className="notice mt-8 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">
|
<div className="flex flex-wrap items-center">
|
||||||
<h3 className="text-base font-bold text-body">
|
<h3 className="text-base font-semibold text-body">
|
||||||
{request ? "How we reach you" : "Your details"}
|
{request ? "How we reach you" : "Your details"}
|
||||||
</h3>
|
</h3>
|
||||||
{!request && <OptionalTag />}
|
{!request && <OptionalTag />}
|
||||||
|
|
@ -487,7 +487,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
||||||
{formError && (
|
{formError && (
|
||||||
<p
|
<p
|
||||||
role="alert"
|
role="alert"
|
||||||
className="mt-8 border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
className="mt-8 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||||
>
|
>
|
||||||
{formError}
|
{formError}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -497,7 +497,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={!ready || sending}
|
disabled={!ready || sending}
|
||||||
className="btn bg-action px-7 py-3 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"
|
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"}
|
{sending ? "Sending…" : request ? "Send request" : "Send feedback"}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import { accentText } from '../../lib/color.ts'
|
||||||
|
|
||||||
const MUTED = "var(--color-muted)";
|
const MUTED = "var(--color-muted)";
|
||||||
const INK = "var(--color-body)";
|
const INK = "var(--color-body)";
|
||||||
const FALLBACK_COLOR = "#004c52";
|
const FALLBACK_COLOR = "#4a6b72";
|
||||||
|
|
||||||
/* Wide enough for a logo beside two lines of text, narrow enough
|
/* Wide enough for a logo beside two lines of text, narrow enough
|
||||||
that three fit on a laptop. The grid drops a column rather than
|
that three fit on a laptop. The grid drops a column rather than
|
||||||
|
|
@ -44,14 +44,14 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
|
className="rounded-2xl p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
|
||||||
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
|
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
|
||||||
>
|
>
|
||||||
<div className="flex items-start gap-4">
|
<div className="flex items-start gap-4">
|
||||||
<OrgLogo org={org} color={color} />
|
<OrgLogo org={org} color={color} />
|
||||||
|
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<h3 className="text-xl font-bold leading-tight" style={{ color }}>
|
<h3 className="text-xl font-extrabold leading-tight" style={{ color }}>
|
||||||
{org.name}
|
{org.name}
|
||||||
</h3>
|
</h3>
|
||||||
{subtitle && (
|
{subtitle && (
|
||||||
|
|
@ -90,7 +90,7 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
||||||
href={org.website}
|
href={org.website}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="py-2 px-4 font-bold text-sm transition-transform duration-200 hover:scale-105"
|
className="py-2 px-4 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||||
style={{ border: `1px solid ${color}`, color }}
|
style={{ border: `1px solid ${color}`, color }}
|
||||||
>
|
>
|
||||||
{siteLabel} <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
{siteLabel} <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||||
|
|
@ -100,7 +100,7 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
||||||
{org.email && (
|
{org.email && (
|
||||||
<a
|
<a
|
||||||
href={`mailto:${org.email}`}
|
href={`mailto:${org.email}`}
|
||||||
className="py-2 px-4 font-bold text-sm transition-transform duration-200 hover:scale-105"
|
className="py-2 px-4 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||||
style={{ border: `1px solid ${color}`, color }}
|
style={{ border: `1px solid ${color}`, color }}
|
||||||
>
|
>
|
||||||
Contact
|
Contact
|
||||||
|
|
@ -117,7 +117,7 @@ function Block({ title, orgs, accent, pageLabel, siteLabel }) {
|
||||||
return (
|
return (
|
||||||
<section className="mb-12">
|
<section className="mb-12">
|
||||||
{title && (
|
{title && (
|
||||||
<h3 className="text-xl font-bold mb-5" style={{ color: FALLBACK_COLOR }}>
|
<h3 className="text-xl font-extrabold mb-5" style={{ color: FALLBACK_COLOR }}>
|
||||||
{title}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const CONTENT_MAX = "88rem";
|
||||||
const MUTED = "var(--color-muted)";
|
const MUTED = "var(--color-muted)";
|
||||||
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
||||||
const INK = "var(--color-body)";
|
const INK = "var(--color-body)";
|
||||||
const FALLBACK_COLOR = "#004c52";
|
const FALLBACK_COLOR = "#4a6b72";
|
||||||
|
|
||||||
/* organizations.color is nullable; an SVG fill left undefined paints
|
/* organizations.color is nullable; an SVG fill left undefined paints
|
||||||
black, so an uncolored region takes the same fallback as a card. */
|
black, so an uncolored region takes the same fallback as a card. */
|
||||||
|
|
@ -70,7 +70,7 @@ function Blocks({ blocks = [] as any[], color }) {
|
||||||
switch (block.type) {
|
switch (block.type) {
|
||||||
case "heading":
|
case "heading":
|
||||||
return (
|
return (
|
||||||
<h4 key={i} className="text-lg font-bold">
|
<h4 key={i} className="text-lg font-extrabold">
|
||||||
{block.text}
|
{block.text}
|
||||||
</h4>
|
</h4>
|
||||||
);
|
);
|
||||||
|
|
@ -291,7 +291,7 @@ function LegendButton({ region, selected, setSelected, hovered, setHovered }) {
|
||||||
onFocus={() => setHovered(region.id)}
|
onFocus={() => setHovered(region.id)}
|
||||||
onBlur={() => setHovered(null)}
|
onBlur={() => setHovered(null)}
|
||||||
aria-pressed={selected === region.id}
|
aria-pressed={selected === region.id}
|
||||||
className="flex items-center gap-2 py-1.5 px-3 text-sm font-bold transition-all duration-200"
|
className="flex items-center gap-2 py-1.5 px-3 rounded-lg text-sm font-bold transition-all duration-200"
|
||||||
style={{
|
style={{
|
||||||
border: `1px solid ${colorOf(region)}`,
|
border: `1px solid ${colorOf(region)}`,
|
||||||
background: on ? colorOf(region) : "transparent",
|
background: on ? colorOf(region) : "transparent",
|
||||||
|
|
@ -342,7 +342,7 @@ function Legend({ domestic, international, onMapIds, ...props }: any) {
|
||||||
{selected && (
|
{selected && (
|
||||||
<button
|
<button
|
||||||
onClick={() => setSelected(null)}
|
onClick={() => setSelected(null)}
|
||||||
className="py-1.5 px-3 text-sm font-bold underline"
|
className="py-1.5 px-3 rounded-lg text-sm font-bold underline"
|
||||||
style={{ color: FALLBACK_COLOR }}
|
style={{ color: FALLBACK_COLOR }}
|
||||||
>
|
>
|
||||||
Show all
|
Show all
|
||||||
|
|
@ -374,7 +374,7 @@ function RegionBlock({
|
||||||
>
|
>
|
||||||
{/* The heading holds the button, not the other way round: a
|
{/* The heading holds the button, not the other way round: a
|
||||||
heading inside a button stops being a heading. */}
|
heading inside a button stops being a heading. */}
|
||||||
<h4 className={`font-bold ${indent ? "text-lg" : "text-xl"}`} style={{ color: INK }}>
|
<h4 className={`font-extrabold ${indent ? "text-lg" : "text-xl"}`} style={{ color: INK }}>
|
||||||
<button
|
<button
|
||||||
onClick={() => setSelected(on ? null : region.id)}
|
onClick={() => setSelected(on ? null : region.id)}
|
||||||
onMouseEnter={() => setHovered(region.id)}
|
onMouseEnter={() => setHovered(region.id)}
|
||||||
|
|
@ -470,7 +470,7 @@ function RegionBlock({
|
||||||
function GroupCard({ group, color, open, onOpen }) {
|
function GroupCard({ group, color, open, onOpen }) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="p-4 flex items-start gap-4 transition-all duration-200"
|
className="rounded-2xl p-4 flex items-start gap-4 transition-all duration-200"
|
||||||
style={{
|
style={{
|
||||||
border: `1px solid ${color}`,
|
border: `1px solid ${color}`,
|
||||||
background: open ? `${withAlpha(color, 8)}` : "transparent",
|
background: open ? `${withAlpha(color, 8)}` : "transparent",
|
||||||
|
|
@ -499,7 +499,7 @@ function GroupCard({ group, color, open, onOpen }) {
|
||||||
onClick={onOpen}
|
onClick={onOpen}
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
aria-label={`${open ? "Hide" : "View"} details for ${group.name}`}
|
aria-label={`${open ? "Hide" : "View"} details for ${group.name}`}
|
||||||
className="h-9 w-9 btn flex items-center justify-center transition-transform duration-200 hover:scale-110"
|
className="h-9 w-9 rounded-full flex items-center justify-center transition-transform duration-200 hover:scale-110"
|
||||||
style={{
|
style={{
|
||||||
border: `1px solid ${color}`,
|
border: `1px solid ${color}`,
|
||||||
color,
|
color,
|
||||||
|
|
@ -540,21 +540,21 @@ function GroupDetail({ group, region, onClose }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="p-6 mb-6"
|
className="rounded-2xl p-6 mb-6"
|
||||||
style={{ border: `2px solid ${colorOf(region)}`, background: `${withAlpha(colorOf(region), 6)}` }}
|
style={{ border: `2px solid ${colorOf(region)}`, background: `${withAlpha(colorOf(region), 6)}` }}
|
||||||
>
|
>
|
||||||
<div className="flex items-start gap-4">
|
<div className="flex items-start gap-4">
|
||||||
<OrgLogo org={group} color={colorOf(region)} size="h-20 w-20" />
|
<OrgLogo org={group} color={colorOf(region)} size="h-20 w-20" />
|
||||||
|
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="text-2xl font-display font-bold leading-tight">{group.name}</p>
|
<p className="text-2xl font-extrabold leading-tight">{group.name}</p>
|
||||||
<p style={{ color: FALLBACK_COLOR }}>{group.location_label}</p>
|
<p style={{ color: FALLBACK_COLOR }}>{group.location_label}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
aria-label="Close details"
|
aria-label="Close details"
|
||||||
className="shrink-0 h-8 w-8 btn flex items-center justify-center text-lg transition-transform duration-200 hover:scale-110"
|
className="shrink-0 h-8 w-8 rounded-full flex items-center justify-center text-lg font-bold transition-transform duration-200 hover:scale-110"
|
||||||
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
|
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
|
||||||
>
|
>
|
||||||
<X size={20} weight="bold" aria-hidden="true" />
|
<X size={20} weight="bold" aria-hidden="true" />
|
||||||
|
|
@ -582,7 +582,7 @@ function GroupDetail({ group, region, onClose }) {
|
||||||
{orgPath(group) && (
|
{orgPath(group) && (
|
||||||
<Link
|
<Link
|
||||||
to={orgPath(group)!}
|
to={orgPath(group)!}
|
||||||
className="py-2 px-5 font-bold text-sm transition-transform duration-200 hover:scale-105"
|
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||||
style={{ background: colorOf(region), color: readableOn(colorOf(region)) }}
|
style={{ background: colorOf(region), color: readableOn(colorOf(region)) }}
|
||||||
>
|
>
|
||||||
Group page
|
Group page
|
||||||
|
|
@ -593,7 +593,7 @@ function GroupDetail({ group, region, onClose }) {
|
||||||
href={group.website}
|
href={group.website}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="py-2 px-5 font-bold text-sm transition-transform duration-200 hover:scale-105"
|
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||||
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
|
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
|
||||||
>
|
>
|
||||||
Visit site
|
Visit site
|
||||||
|
|
@ -603,7 +603,7 @@ function GroupDetail({ group, region, onClose }) {
|
||||||
{group.email && (
|
{group.email && (
|
||||||
<a
|
<a
|
||||||
href={`mailto:${group.email}`}
|
href={`mailto:${group.email}`}
|
||||||
className="py-2 px-5 font-bold text-sm transition-transform duration-200 hover:scale-105"
|
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||||
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
|
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
|
||||||
>
|
>
|
||||||
Get in touch
|
Get in touch
|
||||||
|
|
@ -633,7 +633,7 @@ function GroupGrid({ regions, groups, groupsIn, subtextFor, openId, setOpenId })
|
||||||
className="h-3 w-3 rounded-full shrink-0"
|
className="h-3 w-3 rounded-full shrink-0"
|
||||||
style={{ background: colorOf(region) }}
|
style={{ background: colorOf(region) }}
|
||||||
/>
|
/>
|
||||||
<h3 className="text-2xl font-bold" style={{ color: colorOf(region) }}>
|
<h3 className="text-2xl font-extrabold" style={{ color: colorOf(region) }}>
|
||||||
{region.name}
|
{region.name}
|
||||||
</h3>
|
</h3>
|
||||||
<span className="text-sm" style={{ color: MUTED }}>
|
<span className="text-sm" style={{ color: MUTED }}>
|
||||||
|
|
@ -695,7 +695,7 @@ export function OrgMapToggle({ view, setView, accent }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="inline-flex overflow-hidden shrink-0"
|
className="inline-flex rounded-xl overflow-hidden shrink-0"
|
||||||
style={{ border: `1px solid ${accent}` }}
|
style={{ border: `1px solid ${accent}` }}
|
||||||
role="group"
|
role="group"
|
||||||
aria-label="Change how groups are displayed"
|
aria-label="Change how groups are displayed"
|
||||||
|
|
@ -871,13 +871,13 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
||||||
ref={listRef}
|
ref={listRef}
|
||||||
className="relative lg:h-0 lg:min-h-full overflow-y-auto pr-2"
|
className="relative lg:h-0 lg:min-h-full overflow-y-auto pr-2"
|
||||||
>
|
>
|
||||||
<h3 className="text-xl font-bold mb-1" style={{ color: FALLBACK_COLOR }}>
|
<h3 className="text-xl font-extrabold mb-1" style={{ color: FALLBACK_COLOR }}>
|
||||||
{US_TITLE}
|
{US_TITLE}
|
||||||
</h3>
|
</h3>
|
||||||
{domestic.map(r => block(r, true))}
|
{domestic.map(r => block(r, true))}
|
||||||
|
|
||||||
<h3
|
<h3
|
||||||
className="text-xl font-display font-bold mt-6 mb-1 pt-4"
|
className="text-xl font-extrabold mt-6 mb-1 pt-4"
|
||||||
style={{ color: FALLBACK_COLOR, borderTop: `1px solid ${RULE}` }}
|
style={{ color: FALLBACK_COLOR, borderTop: `1px solid ${RULE}` }}
|
||||||
>
|
>
|
||||||
{INTL_TITLE}
|
{INTL_TITLE}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ import { accentText } from '../../lib/color.ts'
|
||||||
const MUTED = "var(--color-muted)";
|
const MUTED = "var(--color-muted)";
|
||||||
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
||||||
const INK = "var(--color-body)";
|
const INK = "var(--color-body)";
|
||||||
const FALLBACK_COLOR = "#004c52";
|
const FALLBACK_COLOR = "#4a6b72";
|
||||||
|
|
||||||
/* ── Row button ───────────────────────────────────────────────
|
/* ── Row button ───────────────────────────────────────────────
|
||||||
Deliberately a sibling of the summary button rather than inside
|
Deliberately a sibling of the summary button rather than inside
|
||||||
|
|
@ -54,7 +54,7 @@ const FALLBACK_COLOR = "#004c52";
|
||||||
function RowButton({ as: As = "button", color, children, ...rest }: any) {
|
function RowButton({ as: As = "button", color, children, ...rest }: any) {
|
||||||
return (
|
return (
|
||||||
<As
|
<As
|
||||||
className="inline-flex shrink-0 items-center gap-2 whitespace-nowrap py-2 px-4 font-bold text-sm transition-transform duration-200 hover:scale-105"
|
className="inline-flex shrink-0 items-center gap-2 whitespace-nowrap py-2 px-4 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||||
style={{ border: `1px solid ${color}`, color }}
|
style={{ border: `1px solid ${color}`, color }}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
|
|
@ -68,7 +68,7 @@ function OrgMark({ org, color }) {
|
||||||
<span className="h-3 w-3 rounded-full shrink-0" style={{ background: color }} aria-hidden="true" />
|
<span className="h-3 w-3 rounded-full shrink-0" style={{ background: color }} aria-hidden="true" />
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
className="h-8 w-8 shrink-0 flex items-center justify-center text-xs font-display font-bold"
|
className="h-8 w-8 rounded-lg shrink-0 flex items-center justify-center text-xs font-extrabold"
|
||||||
style={{ border: `1px solid ${color}`, color: accentText(color) }}
|
style={{ border: `1px solid ${color}`, color: accentText(color) }}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
>
|
>
|
||||||
|
|
@ -114,7 +114,7 @@ function OrgRow({ org, pageLabel, siteLabel }) {
|
||||||
<OrgMark org={org} color={color} />
|
<OrgMark org={org} color={color} />
|
||||||
|
|
||||||
<span className="min-w-0">
|
<span className="min-w-0">
|
||||||
<span className="block font-display font-bold text-lg leading-tight" style={{ color }}>
|
<span className="block font-extrabold text-lg leading-tight" style={{ color }}>
|
||||||
{org.name}
|
{org.name}
|
||||||
</span>
|
</span>
|
||||||
{summary && (
|
{summary && (
|
||||||
|
|
@ -224,7 +224,7 @@ function Block({ title, orgs, pageLabel, siteLabel }) {
|
||||||
return (
|
return (
|
||||||
<section className="mb-10">
|
<section className="mb-10">
|
||||||
{title && (
|
{title && (
|
||||||
<h3 className="text-xl font-bold mb-1" style={{ color: FALLBACK_COLOR }}>
|
<h3 className="text-xl font-extrabold mb-1" style={{ color: FALLBACK_COLOR }}>
|
||||||
{title}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -413,7 +413,7 @@ export default function QrCodeMaker() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{warning && (
|
{warning && (
|
||||||
<p role="status" className="mt-2 bg-danger-tint px-3 py-2 text-sm text-danger">
|
<p role="status" className="mt-2 rounded-lg bg-danger-tint px-3 py-2 text-sm text-danger">
|
||||||
{warning}
|
{warning}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
@ -423,13 +423,13 @@ export default function QrCodeMaker() {
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm font-medium text-body">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">
|
<div className="mt-2 flex flex-wrap items-center gap-3">
|
||||||
<code className="break-all bg-surface px-3 py-2 text-sm text-body ring-1 ring-muted/20">
|
<code className="break-all rounded-lg bg-surface px-3 py-2 text-sm text-body ring-1 ring-muted/20">
|
||||||
{url}
|
{url}
|
||||||
</code>
|
</code>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={copy}
|
onClick={copy}
|
||||||
className="btn border px-4 py-2 text-sm transition-colors hover:bg-brand/10"
|
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-brand/10"
|
||||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||||
>
|
>
|
||||||
{copied ? 'Copied' : 'Copy link'}
|
{copied ? 'Copied' : 'Copy link'}
|
||||||
|
|
@ -442,7 +442,7 @@ export default function QrCodeMaker() {
|
||||||
<div className="flex flex-col items-center gap-5">
|
<div className="flex flex-col items-center gap-5">
|
||||||
{url ? (
|
{url ? (
|
||||||
<>
|
<>
|
||||||
<div className="w-full max-w-sm bg-white p-6 shadow-lg ring-1 ring-muted/10">
|
<div className="w-full max-w-sm rounded-3xl bg-white p-6 shadow-lg ring-1 ring-muted/10">
|
||||||
<QrCode
|
<QrCode
|
||||||
ref={svgRef}
|
ref={svgRef}
|
||||||
value={url}
|
value={url}
|
||||||
|
|
@ -467,7 +467,7 @@ export default function QrCodeMaker() {
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div className="aspect-square w-full max-w-sm bg-surface/60 ring-1 ring-muted/10" />
|
<div className="aspect-square w-full max-w-sm rounded-3xl bg-surface/60 ring-1 ring-muted/10" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -479,7 +479,7 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className="btn bg-action px-6 py-3 text-white transition-colors hover:bg-action-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/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}
|
{children}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -487,7 +487,7 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
|
||||||
}
|
}
|
||||||
|
|
||||||
const inputClass =
|
const inputClass =
|
||||||
'w-full border border-muted/50 bg-surface px-4 py-3 text-body ' +
|
'w-full rounded-xl border border-muted/50 bg-surface px-4 py-3 text-body ' +
|
||||||
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
|
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
|
||||||
|
|
||||||
/* A color well with its hex beside it, both editable. */
|
/* A color well with its hex beside it, both editable. */
|
||||||
|
|
@ -515,7 +515,7 @@ function ColorInput({
|
||||||
type="color"
|
type="color"
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(e) => onChange(e.target.value)}
|
onChange={(e) => onChange(e.target.value)}
|
||||||
className="h-9 w-11 cursor-pointer border border-muted/25 bg-white"
|
className="h-9 w-11 cursor-pointer rounded border border-muted/25 bg-white"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -525,7 +525,7 @@ function ColorInput({
|
||||||
setText(e.target.value)
|
setText(e.target.value)
|
||||||
if (/^#[0-9a-f]{6}$/i.test(e.target.value)) onChange(e.target.value.toLowerCase())
|
if (/^#[0-9a-f]{6}$/i.test(e.target.value)) onChange(e.target.value.toLowerCase())
|
||||||
}}
|
}}
|
||||||
className="w-24 border border-muted/50 bg-surface px-2 py-1.5 font-mono text-sm text-body outline-none focus:border-brand"
|
className="w-24 rounded-lg border border-muted/50 bg-surface px-2 py-1.5 font-mono text-sm text-body outline-none focus:border-brand"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -533,7 +533,7 @@ function ColorInput({
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectClass =
|
const selectClass =
|
||||||
'w-full appearance-none border border-muted/50 bg-surface px-4 py-3 pr-10 text-body ' +
|
'w-full appearance-none rounded-xl border border-muted/50 bg-surface px-4 py-3 pr-10 text-body ' +
|
||||||
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
|
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
|
||||||
|
|
||||||
function Select({
|
function Select({
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ export default function RequestForm() {
|
||||||
|
|
||||||
if (status === "sent") {
|
if (status === "sent") {
|
||||||
return (
|
return (
|
||||||
<div aria-live="polite" className="border border-brand/20 bg-surface p-8 sm:p-10">
|
<div aria-live="polite" className="rounded-2xl border border-brand/20 bg-surface p-8 sm:p-10">
|
||||||
<h3 className="text-2xl font-bold" style={{ color: accentText(BRAND) }}>
|
<h3 className="text-2xl font-bold" style={{ color: accentText(BRAND) }}>
|
||||||
Thanks, we've got it
|
Thanks, we've got it
|
||||||
</h3>
|
</h3>
|
||||||
|
|
@ -146,7 +146,7 @@ export default function RequestForm() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={reset}
|
onClick={reset}
|
||||||
className="mt-6 btn border border-brand px-5 py-2.5 text-link transition-colors hover:bg-tint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/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"
|
||||||
>
|
>
|
||||||
Send another request
|
Send another request
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -155,7 +155,7 @@ export default function RequestForm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form onSubmit={handleSubmit} noValidate className="border border-brand/20 bg-surface p-6 sm:p-8">
|
<form onSubmit={handleSubmit} noValidate className="rounded-2xl border border-brand/20 bg-surface p-6 sm:p-8">
|
||||||
<TilePicker
|
<TilePicker
|
||||||
legend="What is this about?"
|
legend="What is this about?"
|
||||||
blurb="Pick the closest fit."
|
blurb="Pick the closest fit."
|
||||||
|
|
@ -182,7 +182,7 @@ export default function RequestForm() {
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
className={
|
className={
|
||||||
"inline-block btn border px-5 py-2 text-sm transition-colors " +
|
"inline-block rounded-full border px-5 py-2 text-sm font-semibold transition-colors " +
|
||||||
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand/40 " +
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand/40 " +
|
||||||
(action === a ? "border-brand bg-tint text-link" : "border-muted/30 text-body hover:border-brand/50")
|
(action === a ? "border-brand bg-tint text-link" : "border-muted/30 text-body hover:border-brand/50")
|
||||||
}
|
}
|
||||||
|
|
@ -309,7 +309,7 @@ export default function RequestForm() {
|
||||||
onChange={(e) => setFiles(Array.from(e.target.files ?? []))}
|
onChange={(e) => setFiles(Array.from(e.target.files ?? []))}
|
||||||
aria-invalid={Boolean(fileError || fieldErrors.files)}
|
aria-invalid={Boolean(fileError || fieldErrors.files)}
|
||||||
aria-describedby={fileError || fieldErrors.files ? "request-files-error" : undefined}
|
aria-describedby={fileError || fieldErrors.files ? "request-files-error" : undefined}
|
||||||
className="mt-3 block w-full text-sm text-body file:mr-4 file:border-0 file:bg-tint file:px-4 file:py-2 file:font-semibold file:text-link hover:file:bg-tint-soft"
|
className="mt-3 block w-full text-sm text-body file:mr-4 file:rounded-full file:border-0 file:bg-tint file:px-4 file:py-2 file:font-semibold file:text-link hover:file:bg-tint-soft"
|
||||||
/>
|
/>
|
||||||
<FieldError id="request-files-error">{fileError ?? fieldErrors.files}</FieldError>
|
<FieldError id="request-files-error">{fileError ?? fieldErrors.files}</FieldError>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -317,8 +317,8 @@ export default function RequestForm() {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="notice mt-8 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">
|
||||||
<h3 className="text-base font-bold text-body">How we reach you</h3>
|
<h3 className="text-base font-semibold text-body">How we reach you</h3>
|
||||||
<p className="mt-1 max-w-prose text-sm" style={{ color: MUTED }}>
|
<p className="mt-1 max-w-prose text-sm" style={{ color: MUTED }}>
|
||||||
We use these only to follow up on this request, and we won't add you to any list.
|
We use these only to follow up on this request, and we won't add you to any list.
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -370,7 +370,7 @@ export default function RequestForm() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{formError && (
|
{formError && (
|
||||||
<p role="alert" className="mt-8 border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger">
|
<p role="alert" className="mt-8 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger">
|
||||||
{formError}
|
{formError}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
@ -379,7 +379,7 @@ export default function RequestForm() {
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={!ready || sending}
|
disabled={!ready || sending}
|
||||||
className="btn bg-action px-7 py-3 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"
|
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 ? (files.length ? "Uploading…" : "Sending…") : "Send request"}
|
{sending ? (files.length ? "Uploading…" : "Sending…") : "Send request"}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { CaretDown, CaretUp, Leaf } from '@phosphor-icons/react'
|
import { CaretDown, CaretUp } from '@phosphor-icons/react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import type { GroupedYear, SortDirection } from '../../../lib/timeline.ts'
|
import type { GroupedYear, SortDirection } from '../../../lib/timeline.ts'
|
||||||
import TimelineYear from './TimelineYear.tsx'
|
import TimelineYear from './TimelineYear.tsx'
|
||||||
|
|
@ -42,9 +42,7 @@ export default function TimelineUpcoming({
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
onClick={() => setOpen((v) => !v)}
|
onClick={() => setOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
<span className="site-tl__upcomingLeaf" aria-hidden="true">
|
<span className="site-tl__upcomingDot" aria-hidden="true" />
|
||||||
<Leaf weight="bold" />
|
|
||||||
</span>
|
|
||||||
<span className="site-tl__upcomingLabel">
|
<span className="site-tl__upcomingLabel">
|
||||||
{open
|
{open
|
||||||
? 'Hide what’s scheduled'
|
? 'Hide what’s scheduled'
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,10 @@
|
||||||
import { Leaf } from '@phosphor-icons/react'
|
|
||||||
import type { CSSProperties } from 'react'
|
import type { CSSProperties } from 'react'
|
||||||
import type { GroupedYear } from '../../../lib/timeline.ts'
|
import type { GroupedYear } from '../../../lib/timeline.ts'
|
||||||
import { leafColor } from '../../../lib/color.ts'
|
|
||||||
import TimelineEntry from './TimelineEntry.tsx'
|
import TimelineEntry from './TimelineEntry.tsx'
|
||||||
|
|
||||||
/** Each year is a leaf on the rail, its color turning from green to
|
/** Dot diameter scales with volume, so the rail reads as a density chart. */
|
||||||
* autumn as the years go back (leafColor), its size growing with
|
function dotSize(count: number): string {
|
||||||
* the year's entries so the rail still reads as a density chart.
|
return `${(7 + Math.min(count, 14) * 0.55).toFixed(2)}px`
|
||||||
* Filled, not the icon set's usual bold outline, so the color
|
|
||||||
* carries. */
|
|
||||||
function leafSize(count: number): string {
|
|
||||||
return `${(14 + Math.min(count, 14) * 0.9).toFixed(2)}px`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
@ -42,12 +36,10 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
|
||||||
onClick={() => onToggle(year.year)}
|
onClick={() => onToggle(year.year)}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="site-tl__leaf"
|
className="site-tl__dot"
|
||||||
style={{ '--tl-leaf': leafSize(year.count), color: leafColor(year.year) } as CSSProperties}
|
style={{ '--tl-dot': dotSize(year.count) } as CSSProperties}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
>
|
/>
|
||||||
<Leaf weight="fill" />
|
|
||||||
</span>
|
|
||||||
<span className="site-tl__yearLabel">{year.year}</span>
|
<span className="site-tl__yearLabel">{year.year}</span>
|
||||||
<span className="site-tl__yearCount">
|
<span className="site-tl__yearCount">
|
||||||
{empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
|
{empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
--tl-faint: color-mix(in srgb, var(--color-muted) 70%, transparent);
|
--tl-faint: color-mix(in srgb, var(--color-muted) 70%, transparent);
|
||||||
--tl-rail: color-mix(in srgb, var(--color-brand) 20%, transparent);
|
--tl-rail: color-mix(in srgb, var(--color-brand) 20%, transparent);
|
||||||
--tl-surface: var(--color-surface);
|
--tl-surface: var(--color-surface);
|
||||||
--tl-accent: var(--color-link);
|
--tl-accent: #0f7183;
|
||||||
--tl-accent-soft: color-mix(in srgb, var(--tl-accent) 12%, transparent);
|
--tl-accent-soft: color-mix(in srgb, var(--tl-accent) 12%, transparent);
|
||||||
|
|
||||||
--tl-gutter: 5rem;
|
--tl-gutter: 5rem;
|
||||||
|
|
@ -52,8 +52,8 @@
|
||||||
|
|
||||||
.site-tl__decade--pre::before {
|
.site-tl__decade--pre::before {
|
||||||
background: none;
|
background: none;
|
||||||
border-left: var(--tl-rail-w) solid var(--tl-rail);
|
border-left: var(--tl-rail-w) dashed var(--tl-rail);
|
||||||
opacity: 0.35;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Last decade fades out rather than stopping dead. */
|
/* Last decade fades out rather than stopping dead. */
|
||||||
|
|
@ -132,8 +132,8 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.375rem 0.75rem;
|
padding: 0.375rem 0.75rem;
|
||||||
background: var(--color-tint-soft);
|
border: 1px dashed var(--tl-rail);
|
||||||
border-left: 3px solid var(--tl-rail);
|
border-radius: 999px;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.8125rem;
|
||||||
color: var(--tl-faint);
|
color: var(--tl-faint);
|
||||||
}
|
}
|
||||||
|
|
@ -158,6 +158,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font: inherit;
|
font: inherit;
|
||||||
|
border-radius: 0.375rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__yearBtn:hover .site-tl__yearLabel {
|
.site-tl__yearBtn:hover .site-tl__yearLabel {
|
||||||
|
|
@ -169,38 +170,45 @@
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Each year's leaf sits on the rail (TimelineYear.tsx): its color
|
/* Dot sits on the rail; --tl-dot is set inline from the year's item count, so
|
||||||
is the year's, set inline, and --tl-leaf, its size, grows with the
|
scrolling the page gives you the organization's density at a glance. */
|
||||||
year's entries. Tilted either way in turn, like leaves on a stem. */
|
.site-tl__dot {
|
||||||
.site-tl__leaf {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
justify-self: start;
|
justify-self: start;
|
||||||
display: grid;
|
margin-left: calc(var(--tl-rail-x) - (var(--tl-dot, 8px) / 2) + (var(--tl-rail-w) / 2));
|
||||||
place-items: center;
|
width: var(--tl-dot, 8px);
|
||||||
margin-left: calc(var(--tl-rail-x) - (var(--tl-leaf, 16px) / 2) + (var(--tl-rail-w) / 2));
|
height: var(--tl-dot, 8px);
|
||||||
width: var(--tl-leaf, 16px);
|
border-radius: 50%;
|
||||||
height: var(--tl-leaf, 16px);
|
background: var(--tl-rail);
|
||||||
font-size: var(--tl-leaf, 16px);
|
box-shadow: 0 0 0 4px var(--tl-surface);
|
||||||
transform: rotate(-24deg);
|
transition: background-color 140ms ease, transform 140ms ease;
|
||||||
transition: transform 140ms ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__year:nth-child(even) .site-tl__leaf {
|
.site-tl__yearBtn:hover .site-tl__dot {
|
||||||
transform: rotate(24deg) scaleX(-1);
|
background: var(--tl-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__yearBtn:hover .site-tl__leaf,
|
.site-tl__year--featured .site-tl__dot {
|
||||||
.site-tl__year--open .site-tl__leaf {
|
background: var(--tl-accent);
|
||||||
transform: rotate(-24deg) scale(1.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__year:nth-child(even) .site-tl__yearBtn:hover .site-tl__leaf,
|
.site-tl__year--featured .site-tl__dot::after {
|
||||||
.site-tl__year--open:nth-child(even) .site-tl__leaf {
|
content: '';
|
||||||
transform: rotate(24deg) scaleX(-1) scale(1.2);
|
position: absolute;
|
||||||
|
inset: -5px;
|
||||||
|
border: 1.5px solid var(--tl-accent);
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 0.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__year--featured .site-tl__leaf {
|
.site-tl__year--open .site-tl__dot {
|
||||||
font-size: calc(var(--tl-leaf, 16px) * 1.3);
|
background: var(--tl-accent);
|
||||||
|
transform: scale(1.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-tl__decade--pre .site-tl__dot {
|
||||||
|
background: var(--tl-surface);
|
||||||
|
border: 1.5px solid var(--tl-rail);
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__yearLabel {
|
.site-tl__yearLabel {
|
||||||
|
|
@ -285,6 +293,7 @@
|
||||||
grid-template-columns: 2.75rem minmax(0, 1fr);
|
grid-template-columns: 2.75rem minmax(0, 1fr);
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
padding: 0.5rem 0.75rem 0.5rem 0;
|
padding: 0.5rem 0.75rem 0.5rem 0;
|
||||||
|
border-radius: 0.5rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
@ -349,6 +358,7 @@ a.site-tl__entry:hover .site-tl__entryTitle {
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__kind--event {
|
.site-tl__kind--event {
|
||||||
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__kind--award {
|
.site-tl__kind--award {
|
||||||
|
|
@ -375,6 +385,7 @@ a.site-tl__entry:hover .site-tl__entryTitle {
|
||||||
padding: 1rem 1.125rem;
|
padding: 1rem 1.125rem;
|
||||||
border-left: 2px solid var(--tl-accent);
|
border-left: 2px solid var(--tl-accent);
|
||||||
background: var(--tl-accent-soft);
|
background: var(--tl-accent-soft);
|
||||||
|
border-radius: 0 0.5rem 0.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__entry--featured .site-tl__entryTitle {
|
.site-tl__entry--featured .site-tl__entryTitle {
|
||||||
|
|
@ -420,13 +431,10 @@ a.site-tl__entry--featured:hover {
|
||||||
.site-tl__toolbarBtn {
|
.site-tl__toolbarBtn {
|
||||||
padding: 0.375rem 0.75rem;
|
padding: 0.375rem 0.75rem;
|
||||||
border: 1px solid var(--tl-rail);
|
border: 1px solid var(--tl-rail);
|
||||||
border-radius: var(--btn-radius);
|
border-radius: 999px;
|
||||||
corner-shape: squircle;
|
|
||||||
background: none;
|
background: none;
|
||||||
color: var(--tl-muted);
|
color: var(--tl-muted);
|
||||||
font: inherit;
|
font: inherit;
|
||||||
font-family: var(--font-display);
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 0.8125rem;
|
font-size: 0.8125rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 140ms ease, border-color 140ms ease;
|
transition: color 140ms ease, border-color 140ms ease;
|
||||||
|
|
@ -477,8 +485,7 @@ a.site-tl__entry--featured:hover {
|
||||||
top: 1.25rem;
|
top: 1.25rem;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: var(--tl-rail-x);
|
left: var(--tl-rail-x);
|
||||||
border-left: var(--tl-rail-w) solid var(--tl-rail);
|
border-left: var(--tl-rail-w) dashed var(--tl-rail);
|
||||||
opacity: 0.35;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__upcomingBtn {
|
.site-tl__upcomingBtn {
|
||||||
|
|
@ -504,15 +511,17 @@ a.site-tl__entry--featured:hover {
|
||||||
.site-tl__upcomingBtn:focus-visible {
|
.site-tl__upcomingBtn:focus-visible {
|
||||||
outline: 2px solid var(--tl-accent);
|
outline: 2px solid var(--tl-accent);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
|
border-radius: 0.375rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__upcomingLeaf {
|
.site-tl__upcomingDot {
|
||||||
justify-self: start;
|
justify-self: start;
|
||||||
display: grid;
|
margin-left: calc(var(--tl-rail-x) - 4px + (var(--tl-rail-w) / 2));
|
||||||
place-items: center;
|
width: 8px;
|
||||||
margin-left: calc(var(--tl-rail-x) - 7px + (var(--tl-rail-w) / 2));
|
height: 8px;
|
||||||
font-size: 14px;
|
border-radius: 50%;
|
||||||
color: color-mix(in oklch, #00b83d 60%, #00521b);
|
border: 1.5px dashed var(--tl-accent);
|
||||||
|
box-shadow: 0 0 0 4px var(--tl-surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__upcomingLabel {
|
.site-tl__upcomingLabel {
|
||||||
|
|
@ -535,6 +544,11 @@ a.site-tl__entry--featured:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-tl__upcomingList .site-tl__dot {
|
||||||
|
background: var(--tl-surface);
|
||||||
|
border: 1.5px dashed var(--tl-accent);
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes site-tl-rise {
|
@keyframes site-tl-rise {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
@ -551,12 +565,14 @@ a.site-tl__entry--featured:hover {
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.5rem;
|
||||||
vertical-align: -0.1875rem;
|
vertical-align: -0.1875rem;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* An 18px mark: the dark-mode backing (.logo-plate, index.css) with
|
/* An 18px mark: the dark-mode backing (.logo-plate, index.css) with
|
||||||
a hairline of padding, not the usual quarter rem. */
|
a hairline of padding, not the usual quarter rem. */
|
||||||
:root[data-theme] .site-tl__logo.logo-plate {
|
:root[data-theme] .site-tl__logo.logo-plate {
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__entry--featured .site-tl__logo {
|
.site-tl__entry--featured .site-tl__logo {
|
||||||
|
|
@ -580,6 +596,7 @@ a.site-tl__entry--featured:hover {
|
||||||
border-left: 2px solid var(--tl-accent);
|
border-left: 2px solid var(--tl-accent);
|
||||||
background: var(--tl-accent-soft);
|
background: var(--tl-accent-soft);
|
||||||
margin-top: -0.5rem;
|
margin-top: -0.5rem;
|
||||||
|
border-radius: 0 0 0.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-tl__rosterTeam {
|
.site-tl__rosterTeam {
|
||||||
|
|
@ -636,6 +653,7 @@ a.site-tl__entry--featured:hover {
|
||||||
/* --- Kind markers, continued --------------------------------- */
|
/* --- Kind markers, continued --------------------------------- */
|
||||||
|
|
||||||
.site-tl__kind--organization {
|
.site-tl__kind--organization {
|
||||||
|
border-radius: 2px;
|
||||||
background: none;
|
background: none;
|
||||||
box-shadow: inset 0 0 0 1.5px var(--tl-faint);
|
box-shadow: inset 0 0 0 1.5px var(--tl-faint);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ type CalendarBandProps = { id: string; title: string; blurb?: string | null }
|
||||||
|
|
||||||
export default function CalendarBand({ id, title, blurb }: CalendarBandProps) {
|
export default function CalendarBand({ id, title, blurb }: CalendarBandProps) {
|
||||||
return (
|
return (
|
||||||
<section id={id} className="py-24">
|
<section id={id} className="py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||||
<div className="mx-auto mb-10 flex max-w-6xl flex-wrap items-end justify-between gap-4 px-6">
|
<div className="mx-auto mb-10 flex max-w-6xl flex-wrap items-end justify-between gap-4 px-6">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="font-display text-4xl font-bold text-ink md:text-5xl">
|
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ type FeaturedBandProps = {
|
||||||
|
|
||||||
export default function FeaturedBand({ id, title, blurb, cards }: FeaturedBandProps) {
|
export default function FeaturedBand({ id, title, blurb, cards }: FeaturedBandProps) {
|
||||||
return (
|
return (
|
||||||
<section id={id} className="py-24">
|
<section id={id} className="py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||||
<div className="mx-auto max-w-6xl px-6">
|
<div className="mx-auto max-w-6xl px-6">
|
||||||
<h2 className="font-display text-4xl font-bold text-ink md:text-5xl">{title}</h2>
|
<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>}
|
{blurb && <p className="mt-4 max-w-2xl text-lg text-muted">{blurb}</p>}
|
||||||
<div className="mt-12">
|
<div className="mt-12">
|
||||||
<FeaturedCards cards={cards} />
|
<FeaturedCards cards={cards} />
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
Nothing featured, and the section doesn't render at all.
|
Nothing featured, and the section doesn't render at all.
|
||||||
═══════════════════════════════════════════════════════════════ */
|
═══════════════════════════════════════════════════════════════ */
|
||||||
|
|
||||||
import { ArrowRight, CaretRight, CaretLeft, Leaf } from '@phosphor-icons/react';
|
import { ArrowRight, CaretRight, CaretLeft } from '@phosphor-icons/react';
|
||||||
import { useRef, useState, type PointerEvent as ReactPointerEvent } from 'react'
|
import { useRef, useState, type PointerEvent as ReactPointerEvent } from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ import HomeLink from './HomeLink.tsx'
|
||||||
import { useHistory } from '../../../lib/useHistory.ts'
|
import { useHistory } from '../../../lib/useHistory.ts'
|
||||||
import { hrefFor, logoSrc } from '../../../lib/timelineRefs.ts'
|
import { hrefFor, logoSrc } from '../../../lib/timelineRefs.ts'
|
||||||
import { MONTH_LABELS, type TimelineItem } from '../../../lib/timeline.ts'
|
import { MONTH_LABELS, type TimelineItem } from '../../../lib/timeline.ts'
|
||||||
import { accentText, BRAND, leafColor } from '../../../lib/color.ts'
|
import { accentText, BRAND } from '../../../lib/color.ts'
|
||||||
import { scrollBehavior } from '../../../lib/motion.ts';
|
import { scrollBehavior } from '../../../lib/motion.ts';
|
||||||
|
|
||||||
const DRAG_SLOP = 6
|
const DRAG_SLOP = 6
|
||||||
|
|
@ -76,10 +76,10 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={id} className="overflow-hidden py-24">
|
<section id={id} className="overflow-hidden py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||||
<div className="mx-auto flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
<div className="mx-auto flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="font-display text-4xl font-bold text-ink md:text-5xl">
|
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||||
|
|
@ -96,7 +96,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => step(direction as number)}
|
onClick={() => step(direction as number)}
|
||||||
aria-label={label as string}
|
aria-label={label as string}
|
||||||
className="flex h-12 w-12 items-center justify-center btn border text-2xl transition-colors hover:bg-surface"
|
className="flex h-12 w-12 items-center justify-center rounded-full border text-2xl transition-colors hover:bg-surface"
|
||||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||||
>
|
>
|
||||||
{glyph}
|
{glyph}
|
||||||
|
|
@ -116,7 +116,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
||||||
) : loading ? (
|
) : loading ? (
|
||||||
<div className="mx-auto mt-12 flex max-w-6xl gap-6 px-6" aria-hidden="true">
|
<div className="mx-auto mt-12 flex max-w-6xl gap-6 px-6" aria-hidden="true">
|
||||||
{[0, 1, 2].map((i) => (
|
{[0, 1, 2].map((i) => (
|
||||||
<div key={i} className="h-72 w-80 shrink-0 animate-pulse bg-tint" />
|
<div key={i} className="h-72 w-80 shrink-0 animate-pulse rounded-3xl bg-tint" />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -155,10 +155,10 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
||||||
<Link
|
<Link
|
||||||
to="/history"
|
to="/history"
|
||||||
draggable={false}
|
draggable={false}
|
||||||
className="flex flex-1 flex-col justify-center p-8 text-white transition-transform duration-300 hover:-translate-y-1"
|
className="flex flex-1 flex-col justify-center rounded-3xl p-8 text-white transition-transform duration-300 hover:-translate-y-1"
|
||||||
style={{ background: BRAND }}
|
style={{ background: BRAND }}
|
||||||
>
|
>
|
||||||
<span className="font-display text-2xl font-bold">The whole story</span>
|
<span className="font-display text-2xl font-extrabold">The whole story</span>
|
||||||
<span className="mt-2 text-white/75">Every year, every milestone.</span>
|
<span className="mt-2 text-white/75">Every year, every milestone.</span>
|
||||||
<span className="mt-6 font-semibold">See the full history <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /></span>
|
<span className="mt-6 font-semibold">See the full history <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /></span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -216,23 +216,20 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
||||||
)
|
)
|
||||||
|
|
||||||
const card =
|
const card =
|
||||||
'flex flex-1 flex-col border border-brand/15 bg-surface p-7 shadow-sm'
|
'flex flex-1 flex-col rounded-3xl border border-brand/15 bg-surface p-7 shadow-sm'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full flex-col">
|
<div className="flex h-full flex-col">
|
||||||
{/* The line, its leaf (colored by the year, as on the History
|
{/* The line, its dot, and the year where it changes. */}
|
||||||
page), and the year where it changes. */}
|
|
||||||
<div className="relative mb-4 h-8">
|
<div className="relative mb-4 h-8">
|
||||||
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-brand/30" />
|
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-brand/30" />
|
||||||
<Leaf
|
<span
|
||||||
weight="fill"
|
className="absolute left-0 top-1/2 h-3 w-3 -translate-y-1/2 rounded-full border-2 bg-surface"
|
||||||
aria-hidden="true"
|
style={{ borderColor: BRAND }}
|
||||||
className="absolute -left-1 top-1/2 h-5 w-5 -translate-y-1/2 -rotate-12"
|
|
||||||
style={{ color: leafColor(Number(year(item))) }}
|
|
||||||
/>
|
/>
|
||||||
{showYear && (
|
{showYear && (
|
||||||
<span
|
<span
|
||||||
className="absolute left-6 top-1/2 -translate-y-1/2 px-3 py-0.5 font-display text-sm font-bold text-white"
|
className="absolute left-5 top-1/2 -translate-y-1/2 rounded-full px-3 py-0.5 font-display text-sm font-bold text-white"
|
||||||
style={{ background: BRAND }}
|
style={{ background: BRAND }}
|
||||||
>
|
>
|
||||||
{year(item)}
|
{year(item)}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
Backdrop, what fills the background:
|
Backdrop, what fills the background:
|
||||||
|
|
||||||
brand a flat palette color with the dove, nothing moving
|
brand drifting color and slow concentric rings (many
|
||||||
|
circles, one center) with the dove at that center
|
||||||
photos the hero photos, crossfading with a slow zoom, a
|
photos the hero photos, crossfading with a slow zoom, a
|
||||||
progress bar per photo and a pause button (anything
|
progress bar per photo and a pause button (anything
|
||||||
that moves on its own for more than five seconds
|
that moves on its own for more than five seconds
|
||||||
|
|
@ -49,7 +50,7 @@ import { eventHref } from '../../../lib/hrefs.ts'
|
||||||
import { seriesLabel } from '../../../lib/eventSeries.ts'
|
import { seriesLabel } from '../../../lib/eventSeries.ts'
|
||||||
import type { Hero, HeroBackdrop, HeroEvent, HeroFeature, HeroSlide } from '../../../lib/useFrontPage.ts'
|
import type { Hero, HeroBackdrop, HeroEvent, HeroFeature, HeroSlide } from '../../../lib/useFrontPage.ts'
|
||||||
|
|
||||||
const DEEP = '#001011'
|
const DEEP = '#04262e'
|
||||||
|
|
||||||
export default function HeroStage({ hero }: { hero: Hero | null }) {
|
export default function HeroStage({ hero }: { hero: Hero | null }) {
|
||||||
const slides = (hero?.slides ?? []).filter((slide) => mediaUrl(slide.media))
|
const slides = (hero?.slides ?? []).filter((slide) => mediaUrl(slide.media))
|
||||||
|
|
@ -119,8 +120,8 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
||||||
return (
|
return (
|
||||||
<div className="text-white">
|
<div className="text-white">
|
||||||
{live ? (
|
{live ? (
|
||||||
<p className="mb-6 inline-flex items-center gap-3 bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
|
<p className="mb-6 inline-flex items-center gap-3 rounded-full bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
|
||||||
<span className="h-2.5 w-2.5 rounded-full bg-[#ff4d4d]" aria-hidden="true" />
|
<span className="hp-live-dot h-2.5 w-2.5 rounded-full bg-[#ff4d4d]" aria-hidden="true" />
|
||||||
Live now
|
Live now
|
||||||
{hero.livestream?.title && (
|
{hero.livestream?.title && (
|
||||||
<span className="normal-case tracking-normal text-white/75">
|
<span className="normal-case tracking-normal text-white/75">
|
||||||
|
|
@ -129,13 +130,13 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
) : feature === 'event' ? (
|
) : feature === 'event' ? (
|
||||||
<p className="mb-6 inline-flex items-center gap-3 bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
|
<p className="mb-6 inline-flex items-center gap-3 rounded-full bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
|
||||||
<Star className="text-[#c2ffd6]" weight="fill" aria-hidden="true" />
|
<Star className="text-[#9fe7d0]" weight="fill" aria-hidden="true" />
|
||||||
Featured event
|
Featured event
|
||||||
</p>
|
</p>
|
||||||
) : feature === 'video' ? (
|
) : feature === 'video' ? (
|
||||||
<p className="mb-6 inline-flex items-center gap-3 bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
|
<p className="mb-6 inline-flex items-center gap-3 rounded-full bg-white/10 px-4 py-1.5 text-sm font-semibold uppercase tracking-[0.2em] backdrop-blur">
|
||||||
<Play className="text-[#c2ffd6]" weight="fill" aria-hidden="true" />
|
<Play className="text-[#9fe7d0]" weight="fill" aria-hidden="true" />
|
||||||
Featured video
|
Featured video
|
||||||
{hero.video?.title && (
|
{hero.video?.title && (
|
||||||
<span className="normal-case tracking-normal text-white/75">
|
<span className="normal-case tracking-normal text-white/75">
|
||||||
|
|
@ -145,7 +146,7 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
||||||
</p>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
hero.eyebrow && (
|
hero.eyebrow && (
|
||||||
<p className="mb-6 inline-block border border-white/20 px-4 py-1.5 text-xs font-semibold uppercase tracking-[0.25em] text-[#c2ffd6]">
|
<p className="mb-6 inline-block rounded-full border border-white/20 px-4 py-1.5 text-xs font-semibold uppercase tracking-[0.25em] text-[#9fe7d0]">
|
||||||
{hero.eyebrow}
|
{hero.eyebrow}
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
|
|
@ -156,7 +157,7 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
||||||
by over a second. Sized so an admin's headline stays within
|
by over a second. Sized so an admin's headline stays within
|
||||||
about two lines. */}
|
about two lines. */}
|
||||||
<h1
|
<h1
|
||||||
className={`hp-rise font-display font-bold leading-[1.02] tracking-tight ${
|
className={`hp-rise font-display font-extrabold leading-[1.02] tracking-tight ${
|
||||||
beside ? 'text-4xl md:text-5xl' : 'text-5xl md:text-6xl lg:text-7xl'
|
beside ? 'text-4xl md:text-5xl' : 'text-5xl md:text-6xl lg:text-7xl'
|
||||||
}`}
|
}`}
|
||||||
style={{ animationDelay: '60ms' }}
|
style={{ animationDelay: '60ms' }}
|
||||||
|
|
@ -174,97 +175,90 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(hero.primary || hero.secondary) && (
|
{(hero.primary || hero.secondary) && (
|
||||||
<div className="hp-rise mt-10" style={{ animationDelay: '300ms' }}>
|
<div
|
||||||
<HeroActions primary={hero.primary} secondary={hero.secondary} />
|
className="hp-rise mt-10 flex flex-wrap gap-4"
|
||||||
|
style={{ animationDelay: '300ms' }}
|
||||||
|
>
|
||||||
|
{hero.primary && (
|
||||||
|
<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: '#9fe7d0' }}
|
||||||
|
>
|
||||||
|
{hero.primary.label}
|
||||||
|
</HomeLink>
|
||||||
|
)}
|
||||||
|
{hero.secondary && (
|
||||||
|
<HomeLink
|
||||||
|
url={hero.secondary.url}
|
||||||
|
className="rounded-full border border-white/35 px-8 py-4 text-lg font-semibold text-white transition-colors duration-300 hover:bg-white/10"
|
||||||
|
>
|
||||||
|
{hero.secondary.label} <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||||
|
</HomeLink>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── The hero's buttons ──────────────────────────────────────────
|
|
||||||
Both set: one cell in two halves, the primary filled on the left
|
|
||||||
and the secondary clear on the right, split by a slash (the
|
|
||||||
filled half's slanted edge, which the clear half tucks under).
|
|
||||||
One set: that one alone, in its own style. */
|
|
||||||
|
|
||||||
const SLANT = '1.75rem'
|
|
||||||
const PRIMARY_FILL = '#c2ffd6'
|
|
||||||
const PRIMARY_TEXT = '#001011'
|
|
||||||
const HALF = 'relative flex items-center gap-2 px-8 py-4 text-lg transition-colors duration-200 focus-visible:outline-offset-[-6px]'
|
|
||||||
|
|
||||||
type HeroLink = Hero['primary']
|
|
||||||
|
|
||||||
function HeroActions({ primary, secondary }: { primary: HeroLink; secondary: HeroLink }) {
|
|
||||||
const arrow = <ArrowRight size="1em" weight="bold" className="inline" aria-hidden="true" />
|
|
||||||
|
|
||||||
if (primary && secondary) {
|
|
||||||
return (
|
|
||||||
<div className="btn inline-flex max-w-full overflow-hidden border border-white/35">
|
|
||||||
<HomeLink
|
|
||||||
url={primary.url}
|
|
||||||
className={`${HALF} z-10 hover:brightness-95`}
|
|
||||||
style={{
|
|
||||||
background: PRIMARY_FILL,
|
|
||||||
color: PRIMARY_TEXT,
|
|
||||||
paddingRight: `calc(2rem + ${SLANT})`,
|
|
||||||
clipPath: `polygon(0 0, 100% 0, calc(100% - ${SLANT}) 100%, 0 100%)`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{primary.label}
|
|
||||||
</HomeLink>
|
|
||||||
<HomeLink
|
|
||||||
url={secondary.url}
|
|
||||||
className={`${HALF} text-white hover:bg-white/10`}
|
|
||||||
style={{ marginLeft: `-${SLANT}`, paddingLeft: `calc(2rem + ${SLANT})` }}
|
|
||||||
>
|
|
||||||
{secondary.label} {arrow}
|
|
||||||
</HomeLink>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (primary) {
|
|
||||||
return (
|
|
||||||
<HomeLink
|
|
||||||
url={primary.url}
|
|
||||||
className="btn inline-flex px-8 py-4 text-lg transition-transform duration-200 hover:-translate-y-0.5"
|
|
||||||
style={{ background: PRIMARY_FILL, color: PRIMARY_TEXT }}
|
|
||||||
>
|
|
||||||
{primary.label}
|
|
||||||
</HomeLink>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<HomeLink
|
|
||||||
url={secondary!.url}
|
|
||||||
className="btn inline-flex items-center gap-2 border border-white/35 px-8 py-4 text-lg text-white transition-colors duration-200 hover:bg-white/10"
|
|
||||||
>
|
|
||||||
{secondary!.label} {arrow}
|
|
||||||
</HomeLink>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Brand backdrop ──────────────────────────────────────────── */
|
/* ── Brand backdrop ──────────────────────────────────────────── */
|
||||||
|
|
||||||
const BRAND_FILL = '#004552'
|
|
||||||
|
|
||||||
function BrandBackdrop() {
|
function BrandBackdrop() {
|
||||||
return (
|
return (
|
||||||
<div className="absolute inset-0 -z-10" style={{ background: BRAND_FILL }} aria-hidden="true">
|
<div className="absolute inset-0 -z-10" aria-hidden="true">
|
||||||
|
<div className="hp-aurora hp-aurora--a" style={blob('#138ba0', '48vw', '-10%', '-10%')} />
|
||||||
|
<div className="hp-aurora hp-aurora--b" style={blob('#9fe7d0', '38vw', '45%', '20%')} />
|
||||||
|
<div className="hp-aurora hp-aurora--c" style={blob('#aac992', '30vw', '70%', '-5%')} />
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
className="absolute -right-[20vw] top-1/2 h-[120vw] w-[120vw] -translate-y-1/2 md:-right-[10vw] md:h-[80vw] md:w-[80vw]"
|
className="absolute -right-[20vw] top-1/2 h-[120vw] w-[120vw] -translate-y-1/2 md:-right-[10vw] md:h-[80vw] md:w-[80vw]"
|
||||||
viewBox="0 0 400 400"
|
viewBox="0 0 400 400"
|
||||||
>
|
>
|
||||||
<g style={{ color: '#ffffff' }} opacity="0.14">
|
<defs>
|
||||||
<DoveMark x="120" y="148" width="160" height="106.75" />
|
<radialGradient id="hp-dove-glow">
|
||||||
|
<stop offset="0%" stopColor="#9fe7d0" stopOpacity="0.35" />
|
||||||
|
<stop offset="100%" stopColor="#9fe7d0" stopOpacity="0" />
|
||||||
|
</radialGradient>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
{/* The rings are faint; the dove at their center is not, so
|
||||||
|
the opacity sits on the rings rather than the whole SVG. */}
|
||||||
|
<g opacity="0.16">
|
||||||
|
<g className="hp-rings" fill="none" stroke="#ffffff">
|
||||||
|
{[40, 70, 100, 130, 160, 190].map((r, i) => (
|
||||||
|
<circle key={r} cx="200" cy="200" r={r} strokeWidth={i % 2 ? 0.6 : 1.2} strokeDasharray={i % 2 ? '2 6' : undefined} />
|
||||||
|
))}
|
||||||
|
<circle cx="390" cy="200" r="4" fill="#9fe7d0" stroke="none" />
|
||||||
|
<circle cx="200" cy="40" r="3" fill="#5ce7ff" stroke="none" />
|
||||||
|
</g>
|
||||||
|
<g className="hp-rings hp-rings--reverse" fill="none" stroke="#9fe7d0">
|
||||||
|
<circle cx="200" cy="200" r="115" strokeWidth="0.8" strokeDasharray="1 10" />
|
||||||
|
<circle cx="85" cy="200" r="3.5" fill="#ffffff" stroke="none" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
{/* Outside the rotating groups, so it stays upright while the
|
||||||
|
rings turn around it. 64 × 42.7 at the center fits inside
|
||||||
|
the innermost ring (r 40) with room to float. */}
|
||||||
|
<circle cx="200" cy="200" r="46" fill="url(#hp-dove-glow)" />
|
||||||
|
<g className="hp-dove" style={{ color: '#ffffff' }} opacity="0.9">
|
||||||
|
<DoveMark x="168" y="178.65" width="64" height="42.7" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className="absolute inset-x-0 bottom-0 h-40"
|
||||||
|
style={{ background: `linear-gradient(to bottom, transparent, ${DEEP})` }}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function blob(color: string, size: string, left: string, top: string): CSSProperties {
|
||||||
|
return { background: color, width: size, height: size, left, top }
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Photo backdrop ──────────────────────────────────────────── */
|
/* ── Photo backdrop ──────────────────────────────────────────── */
|
||||||
|
|
||||||
function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: number }) {
|
function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: number }) {
|
||||||
|
|
@ -304,14 +298,14 @@ function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: numb
|
||||||
className="absolute inset-0"
|
className="absolute inset-0"
|
||||||
style={{
|
style={{
|
||||||
background:
|
background:
|
||||||
'linear-gradient(100deg, rgba(0,16,17,0.92) 0%, rgba(0,16,17,0.65) 45%, rgba(0,16,17,0.15) 100%)',
|
'linear-gradient(100deg, rgba(4,38,46,0.92) 0%, rgba(4,38,46,0.65) 45%, rgba(4,38,46,0.15) 100%)',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="absolute inset-x-0 bottom-6 z-10 mx-auto flex max-w-7xl flex-wrap items-end gap-4 px-6">
|
<div className="absolute inset-x-0 bottom-6 z-10 mx-auto flex max-w-7xl flex-wrap items-end gap-4 px-6">
|
||||||
{current?.caption && (
|
{current?.caption && (
|
||||||
<p className="max-w-md bg-black/35 px-4 py-2 text-sm text-white/90 backdrop-blur">
|
<p className="max-w-md rounded-xl bg-black/35 px-4 py-2 text-sm text-white/90 backdrop-blur">
|
||||||
{current.link_url ? (
|
{current.link_url ? (
|
||||||
<HomeLink url={current.link_url} className="hover:underline">
|
<HomeLink url={current.link_url} className="hover:underline">
|
||||||
{current.caption} <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
{current.caption} <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||||
|
|
@ -332,7 +326,7 @@ function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: numb
|
||||||
onClick={() => setIndex(i)}
|
onClick={() => setIndex(i)}
|
||||||
aria-label={`Show photo ${i + 1} of ${slides.length}`}
|
aria-label={`Show photo ${i + 1} of ${slides.length}`}
|
||||||
aria-current={i === index}
|
aria-current={i === index}
|
||||||
className="h-1.5 w-10 overflow-hidden bg-white/25"
|
className="h-1.5 w-10 overflow-hidden rounded-full bg-white/25"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
// Re-keyed per index so the fill restarts on every change.
|
// Re-keyed per index so the fill restarts on every change.
|
||||||
|
|
@ -348,7 +342,7 @@ function PhotoBackdrop({ slides, seconds }: { slides: HeroSlide[]; seconds: numb
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setPaused((p) => !p)}
|
onClick={() => setPaused((p) => !p)}
|
||||||
aria-label={paused ? 'Play slideshow' : 'Pause slideshow'}
|
aria-label={paused ? 'Play slideshow' : 'Pause slideshow'}
|
||||||
className="flex h-8 w-8 items-center justify-center btn border border-white/40 text-xs text-white hover:bg-white/10"
|
className="flex h-8 w-8 items-center justify-center rounded-full border border-white/40 text-xs text-white hover:bg-white/10"
|
||||||
>
|
>
|
||||||
{paused ? <Play size={14} weight="fill" aria-hidden="true" /> : <Pause size={14} weight="fill" aria-hidden="true" />}
|
{paused ? <Play size={14} weight="fill" aria-hidden="true" /> : <Pause size={14} weight="fill" aria-hidden="true" />}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -367,8 +361,8 @@ function LiveFrame({ src, url, title }: { src: string | null; url: string; title
|
||||||
const [watching, setWatching] = useState(false)
|
const [watching, setWatching] = useState(false)
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="relative overflow-hidden border border-white/15 bg-black shadow-2xl"
|
className="relative overflow-hidden rounded-3xl border border-white/15 bg-black shadow-2xl"
|
||||||
style={{ boxShadow: '0 24px 48px -24px rgba(0, 16, 17, 0.6)' }}
|
style={{ boxShadow: '0 24px 48px -24px rgba(4, 38, 46, 0.6)' }}
|
||||||
>
|
>
|
||||||
<div className="aspect-video w-full">
|
<div className="aspect-video w-full">
|
||||||
{src && watching ? (
|
{src && watching ? (
|
||||||
|
|
@ -381,21 +375,21 @@ function LiveFrame({ src, url, title }: { src: string | null; url: string; title
|
||||||
/>
|
/>
|
||||||
) : src ? (
|
) : src ? (
|
||||||
<div className="flex h-full w-full flex-col items-center justify-center gap-4 text-white">
|
<div className="flex h-full w-full flex-col items-center justify-center gap-4 text-white">
|
||||||
<span className="h-4 w-4 rounded-full bg-[#ff4d4d]" aria-hidden="true" />
|
<span className="hp-live-dot h-4 w-4 rounded-full bg-[#ff4d4d]" aria-hidden="true" />
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setWatching(true)}
|
onClick={() => setWatching(true)}
|
||||||
className="btn bg-white px-6 py-3 text-[#001011] hover:scale-105"
|
className="rounded-full bg-white px-6 py-3 font-semibold text-[#04262e] hover:scale-105"
|
||||||
>
|
>
|
||||||
Watch live
|
Watch live
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex h-full w-full flex-col items-center justify-center gap-4 text-white">
|
<div className="flex h-full w-full flex-col items-center justify-center gap-4 text-white">
|
||||||
<span className="h-4 w-4 rounded-full bg-[#ff4d4d]" aria-hidden="true" />
|
<span className="hp-live-dot h-4 w-4 rounded-full bg-[#ff4d4d]" aria-hidden="true" />
|
||||||
<HomeLink
|
<HomeLink
|
||||||
url={url}
|
url={url}
|
||||||
className="btn bg-white px-6 py-3 text-[#001011] hover:scale-105"
|
className="rounded-full bg-white px-6 py-3 font-semibold text-[#04262e] hover:scale-105"
|
||||||
>
|
>
|
||||||
Watch live
|
Watch live
|
||||||
</HomeLink>
|
</HomeLink>
|
||||||
|
|
@ -424,8 +418,8 @@ function VideoFrame({
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="relative overflow-hidden border border-white/15 bg-black shadow-2xl"
|
className="relative overflow-hidden rounded-3xl border border-white/15 bg-black shadow-2xl"
|
||||||
style={{ boxShadow: '0 24px 48px -24px rgba(0, 16, 17, 0.6)' }}
|
style={{ boxShadow: '0 24px 48px -24px rgba(4, 38, 46, 0.6)' }}
|
||||||
>
|
>
|
||||||
<div className="aspect-video w-full">
|
<div className="aspect-video w-full">
|
||||||
{source?.kind === 'file' ? (
|
{source?.kind === 'file' ? (
|
||||||
|
|
@ -443,7 +437,7 @@ function VideoFrame({
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex h-full w-full items-center justify-center">
|
||||||
<HomeLink
|
<HomeLink
|
||||||
url={url}
|
url={url}
|
||||||
className="btn bg-white px-6 py-3 text-[#001011] hover:scale-105"
|
className="rounded-full bg-white px-6 py-3 font-semibold text-[#04262e] hover:scale-105"
|
||||||
>
|
>
|
||||||
Watch the video
|
Watch the video
|
||||||
</HomeLink>
|
</HomeLink>
|
||||||
|
|
@ -468,8 +462,8 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="overflow-hidden border border-white/15 bg-white/10 text-white shadow-2xl backdrop-blur"
|
className="overflow-hidden rounded-3xl border border-white/15 bg-white/10 text-white shadow-2xl backdrop-blur"
|
||||||
style={{ boxShadow: '0 24px 48px -24px rgba(0, 16, 17, 0.6)' }}
|
style={{ boxShadow: '0 24px 48px -24px rgba(4, 38, 46, 0.6)' }}
|
||||||
>
|
>
|
||||||
{photo ? (
|
{photo ? (
|
||||||
<img src={photo} alt="" className="aspect-[16/7] w-full object-cover" />
|
<img src={photo} alt="" className="aspect-[16/7] w-full object-cover" />
|
||||||
|
|
@ -477,18 +471,18 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
||||||
<div
|
<div
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="aspect-[16/7] w-full"
|
className="aspect-[16/7] w-full"
|
||||||
style={{ background: `color-mix(in srgb, ${color} 35%, #001011)` }}
|
style={{ background: `color-mix(in srgb, ${color} 35%, #04262e)` }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="space-y-4 p-8">
|
<div className="space-y-4 p-8">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="font-display text-3xl font-bold leading-tight md:text-4xl">
|
<h2 className="font-display text-3xl font-extrabold leading-tight md:text-4xl">
|
||||||
<Link to={eventHref(event.id)} className="hover:underline">
|
<Link to={eventHref(event.id)} className="hover:underline">
|
||||||
{event.title}
|
{event.title}
|
||||||
</Link>
|
</Link>
|
||||||
</h2>
|
</h2>
|
||||||
{event.theme && <p className="mt-1 text-lg font-semibold text-[#c2ffd6]">"{event.theme}"</p>}
|
{event.theme && <p className="mt-1 text-lg font-semibold text-[#9fe7d0]">"{event.theme}"</p>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(when || where) && (
|
{(when || where) && (
|
||||||
|
|
@ -501,10 +495,10 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
||||||
<HomeLink
|
<HomeLink
|
||||||
key={link.url}
|
key={link.url}
|
||||||
url={link.url}
|
url={link.url}
|
||||||
className={`inline-flex items-center gap-2 btn px-6 py-3 transition-transform hover:scale-105 ${
|
className={`inline-flex items-center gap-2 rounded-full px-6 py-3 font-semibold transition-transform hover:scale-105 ${
|
||||||
index === 0 ? 'text-[#001011]' : 'border border-white/35 text-white hover:bg-white/10'
|
index === 0 ? 'text-[#04262e]' : 'border border-white/35 text-white hover:bg-white/10'
|
||||||
}`}
|
}`}
|
||||||
style={index === 0 ? { background: '#c2ffd6' } : undefined}
|
style={index === 0 ? { background: '#9fe7d0' } : undefined}
|
||||||
>
|
>
|
||||||
<PlatformIcon platform={link.platform} />
|
<PlatformIcon platform={link.platform} />
|
||||||
{link.label}
|
{link.label}
|
||||||
|
|
@ -512,7 +506,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
||||||
))}
|
))}
|
||||||
<Link
|
<Link
|
||||||
to={eventHref(event.id)}
|
to={eventHref(event.id)}
|
||||||
className="btn border border-white/35 px-6 py-3 text-white transition-colors hover:bg-white/10"
|
className="rounded-full border border-white/35 px-6 py-3 font-semibold text-white transition-colors hover:bg-white/10"
|
||||||
>
|
>
|
||||||
Event details <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
Event details <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -82,18 +82,18 @@ export default function NextEventCountdown({
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
aria-label="Next event"
|
aria-label="Next event"
|
||||||
className={`relative z-20 px-6 ${overlap ? '-mt-14 -mb-14' : 'py-12'}`}
|
className={`relative z-20 px-6 ${overlap ? '-mt-12' : 'py-12'}`}
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
to={eventHref(event.id)}
|
to={eventHref(event.id)}
|
||||||
className="group mx-auto flex max-w-6xl flex-col gap-6 border bg-surface p-6 shadow-2xl transition-transform duration-300 hover:-translate-y-1 md:flex-row md:items-center md:p-8"
|
className="group mx-auto flex max-w-6xl flex-col gap-6 rounded-3xl border bg-surface/95 p-6 shadow-2xl backdrop-blur transition-transform duration-300 hover:-translate-y-1 md:flex-row md:items-center md:p-8"
|
||||||
style={{ borderColor: `${withAlpha(accent, 33)}` }}
|
style={{ borderColor: `${withAlpha(accent, 33)}` }}
|
||||||
>
|
>
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="text-xs font-bold uppercase tracking-[0.25em]" style={{ color: accentText(accent) }}>
|
<p className="text-xs font-bold uppercase tracking-[0.25em]" style={{ color: accentText(accent) }}>
|
||||||
{live ? 'Happening now' : 'Next up'}
|
{live ? 'Happening now' : 'Next up'}
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-1 truncate font-display text-2xl font-bold text-ink md:text-3xl">
|
<p className="mt-1 truncate font-display text-2xl font-extrabold text-ink md:text-3xl">
|
||||||
{event.title}
|
{event.title}
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-1 text-sm text-muted">
|
<p className="mt-1 text-sm text-muted">
|
||||||
|
|
@ -108,8 +108,8 @@ export default function NextEventCountdown({
|
||||||
{parts.map(([label, value]) => (
|
{parts.map(([label, value]) => (
|
||||||
<div
|
<div
|
||||||
key={label}
|
key={label}
|
||||||
className="flex w-16 flex-col items-center py-3 text-white md:w-20"
|
className="flex w-16 flex-col items-center rounded-2xl py-3 text-white md:w-20"
|
||||||
style={{ background: `color-mix(in srgb, ${accent} 35%, #001011)` }}
|
style={{ background: `color-mix(in srgb, ${accent} 35%, #04262e)` }}
|
||||||
>
|
>
|
||||||
<span className="font-display text-2xl font-bold tabular-nums md:text-3xl">
|
<span className="font-display text-2xl font-bold tabular-nums md:text-3xl">
|
||||||
{String(value).padStart(2, '0')}
|
{String(value).padStart(2, '0')}
|
||||||
|
|
|
||||||
|
|
@ -13,20 +13,14 @@
|
||||||
|
|
||||||
Re-keying the panel on the selected index is what replays the
|
Re-keying the panel on the selected index is what replays the
|
||||||
entrance animation for each choice.
|
entrance animation for each choice.
|
||||||
|
|
||||||
Drawn like the featured cards (FeaturedCards.tsx): one continuous
|
|
||||||
block, no gaps and no frame, a colored rule between cells. The
|
|
||||||
paths are a strip of cells along the top, the chosen one filled
|
|
||||||
flat in its accent; under it, the path's blurb and its actions
|
|
||||||
are cells of the same block.
|
|
||||||
═══════════════════════════════════════════════════════════════ */
|
═══════════════════════════════════════════════════════════════ */
|
||||||
|
|
||||||
import { ArrowRight, ArrowUpRight, BookOpen, CalendarBlank, ChatCircle, Compass, GraduationCap, HandHeart, Heart, House, MapPin, MusicNotes, Sparkle, Star, Tent, UsersThree, type Icon } from '@phosphor-icons/react'
|
import { ArrowRight, ArrowUpRight, BookOpen, CalendarBlank, ChatCircle, Compass, GraduationCap, HandHeart, Heart, House, MapPin, MusicNotes, Sparkle, Star, Tent, UsersThree, type Icon } from '@phosphor-icons/react'
|
||||||
import { useId, useRef, useState, type CSSProperties, type KeyboardEvent } from 'react'
|
import { useId, useRef, useState, type KeyboardEvent } from 'react'
|
||||||
|
|
||||||
import HomeLink, { isExternal } from './HomeLink.tsx'
|
import HomeLink, { isExternal } from './HomeLink.tsx'
|
||||||
import type { FrontPagePath } from '../../../lib/useFrontPage.ts'
|
import type { FrontPagePath } from '../../../lib/useFrontPage.ts'
|
||||||
import { ACCENTS, accentText, readableOn } from '../../../lib/color.ts'
|
import { ACCENTS, withAlpha, accentText, readableOn } from '../../../lib/color.ts'
|
||||||
|
|
||||||
type PathfinderProps = {
|
type PathfinderProps = {
|
||||||
id: string
|
id: string
|
||||||
|
|
@ -64,7 +58,7 @@ function PathIcon({ value }: { value?: string | null }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The site's accent family, in turn (color.ts).
|
// The site's accent family, in turn (color.ts).
|
||||||
const PATH_ACCENTS = [ACCENTS.teal, ACCENTS.green, ACCENTS.olive, ACCENTS.deep]
|
const PATH_ACCENTS = [ACCENTS.teal, ACCENTS.green, ACCENTS.mint, ACCENTS.deep]
|
||||||
|
|
||||||
export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps) {
|
export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps) {
|
||||||
const [selected, setSelected] = useState(0)
|
const [selected, setSelected] = useState(0)
|
||||||
|
|
@ -96,25 +90,21 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
||||||
focus(moves[e.key])
|
focus(moves[e.key])
|
||||||
}
|
}
|
||||||
|
|
||||||
// A cell's rules: right and bottom, the outer ones clipped off
|
|
||||||
// by the wrapper (the grid runs 2px past it).
|
|
||||||
const cell = 'border-r-2 border-b-2 border-brand'
|
|
||||||
const panelFill = `color-mix(in srgb, ${accent} 12%, var(--color-surface))`
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={id} className="py-24">
|
<section id={id} className="py-24" style={{ background: 'var(--color-surface)' }}>
|
||||||
<div className="mx-auto max-w-6xl px-6">
|
<div className="mx-auto max-w-6xl px-6">
|
||||||
<h2 className="font-display text-4xl font-bold text-ink md:text-5xl">{title}</h2>
|
<div className="grid gap-12 lg:grid-cols-12">
|
||||||
{blurb && <p className="mt-4 max-w-2xl text-lg text-muted">{blurb}</p>}
|
<div className="lg:col-span-5">
|
||||||
|
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||||
|
{title}
|
||||||
|
</h2>
|
||||||
|
{blurb && <p className="mt-4 text-lg text-muted">{blurb}</p>}
|
||||||
|
|
||||||
<div className="mt-12 overflow-hidden">
|
|
||||||
<div className="-mr-[2px] -mb-[2px]">
|
|
||||||
<div
|
<div
|
||||||
role="tablist"
|
role="tablist"
|
||||||
aria-label={title}
|
aria-label={title}
|
||||||
aria-orientation="horizontal"
|
aria-orientation="vertical"
|
||||||
className="grid sm:grid-cols-2 lg:grid-cols-[repeat(var(--paths),minmax(0,1fr))]"
|
className="mt-10 flex flex-col gap-3"
|
||||||
style={{ '--paths': Math.min(paths.length, 5) } as CSSProperties}
|
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
>
|
>
|
||||||
{paths.map((option, index) => {
|
{paths.map((option, index) => {
|
||||||
|
|
@ -133,65 +123,84 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
||||||
aria-controls={`${base}-panel`}
|
aria-controls={`${base}-panel`}
|
||||||
tabIndex={on ? 0 : -1}
|
tabIndex={on ? 0 : -1}
|
||||||
onClick={() => setSelected(index)}
|
onClick={() => setSelected(index)}
|
||||||
className={`${cell} flex items-center gap-4 px-6 py-6 text-left transition-colors duration-300 ${
|
className="group flex items-center gap-4 rounded-2xl border-2 px-5 py-4 text-left transition-all duration-300"
|
||||||
on ? '' : 'bg-surface hover:bg-tint-soft'
|
style={{
|
||||||
}`}
|
borderColor: on ? color : 'rgba(19,139,160,0.12)',
|
||||||
style={on ? { background: color, color: readableOn(color) } : undefined}
|
background: on ? `${withAlpha(color, 7)}` : 'var(--color-surface)',
|
||||||
|
transform: on ? 'translateX(8px)' : undefined,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="text-2xl"
|
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={{ color: on ? readableOn(color) : accentText(color) }}
|
style={{
|
||||||
|
background: on ? color : `${withAlpha(color, 12)}`,
|
||||||
|
color: on ? readableOn(color) : accentText(color),
|
||||||
|
}}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
>
|
>
|
||||||
<PathIcon value={option.icon} />
|
<PathIcon value={option.icon} />
|
||||||
</span>
|
</span>
|
||||||
<span className="font-display text-xl font-bold" style={on ? undefined : { color: 'var(--color-ink)' }}>
|
<span className="font-display text-xl font-bold" style={{ color: on ? accentText(color) : 'var(--color-ink)' }}>
|
||||||
{option.label}
|
{option.label}
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
className="ml-auto text-xl transition-opacity"
|
||||||
|
style={{ color, opacity: on ? 1 : 0 }}
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
key={selected}
|
key={selected}
|
||||||
id={`${base}-panel`}
|
id={`${base}-panel`}
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
aria-labelledby={`${base}-tab-${selected}`}
|
aria-labelledby={`${base}-tab-${selected}`}
|
||||||
className="grid sm:grid-cols-2 lg:grid-cols-3"
|
className="relative overflow-hidden rounded-3xl p-8 md:p-10 lg:col-span-7"
|
||||||
>
|
style={{ background: withAlpha(accent, 5) }}
|
||||||
{path.blurb && (
|
>
|
||||||
<p
|
|
||||||
className={`${cell} hp-pop p-8 font-display text-2xl leading-snug text-ink md:p-10`}
|
|
||||||
style={{ background: panelFill }}
|
|
||||||
>
|
|
||||||
{path.blurb}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
{path.blurb && (
|
||||||
|
<p className="hp-pop relative max-w-md font-display text-2xl font-semibold leading-snug text-ink">
|
||||||
|
{path.blurb}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<ul className="relative mt-8 grid gap-4 sm:grid-cols-2">
|
||||||
{path.actions.map((action, index) => (
|
{path.actions.map((action, index) => (
|
||||||
<HomeLink
|
<li
|
||||||
key={`${action.url}-${index}`}
|
key={`${action.url}-${index}`}
|
||||||
url={action.url}
|
className="hp-pop"
|
||||||
className={`${cell} hp-pop group flex flex-col bg-surface p-8 transition-colors duration-200 hover:bg-tint-soft`}
|
|
||||||
style={{ animationDelay: `${120 + index * 90}ms` }}
|
style={{ animationDelay: `${120 + index * 90}ms` }}
|
||||||
>
|
>
|
||||||
<span className="flex items-start gap-2 font-display text-lg font-bold text-ink">
|
<HomeLink
|
||||||
{action.label}
|
url={action.url}
|
||||||
<span
|
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"
|
||||||
className="ml-auto transition-transform group-hover:translate-x-1"
|
>
|
||||||
style={{ color: accentText(accent) }}
|
<span className="flex items-start gap-2 font-display text-lg font-bold text-ink">
|
||||||
aria-hidden="true"
|
{action.label}
|
||||||
>
|
<span
|
||||||
{isExternal(action.url) ? <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /> : <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />}
|
className="ml-auto transition-transform group-hover:translate-x-1"
|
||||||
|
style={{ color: accentText(accent) }}
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
{isExternal(action.url) ? <ArrowUpRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /> : <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
{action.description && (
|
||||||
{action.description && (
|
<span className="mt-2 text-sm leading-relaxed text-muted">
|
||||||
<span className="mt-2 text-sm leading-relaxed text-muted">{action.description}</span>
|
{action.description}
|
||||||
)}
|
</span>
|
||||||
</HomeLink>
|
)}
|
||||||
|
</HomeLink>
|
||||||
|
</li>
|
||||||
))}
|
))}
|
||||||
</div>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,17 +18,17 @@ type RetreatsBandProps = { id: string; title: string; blurb?: string | null }
|
||||||
|
|
||||||
export default function RetreatsBand({ id, title, blurb }: RetreatsBandProps) {
|
export default function RetreatsBand({ id, title, blurb }: RetreatsBandProps) {
|
||||||
return (
|
return (
|
||||||
<section id={id} className="overflow-hidden py-24">
|
<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 className="mx-auto mb-12 flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="font-display text-4xl font-bold text-ink md:text-5xl">
|
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||||
</div>
|
</div>
|
||||||
<Link
|
<Link
|
||||||
to="/retreats"
|
to="/retreats"
|
||||||
className="ml-auto btn border px-5 py-2 text-sm transition-colors hover:bg-surface"
|
className="ml-auto rounded-full border px-5 py-2 text-sm font-semibold transition-colors hover:bg-surface"
|
||||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||||
>
|
>
|
||||||
All retreats <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
All retreats <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,16 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
|
||||||
id={id}
|
id={id}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className="relative overflow-hidden py-24"
|
className="relative overflow-hidden py-24"
|
||||||
style={{ background: '#004552' }}
|
style={{ background: '#073d4a' }}
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
className="pointer-events-none absolute -left-40 -top-40 h-[32rem] w-[32rem] rounded-full opacity-25 blur-3xl"
|
||||||
|
style={{ background: '#9fe7d0' }}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="relative mx-auto max-w-6xl px-6">
|
<div className="relative mx-auto max-w-6xl px-6">
|
||||||
<h2 className="font-display text-3xl font-bold text-white md:text-4xl">
|
<h2 className="font-display text-3xl font-extrabold text-white md:text-4xl">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
{blurb && <p className="mt-3 max-w-2xl text-white/70">{blurb}</p>}
|
{blurb && <p className="mt-3 max-w-2xl text-white/70">{blurb}</p>}
|
||||||
|
|
@ -64,7 +70,7 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
|
||||||
>
|
>
|
||||||
<dd className="font-display text-5xl font-extrabold leading-none text-white md:text-6xl">
|
<dd className="font-display text-5xl font-extrabold leading-none text-white md:text-6xl">
|
||||||
<CountUp value={stat.value} run={seen} />
|
<CountUp value={stat.value} run={seen} />
|
||||||
{stat.suffix && <span className="text-[#c2ffd6]">{stat.suffix}</span>}
|
{stat.suffix && <span className="text-[#9fe7d0]">{stat.suffix}</span>}
|
||||||
</dd>
|
</dd>
|
||||||
<dt className="mt-3 text-sm font-semibold uppercase tracking-widest text-white/70">
|
<dt className="mt-3 text-sm font-semibold uppercase tracking-widest text-white/70">
|
||||||
{stat.label}
|
{stat.label}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,56 @@
|
||||||
prefers-reduced-motion; the page still reads the same without it.
|
prefers-reduced-motion; the page still reads the same without it.
|
||||||
═══════════════════════════════════════════════════════════════ */
|
═══════════════════════════════════════════════════════════════ */
|
||||||
|
|
||||||
|
/* ── Hero: brand mode aurora ─────────────────────────────────── */
|
||||||
|
|
||||||
|
.hp-aurora {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 9999px;
|
||||||
|
filter: blur(80px);
|
||||||
|
opacity: 0.55;
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hp-aurora--a { animation: hp-drift-a 22s ease-in-out infinite alternate; }
|
||||||
|
.hp-aurora--b { animation: hp-drift-b 28s ease-in-out infinite alternate; }
|
||||||
|
.hp-aurora--c { animation: hp-drift-c 34s ease-in-out infinite alternate; }
|
||||||
|
|
||||||
|
@keyframes hp-drift-a {
|
||||||
|
from { transform: translate(-10%, -5%) scale(1); }
|
||||||
|
to { transform: translate(15%, 10%) scale(1.25); }
|
||||||
|
}
|
||||||
|
@keyframes hp-drift-b {
|
||||||
|
from { transform: translate(10%, 5%) scale(1.1); }
|
||||||
|
to { transform: translate(-20%, -10%) scale(0.9); }
|
||||||
|
}
|
||||||
|
@keyframes hp-drift-c {
|
||||||
|
from { transform: translate(0, 10%) scale(0.9); }
|
||||||
|
to { transform: translate(-10%, -15%) scale(1.2); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Concentric rings: many circles, one center. */
|
||||||
|
.hp-rings {
|
||||||
|
animation: hp-spin 90s linear infinite;
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
}
|
||||||
|
.hp-rings--reverse { animation-direction: reverse; animation-duration: 140s; }
|
||||||
|
|
||||||
|
@keyframes hp-spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The dove at the rings' center bobs gently rather than turning. */
|
||||||
|
.hp-dove {
|
||||||
|
animation: hp-bob 6s ease-in-out infinite;
|
||||||
|
transform-box: fill-box;
|
||||||
|
transform-origin: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes hp-bob {
|
||||||
|
0%, 100% { transform: translateY(0); }
|
||||||
|
50% { transform: translateY(-4px); }
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Hero: headline words rise in ────────────────────────────── */
|
/* ── Hero: headline words rise in ────────────────────────────── */
|
||||||
|
|
||||||
.hp-rise {
|
.hp-rise {
|
||||||
|
|
@ -53,6 +103,17 @@
|
||||||
to { transform: scaleX(1); }
|
to { transform: scaleX(1); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Hero: LIVE ──────────────────────────────────────────────── */
|
||||||
|
|
||||||
|
.hp-live-dot {
|
||||||
|
box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
|
||||||
|
animation: hp-pulse 1.6s ease-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes hp-pulse {
|
||||||
|
to { box-shadow: 0 0 0 12px rgba(255, 77, 77, 0); }
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Timeline rail ───────────────────────────────────────────── */
|
/* ── Timeline rail ───────────────────────────────────────────── */
|
||||||
|
|
||||||
.hp-rail {
|
.hp-rail {
|
||||||
|
|
@ -86,7 +147,11 @@
|
||||||
.hp-stat--in { opacity: 1; transform: none; }
|
.hp-stat--in { opacity: 1; transform: none; }
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.hp-slide--on img {
|
.hp-aurora,
|
||||||
|
.hp-rings,
|
||||||
|
.hp-dove,
|
||||||
|
.hp-slide--on img,
|
||||||
|
.hp-live-dot {
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
.hp-rise,
|
.hp-rise,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue