Nothing before these changes was ever public, so the fixes kept for older data go: the /leadership redirect (MOVED in routes/pages.js), index.html's move of "ngu-" browser keys to "site-", the boot-time sorting of images from before folders (media.js), and emoji path icons (a path with no named icon shows a dot; migration 055 turns the baseline's seeded emoji into their names). Pages → Organization page (migration 055): a singleton with the Mission, Vision & Values blocks, the Leadership blocks (a People block per team, in order) with a heading and blurb, and Volunteering (title, blurb, links). content_blocks gains the two owner kinds; GET /organization-page serves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.5 KiB
TypeScript
71 lines
2.5 KiB
TypeScript
/* 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" },
|
|
],
|
|
},
|
|
],
|
|
};
|