import PageShell from "../components/PageShell.tsx"; import { sitePage } from "../lib/site.ts"; import { useSectionManifest } from "../lib/sections.tsx"; import EventListCards, { EventCardsToggle } from "./sections/EventList-Cards.tsx"; import { ACCENTS, BRAND } from "../lib/color.ts" /* Title and intro: site.json, which also gives the search metadata. */ const PAGE = sitePage("/retreats"); /* ═══════════════════════════════════════════════════════════════ RETREATS PAGE Three bands, all the same view of the same table with a different filter. The page declares them and does nothing else, each section fetches its own slice. Two filters per band now, and they answer different questions: scope whose gathering it is. event_scopes holds six of these; this page draws three. type what kind of gathering it is. Pinned to "retreat" everywhere on this page, which is what the page is for and what lets "Partner" read as a heading rather than a catch-all. Because every band is pinned to one type, EventListCards finds a single kind in each and draws no type chips. Drop the `type` from a band and the chips appear on their own. What this page deliberately does not show: local, international and other scopes, and every non-retreat type. Those are reachable from their host's page and by URL, and get a band here when there's enough of them to fill one, see the block at the bottom. To reorder the page, move a line. To add a different kind of section, add an entry with another Component. ═══════════════════════════════════════════════════════════════ */ const CARD_VIEWS = { options: ["carousel", "grid"], Toggle: EventCardsToggle }; /* Pinned on every band. Named rather than repeated so turning this page into "everything, filtered" later is one deletion. */ const RETREATS = { type: "retreat" }; const SECTIONS = [ { id: "national", title: "National Retreats", blurb: "Our flagship gatherings, open to young adults across the country.", accent: BRAND, background: "var(--color-tint)", Component: EventListCards, props: { scope: "national", ...RETREATS }, views: { ...CARD_VIEWS, default: "carousel" }, }, { id: "regional", title: "Regional Retreats", blurb: "Smaller gatherings hosted by regions throughout the year.", accent: ACCENTS.green, background: "var(--color-surface)", Component: EventListCards, props: { scope: "regional", ...RETREATS }, views: { ...CARD_VIEWS, default: "grid" }, }, { id: "partner", title: "Partner Events", blurb: "Retreats hosted by organizations we collaborate with.", accent: ACCENTS.mint, background: "var(--color-tint)", Component: EventListCards, props: { scope: "partner", ...RETREATS }, views: { ...CARD_VIEWS, default: "grid" }, }, /* The other three scopes, ready to uncomment. Each needs an accent and a background of its own, those are presentation and live here, not in event_scopes. { id: "local", title: "Local Events", blurb: "Hosted by individual chapters.", accent: ACCENTS.green, background: "var(--color-surface)", Component: EventListCards, props: { scope: "local", ...RETREATS_ONLY }, views: { ...CARD_VIEWS, default: "grid" }, }, { id: "international", title: "International Events", blurb: "Gatherings beyond the US.", accent: ACCENTS.deep, background: "var(--color-tint)", Component: EventListCards, props: { scope: "international", ...RETREATS_ONLY }, views: { ...CARD_VIEWS, default: "grid" }, }, { id: "other", title: "Other Events", blurb: "Everything that doesn't fit the categories above.", accent: ACCENTS.mint, background: "var(--color-surface)", Component: EventListCards, props: { scope: "other", ...RETREATS_ONLY }, views: { ...CARD_VIEWS, default: "grid" }, }, */ ]; export default function RetreatsPage() { const sections = useSectionManifest(SECTIONS); return ( ); }