# Add the "School Board" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/school-board) to this Pantheon Content Publisher (P1) Next.js project. Board of education members with seats and terms, a next-meeting card with agenda link, public comment steps and archive.

## Steps

1. Create `components/puck/school-board-block.tsx` with the exact file contents below. If `components/puck/` doesn't exist, find the folder where this project keeps its Puck components (look at the imports in `puck.config.tsx`) and put it there.
2. In `puck.config.tsx`, import it: `import { schoolBoardBlock } from "./components/puck/school-board-block";`
3. Register it under `components` as `SchoolBoardBlock: schoolBoardBlock`.
4. Add `"SchoolBoardBlock"` to the best-fitting entry in `categories` (this block's library category is "K-12"). Create a category only if none fits.
5. Run the project's type check (usually `pnpm typecheck`) and resolve anything project-specific.
6. If `package.json` has a `sync:registry` script, tell the user it must run (or that CI will run it) before the new component appears in the P1 editor.

## Rules

- Do not add dependencies. The block is self-contained by design: one type-only import from `@puckeditor/core`, Tailwind v4 classes, no client JavaScript.
- Keep the files as-is unless the user asks for changes. The accent color is `indigo-*`; if the project has brand colors, offer to swap them with a find-and-replace on `indigo-`.
- Images are plain `imageUrl` + `imageAlt` text fields. If this project defines a P1 media-library field (search for `"p1-media"`), offer to switch to it.
- Don't change prop names in `defaultProps`. Content editors' saved pages depend on them.

## File: `components/puck/school-board-block.tsx`

```tsx
import type { ComponentConfig } from "@puckeditor/core";

/**
 * School Board — board of education members (seat, term, email) beside a next-meeting card
 * with agenda link, how to give public comment, and a link to past meetings.
 * Register: `SchoolBoardBlock: schoolBoardBlock` in puck.config.tsx.
 */

type Heading = "h1" | "h2" | "h3" | "h4";

type Member = { name: string; office: string; seat: string; termEnds: string; email: string };

export type SchoolBoardProps = {
  heading: string;
  headingLevel: Heading;
  intro: string;
  members: Member[];
  meetingLabel: string;
  meetingDate: string;
  meetingDateIso: string;
  meetingTime: string;
  meetingPlace: string;
  agendaLabel: string;
  agendaHref: string;
  watchLabel: string;
  watchHref: string;
  commentHeading: string;
  commentText: string;
  commentLabel: string;
  commentHref: string;
  archiveLabel: string;
  archiveHref: string;
  groupEmail: string;
};

const lower = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;

const icons = {
  arrow: "M3 10a.75.75 0 0 1 .75-.75h10.64l-3.22-3.22a.75.75 0 1 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H3.75A.75.75 0 0 1 3 10Z",
  mail: "M3 4a2 2 0 0 0-2 2v1.161l8.441 4.221a1.25 1.25 0 0 0 1.118 0L19 7.162V6a2 2 0 0 0-2-2H3Zm16 4.839-7.77 3.885a2.75 2.75 0 0 1-2.46 0L1 8.839V14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.839Z",
  clock: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-13a.75.75 0 0 0-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 0 0 0-1.5h-3.25V5Z",
  pin: "m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",
  doc: "M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm2.25 8.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 3a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",
  video: "M3.25 4A2.25 2.25 0 0 0 1 6.25v7.5A2.25 2.25 0 0 0 3.25 16h7.5A2.25 2.25 0 0 0 13 13.75v-7.5A2.25 2.25 0 0 0 10.75 4h-7.5ZM19 4.75a.75.75 0 0 0-1.28-.53l-3 3a.75.75 0 0 0-.22.53v4.5c0 .199.079.39.22.53l3 3a.75.75 0 0 0 1.28-.53V4.75Z",
  chat: "M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902.848.137 1.705.248 2.57.331v3.443a.75.75 0 0 0 1.28.53l3.58-3.579a.78.78 0 0 1 .527-.224 41.202 41.202 0 0 0 5.183-.5c1.437-.232 2.43-1.49 2.43-2.903V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2Z",
};

function Icon({ d, className }: { d: string; className: string }) {
  return (
    <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className={className}>
      <path fillRule="evenodd" d={d} clipRule="evenodd" />
    </svg>
  );
}

const initials = (name: string) =>
  name
    .replace(/^(dr|mr|mrs|ms)\.?\s+/i, "")
    .split(/\s+/)
    .filter(Boolean)
    .map((p) => p[0])
    .filter((c, i, a) => i === 0 || i === a.length - 1)
    .join("")
    .toUpperCase();

const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
function dateParts(iso?: string) {
  const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(iso || "");
  if (!m) return null;
  const month = months[Number(m[2]) - 1];
  return month ? { month, day: String(Number(m[3])) } : null;
}

const pillLink =
  "inline-flex min-h-11 items-center gap-2 rounded-lg px-3.5 text-sm font-semibold transition focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white";

export const schoolBoardBlock: ComponentConfig<SchoolBoardProps> = {
  label: "School Board",
  fields: {
    heading: { type: "text", label: "Heading" },
    headingLevel: {
      type: "select",
      label: "Heading level",
      options: [
        { label: "H1", value: "h1" },
        { label: "H2", value: "h2" },
        { label: "H3", value: "h3" },
        { label: "H4", value: "h4" },
      ],
      metadata: { help: "Sets the page outline for screen readers and search. The look doesn't change." },
    },
    intro: { type: "textarea", label: "Intro", metadata: { help: "Leave blank to hide it." } },
    members: {
      type: "array",
      label: "Board members",
      min: 1,
      max: 15,
      getItemSummary: (item) => (item?.name ? `${item.name}${item.office ? ` (${item.office})` : ""}` : "Member"),
      defaultItemProps: { name: "New member", office: "", seat: "", termEnds: "", email: "" },
      arrayFields: {
        name: { type: "text", label: "Name" },
        office: { type: "text", label: "Board office", metadata: { help: "Like \"President\" or \"Clerk\". Leave blank for members." } },
        seat: { type: "text", label: "Seat or area", metadata: { help: "Like \"Trustee Area 2\" or \"At-large\"." } },
        termEnds: { type: "text", label: "Term ends", metadata: { help: "Like \"December 2028\"." } },
        email: { type: "text", label: "Email" },
      },
    },
    meetingLabel: { type: "text", label: "Meeting card label", metadata: { help: "Like \"Next regular meeting\". Leave blank to hide the meeting card." } },
    meetingDate: { type: "text", label: "Meeting date (as shown)", metadata: { help: "Like \"Tuesday, October 20, 2026\"." } },
    meetingDateIso: { type: "text", label: "Meeting date (machine-readable)", metadata: { help: "YYYY-MM-DD. Draws the calendar badge. Leave blank to hide the badge." } },
    meetingTime: { type: "text", label: "Meeting time" },
    meetingPlace: { type: "textarea", label: "Meeting place" },
    agendaLabel: { type: "text", label: "Agenda link text", metadata: { help: "Leave blank until the agenda is posted." } },
    agendaHref: { type: "text", label: "Agenda link" },
    watchLabel: { type: "text", label: "Livestream link text", metadata: { help: "Leave blank to hide it." } },
    watchHref: { type: "text", label: "Livestream link" },
    commentHeading: { type: "text", label: "Public comment heading", metadata: { help: "Leave blank to hide the public comment section." } },
    commentText: { type: "textarea", label: "Public comment instructions" },
    commentLabel: { type: "text", label: "Comment form link text", metadata: { help: "Leave blank to hide it." } },
    commentHref: { type: "text", label: "Comment form link" },
    archiveLabel: { type: "text", label: "Archive link text", metadata: { help: "Leave blank to hide it." } },
    archiveHref: { type: "text", label: "Archive link" },
    groupEmail: { type: "text", label: "Whole-board email", metadata: { help: "Reaches every member at once. Leave blank to hide it." } },
  },
  defaultProps: {
    heading: "Board of Education",
    headingLevel: "h2",
    intro: "Five trustees, elected by Riverbend voters, set district policy, approve the budget and hire the superintendent. Every meeting is open to the public.",
    members: [
      { name: "Patricia Holloway", office: "President", seat: "Trustee Area 3", termEnds: "December 2028", email: "pholloway@riverbendusd.example.org" },
      { name: "Andre Simmons", office: "Vice President", seat: "Trustee Area 1", termEnds: "December 2026", email: "asimmons@riverbendusd.example.org" },
      { name: "Mei Chen", office: "Clerk", seat: "Trustee Area 5", termEnds: "December 2028", email: "mchen@riverbendusd.example.org" },
      { name: "Robert Alvarez", office: "", seat: "Trustee Area 2", termEnds: "December 2026", email: "ralvarez@riverbendusd.example.org" },
      { name: "Keisha Morgan", office: "", seat: "Trustee Area 4", termEnds: "December 2028", email: "kmorgan@riverbendusd.example.org" },
    ],
    meetingLabel: "Next regular meeting",
    meetingDate: "Tuesday, October 20, 2026",
    meetingDateIso: "2026-10-20",
    meetingTime: "6:00 p.m.",
    meetingPlace: "Board Room, District Office, 500 Main Street, Riverbend",
    agendaLabel: "Agenda (PDF)",
    agendaHref: "/board/agendas/2026-10-20.pdf",
    watchLabel: "Watch live",
    watchHref: "/board/livestream",
    commentHeading: "Speak at a meeting",
    commentText:
      "Fill out a speaker card at the door before the meeting starts. Each speaker gets 3 minutes. Can't come? Send a written comment by noon on the meeting day and we'll share it with every trustee. Interpreters are free; ask at least 48 hours ahead at 555-0102.",
    commentLabel: "Send a written comment",
    commentHref: "/board/public-comment",
    archiveLabel: "Past agendas, minutes and videos",
    archiveHref: "/board/meetings",
    groupEmail: "board@riverbendusd.example.org",
  },
  render: ({
    id,
    heading,
    headingLevel,
    intro,
    members,
    meetingLabel,
    meetingDate,
    meetingDateIso,
    meetingTime,
    meetingPlace,
    agendaLabel,
    agendaHref,
    watchLabel,
    watchHref,
    commentHeading,
    commentText,
    commentLabel,
    commentHref,
    archiveLabel,
    archiveHref,
    groupEmail,
  }) => {
    const H = headingLevel || "h2";
    const Sub = lower[H] || "h3";
    const uid = id || "school-board";
    const list = (members ?? []).filter((m) => m?.name);
    const parts = dateParts(meetingDateIso);
    const hasAside = Boolean(meetingLabel || commentHeading || archiveLabel);

    return (
      <section aria-labelledby={heading ? `${uid}-heading` : undefined} className="bg-white px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          {heading || intro ? (
            <div className="max-w-2xl">
              {heading ? (
                <H id={`${uid}-heading`} className="text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl">
                  {heading}
                </H>
              ) : null}
              {intro ? <p className="mt-4 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
            </div>
          ) : null}

          <div className={`grid grid-cols-1 gap-10 lg:gap-12 ${hasAside ? "lg:grid-cols-5" : ""} ${heading || intro ? "mt-10 sm:mt-12" : ""}`}>
            <div className={`min-w-0 ${hasAside ? "lg:col-span-3" : ""}`}>
              {list.length ? (
                <ul role="list" className="grid grid-cols-1 gap-4 sm:grid-cols-2">
                  {list.map((m, i) => (
                    <li key={`${m.name}-${i}`} className="flex min-w-0 gap-4 rounded-2xl p-5 ring-1 ring-neutral-200">
                      <span aria-hidden="true" className="flex size-12 shrink-0 items-center justify-center rounded-full bg-indigo-50 text-base font-semibold text-indigo-800 ring-1 ring-indigo-200">
                        {initials(m.name)}
                      </span>
                      <div className="min-w-0 flex-1">
                        {m.office ? <p className="text-xs font-semibold tracking-wide text-indigo-700 uppercase">{m.office}</p> : null}
                        <Sub className="text-base leading-7 font-semibold text-neutral-950">{m.name}</Sub>
                        <dl className="mt-1 text-sm leading-6 text-neutral-600">
                          {m.seat ? (
                            <div>
                              <dt className="sr-only">Seat</dt>
                              <dd>{m.seat}</dd>
                            </div>
                          ) : null}
                          {m.termEnds ? (
                            <div className="flex gap-1">
                              <dt>Term ends</dt>
                              <dd className="text-neutral-800">{m.termEnds}</dd>
                            </div>
                          ) : null}
                        </dl>
                        {m.email ? (
                          <a
                            href={`mailto:${m.email}`}
                            className="mt-1 inline-flex min-h-11 items-center gap-2 rounded-md text-sm font-semibold text-indigo-700 hover:text-indigo-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700"
                          >
                            <Icon d={icons.mail} className="size-4 shrink-0" />
                            Email
                            <span className="sr-only"> {m.name}</span>
                          </a>
                        ) : null}
                      </div>
                    </li>
                  ))}
                </ul>
              ) : null}
              {groupEmail ? (
                <p className="mt-6 text-sm leading-6 text-neutral-700">
                  Write to the whole board:{" "}
                  <a href={`mailto:${groupEmail}`} className="inline-flex min-h-11 items-center rounded-md font-semibold break-all text-indigo-700 hover:text-indigo-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700">
                    {groupEmail}
                  </a>
                </p>
              ) : null}
            </div>

            {hasAside ? (
              <div className={`min-w-0 space-y-6 self-start ${list.length || groupEmail ? "lg:col-span-2" : "lg:col-span-5"}`}>
                {meetingLabel ? (
                  <div className="rounded-2xl bg-indigo-950 p-6 text-white sm:p-7">
                    <div className="flex items-start gap-4">
                      {parts ? (
                        <div aria-hidden="true" className="flex w-14 shrink-0 flex-col items-center overflow-hidden rounded-xl bg-white ring-1 ring-white/10">
                          <span className="w-full bg-indigo-600 py-0.5 text-center text-xs font-semibold tracking-wide text-white uppercase">{parts.month}</span>
                          <span className="py-1.5 text-2xl font-semibold tracking-tight text-neutral-950 tabular-nums">{parts.day}</span>
                        </div>
                      ) : null}
                      <div className="min-w-0">
                        <Sub className="text-sm font-semibold tracking-wide text-indigo-200 uppercase">{meetingLabel}</Sub>
                        {meetingDate ? (
                          <p className="mt-1 text-lg leading-7 font-semibold text-balance">
                            {parts ? <time dateTime={meetingDateIso.slice(0, 10)}>{meetingDate}</time> : meetingDate}
                          </p>
                        ) : null}
                      </div>
                    </div>
                    {meetingTime || meetingPlace ? (
                      <ul role="list" className="mt-4 space-y-2 text-sm leading-6 text-indigo-100">
                        {meetingTime ? (
                          <li className="flex gap-2.5">
                            <Icon d={icons.clock} className="mt-0.5 size-5 shrink-0 text-indigo-300" />
                            <span className="sr-only">Time: </span>
                            {meetingTime}
                          </li>
                        ) : null}
                        {meetingPlace ? (
                          <li className="flex gap-2.5">
                            <Icon d={icons.pin} className="mt-0.5 size-5 shrink-0 text-indigo-300" />
                            <span className="sr-only">Place: </span>
                            <span className="min-w-0 text-pretty">{meetingPlace}</span>
                          </li>
                        ) : null}
                      </ul>
                    ) : null}
                    <div className="mt-5 flex flex-wrap gap-2">
                      {agendaLabel ? (
                        <a href={agendaHref || "#"} className={`${pillLink} bg-white text-indigo-950 hover:bg-indigo-50`}>
                          <Icon d={icons.doc} className="size-4 shrink-0 text-indigo-700" />
                          {agendaLabel}
                        </a>
                      ) : (
                        <p className="text-sm text-indigo-200">Agenda posted at least 72 hours before.</p>
                      )}
                      {watchLabel ? (
                        <a href={watchHref || "#"} className={`${pillLink} text-white ring-1 ring-white/30 ring-inset hover:bg-white/10`}>
                          <Icon d={icons.video} className="size-4 shrink-0" />
                          {watchLabel}
                        </a>
                      ) : null}
                    </div>
                  </div>
                ) : null}

                {commentHeading ? (
                  <div className="rounded-2xl bg-neutral-50 p-6 ring-1 ring-neutral-200 sm:p-7">
                    <Sub className="flex items-center gap-2 text-base font-semibold text-neutral-950">
                      <Icon d={icons.chat} className="size-5 shrink-0 text-indigo-700" />
                      {commentHeading}
                    </Sub>
                    {commentText ? <p className="mt-2 text-sm leading-6 text-pretty text-neutral-700">{commentText}</p> : null}
                    {commentLabel ? (
                      <a
                        href={commentHref || "#"}
                        className="group mt-2 inline-flex min-h-11 items-center gap-1.5 rounded-md text-sm font-semibold text-indigo-700 hover:text-indigo-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700"
                      >
                        {commentLabel}
                        <Icon d={icons.arrow} className="size-4 shrink-0 transition motion-safe:group-hover:translate-x-0.5" />
                      </a>
                    ) : null}
                  </div>
                ) : null}

                {archiveLabel ? (
                  <a
                    href={archiveHref || "#"}
                    className="group flex min-h-11 items-center justify-between gap-3 rounded-xl px-1 text-sm font-semibold text-neutral-900 hover:text-indigo-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700"
                  >
                    {archiveLabel}
                    <Icon d={icons.arrow} className="size-4 shrink-0 text-indigo-700 transition motion-safe:group-hover:translate-x-0.5" />
                  </a>
                ) : null}
              </div>
            ) : null}
          </div>
        </div>
      </section>
    );
  },
};
```
