/* Pages → Organization page: the /organization page's own content. Server side: server/src/admin-schema/organizationPage.js. Each section's blocks are their own collection; the Leadership blocks are where the teams go, a People block each, in order. */ import { blocksChild } from "./shared.ts"; /* A block collection for one section: the shared block editor, without "Shown in" (these blocks only ever show on the page). */ const sectionBlocks = (key: string, label: string, note: string) => ({ ...blocksChild, key, label, note, fields: blocksChild.fields.filter((field) => field.path !== "slot"), }); export const organizationPage = { key: "organization_page", label: "Organization page", singular: "organization page", idLabel: "Page", singleton: "organization", list: { columns: [], filters: [] }, groups: [ { legend: "Mission, Vision & Values", note: "The page's first section. Its content is the Mission blocks below.", fields: [{ path: "mission_title", label: "Heading", help: "Default: Mission, Vision & Values" }], }, { legend: "Leadership", note: "The second section: the Leadership blocks below, then Volunteering.", fields: [ { path: "leadership_title", label: "Heading", help: "Default: Leadership" }, { path: "leadership_blurb", label: "Blurb", widget: "textarea", full: true }, ], }, { legend: "Volunteering", note: "Under the leadership: a title, a line or two and the links below.", fields: [ { path: "volunteer_title", label: "Title", help: "Default: Volunteering" }, { path: "volunteer_blurb", label: "Blurb", widget: "textarea", full: true }, ], }, ], children: [ sectionBlocks("mission_blocks", "Mission blocks", "The Mission, Vision & Values section: headings, paragraphs, lists, whatever it needs."), sectionBlocks( "leadership_blocks", "Leadership blocks", "The Leadership section, in order: eg. a People block for the Board of Trustees, then one for the Retreat Team.", ), { key: "volunteer_links", label: "Volunteering links", note: "Buttons under the volunteering blurb.", addLabel: "Add link", title: (row) => row.label || row.url || "New link", blank: { label: "", url: "" }, fields: [ { path: "label", label: "Label", required: true, help: "eg. Volunteer at a retreat" }, { path: "url", label: "Link", required: true, full: true, help: "A page on this site (eg. /request) or anywhere else" }, ], }, ], };