# Add the "Seasonal Highlights" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/seasonal-highlights) to this Pantheon Content Publisher (P1) Next.js project. Four staggered season panels with a photo, top experiences, typical weather and a link to each season's events.

## Steps

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

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

/**
 * Seasonal Highlights — what's great in each season: four photo-topped panels (stacked on
 * phones, four across on desktop) with months, top experiences, typical weather and a link.
 * Register: `SeasonalHighlightsBlock: seasonalHighlightsBlock` in puck.config.tsx.
 */

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

export type SeasonalHighlightsProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  seasons: {
    name: string;
    months: string;
    imageUrl: string;
    imageAlt: string;
    experiences: string;
    weather: string;
    linkLabel: string;
    linkHref: string;
  }[];
  source: string;
};

const childHeading: Record<Heading, "h2" | "h3" | "h4" | "h5"> = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" };
const FOCUS = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";
const ARROW = "M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z";

// Staggered tops on desktop so the four panels read as a hand-placed row, not a grid.
const OFFSETS = ["", "lg:mt-12", "lg:mt-4", "lg:mt-16"];

const lines = (raw: string) => (raw || "").split("\n").map((l) => l.trim()).filter(Boolean);

export const seasonalHighlightsBlock: ComponentConfig<SeasonalHighlightsProps> = {
  label: "Seasonal Highlights",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Small line above the heading. Leave blank to hide it." } },
    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. Season names use the next level down." },
    },
    intro: { type: "textarea", label: "Intro" },
    seasons: {
      type: "array",
      label: "Seasons",
      min: 1,
      max: 4,
      getItemSummary: (item) => item?.name || "Season",
      defaultItemProps: {
        name: "New season",
        months: "",
        imageUrl: "https://picsum.photos/seed/riverbend-season/800/1000",
        imageAlt: "",
        experiences: "",
        weather: "",
        linkLabel: "",
        linkHref: "",
      },
      arrayFields: {
        name: { type: "text", label: "Season" },
        months: { type: "text", label: "Months", metadata: { help: "Like “March–May”. Leave blank to hide it." } },
        imageUrl: { type: "text", label: "Image URL", metadata: { help: "A tall photo works best." } },
        imageAlt: { type: "text", label: "Image alt text", metadata: { help: "Describe the photo for screen reader users. Leave blank only if it's purely decorative." } },
        experiences: { type: "textarea", label: "Top experiences", metadata: { help: "One per line. Three or four read best." } },
        weather: { type: "text", label: "Typical weather", metadata: { help: "Like “Highs 60–78°F, frequent showers”. Add the source in the footnote." } },
        linkLabel: { type: "text", label: "Link text", metadata: { help: "Leave blank to hide the link." } },
        linkHref: { type: "text", label: "Link" },
      },
    },
    source: { type: "text", label: "Weather source", metadata: { help: "Where the weather figures come from, shown under the panels. Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Plan by season",
    heading: "There's no off-season on the river",
    headingLevel: "h2",
    intro: "Riverbend changes its clothes four times a year. Here's what locals look forward to in each.",
    seasons: [
      {
        name: "Spring",
        months: "March–May",
        imageUrl: "https://picsum.photos/seed/riverbend-spring/800/1000",
        imageAlt: "Redbud trees blooming pink along a riverside path",
        experiences: "Redbud bloom on the Bluff Trail\nOpening day at the farmers market\nHigh-water paddling tours\nThe Old Mill garden walk",
        weather: "Highs 58–78°F, frequent showers",
        linkLabel: "Spring events",
        linkHref: "/seasons/spring",
      },
      {
        name: "Summer",
        months: "June–August",
        imageUrl: "https://picsum.photos/seed/riverbend-summer/800/1000",
        imageAlt: "People floating on inner tubes down a sunny river",
        experiences: "Bend in the River Music Festival\nTubing from Heron Marsh\nFriday fireworks on the barge\nRooftop bar season",
        weather: "Highs 85–91°F, humid afternoons",
        linkLabel: "Summer events",
        linkHref: "/seasons/summer",
      },
      {
        name: "Fall",
        months: "September–November",
        imageUrl: "https://picsum.photos/seed/riverbend-fall/800/1000",
        imageAlt: "Orange and gold maple leaves over a wooden footbridge",
        experiences: "Peak color from Bluff Overlook\nCider Week at the orchards\nWarehouse District art crawl\nBourbon and barbecue weekend",
        weather: "Highs 58–82°F, dry and clear",
        linkLabel: "Fall events",
        linkHref: "/seasons/fall",
      },
      {
        name: "Winter",
        months: "December–February",
        imageUrl: "https://picsum.photos/seed/riverbend-winter/800/1000",
        imageAlt: "A main street lit with holiday lights on a snowy evening",
        experiences: "Lantern walk on the riverfront\nIce rink at Market Square\nEagle watching at the lock and dam\nRestaurant Week deals",
        weather: "Highs 40–48°F, occasional snow",
        linkLabel: "Winter events",
        linkHref: "/seasons/winter",
      },
    ],
    source: "Sample figures. Typical highs based on NOAA 1991–2020 climate normals for the region; actual weather varies.",
  },
  render: ({ eyebrow, heading, headingLevel, intro, seasons, source }) => {
    const H = headingLevel || "h2";
    const Item = childHeading[H] ?? "h3";
    const list = (seasons ?? []).filter((s) => s?.name).slice(0, 4);
    const hasHeader = Boolean(eyebrow || heading || intro);
    return (
      <section className="bg-neutral-50 px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          {hasHeader ? (
            <div className="grid grid-cols-1 gap-4 lg:grid-cols-2 lg:items-end lg:gap-16">
              <div>
                {eyebrow ? <p className="text-sm font-semibold tracking-widest text-indigo-700 uppercase">{eyebrow}</p> : null}
                {heading ? <H className={`${eyebrow ? "mt-3" : ""} text-4xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-5xl`}>{heading}</H> : null}
              </div>
              {intro ? <p className="text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
            </div>
          ) : null}

          {list.length > 0 ? (
            <ul role="list" className={`${hasHeader ? "mt-12 sm:mt-16" : ""} grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4 lg:items-start lg:gap-5`}>
              {list.map((s, i) => {
                const items = lines(s.experiences);
                return (
                  <li key={`${s.name}-${i}`} className={`flex flex-col overflow-hidden rounded-3xl bg-white ring-1 ring-neutral-950/5 shadow-sm ${OFFSETS[i] ?? ""}`}>
                    <div className="relative isolate flex aspect-4/3 flex-col justify-end overflow-hidden bg-neutral-800 p-5 sm:aspect-4/5">
                      {s.imageUrl ? <img src={s.imageUrl} alt={s.imageAlt || ""} className="absolute inset-0 -z-20 size-full object-cover" /> : null}
                      <div aria-hidden="true" className="absolute inset-0 -z-10 bg-linear-to-t from-neutral-950/85 via-neutral-950/25 to-neutral-950/0" />
                      {s.months ? <p className="text-xs font-semibold tracking-widest text-white uppercase">{s.months}</p> : null}
                      <Item className="mt-1 text-3xl font-semibold tracking-tight text-white">{s.name}</Item>
                    </div>
                    <div className="flex flex-1 flex-col p-5 sm:p-6">
                      {items.length > 0 ? (
                        <ul role="list" className="space-y-2.5">
                          {items.map((x, k) => (
                            <li key={`${x}-${k}`} className="flex gap-2.5 text-sm leading-6 text-neutral-800">
                              <span aria-hidden="true" className="mt-2.5 h-px w-3 shrink-0 bg-indigo-600" />
                              {x}
                            </li>
                          ))}
                        </ul>
                      ) : null}
                      {s.weather ? (
                        <p className="mt-5 flex items-start gap-2 rounded-xl bg-neutral-100 px-3 py-2.5 text-sm text-neutral-700">
                          <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="mt-0.5 size-4 shrink-0 text-indigo-600">
                            <path d="M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z" />
                          </svg>
                          <span>
                            <span className="font-semibold text-neutral-900">Typical weather: </span>
                            {s.weather}
                          </span>
                        </p>
                      ) : null}
                      {s.linkLabel ? (
                        <a
                          href={s.linkHref || "#"}
                          className={`group mt-auto inline-flex min-h-11 items-center gap-1.5 self-start rounded-sm pt-4 text-sm font-semibold text-indigo-700 hover:text-indigo-900 ${FOCUS}`}
                        >
                          {s.linkLabel}
                          <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="size-4 transition group-hover:translate-x-0.5">
                            <path fillRule="evenodd" d={ARROW} clipRule="evenodd" />
                          </svg>
                        </a>
                      ) : null}
                    </div>
                  </li>
                );
              })}
            </ul>
          ) : null}

          {source ? <p className="mt-10 text-sm text-neutral-600 lg:mt-12">{source}</p> : null}
        </div>
      </section>
    );
  },
};
```
