- Backdrop: two slow circles fixed to the window drift up as the page scrolls (a scroll-driven animation), three sit down the page and travel with their sections; tones still change per section. - Notices are two corner brackets, no box or fill. - People tiles: the frame is the list's, and details open right under the tile, closing on Escape or a click elsewhere. - Featured cards and the connect section: 4px rules; video frames inset from the card edge. - Calendar weekday row is a solid bar; History decade numerals are tags on the rail instead of a white box. - Region and partner buttons say Request; the region list's group count is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
95 lines
3.2 KiB
TypeScript
95 lines
3.2 KiB
TypeScript
import PageShell from "../components/PageShell.tsx";
|
|
import { sitePage } from "../lib/site.ts";
|
|
import { useSectionManifest } from "../lib/sections.tsx";
|
|
import OrgListMap, { OrgMapToggle } from "./sections/OrgList-Map.tsx";
|
|
import OrgListVertical from "./sections/OrgList-Vertical.tsx";
|
|
import OrgListCards from "./sections/OrgList-Card.tsx";
|
|
import CommunityBlog from "./sections/CommunityBlog.tsx";
|
|
import { useCommunityBlog } from "../lib/useBlog.ts";
|
|
import { ACCENTS, BRAND } from "../lib/color.ts"
|
|
|
|
/* Title and intro: site.json, which also gives the search metadata. */
|
|
const PAGE = sitePage("/community");
|
|
|
|
/* ═══════════════════════════════════════════════════════════════
|
|
COMMUNITY PAGE
|
|
|
|
The blog first, then two views of the organizations table. The
|
|
map is filtered to groups; the vertical list is filtered to
|
|
regions. Same rows, same endpoint, different shape on the page.
|
|
|
|
The blog's heading and blurb are the admin's (Pages → Community blog
|
|
section), so that one entry is built here from the same cached
|
|
request CommunityBlog makes for its posts.
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
const BLOG_DEFAULT_TITLE = "Community Blog";
|
|
|
|
const SECTIONS = [
|
|
{
|
|
id: "groups",
|
|
title: "Local Groups",
|
|
blurb:
|
|
"Young adult groups meeting in person and online across the movement.",
|
|
accent: BRAND,
|
|
Component: OrgListMap,
|
|
request: { type: "group", label: "Add or update a group" },
|
|
views: { options: ["map", "grid"], default: "map", Toggle: OrgMapToggle },
|
|
},
|
|
{
|
|
id: "regions",
|
|
title: "Unity Regions",
|
|
blurb:
|
|
"The regional organizations that support groups and host their own gatherings.",
|
|
accent: "#004c52",
|
|
Component: OrgListVertical,
|
|
request: { type: "region", label: "Request a region update" },
|
|
props: {
|
|
kind: "region",
|
|
pageLabel: "Region page",
|
|
groupBy: org => org.details?.scope,
|
|
groups: [
|
|
{ key: "domestic", title: "US Unity Regions" },
|
|
{ key: "international", title: "International Unity Regions" },
|
|
],
|
|
},
|
|
},
|
|
{
|
|
id: "partners",
|
|
title: "Partner Organizations",
|
|
blurb:
|
|
"Organizations we collaborate with across the Unity movement and beyond.",
|
|
accent: ACCENTS.olive,
|
|
Component: OrgListCards,
|
|
request: { type: "partner", label: "Request a partner listing" },
|
|
props: {
|
|
kind: "partner",
|
|
pageLabel: "Partner page",
|
|
empty: "· Partner organizations coming soon ·",
|
|
},
|
|
},
|
|
];
|
|
|
|
export default function CommunityPage() {
|
|
const { data: blog } = useCommunityBlog();
|
|
|
|
const sections = useSectionManifest([
|
|
{
|
|
id: "blog",
|
|
title: blog?.title || BLOG_DEFAULT_TITLE,
|
|
blurb: blog?.blurb ?? undefined,
|
|
accent: BRAND,
|
|
Component: CommunityBlog,
|
|
request: { type: "blog", label: "Write for the blog" },
|
|
},
|
|
...SECTIONS,
|
|
]);
|
|
|
|
return (
|
|
<PageShell
|
|
title={PAGE.title}
|
|
intro={PAGE.description}
|
|
sections={sections}
|
|
/>
|
|
);
|
|
}
|