- The header's second strip is gone: each top link drops down its page's sections on hover or keyboard focus. - Retreats, Community, Resources, Organization and History get the admin editors' "On this page" column (SectionNav), sticky at the left from lg up, with the section being read lit. - Home's sections in the dropdown, mobile menu, footer site map, the feedback form and the QR maker are the bands the front page is showing, in its order and under its headings (navSections.ts, frontPageBands.ts, which Home.tsx now draws from too). - Resources comes before Organization in the nav and footer. - The Organization page draws from its own editor's content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
121 lines
4.2 KiB
TypeScript
121 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
|
|
sideNav
|
|
title={PAGE.title}
|
|
intro={PAGE.description}
|
|
sections={sections}
|
|
/>
|
|
);
|
|
}
|