# Add the "Footer — Simple" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/footer-simple) to this Pantheon Content Publisher (P1) Next.js project. Centered name, one-line mission, a row of links, social icons and the copyright, for sites that don't need link columns.

## Steps

1. Create `components/puck/footer-simple-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 { footerSimpleBlock } from "./components/puck/footer-simple-block";`
3. Register it under `components` as `FooterSimpleBlock: footerSimpleBlock`.
4. Add `"FooterSimpleBlock"` to the best-fitting entry in `categories` (this block's library category is "Footers"). 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/footer-simple-block.tsx`

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

/**
 * Footer (Simple) — a centered footer: name or logo, one line of mission, a row of links,
 * social icons and the copyright. For small sites that don't need link columns.
 * Register: `FooterSimpleBlock: footerSimpleBlock` in puck.config.tsx.
 */

type Platform = "facebook" | "instagram" | "x" | "linkedin" | "youtube" | "other";

export type FooterSimpleProps = {
  logoText: string;
  logoImageUrl: string;
  logoImageAlt: string;
  tagline: string;
  navLabel: string;
  links: { label: string; href: string }[];
  socials: { platform: Platform; label: string; href: string }[];
  copyrightYear: string;
  copyrightHolder: string;
};

const platformNames: Record<Platform, string> = {
  facebook: "Facebook",
  instagram: "Instagram",
  x: "X",
  linkedin: "LinkedIn",
  youtube: "YouTube",
  other: "Website",
};

function SocialIcon({ platform }: { platform: Platform }) {
  const cls = "size-5";
  switch (platform) {
    case "facebook":
      return (
        <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" className={cls}>
          <path d="M14.5 8H13a1 1 0 0 0-1 1v2h2.5l-.4 3H12v7H9v-7H7v-3h2V8.6A3.6 3.6 0 0 1 12.6 5h1.9v3Z" />
        </svg>
      );
    case "instagram":
      return (
        <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" className={cls}>
          <rect x="3.5" y="3.5" width="17" height="17" rx="5" />
          <circle cx="12" cy="12" r="3.75" />
          <circle cx="17.25" cy="6.75" r="1" fill="currentColor" stroke="none" />
        </svg>
      );
    case "x":
      return (
        <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" className={cls}>
          <path d="M4 4h4.6l11.4 16h-4.6L4 4Z" />
          <path d="M18.4 4h1.9l-6.4 7.3-1-1.4L18.4 4ZM10.9 13.2l1 1.4L5.6 20H3.7l7.2-6.8Z" />
        </svg>
      );
    case "linkedin":
      return (
        <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" className={cls}>
          <path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M4.5 3h15A1.5 1.5 0 0 1 21 4.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 19.5v-15A1.5 1.5 0 0 1 4.5 3Zm2.25 7v7.5h2.5V10h-2.5ZM8 5.9a1.4 1.4 0 1 0 0 2.8 1.4 1.4 0 0 0 0-2.8ZM11 10v7.5h2.5v-4c0-1 .6-1.6 1.4-1.6.8 0 1.3.6 1.3 1.6v4h2.5v-4.6c0-2.2-1.2-3.1-2.8-3.1-1.1 0-1.9.5-2.4 1.2V10H11Z"
          />
        </svg>
      );
    case "youtube":
      return (
        <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" className={cls}>
          <path fillRule="evenodd" clipRule="evenodd" d="M5 5h14a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3Zm5 4v6l5.2-3L10 9Z" />
        </svg>
      );
    default:
      return (
        <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className={cls}>
          <path d="M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z" />
          <path d="M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z" />
        </svg>
      );
  }
}

const focusRing = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";

export const footerSimpleBlock: ComponentConfig<FooterSimpleProps> = {
  label: "Footer (Simple)",
  fields: {
    logoText: { type: "text", label: "Organization name" },
    logoImageUrl: { type: "text", label: "Logo image URL", metadata: { help: "Optional. Shown above the name. Leave blank for the name alone." } },
    logoImageAlt: { type: "text", label: "Logo alt text", metadata: { help: "Leave blank when the name is shown too, so screen readers don't hear it twice." } },
    tagline: { type: "textarea", label: "Tagline", metadata: { help: "One sentence. Leave blank to hide it." } },
    navLabel: { type: "text", label: "Navigation name", metadata: { help: "Read by screen readers, like Footer." } },
    links: {
      type: "array",
      label: "Links",
      min: 0,
      max: 8,
      getItemSummary: (item) => item?.label || "Link",
      defaultItemProps: { label: "New link", href: "/" },
      arrayFields: {
        label: { type: "text", label: "Label" },
        href: { type: "text", label: "Link" },
      },
    },
    socials: {
      type: "array",
      label: "Social links",
      min: 0,
      max: 6,
      getItemSummary: (item) => item?.label || platformNames[item?.platform as Platform] || "Social link",
      defaultItemProps: { platform: "instagram", label: "", href: "" },
      arrayFields: {
        platform: {
          type: "select",
          label: "Platform",
          options: [
            { label: "Facebook", value: "facebook" },
            { label: "Instagram", value: "instagram" },
            { label: "X", value: "x" },
            { label: "LinkedIn", value: "linkedin" },
            { label: "YouTube", value: "youtube" },
            { label: "Other", value: "other" },
          ],
        },
        label: { type: "text", label: "Screen reader label", metadata: { help: "Optional. Defaults to the platform name, like Instagram." } },
        href: { type: "text", label: "Profile link" },
      },
    },
    copyrightYear: { type: "text", label: "Copyright year", metadata: { help: "Like 2026. Update it each January." } },
    copyrightHolder: { type: "text", label: "Copyright holder", metadata: { help: "Defaults to the organization name." } },
  },
  defaultProps: {
    logoText: "Eastside Community Garden Trust",
    logoImageUrl: "",
    logoImageAlt: "",
    tagline: "Fourteen shared gardens, tended by 600 neighbors, growing food on land that used to be vacant lots.",
    navLabel: "Footer",
    links: [
      { label: "Find a garden", href: "/gardens" },
      { label: "Rent a plot", href: "/plots" },
      { label: "Volunteer days", href: "/volunteer" },
      { label: "Contact", href: "/contact" },
      { label: "Privacy", href: "/privacy" },
    ],
    socials: [
      { platform: "instagram", label: "", href: "https://instagram.com/" },
      { platform: "facebook", label: "", href: "https://facebook.com/" },
    ],
    copyrightYear: "2026",
    copyrightHolder: "",
  },
  render: ({ logoText, logoImageUrl, logoImageAlt, tagline, navLabel, links, socials, copyrightYear, copyrightHolder }) => {
    const items = (links ?? []).filter((l) => l?.label);
    const social = (socials ?? []).filter((s) => s?.href);
    const holder = copyrightHolder || logoText;

    return (
      <footer className="border-t border-neutral-200 bg-white px-4 py-14 sm:px-6 sm:py-16 lg:px-8">
        <div className="mx-auto flex max-w-3xl flex-col items-center text-center">
          {logoImageUrl ? <img src={logoImageUrl} alt={logoImageAlt || ""} className="mb-4 h-10 w-auto" /> : null}
          {logoText ? <p className="text-lg font-semibold tracking-tight text-neutral-950">{logoText}</p> : null}
          {tagline ? <p className="mt-3 max-w-xl text-sm leading-6 text-pretty text-neutral-600">{tagline}</p> : null}

          {items.length ? (
            <nav aria-label={navLabel || "Footer"} className="mt-8">
              <ul role="list" className="flex flex-wrap justify-center gap-x-2 gap-y-0 sm:gap-x-4">
                {items.map((l, i) => (
                  <li key={`${l.label}-${i}`}>
                    <a href={l.href || "#"} className={`inline-flex min-h-11 items-center rounded px-2 text-sm font-medium text-neutral-700 underline-offset-4 hover:text-indigo-700 hover:underline ${focusRing}`}>
                      {l.label}
                    </a>
                  </li>
                ))}
              </ul>
            </nav>
          ) : null}

          {social.length ? (
            <ul role="list" className="mt-6 flex flex-wrap justify-center gap-2">
              {social.map((s, i) => {
                const platform = (s.platform || "other") as Platform;
                return (
                  <li key={`${s.href}-${i}`}>
                    <a
                      href={s.href}
                      className={`inline-flex size-11 items-center justify-center rounded-full text-neutral-600 ring-1 ring-neutral-200 transition hover:bg-indigo-50 hover:text-indigo-700 hover:ring-indigo-200 ${focusRing}`}
                    >
                      <SocialIcon platform={platform} />
                      <span className="sr-only">{s.label || platformNames[platform] || "Social link"}</span>
                    </a>
                  </li>
                );
              })}
            </ul>
          ) : null}

          {holder || copyrightYear ? (
            <p className="mt-8 text-xs text-neutral-600">
              © {copyrightYear ? `${copyrightYear} ` : ""}
              {holder}
            </p>
          ) : null}
        </div>
      </footer>
    );
  },
};
```
