NGU-Web/src/pages/Retreats.tsx
Zaldimmar 79f1d09eef Try the revised palette (teal, green, amber, ink)
The suggested grid as the theme defaults, light and dark, with
PALETTE, the accents (olive becomes amber), the backdrop shades
and every literal from the old grid mapped over. Every text pair
passes the admin's 4.5:1 check; the hero's filled button is amber.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:51:14 -05:00

120 lines
4.2 KiB
TypeScript

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,
Component: EventListCards,
props: { scope: "national", ...RETREATS },
views: { ...CARD_VIEWS, default: "carousel" },
request: { type: "event", label: "Add or update an event" },
},
{
id: "regional",
title: "Regional Retreats",
blurb: "Smaller gatherings hosted by regions throughout the year.",
accent: ACCENTS.green,
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.amber,
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 groups.",
accent: ACCENTS.green,
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,
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.amber,
Component: EventListCards,
props: { scope: "other", ...RETREATS_ONLY },
views: { ...CARD_VIEWS, default: "grid" },
},
*/
];
export default function RetreatsPage() {
const sections = useSectionManifest(SECTIONS);
return (
<PageShell
title={PAGE.title}
intro={PAGE.description}
sections={sections}
/>
);
}