Add colour tokens, dark mode and drop gradients
- Colour tokens in index.css named by role (ink, body, muted, link, brand, action, surface, tint, danger), used everywhere instead of hex - Dark mode: follows the system, a header toggle (site and admin) overrides it and is remembered; set before first paint in index.html - Data colours go through src/lib/color.ts: withAlpha for tints, accentText (lighter on dark) for text in an accent, readableOn for text on one, so an admin's pale colour still reads - Migration 040 drops events.gradient: a card is its photo or plain, with its colour as the border; other decorative gradients are solid - The countdown and a hero event without a photo mix their colour toward ink behind white text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ee61568911
commit
c74ad746f5
70 changed files with 829 additions and 596 deletions
|
|
@ -24,6 +24,7 @@ import { blogImage } from '../../lib/media.ts'
|
|||
import { preview } from '../../lib/text.ts'
|
||||
import { postDate, useCommunityBlog, type BlogPostSummary } from '../../lib/useBlog.ts'
|
||||
import HomeLink from './home/HomeLink.tsx'
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
/* Headings for a half the admin didn't title. */
|
||||
const DEFAULTS = {
|
||||
|
|
@ -40,19 +41,19 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
|
|||
const authors = post.authors.map((author) => author.name).join(', ')
|
||||
|
||||
return (
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-[#138ba0]/15 bg-white shadow-sm transition-shadow hover:shadow-lg">
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg">
|
||||
{cover ? (
|
||||
<img src={cover} alt="" loading="lazy" className="aspect-video w-full object-cover" />
|
||||
) : (
|
||||
<div className="aspect-video w-full bg-gradient-to-br from-[#eef9fb] to-[#d9f0f3]" />
|
||||
<div className="aspect-video w-full bg-tint" />
|
||||
)}
|
||||
<div className="flex flex-1 flex-col p-6">
|
||||
{(date || post.tags.length > 0) && (
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accent }}>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accentText(accent) }}>
|
||||
{[date, ...post.tags].filter(Boolean).join(' · ')}
|
||||
</p>
|
||||
)}
|
||||
<h4 className="mt-2 font-display text-xl font-extrabold leading-snug text-[#073d4a]">
|
||||
<h4 className="mt-2 font-display text-xl font-extrabold leading-snug text-ink">
|
||||
<Link
|
||||
to={blogHref(post.id)}
|
||||
className="after:absolute after:inset-0 after:rounded-2xl after:content-[''] hover:underline"
|
||||
|
|
@ -61,9 +62,9 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
|
|||
</Link>
|
||||
</h4>
|
||||
{post.excerpt && (
|
||||
<p className="mt-2 leading-relaxed text-[#4a6b72]">{preview(post.excerpt, EXCERPT_CHARS)}</p>
|
||||
<p className="mt-2 leading-relaxed text-muted">{preview(post.excerpt, EXCERPT_CHARS)}</p>
|
||||
)}
|
||||
{authors && <p className="mt-auto pt-4 text-sm font-medium text-[#26454c]">By {authors}</p>}
|
||||
{authors && <p className="mt-auto pt-4 text-sm font-medium text-body">By {authors}</p>}
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
|
|
@ -71,7 +72,7 @@ function PostCard({ post, accent }: { post: BlogPostSummary; accent: string }) {
|
|||
|
||||
function Subheading({ children, accent }: { children: string; accent: string }) {
|
||||
return (
|
||||
<h3 className="text-2xl font-extrabold" style={{ color: accent }}>
|
||||
<h3 className="text-2xl font-extrabold" style={{ color: accentText(accent) }}>
|
||||
{children}
|
||||
</h3>
|
||||
)
|
||||
|
|
@ -82,13 +83,13 @@ export default function CommunityBlog({ accent = '#0f7183' }: { accent?: string
|
|||
|
||||
if (!blog) {
|
||||
return (
|
||||
<div className="mx-auto max-w-6xl px-6 text-[#4a6b72]">
|
||||
<div className="mx-auto max-w-6xl px-6 text-muted">
|
||||
{loading ? (
|
||||
'Loading…'
|
||||
) : (
|
||||
<>
|
||||
Couldn’t load the blog. {error}{' '}
|
||||
<button type="button" onClick={reload} className="underline" style={{ color: accent }}>
|
||||
<button type="button" onClick={reload} className="underline" style={{ color: accentText(accent) }}>
|
||||
Try again
|
||||
</button>
|
||||
</>
|
||||
|
|
@ -102,7 +103,7 @@ export default function CommunityBlog({ accent = '#0f7183' }: { accent?: string
|
|||
const hasExternal = external.cards.length > 0 || Boolean(external.url)
|
||||
|
||||
if (!hasInternal && !hasExternal) {
|
||||
return <p className="mx-auto max-w-6xl px-6 text-center text-[#4a6b72]">· Posts coming soon ·</p>
|
||||
return <p className="mx-auto max-w-6xl px-6 text-center text-muted">· Posts coming soon ·</p>
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ import { EVENT_TYPES, eventTypeLabel, type EventType } from '../../lib/eventType
|
|||
import { firstOccurrenceFrom, occurrencesBetween, seriesTimes } from '../../lib/eventSeries.ts'
|
||||
import { eventHref } from '../../lib/hrefs.ts'
|
||||
import type { EventListItem } from '../../lib/useContent.ts'
|
||||
import { withAlpha, accentText, readableOn } from '../../lib/color.ts'
|
||||
|
||||
export type CalendarControl = 'scope' | 'type' | 'online' | 'search'
|
||||
export type CalendarView = 'month' | 'list'
|
||||
|
|
@ -57,8 +58,8 @@ const ALL_CONTROLS: CalendarControl[] = ['scope', 'type', 'online', 'search']
|
|||
const MAX_LANES = 3
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const INK = '#073d4a'
|
||||
const BODY = '#4a6b72'
|
||||
const INK = 'var(--color-ink)'
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
const WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
||||
|
||||
|
|
@ -326,8 +327,8 @@ export default function EventCalendar({
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => go(monthKey(today))}
|
||||
className="rounded-full border px-3 py-1 text-sm font-semibold hover:bg-white"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="rounded-full border px-3 py-1 text-sm font-semibold hover:bg-surface"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
Today
|
||||
</button>
|
||||
|
|
@ -348,8 +349,8 @@ export default function EventCalendar({
|
|||
className="px-4 py-1.5 text-sm font-semibold capitalize transition-colors"
|
||||
style={
|
||||
view === option
|
||||
? { background: accent, color: '#ffffff' }
|
||||
: { color: accent }
|
||||
? { background: accent, color: readableOn(accent) }
|
||||
: { color: accentText(accent) }
|
||||
}
|
||||
>
|
||||
{option}
|
||||
|
|
@ -380,7 +381,7 @@ export default function EventCalendar({
|
|||
/>
|
||||
)}
|
||||
{show('online') && (
|
||||
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-[#138ba0]/25 bg-white px-4 py-2 text-sm">
|
||||
<label className="flex cursor-pointer items-center gap-2 rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={onlineOnly}
|
||||
|
|
@ -398,7 +399,7 @@ export default function EventCalendar({
|
|||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Search events"
|
||||
aria-label="Search events"
|
||||
className="min-w-[12rem] flex-1 rounded-full border border-[#138ba0]/25 bg-white px-4 py-2 text-sm outline-none focus:border-[#0f7183] focus:ring-2 focus:ring-[#0f7183]/40 md:max-w-xs"
|
||||
className="min-w-[12rem] flex-1 rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40 md:max-w-xs"
|
||||
/>
|
||||
)}
|
||||
{filtering && (
|
||||
|
|
@ -406,7 +407,7 @@ export default function EventCalendar({
|
|||
type="button"
|
||||
onClick={clearFilters}
|
||||
className="text-sm font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Clear filters
|
||||
</button>
|
||||
|
|
@ -417,7 +418,7 @@ export default function EventCalendar({
|
|||
{/* ── Body ── */}
|
||||
<div className="mt-6">
|
||||
{error ? (
|
||||
<p className="rounded-2xl bg-white p-6 text-[#b3261e]">
|
||||
<p className="rounded-2xl bg-surface p-6 text-danger">
|
||||
Couldn’t load events. {error.message}
|
||||
</p>
|
||||
) : loading ? (
|
||||
|
|
@ -457,7 +458,7 @@ export default function EventCalendar({
|
|||
type="button"
|
||||
onClick={() => go(monthKey(next))}
|
||||
className="font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Jump to the next event, {monthTitle(monthKey(next))} →
|
||||
</button>
|
||||
|
|
@ -494,8 +495,8 @@ type MonthGridProps = {
|
|||
|
||||
function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accent }: MonthGridProps) {
|
||||
return (
|
||||
<div className="overflow-hidden rounded-3xl border border-[#138ba0]/15 bg-white shadow-sm">
|
||||
<div className="grid grid-cols-7 border-b border-[#138ba0]/10 bg-[#f6fbfc]">
|
||||
<div className="overflow-hidden rounded-3xl border border-brand/15 bg-surface shadow-sm">
|
||||
<div className="grid grid-cols-7 border-b border-brand/10 bg-tint-soft">
|
||||
{WEEKDAYS.map((day) => (
|
||||
<div
|
||||
key={day}
|
||||
|
|
@ -516,7 +517,7 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
|
|||
segments.filter((s) => s.col <= col && s.col + s.span > col).length
|
||||
|
||||
return (
|
||||
<div key={week[0]} className="relative min-h-[8rem] border-b border-[#138ba0]/10 last:border-b-0">
|
||||
<div key={week[0]} className="relative min-h-[8rem] border-b border-brand/10 last:border-b-0">
|
||||
{/* Day cells: the click targets, and the numbers. */}
|
||||
<div className="absolute inset-0 grid grid-cols-7">
|
||||
{week.map((date, col) => {
|
||||
|
|
@ -532,23 +533,23 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
|
|||
onClick={() => onSelect(date)}
|
||||
aria-pressed={isSelected}
|
||||
aria-label={`${longDay(date)}${count ? `, ${count} event${count === 1 ? '' : 's'}` : ''}`}
|
||||
className="relative flex flex-col items-start border-r border-[#138ba0]/10 p-2 text-left transition-colors last:border-r-0 hover:bg-[#f6fbfc]"
|
||||
className="relative flex flex-col items-start border-r border-brand/10 p-2 text-left transition-colors last:border-r-0 hover:bg-tint-soft"
|
||||
style={{
|
||||
background: isSelected ? `${accent}14` : outside ? '#fbfdfd' : undefined,
|
||||
background: isSelected ? `${withAlpha(accent, 8)}` : outside ? 'var(--color-tint-soft)' : undefined,
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className="flex h-7 w-7 items-center justify-center rounded-full text-sm font-semibold"
|
||||
style={
|
||||
isToday
|
||||
? { background: accent, color: '#ffffff' }
|
||||
: { color: outside ? '#b8c6c9' : INK }
|
||||
? { background: accent, color: readableOn(accent) }
|
||||
: { color: outside ? withAlpha('var(--color-muted)', 60) : INK }
|
||||
}
|
||||
>
|
||||
{Number(date.slice(8))}
|
||||
</span>
|
||||
{hidden > 0 && (
|
||||
<span className="mt-auto text-xs font-semibold" style={{ color: accent }}>
|
||||
<span className="mt-auto text-xs font-semibold" style={{ color: accentText(accent) }}>
|
||||
+{hidden} more
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -620,14 +621,14 @@ function DayPanel({
|
|||
onClose: () => void
|
||||
}) {
|
||||
return (
|
||||
<div className="mt-4 rounded-3xl border bg-white p-6" style={{ borderColor: `${accent}40` }}>
|
||||
<div className="mt-4 rounded-3xl border bg-surface p-6" style={{ borderColor: `${withAlpha(accent, 25)}` }}>
|
||||
<div className="flex items-center gap-4">
|
||||
<h4 className="font-display text-lg font-bold">{longDay(date)}</h4>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onClose}
|
||||
className="ml-auto text-sm font-semibold hover:underline"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
|
|
@ -664,7 +665,7 @@ function MonthList({
|
|||
}) {
|
||||
if (items.length === 0) {
|
||||
return (
|
||||
<p className="rounded-3xl bg-white p-10 text-center" style={{ color: BODY }}>
|
||||
<p className="rounded-3xl bg-surface p-10 text-center" style={{ color: BODY }}>
|
||||
Nothing on the calendar this month.
|
||||
</p>
|
||||
)
|
||||
|
|
@ -683,9 +684,9 @@ function MonthList({
|
|||
{[...byDay.entries()].map(([day, list]) => {
|
||||
const d = parse(day)
|
||||
return (
|
||||
<li key={day} className="flex gap-5 rounded-3xl bg-white p-5 shadow-sm">
|
||||
<li key={day} className="flex gap-5 rounded-3xl bg-surface p-5 shadow-sm">
|
||||
<div className="w-14 shrink-0 text-center">
|
||||
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accent }}>
|
||||
<p className="text-xs font-bold uppercase tracking-widest" style={{ color: accentText(accent) }}>
|
||||
{d.toLocaleDateString(undefined, { weekday: 'short' })}
|
||||
</p>
|
||||
<p className="font-display text-3xl font-extrabold leading-none">{d.getDate()}</p>
|
||||
|
|
@ -715,13 +716,13 @@ function EventLine({ item, accent }: { item: Occurrence; accent: string }) {
|
|||
return (
|
||||
<Link
|
||||
to={eventHref(event.id)}
|
||||
className="group flex items-start gap-3 rounded-xl p-2 transition-colors hover:bg-[#f6fbfc]"
|
||||
className="group flex items-start gap-3 rounded-xl p-2 transition-colors hover:bg-tint-soft"
|
||||
>
|
||||
<span className="mt-1.5 h-3 w-3 shrink-0 rounded-full" style={{ background: color }} aria-hidden="true" />
|
||||
<span className="min-w-0">
|
||||
<span className={`block font-semibold group-hover:underline ${cancelled ? 'line-through' : ''}`}>
|
||||
{event.title}
|
||||
{cancelled && <span className="ml-2 text-xs font-bold uppercase text-[#b3261e] no-underline">Cancelled</span>}
|
||||
{cancelled && <span className="ml-2 text-xs font-bold uppercase text-danger no-underline">Cancelled</span>}
|
||||
</span>
|
||||
<span className="block text-sm" style={{ color: BODY }}>
|
||||
{[
|
||||
|
|
@ -755,8 +756,8 @@ function NavButton({
|
|||
type="button"
|
||||
onClick={onClick}
|
||||
aria-label={label}
|
||||
className="flex h-10 w-10 items-center justify-center rounded-full border text-xl transition-colors hover:bg-white"
|
||||
style={{ borderColor: accent, color: accent }}
|
||||
className="flex h-10 w-10 items-center justify-center rounded-full border text-xl transition-colors hover:bg-surface"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
|
@ -781,7 +782,7 @@ function FilterSelect({
|
|||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
aria-label={label}
|
||||
className="rounded-full border border-[#138ba0]/25 bg-white px-4 py-2 text-sm outline-none focus:border-[#0f7183] focus:ring-2 focus:ring-[#0f7183]/40"
|
||||
className="rounded-full border border-brand/25 bg-surface px-4 py-2 text-sm outline-none focus:border-link focus:ring-2 focus:ring-link/40"
|
||||
>
|
||||
<option value="">{all}</option>
|
||||
{options.map(([id, name]) => (
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { EVENT_TYPES, eventTypeLabel } from "../../lib/eventTypes.ts";
|
|||
import { seriesLabel } from "../../lib/eventSeries.ts";
|
||||
import PlatformIcon from "../../components/PlatformIcon.tsx";
|
||||
import { eventBackground, eventLogo as eventLogoSrc, orgLogo as orgLogoSrc } from "../../lib/media.ts";
|
||||
import { accentText, withAlpha, readableOn } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
EVENT LIST: CARDS
|
||||
|
|
@ -50,20 +51,19 @@ function Logo({ src, alt = "", className }) {
|
|||
}
|
||||
|
||||
const TEAL = "#0f7183"; // last-resort card color
|
||||
const INK = "#073d4a"; // button text: the card colour is only a border
|
||||
const CARD_BG = "#ffffff"; // sits under every card, gradient or not
|
||||
const INK = "var(--color-ink)"; // button text: the card colour is only a border
|
||||
const CARD_BG = "var(--color-surface)"; // sits under every card, photo or not
|
||||
|
||||
/* Laid over a card's background image so black text reads on any
|
||||
photo. Heavier at the top, where the title and dates are, and
|
||||
lighter lower down so more of the picture shows through. */
|
||||
const CARD_IMAGE_VEIL =
|
||||
"linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0.78))";
|
||||
"linear-gradient(to bottom, color-mix(in srgb, var(--color-surface) 90%, transparent), color-mix(in srgb, var(--color-surface) 78%, transparent))";
|
||||
|
||||
/* The card's background layers, top first: its gradient if it has
|
||||
one, then the veil and photo if it has one, then white. */
|
||||
/* The card's background layers, top first: the veil and photo if it
|
||||
has one, then the plain surface. */
|
||||
function cardBackground(ev) {
|
||||
const layers: string[] = [];
|
||||
if (ev.gradient) layers.push(ev.gradient);
|
||||
const image = eventBackground(ev.card_image);
|
||||
if (image) {
|
||||
layers.push(CARD_IMAGE_VEIL, `url(${JSON.stringify(image)}) center / cover no-repeat`);
|
||||
|
|
@ -192,7 +192,7 @@ export function Card({
|
|||
|
||||
return (
|
||||
<div
|
||||
className={`rounded-3xl text-black overflow-hidden shadow-2xl h-full flex flex-col ${
|
||||
className={`rounded-3xl text-ink overflow-hidden shadow-2xl h-full flex flex-col ${
|
||||
compact ? "ev-card" : ""
|
||||
}`}
|
||||
style={{
|
||||
|
|
@ -278,7 +278,7 @@ export function Card({
|
|||
doesn't. */}
|
||||
<div className={`mt-auto ${compact ? "pt-6" : "pt-8"}`}>
|
||||
{links.length === 0 && (
|
||||
<p className="text-center font-semibold" style={{ color: accent }}>
|
||||
<p className="text-center font-semibold" style={{ color: accentText(accent) }}>
|
||||
{past
|
||||
? "This event has concluded. Thank you to everyone who joined us!"
|
||||
: igHandle
|
||||
|
|
@ -320,7 +320,7 @@ export function Card({
|
|||
className={`ig-link flex items-center justify-center rounded-xl font-bold transition-all duration-200 hover:scale-[1.02] gap-3 ${
|
||||
compact ? "py-2.5 px-5" : "py-3 px-6"
|
||||
}`}
|
||||
style={{ border: `1px solid ${accent}`, color: accent }}
|
||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||
>
|
||||
<PlatformIcon platform="instagram" className="w-6 h-6" />
|
||||
{igHandle}
|
||||
|
|
@ -362,7 +362,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
|
|||
const chip = on => ({
|
||||
border: `1px solid ${accent}`,
|
||||
background: on ? accent : "transparent",
|
||||
color: on ? "#ffffff" : accent,
|
||||
color: on ? readableOn(accent) : accentText(accent),
|
||||
});
|
||||
|
||||
const button = (id, label) => (
|
||||
|
|
@ -396,7 +396,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
|
|||
export function EventCardsToggle({ view, setView, accent }) {
|
||||
const btn = active => ({
|
||||
background: active ? accent : "transparent",
|
||||
color: active ? "#ffffff" : accent,
|
||||
color: active ? readableOn(accent) : accentText(accent),
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -522,14 +522,14 @@ export default function EventListCards({
|
|||
// Arrows and dots follow the section accent, not the active card.
|
||||
const arrowStyle = enabled => ({
|
||||
border: `1px solid ${accent}`,
|
||||
background: "rgba(255,255,255,0.85)",
|
||||
color: enabled ? accent : "#b8c6c9",
|
||||
background: "color-mix(in srgb, var(--color-surface) 85%, transparent)",
|
||||
color: enabled ? accentText(accent) : withAlpha("var(--color-muted)", 50),
|
||||
cursor: enabled ? "pointer" : "default",
|
||||
opacity: enabled ? 1 : 0.4,
|
||||
});
|
||||
|
||||
const notice = text => (
|
||||
<p className="max-w-6xl mx-auto px-6 font-semibold" style={{ color: accent }}>
|
||||
<p className="max-w-6xl mx-auto px-6 font-semibold" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</p>
|
||||
);
|
||||
|
|
@ -600,7 +600,7 @@ export default function EventListCards({
|
|||
<div className="mt-12">
|
||||
<h3
|
||||
className="text-2xl font-extrabold mb-6"
|
||||
style={{ color: accent, opacity: 0.85 }}
|
||||
style={{ color: accentText(accent), opacity: 0.85 }}
|
||||
>
|
||||
Past Events
|
||||
</h3>
|
||||
|
|
@ -640,7 +640,7 @@ export default function EventListCards({
|
|||
onClick={() => setShowPast(v => !v)}
|
||||
aria-expanded={showPast}
|
||||
className="flex items-center gap-2 py-2.5 px-6 rounded-xl font-bold transition-all duration-200 hover:scale-105"
|
||||
style={{ border: `1px solid ${accent}`, color: accent }}
|
||||
style={{ border: `1px solid ${accent}`, color: accentText(accent) }}
|
||||
>
|
||||
{showPast
|
||||
? "Hide past events"
|
||||
|
|
@ -737,7 +737,7 @@ export default function EventListCards({
|
|||
className="h-2.5 rounded-full transition-all duration-200"
|
||||
style={{
|
||||
width: i === index ? "1.5rem" : "0.625rem",
|
||||
background: i === index ? accent : "#b8c6c9",
|
||||
background: i === index ? accent : withAlpha("var(--color-muted)", 40),
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ import { useState } from "react";
|
|||
import { post, ApiError } from "../../lib/api.ts";
|
||||
import { PAGE_LINKS, PAGE_SECTIONS } from "../../navConfig.ts";
|
||||
import { DATA_REQUEST, FEEDBACK_TYPES } from "../../data/feedbackTypes.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
const ACCENT = "#0f7183";
|
||||
const MUTED = "#4a6b72";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const MAX_CHARS = 1500;
|
||||
const MIN_MESSAGE = 10; // matches the server
|
||||
|
||||
|
|
@ -34,17 +35,17 @@ const WHOLE_PAGE = "";
|
|||
/* ── Shared field chrome ─────────────────────────────────────── */
|
||||
|
||||
const fieldClass =
|
||||
"w-full rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 text-[#26454c] " +
|
||||
"placeholder:text-[#4a6b72]/50 outline-none transition-colors " +
|
||||
"focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25";
|
||||
"w-full rounded-xl border border-muted/25 bg-surface px-4 py-3 text-body " +
|
||||
"placeholder:text-muted/50 outline-none transition-colors " +
|
||||
"focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||
|
||||
const errorFieldClass = "border-[#b3261e] focus:border-[#b3261e] focus:ring-[#b3261e]/20";
|
||||
const errorFieldClass = "border-danger focus:border-danger focus:ring-danger/20";
|
||||
|
||||
const selectClass = `${fieldClass} appearance-none pr-10`;
|
||||
|
||||
function OptionalTag() {
|
||||
return (
|
||||
<span className="ml-2 rounded-full bg-[#eef9fb] px-2 py-0.5 text-xs font-medium text-[#0f7183]">
|
||||
<span className="ml-2 rounded-full bg-tint px-2 py-0.5 text-xs font-medium text-link">
|
||||
Optional
|
||||
</span>
|
||||
);
|
||||
|
|
@ -53,7 +54,7 @@ function OptionalTag() {
|
|||
function FieldError({ id, children }) {
|
||||
if (!children) return null;
|
||||
return (
|
||||
<p id={id} className="mt-2 text-sm text-[#b3261e]">
|
||||
<p id={id} className="mt-2 text-sm text-danger">
|
||||
{children}
|
||||
</p>
|
||||
);
|
||||
|
|
@ -63,7 +64,7 @@ function FieldError({ id, children }) {
|
|||
function Select({ id, label, value, onChange, children }) {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={id} className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor={id} className="block text-sm font-medium text-body">
|
||||
{label}
|
||||
</label>
|
||||
<div className="relative mt-2">
|
||||
|
|
@ -100,7 +101,7 @@ function Select({ id, label, value, onChange, children }) {
|
|||
function TypePicker({ value, onChange }) {
|
||||
return (
|
||||
<fieldset>
|
||||
<legend className="text-base font-semibold text-[#26454c]">
|
||||
<legend className="text-base font-semibold text-body">
|
||||
What kind of feedback is this?
|
||||
</legend>
|
||||
<p className="mt-1 text-sm" style={{ color: MUTED }}>
|
||||
|
|
@ -123,21 +124,21 @@ function TypePicker({ value, onChange }) {
|
|||
<span
|
||||
className={
|
||||
"flex h-full flex-col gap-1 rounded-xl border p-4 transition-colors " +
|
||||
"peer-focus-visible:ring-2 peer-focus-visible:ring-[#138ba0]/40 " +
|
||||
"peer-focus-visible:ring-2 peer-focus-visible:ring-brand/40 " +
|
||||
(selected
|
||||
? "border-[#138ba0] bg-[#eef9fb]"
|
||||
: "border-[#4a6b72]/20 bg-white hover:border-[#138ba0]/50")
|
||||
? "border-brand bg-tint"
|
||||
: "border-muted/20 bg-surface hover:border-brand/50")
|
||||
}
|
||||
>
|
||||
<span className="flex items-start justify-between gap-2">
|
||||
<span className="font-semibold text-[#26454c]">{type.label}</span>
|
||||
<span className="font-semibold text-body">{type.label}</span>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={
|
||||
"mt-0.5 h-4 w-4 shrink-0 rounded-full border-2 transition-colors " +
|
||||
(selected
|
||||
? "border-[#138ba0] bg-[#0f7183] ring-2 ring-inset ring-white"
|
||||
: "border-[#4a6b72]/30")
|
||||
? "border-brand bg-action ring-2 ring-inset ring-white"
|
||||
: "border-muted/30")
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
|
|
@ -161,7 +162,7 @@ function LocationPicker({ page, section, onPageChange, onSectionChange }) {
|
|||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap items-center">
|
||||
<h3 className="text-base font-semibold text-[#26454c]">
|
||||
<h3 className="text-base font-semibold text-body">
|
||||
Where did you run into it?
|
||||
</h3>
|
||||
<OptionalTag />
|
||||
|
|
@ -294,9 +295,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
return (
|
||||
<div
|
||||
aria-live="polite"
|
||||
className="rounded-2xl border border-[#138ba0]/20 bg-white p-8 sm:p-10"
|
||||
className="rounded-2xl border border-brand/20 bg-surface p-8 sm:p-10"
|
||||
>
|
||||
<h3 className="text-2xl font-bold" style={{ color: ACCENT }}>
|
||||
<h3 className="text-2xl font-bold" style={{ color: accentText(ACCENT) }}>
|
||||
Thanks, we've got it
|
||||
</h3>
|
||||
{where && (
|
||||
|
|
@ -314,7 +315,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<button
|
||||
type="button"
|
||||
onClick={reset}
|
||||
className="mt-6 rounded-full border border-[#138ba0] px-5 py-2.5 font-semibold text-[#0f7183] transition-colors hover:bg-[#eef9fb] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40"
|
||||
className="mt-6 rounded-full border border-brand px-5 py-2.5 font-semibold text-link transition-colors hover:bg-tint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40"
|
||||
>
|
||||
{request ? "Send another request" : "Send more feedback"}
|
||||
</button>
|
||||
|
|
@ -326,7 +327,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<form
|
||||
onSubmit={handleSubmit}
|
||||
noValidate
|
||||
className="rounded-2xl border border-[#138ba0]/20 bg-white p-6 sm:p-8"
|
||||
className="rounded-2xl border border-brand/20 bg-surface p-6 sm:p-8"
|
||||
>
|
||||
{!fixedType && (
|
||||
<>
|
||||
|
|
@ -347,7 +348,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<div className={fixedType ? "" : "mt-10"}>
|
||||
<label
|
||||
htmlFor="feedback-message"
|
||||
className="text-base font-semibold text-[#26454c]"
|
||||
className="text-base font-semibold text-body"
|
||||
>
|
||||
{request ? "Your request" : "Tell us more"}
|
||||
</label>
|
||||
|
|
@ -385,9 +386,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
</div>
|
||||
|
||||
{/* Optional contact details */}
|
||||
<div className="mt-8 rounded-xl border border-dashed border-[#4a6b72]/30 bg-[#eef9fb]/60 p-5 sm:p-6">
|
||||
<div className="mt-8 rounded-xl border border-dashed border-muted/30 bg-tint/60 p-5 sm:p-6">
|
||||
<div className="flex flex-wrap items-center">
|
||||
<h3 className="text-base font-semibold text-[#26454c]">
|
||||
<h3 className="text-base font-semibold text-body">
|
||||
{request ? "How we reach you" : "Your details"}
|
||||
</h3>
|
||||
{!request && <OptionalTag />}
|
||||
|
|
@ -402,9 +403,9 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<div>
|
||||
<label
|
||||
htmlFor="feedback-name"
|
||||
className="block text-sm font-medium text-[#26454c]"
|
||||
className="block text-sm font-medium text-body"
|
||||
>
|
||||
Name <span className="font-normal text-[#4a6b72]">(optional)</span>
|
||||
Name <span className="font-normal text-muted">(optional)</span>
|
||||
</label>
|
||||
<input
|
||||
id="feedback-name"
|
||||
|
|
@ -418,10 +419,10 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<div>
|
||||
<label
|
||||
htmlFor="feedback-email"
|
||||
className="block text-sm font-medium text-[#26454c]"
|
||||
className="block text-sm font-medium text-body"
|
||||
>
|
||||
Email{" "}
|
||||
<span className="font-normal text-[#4a6b72]">{request ? "(required)" : "(optional)"}</span>
|
||||
<span className="font-normal text-muted">{request ? "(required)" : "(optional)"}</span>
|
||||
</label>
|
||||
<input
|
||||
id="feedback-email"
|
||||
|
|
@ -459,7 +460,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
{formError && (
|
||||
<p
|
||||
role="alert"
|
||||
className="mt-8 rounded-xl border border-[#b3261e]/30 bg-[#fdf3f2] px-4 py-3 text-sm text-[#b3261e]"
|
||||
className="mt-8 rounded-xl border border-danger/30 bg-danger-tint px-4 py-3 text-sm text-danger"
|
||||
>
|
||||
{formError}
|
||||
</p>
|
||||
|
|
@ -469,7 +470,7 @@ export default function FeedbackForm({ fixedType }: { fixedType?: string } = {})
|
|||
<button
|
||||
type="submit"
|
||||
disabled={!ready || sending}
|
||||
className="rounded-full bg-[#0f7183] px-7 py-3 font-semibold text-white transition-colors hover:bg-[#0b5c6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40 disabled:cursor-not-allowed disabled:bg-[#4a6b72]/25 disabled:text-white/80"
|
||||
className="rounded-full bg-action px-7 py-3 font-semibold text-white transition-colors hover:bg-action-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 disabled:cursor-not-allowed disabled:bg-muted/25 disabled:text-white/80"
|
||||
>
|
||||
{sending ? "Sending…" : request ? "Send request" : "Send feedback"}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
useOrganizations,
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: CARDS
|
||||
|
|
@ -23,8 +24,8 @@ import {
|
|||
array, only the short card description.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* Wide enough for a logo beside two lines of text, narrow enough
|
||||
|
|
@ -70,7 +71,7 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
|||
return (
|
||||
<div
|
||||
className="rounded-2xl p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
|
||||
style={{ border: `1px solid ${color}`, background: "#ffffff" }}
|
||||
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
|
||||
>
|
||||
<div className="flex items-start gap-4">
|
||||
<OrgMark org={org} color={color} />
|
||||
|
|
@ -195,7 +196,7 @@ export default function OrgListCards({
|
|||
|
||||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
@ -203,7 +204,7 @@ export default function OrgListCards({
|
|||
|
||||
if (organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{empty}
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import ArrowLink from "../../components/ArrowLink.tsx";
|
|||
import { orgLogo } from "../../lib/media.ts";
|
||||
import { initialsFor, orgPath } from "../../lib/organizations.ts";
|
||||
import { AREAS, AREA_NAMES } from "../../data/mapGrid.ts";
|
||||
import { withAlpha, accentText, readableOn } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: MAP
|
||||
|
|
@ -40,9 +41,9 @@ const ROWS = 7;
|
|||
// stays at max-w-6xl, so this deliberately breaks out past it.
|
||||
const CONTENT_MAX = "88rem";
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const RULE = "#cfe3e7";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* organizations.color is nullable; an SVG fill left undefined paints
|
||||
|
|
@ -214,7 +215,7 @@ function Tile({
|
|||
height={size}
|
||||
rx={14}
|
||||
fill="none"
|
||||
stroke={active ? colorOf(primary) : "#ffffff"}
|
||||
stroke={active ? colorOf(primary) : "var(--color-surface)"}
|
||||
strokeOpacity={active ? 1 : 0.55}
|
||||
strokeWidth={active ? 4 : 2}
|
||||
className="transition-all duration-200"
|
||||
|
|
@ -227,7 +228,7 @@ function Tile({
|
|||
dominantBaseline="middle"
|
||||
fontSize={fontSize}
|
||||
fontWeight="800"
|
||||
fill={count ? "#ffffff" : colorOf(primary)}
|
||||
fill={count ? "var(--color-surface)" : colorOf(primary)}
|
||||
style={{ pointerEvents: "none" }}
|
||||
>
|
||||
{label || code}
|
||||
|
|
@ -292,7 +293,7 @@ function LegendButton({ region, selected, setSelected, hovered, setHovered }) {
|
|||
style={{
|
||||
border: `1px solid ${colorOf(region)}`,
|
||||
background: on ? colorOf(region) : "transparent",
|
||||
color: on ? "#ffffff" : INK,
|
||||
color: on ? readableOn(colorOf(region)) : INK,
|
||||
opacity: selected && selected !== region.id ? 0.45 : 1,
|
||||
}}
|
||||
>
|
||||
|
|
@ -496,7 +497,7 @@ function ChapterCard({ chapter, color, open, onOpen }) {
|
|||
className="rounded-2xl p-4 flex items-start gap-4 transition-all duration-200"
|
||||
style={{
|
||||
border: `1px solid ${color}`,
|
||||
background: open ? `${color}14` : "transparent",
|
||||
background: open ? `${withAlpha(color, 8)}` : "transparent",
|
||||
}}
|
||||
>
|
||||
<OrgLogo org={chapter} color={color} />
|
||||
|
|
@ -574,7 +575,7 @@ function ChapterDetail({ chapter, region, onClose }) {
|
|||
return (
|
||||
<div
|
||||
className="rounded-2xl p-6 mb-6"
|
||||
style={{ border: `2px solid ${colorOf(region)}`, background: `${colorOf(region)}0f` }}
|
||||
style={{ border: `2px solid ${colorOf(region)}`, background: `${withAlpha(colorOf(region), 6)}` }}
|
||||
>
|
||||
<div className="flex items-start gap-4">
|
||||
<OrgLogo org={chapter} color={colorOf(region)} size="h-20 w-20" />
|
||||
|
|
@ -616,7 +617,7 @@ function ChapterDetail({ chapter, region, onClose }) {
|
|||
<Link
|
||||
to={orgPath(chapter)!}
|
||||
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
|
||||
style={{ background: colorOf(region), color: "#ffffff" }}
|
||||
style={{ background: colorOf(region), color: readableOn(colorOf(region)) }}
|
||||
>
|
||||
Chapter page
|
||||
</Link>
|
||||
|
|
@ -723,7 +724,7 @@ function ChapterGrid({ regions, chapters, chaptersIn, subtextFor, openId, setOpe
|
|||
export function OrgMapToggle({ view, setView, accent }) {
|
||||
const btn = active => ({
|
||||
background: active ? accent : "transparent",
|
||||
color: active ? "#ffffff" : accent,
|
||||
color: active ? readableOn(accent) : accentText(accent),
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -834,7 +835,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
|
||||
if (error && regions.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· Chapters couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
useOrganizations,
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST: VERTICAL
|
||||
|
|
@ -38,9 +39,9 @@ import {
|
|||
a partner row simply doesn't have them.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
const RULE = "#cfe3e7";
|
||||
const INK = "#2c4a50";
|
||||
const MUTED = "var(--color-muted)";
|
||||
const RULE = "color-mix(in srgb, var(--color-muted) 25%, transparent)";
|
||||
const INK = "var(--color-body)";
|
||||
const FALLBACK_COLOR = "#4a6b72";
|
||||
|
||||
/* ── Row button ───────────────────────────────────────────────
|
||||
|
|
@ -290,7 +291,7 @@ export default function OrgListVertical({
|
|||
|
||||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
|
|
@ -298,7 +299,7 @@ export default function OrgListVertical({
|
|||
|
||||
if (organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-semibold" style={{ color: accent }}>
|
||||
<p className="font-semibold" style={{ color: accentText(accent) }}>
|
||||
{empty}
|
||||
</p>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -38,9 +38,10 @@ import { NAV_ACTIONS, PAGE_LINKS, PAGE_SECTIONS } from '../../navConfig.ts'
|
|||
import { awardHref, blogHref, eventHref, orgHref, personHref, teamHref } from '../../lib/hrefs.ts'
|
||||
import { siteUrl } from '../../lib/site.ts'
|
||||
import { useDirectory, type Directory } from '../../lib/useContent.ts'
|
||||
import { accentText } from '../../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const MUTED = '#4a6b72'
|
||||
const MUTED = 'var(--color-muted)'
|
||||
|
||||
/* PNG download size in pixels. Plenty for print at a few inches;
|
||||
anything bigger should use the SVG. */
|
||||
|
|
@ -316,7 +317,7 @@ export default function QrCodeMaker() {
|
|||
|
||||
{kind === 'custom' ? (
|
||||
<div>
|
||||
<label htmlFor="qr-custom" className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor="qr-custom" className="block text-sm font-medium text-body">
|
||||
Link
|
||||
</label>
|
||||
<input
|
||||
|
|
@ -337,7 +338,7 @@ export default function QrCodeMaker() {
|
|||
) : needsDirectory && loading && !directory ? (
|
||||
<p style={{ color: MUTED }}>Loading the list…</p>
|
||||
) : needsDirectory && error ? (
|
||||
<p className="text-[#b3261e]">Couldn't load the list of pages. {error}</p>
|
||||
<p className="text-danger">Couldn't load the list of pages. {error}</p>
|
||||
) : choices.length === 0 ? (
|
||||
<p style={{ color: MUTED }}>Nothing published here yet.</p>
|
||||
) : (
|
||||
|
|
@ -390,7 +391,7 @@ export default function QrCodeMaker() {
|
|||
</Select>
|
||||
|
||||
<fieldset>
|
||||
<legend className="text-sm font-medium text-[#26454c]">Colours</legend>
|
||||
<legend className="text-sm font-medium text-body">Colours</legend>
|
||||
<div className="mt-2 flex flex-wrap items-end gap-5">
|
||||
<ColourInput id="qr-ink" label="Code" value={ink} onChange={setInk} />
|
||||
<ColourInput id="qr-paper" label="Background" value={paper} onChange={setPaper} />
|
||||
|
|
@ -406,14 +407,14 @@ export default function QrCodeMaker() {
|
|||
setDoveColor(QR_DOVE)
|
||||
}}
|
||||
className="pb-2 text-sm underline"
|
||||
style={{ color: TEAL }}
|
||||
style={{ color: accentText(TEAL) }}
|
||||
>
|
||||
Reset colours
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{warning && (
|
||||
<p role="status" className="mt-2 rounded-lg bg-[#fdf3f2] px-3 py-2 text-sm text-[#b3261e]">
|
||||
<p role="status" className="mt-2 rounded-lg bg-danger-tint px-3 py-2 text-sm text-danger">
|
||||
{warning}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -421,16 +422,16 @@ export default function QrCodeMaker() {
|
|||
|
||||
{url && (
|
||||
<div>
|
||||
<p className="text-sm font-medium text-[#26454c]">Links to</p>
|
||||
<p className="text-sm font-medium text-body">Links to</p>
|
||||
<div className="mt-2 flex flex-wrap items-center gap-3">
|
||||
<code className="break-all rounded-lg bg-white px-3 py-2 text-sm text-[#26454c] ring-1 ring-[#4a6b72]/20">
|
||||
<code className="break-all rounded-lg bg-surface px-3 py-2 text-sm text-body ring-1 ring-muted/20">
|
||||
{url}
|
||||
</code>
|
||||
<button
|
||||
type="button"
|
||||
onClick={copy}
|
||||
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-[#138ba0]/10"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
className="rounded-full border px-4 py-2 text-sm font-semibold transition-colors hover:bg-brand/10"
|
||||
style={{ borderColor: TEAL, color: accentText(TEAL) }}
|
||||
>
|
||||
{copied ? 'Copied ✓' : 'Copy link'}
|
||||
</button>
|
||||
|
|
@ -442,7 +443,7 @@ export default function QrCodeMaker() {
|
|||
<div className="flex flex-col items-center gap-5">
|
||||
{url ? (
|
||||
<>
|
||||
<div className="w-full max-w-sm rounded-3xl bg-white p-6 shadow-lg ring-1 ring-[#4a6b72]/10">
|
||||
<div className="w-full max-w-sm rounded-3xl bg-white p-6 shadow-lg ring-1 ring-muted/10">
|
||||
<QrCode
|
||||
ref={svgRef}
|
||||
value={url}
|
||||
|
|
@ -467,7 +468,7 @@ export default function QrCodeMaker() {
|
|||
</p>
|
||||
</>
|
||||
) : (
|
||||
<div className="aspect-square w-full max-w-sm rounded-3xl bg-white/60 ring-1 ring-[#4a6b72]/10" />
|
||||
<div className="aspect-square w-full max-w-sm rounded-3xl bg-white/60 ring-1 ring-muted/10" />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -479,7 +480,7 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
|
|||
<button
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
className="rounded-full bg-[#0f7183] px-6 py-3 font-semibold text-white transition-colors hover:bg-[#0b5c6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40"
|
||||
className="rounded-full bg-action px-6 py-3 font-semibold text-white transition-colors hover:bg-action-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40"
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
|
@ -487,8 +488,8 @@ function DownloadButton({ onClick, children }: { onClick: () => void; children:
|
|||
}
|
||||
|
||||
const inputClass =
|
||||
'w-full rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 text-[#26454c] ' +
|
||||
'outline-none transition-colors focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25'
|
||||
'w-full rounded-xl border border-muted/25 bg-surface px-4 py-3 text-body ' +
|
||||
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
|
||||
|
||||
/* A colour well with its hex beside it, both editable. */
|
||||
function ColourInput({
|
||||
|
|
@ -515,7 +516,7 @@ function ColourInput({
|
|||
type="color"
|
||||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
className="h-9 w-11 cursor-pointer rounded border border-[#4a6b72]/25 bg-white"
|
||||
className="h-9 w-11 cursor-pointer rounded border border-muted/25 bg-white"
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
|
|
@ -525,7 +526,7 @@ function ColourInput({
|
|||
setText(e.target.value)
|
||||
if (/^#[0-9a-f]{6}$/i.test(e.target.value)) onChange(e.target.value.toLowerCase())
|
||||
}}
|
||||
className="w-24 rounded-lg border border-[#4a6b72]/25 bg-white px-2 py-1.5 font-mono text-sm text-[#26454c] outline-none focus:border-[#138ba0]"
|
||||
className="w-24 rounded-lg border border-muted/25 bg-surface px-2 py-1.5 font-mono text-sm text-body outline-none focus:border-brand"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -533,8 +534,8 @@ function ColourInput({
|
|||
}
|
||||
|
||||
const selectClass =
|
||||
'w-full appearance-none rounded-xl border border-[#4a6b72]/25 bg-white px-4 py-3 pr-10 text-[#26454c] ' +
|
||||
'outline-none transition-colors focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25'
|
||||
'w-full appearance-none rounded-xl border border-muted/25 bg-surface px-4 py-3 pr-10 text-body ' +
|
||||
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
|
||||
|
||||
function Select({
|
||||
id,
|
||||
|
|
@ -551,7 +552,7 @@ function Select({
|
|||
}) {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={id} className="block text-sm font-medium text-[#26454c]">
|
||||
<label htmlFor={id} className="block text-sm font-medium text-body">
|
||||
{label}
|
||||
</label>
|
||||
<div className="relative mt-2">
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
.ngu-tl {
|
||||
/* Defaults match the site palette; History.tsx overrides accent and
|
||||
surface per section so the rail sits on the right background. */
|
||||
--tl-ink: #16343a;
|
||||
--tl-muted: #4a6b72;
|
||||
--tl-faint: #8aa7ad;
|
||||
--tl-rail: #cfe4e8;
|
||||
--tl-surface: #ffffff;
|
||||
--tl-ink: var(--color-ink);
|
||||
--tl-muted: var(--color-muted);
|
||||
--tl-faint: color-mix(in srgb, var(--color-muted) 70%, transparent);
|
||||
--tl-rail: color-mix(in srgb, var(--color-brand) 20%, transparent);
|
||||
--tl-surface: var(--color-surface);
|
||||
--tl-accent: #0f7183;
|
||||
--tl-accent-soft: color-mix(in srgb, var(--tl-accent) 12%, transparent);
|
||||
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
line-height: 1.1;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: sideways;
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__decade--pre .ngu-tl__decadeNum {
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
}
|
||||
|
||||
.ngu-tl__yearBtn:hover .ngu-tl__yearLabel {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__yearBtn:focus-visible {
|
||||
|
|
@ -323,7 +323,7 @@ a.ngu-tl__entry:focus-visible {
|
|||
}
|
||||
|
||||
a.ngu-tl__entry:hover .ngu-tl__entryTitle {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__entryMeta {
|
||||
|
|
@ -441,7 +441,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
}
|
||||
|
||||
.ngu-tl__toolbarBtn:hover {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
border-color: var(--tl-accent);
|
||||
}
|
||||
|
||||
|
|
@ -505,7 +505,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
}
|
||||
|
||||
.ngu-tl__upcomingBtn:hover {
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__upcomingBtn:focus-visible {
|
||||
|
|
@ -629,7 +629,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
font-size: 0.625rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--tl-accent);
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.ngu-tl__personName {
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ type CalendarBandProps = { id: string; title: string; blurb?: string | null }
|
|||
|
||||
export default function CalendarBand({ id, title, blurb }: CalendarBandProps) {
|
||||
return (
|
||||
<section id={id} className="py-24" style={{ background: '#f6fbfc' }}>
|
||||
<section id={id} className="py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||
<div className="mx-auto mb-10 max-w-6xl px-6">
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||
</div>
|
||||
|
||||
<EventCalendar />
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ type FeaturedBandProps = {
|
|||
|
||||
export default function FeaturedBand({ id, title, blurb, cards }: FeaturedBandProps) {
|
||||
return (
|
||||
<section id={id} className="py-24" style={{ background: '#f6fbfc' }}>
|
||||
<section id={id} className="py-24" style={{ background: 'var(--color-tint-soft)' }}>
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">{title}</h2>
|
||||
{blurb && <p className="mt-4 max-w-2xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">{title}</h2>
|
||||
{blurb && <p className="mt-4 max-w-2xl text-lg text-muted">{blurb}</p>}
|
||||
<div className="mt-12">
|
||||
<FeaturedCards cards={cards} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import HomeLink from './HomeLink.tsx'
|
|||
import { useHistory } from '../../../lib/useHistory.ts'
|
||||
import { hrefFor, logoSrc } from '../../../lib/timelineRefs.ts'
|
||||
import { MONTH_LABELS, type TimelineItem } from '../../../lib/timeline.ts'
|
||||
import { accentText } from '../../../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
const DRAG_SLOP = 6
|
||||
|
|
@ -77,10 +78,10 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
<section id={id} className="overflow-hidden py-24" style={{ background: '#f4faf7' }}>
|
||||
<div className="mx-auto flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
||||
<div>
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||
</div>
|
||||
|
||||
{featured.length > 1 && (
|
||||
|
|
@ -94,8 +95,8 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
type="button"
|
||||
onClick={() => step(direction as number)}
|
||||
aria-label={label as string}
|
||||
className="flex h-12 w-12 items-center justify-center rounded-full border text-2xl transition-colors hover:bg-white"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
className="flex h-12 w-12 items-center justify-center rounded-full border text-2xl transition-colors hover:bg-surface"
|
||||
style={{ borderColor: TEAL, color: accentText(TEAL) }}
|
||||
>
|
||||
{glyph}
|
||||
</button>
|
||||
|
|
@ -105,7 +106,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
</div>
|
||||
|
||||
{error ? (
|
||||
<p className="mx-auto mt-10 max-w-6xl px-6 text-[#b3261e]">
|
||||
<p className="mx-auto mt-10 max-w-6xl px-6 text-danger">
|
||||
Couldn’t load the timeline. {error}{' '}
|
||||
<button type="button" onClick={reload} className="underline">
|
||||
Try again
|
||||
|
|
@ -114,7 +115,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
) : loading ? (
|
||||
<div className="mx-auto mt-12 flex max-w-6xl gap-6 px-6" aria-hidden="true">
|
||||
{[0, 1, 2].map((i) => (
|
||||
<div key={i} className="h-72 w-80 shrink-0 animate-pulse rounded-3xl bg-white" />
|
||||
<div key={i} className="h-72 w-80 shrink-0 animate-pulse rounded-3xl bg-surface" />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
|
|
@ -154,7 +155,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
to="/history"
|
||||
draggable={false}
|
||||
className="flex flex-1 flex-col justify-center rounded-3xl p-8 text-white transition-transform duration-300 hover:-translate-y-1"
|
||||
style={{ background: `linear-gradient(150deg, ${TEAL}, #073d4a)` }}
|
||||
style={{ background: TEAL }}
|
||||
>
|
||||
<span className="font-display text-2xl font-extrabold">The whole story</span>
|
||||
<span className="mt-2 text-white/75">Every year, every milestone.</span>
|
||||
|
|
@ -195,18 +196,18 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
className="mb-5 h-14 w-14 object-contain"
|
||||
/>
|
||||
)}
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: TEAL }}>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em]" style={{ color: accentText(TEAL) }}>
|
||||
{dateLabel(item)}
|
||||
</p>
|
||||
<p className="mt-2 font-display text-xl font-bold leading-snug text-[#073d4a]">
|
||||
<p className="mt-2 font-display text-xl font-bold leading-snug text-ink">
|
||||
{item.title}
|
||||
</p>
|
||||
{item.meta && <p className="mt-1 text-sm text-[#4a6b72]">{item.meta}</p>}
|
||||
{item.meta && <p className="mt-1 text-sm text-muted">{item.meta}</p>}
|
||||
{item.blurb && (
|
||||
<p className="mt-3 line-clamp-4 text-sm leading-relaxed text-[#4a6b72]">{item.blurb}</p>
|
||||
<p className="mt-3 line-clamp-4 text-sm leading-relaxed text-muted">{item.blurb}</p>
|
||||
)}
|
||||
{href && (
|
||||
<span className="mt-auto pt-5 text-sm font-semibold" style={{ color: TEAL }}>
|
||||
<span className="mt-auto pt-5 text-sm font-semibold" style={{ color: accentText(TEAL) }}>
|
||||
Read more →
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -214,15 +215,15 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
|
|||
)
|
||||
|
||||
const card =
|
||||
'flex flex-1 flex-col rounded-3xl border border-[#138ba0]/15 bg-white p-7 shadow-sm'
|
||||
'flex flex-1 flex-col rounded-3xl border border-brand/15 bg-surface p-7 shadow-sm'
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col">
|
||||
{/* The line, its dot, and the year where it changes. */}
|
||||
<div className="relative mb-4 h-8">
|
||||
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-[#138ba0]/30" />
|
||||
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-brand/30" />
|
||||
<span
|
||||
className="absolute left-0 top-1/2 h-3 w-3 -translate-y-1/2 rounded-full border-2 bg-white"
|
||||
className="absolute left-0 top-1/2 h-3 w-3 -translate-y-1/2 rounded-full border-2 bg-surface"
|
||||
style={{ borderColor: TEAL }}
|
||||
/>
|
||||
{showYear && (
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import { eventBackground, heroPhoto } from '../../../lib/media.ts'
|
|||
import { eventHref } from '../../../lib/hrefs.ts'
|
||||
import { seriesLabel } from '../../../lib/eventSeries.ts'
|
||||
import type { Hero, HeroBackdrop, HeroEvent, HeroFeature, HeroSlide } from '../../../lib/useFrontPage.ts'
|
||||
import { withAlpha } from '../../../lib/color.ts'
|
||||
|
||||
const DEEP = '#04262e'
|
||||
|
||||
|
|
@ -187,7 +188,7 @@ function Words({ hero, feature }: { hero: Hero; feature: HeroFeature }) {
|
|||
<HomeLink
|
||||
url={hero.primary.url}
|
||||
className="rounded-full px-8 py-4 text-lg font-bold text-[#04262e] shadow-xl transition-transform duration-300 hover:-translate-y-0.5 hover:scale-[1.03]"
|
||||
style={{ background: 'linear-gradient(120deg, #9fe7d0, #5ce7ff)' }}
|
||||
style={{ background: '#9fe7d0' }}
|
||||
>
|
||||
{hero.primary.label}
|
||||
</HomeLink>
|
||||
|
|
@ -461,7 +462,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
return (
|
||||
<div
|
||||
className="overflow-hidden rounded-3xl border border-white/15 bg-white/10 text-white shadow-2xl backdrop-blur"
|
||||
style={{ boxShadow: `0 30px 80px -20px ${color}66` }}
|
||||
style={{ boxShadow: `0 30px 80px -20px ${withAlpha(color, 40)}` }}
|
||||
>
|
||||
{photo ? (
|
||||
<img src={photo} alt="" className="aspect-[16/7] w-full object-cover" />
|
||||
|
|
@ -469,7 +470,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
<div
|
||||
aria-hidden="true"
|
||||
className="aspect-[16/7] w-full"
|
||||
style={{ background: `linear-gradient(135deg, ${color}, #04262e)` }}
|
||||
style={{ background: `color-mix(in srgb, ${color} 35%, #04262e)` }}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
@ -496,7 +497,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
className={`inline-flex items-center gap-2 rounded-full px-6 py-3 font-semibold transition-transform hover:scale-105 ${
|
||||
index === 0 ? 'text-[#04262e]' : 'border border-white/35 text-white hover:bg-white/10'
|
||||
}`}
|
||||
style={index === 0 ? { background: 'linear-gradient(120deg, #9fe7d0, #5ce7ff)' } : undefined}
|
||||
style={index === 0 ? { background: '#9fe7d0' } : undefined}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
{link.label}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import { Link } from 'react-router-dom'
|
|||
import { eventHref } from '../../../lib/hrefs.ts'
|
||||
import { upcomingOccurrences } from '../../../lib/eventSeries.ts'
|
||||
import type { CountdownEvent } from '../../../lib/useFrontPage.ts'
|
||||
import { withAlpha, accentText } from '../../../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
|
||||
|
|
@ -86,16 +87,16 @@ export default function NextEventCountdown({
|
|||
<Link
|
||||
to={eventHref(event.id)}
|
||||
className="group mx-auto flex max-w-6xl flex-col gap-6 rounded-3xl border bg-white/95 p-6 shadow-2xl backdrop-blur transition-transform duration-300 hover:-translate-y-1 md:flex-row md:items-center md:p-8"
|
||||
style={{ borderColor: `${accent}55` }}
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}` }}
|
||||
>
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-xs font-bold uppercase tracking-[0.25em]" style={{ color: accent }}>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.25em]" style={{ color: accentText(accent) }}>
|
||||
{live ? 'Happening now' : 'Next up'}
|
||||
</p>
|
||||
<p className="mt-1 truncate font-display text-2xl font-extrabold text-[#073d4a] md:text-3xl">
|
||||
<p className="mt-1 truncate font-display text-2xl font-extrabold text-ink md:text-3xl">
|
||||
{event.title}
|
||||
</p>
|
||||
<p className="mt-1 text-sm text-[#4a6b72]">
|
||||
<p className="mt-1 text-sm text-muted">
|
||||
{[event.theme && `“${event.theme}”`, event.date_label, where]
|
||||
.filter(Boolean)
|
||||
.join(' · ')}
|
||||
|
|
@ -108,7 +109,7 @@ export default function NextEventCountdown({
|
|||
<div
|
||||
key={label}
|
||||
className="flex w-16 flex-col items-center rounded-2xl py-3 text-white md:w-20"
|
||||
style={{ background: `linear-gradient(160deg, ${accent}, #073d4a)` }}
|
||||
style={{ background: `color-mix(in srgb, ${accent} 35%, #04262e)` }}
|
||||
>
|
||||
<span className="font-display text-2xl font-bold tabular-nums md:text-3xl">
|
||||
{String(value).padStart(2, '0')}
|
||||
|
|
@ -123,7 +124,7 @@ export default function NextEventCountdown({
|
|||
|
||||
<span
|
||||
className="self-start text-sm font-semibold transition-transform group-hover:translate-x-1 md:self-center"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
>
|
||||
Details →
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import { useId, useRef, useState, type KeyboardEvent } from 'react'
|
|||
|
||||
import HomeLink, { isExternal } from './HomeLink.tsx'
|
||||
import type { FrontPagePath } from '../../../lib/useFrontPage.ts'
|
||||
import { withAlpha, accentText } from '../../../lib/color.ts'
|
||||
|
||||
type PathfinderProps = {
|
||||
id: string
|
||||
|
|
@ -62,17 +63,17 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
}
|
||||
|
||||
return (
|
||||
<section id={id} className="py-24" style={{ background: '#ffffff' }}>
|
||||
<section id={id} className="py-24" style={{ background: 'var(--color-surface)' }}>
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<div className="grid gap-12 lg:grid-cols-12">
|
||||
<div className="lg:col-span-5">
|
||||
<p className="text-xs font-bold uppercase tracking-[0.3em] text-[#0f7183]">
|
||||
<p className="text-xs font-bold uppercase tracking-[0.3em] text-link">
|
||||
I’m looking to…
|
||||
</p>
|
||||
<h2 className="mt-3 font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">
|
||||
<h2 className="mt-3 font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-4 text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-4 text-lg text-muted">{blurb}</p>}
|
||||
|
||||
<div
|
||||
role="tablist"
|
||||
|
|
@ -100,18 +101,18 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
className="group flex items-center gap-4 rounded-2xl border-2 px-5 py-4 text-left transition-all duration-300"
|
||||
style={{
|
||||
borderColor: on ? color : 'rgba(19,139,160,0.12)',
|
||||
background: on ? `${color}12` : '#ffffff',
|
||||
background: on ? `${withAlpha(color, 7)}` : 'var(--color-surface)',
|
||||
transform: on ? 'translateX(8px)' : undefined,
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className="flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl transition-transform duration-300 group-hover:scale-110"
|
||||
style={{ background: on ? color : `${color}1f` }}
|
||||
style={{ background: on ? color : `${withAlpha(color, 12)}` }}
|
||||
aria-hidden="true"
|
||||
>
|
||||
{option.icon || '•'}
|
||||
</span>
|
||||
<span className="font-display text-xl font-bold" style={{ color: on ? color : '#073d4a' }}>
|
||||
<span className="font-display text-xl font-bold" style={{ color: on ? accentText(color) : 'var(--color-ink)' }}>
|
||||
{option.label}
|
||||
</span>
|
||||
<span
|
||||
|
|
@ -133,7 +134,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
role="tabpanel"
|
||||
aria-labelledby={`${base}-tab-${selected}`}
|
||||
className="relative overflow-hidden rounded-[2rem] p-8 md:p-10 lg:col-span-7"
|
||||
style={{ background: `linear-gradient(155deg, ${accent}14, ${accent}05 60%, #ffffff)` }}
|
||||
style={{ background: withAlpha(accent, 5) }}
|
||||
>
|
||||
<span
|
||||
className="pointer-events-none absolute -right-6 -top-10 select-none text-[10rem] leading-none opacity-10"
|
||||
|
|
@ -143,7 +144,7 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
</span>
|
||||
|
||||
{path.blurb && (
|
||||
<p className="hp-pop relative max-w-md font-display text-2xl font-semibold leading-snug text-[#073d4a]">
|
||||
<p className="hp-pop relative max-w-md font-display text-2xl font-semibold leading-snug text-ink">
|
||||
{path.blurb}
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -157,20 +158,20 @@ export default function Pathfinder({ id, title, blurb, paths }: PathfinderProps)
|
|||
>
|
||||
<HomeLink
|
||||
url={action.url}
|
||||
className="group flex h-full flex-col rounded-2xl bg-white p-6 shadow-sm ring-1 ring-black/5 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
|
||||
className="group flex h-full flex-col rounded-2xl bg-surface p-6 shadow-sm ring-1 ring-black/5 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
|
||||
>
|
||||
<span className="flex items-start gap-2 font-display text-lg font-bold text-[#073d4a]">
|
||||
<span className="flex items-start gap-2 font-display text-lg font-bold text-ink">
|
||||
{action.label}
|
||||
<span
|
||||
className="ml-auto transition-transform group-hover:translate-x-1"
|
||||
style={{ color: accent }}
|
||||
style={{ color: accentText(accent) }}
|
||||
aria-hidden="true"
|
||||
>
|
||||
{isExternal(action.url) ? '↗' : '→'}
|
||||
</span>
|
||||
</span>
|
||||
{action.description && (
|
||||
<span className="mt-2 text-sm leading-relaxed text-[#4a6b72]">
|
||||
<span className="mt-2 text-sm leading-relaxed text-muted">
|
||||
{action.description}
|
||||
</span>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
import { Link } from 'react-router-dom'
|
||||
|
||||
import EventListCards from '../EventList-Cards.tsx'
|
||||
import { accentText } from '../../../lib/color.ts'
|
||||
|
||||
const TEAL = '#0f7183'
|
||||
|
||||
|
|
@ -17,18 +18,18 @@ type RetreatsBandProps = { id: string; title: string; blurb?: string | null }
|
|||
|
||||
export default function RetreatsBand({ id, title, blurb }: RetreatsBandProps) {
|
||||
return (
|
||||
<section id={id} className="overflow-hidden py-24" style={{ background: '#eef9fb' }}>
|
||||
<section id={id} className="overflow-hidden py-24" style={{ background: 'var(--color-tint)' }}>
|
||||
<div className="mx-auto mb-12 flex max-w-6xl flex-wrap items-end gap-6 px-6">
|
||||
<div>
|
||||
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">
|
||||
<h2 className="font-display text-4xl font-extrabold text-ink md:text-5xl">
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-[#4a6b72]">{blurb}</p>}
|
||||
{blurb && <p className="mt-3 max-w-xl text-lg text-muted">{blurb}</p>}
|
||||
</div>
|
||||
<Link
|
||||
to="/retreats"
|
||||
className="ml-auto rounded-full border px-5 py-2 text-sm font-semibold transition-colors hover:bg-white"
|
||||
style={{ borderColor: TEAL, color: TEAL }}
|
||||
className="ml-auto rounded-full border px-5 py-2 text-sm font-semibold transition-colors hover:bg-surface"
|
||||
style={{ borderColor: TEAL, color: accentText(TEAL) }}
|
||||
>
|
||||
All retreats →
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
|
|||
id={id}
|
||||
ref={ref}
|
||||
className="relative overflow-hidden py-24"
|
||||
style={{ background: 'linear-gradient(160deg, #073d4a 0%, #04262e 70%)' }}
|
||||
style={{ background: '#073d4a' }}
|
||||
>
|
||||
<div
|
||||
className="pointer-events-none absolute -left-40 -top-40 h-[32rem] w-[32rem] rounded-full opacity-25 blur-3xl"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue