# Add the "Student Life" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/student-life) to this Pantheon Content Publisher (P1) Next.js project. Student organizations grouped by category with counts and examples, beside a big explore-all call to action.

## Steps

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

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

/**
 * Student Life — clubs and organizations grouped by category, each with a count and a few
 * example groups, beside a large "explore every organization" call to action.
 * Register: `StudentLifeBlock: studentLifeBlock` in puck.config.tsx.
 */

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

type Category = {
  name: string;
  count: string;
  examples: string;
  href: string;
};

export type StudentLifeProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  totalValue: string;
  totalLabel: string;
  ctaLabel: string;
  ctaHref: string;
  categories: Category[];
  footnote: string;
};

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

export const studentLifeBlock: ComponentConfig<StudentLifeProps> = {
  label: "Student Life",
  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." },
    },
    intro: { type: "textarea", label: "Intro" },
    totalValue: { type: "text", label: "Big number", metadata: { help: "The headline count, such as 400+. Leave blank to hide the number." } },
    totalLabel: { type: "text", label: "Big number label", metadata: { help: "What the number counts, such as student organizations." } },
    ctaLabel: { type: "text", label: "Button text", metadata: { help: "Leave blank to hide the button." } },
    ctaHref: { type: "text", label: "Button link", metadata: { help: "Usually your organization directory or involvement platform." } },
    categories: {
      type: "array",
      label: "Categories",
      min: 1,
      max: 12,
      getItemSummary: (item) => [item?.name, item?.count].filter(Boolean).join(" · ") || "Category",
      defaultItemProps: { name: "New category", count: "10", examples: "First group, Second group", href: "/student-life/organizations" },
      arrayFields: {
        name: { type: "text", label: "Category name" },
        count: { type: "text", label: "Number of groups", metadata: { help: "Such as 48. Leave blank to hide it." } },
        examples: { type: "text", label: "Example groups", metadata: { help: "Separate with commas. The first three are shown." } },
        href: { type: "text", label: "Link", metadata: { help: "The filtered directory for this category. The whole card links here." } },
      },
    },
    footnote: { type: "text", label: "Footnote", metadata: { help: "Where the counts come from and when. Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Student life",
    heading: "Find your people",
    headingLevel: "h2",
    intro: "From a cappella to club rugby, there's a group for almost everything at Northfield, and if there isn't, five students and a faculty advisor can start one.",
    totalValue: "400+",
    totalLabel: "registered student organizations",
    ctaLabel: "Explore 400+ organizations",
    ctaHref: "/student-life/organizations",
    categories: [
      { name: "Arts and performance", count: "54", examples: "Northfield Players, Treble Makers a cappella, Ceramics Collective", href: "/student-life/organizations?category=arts" },
      { name: "Cultural and identity", count: "61", examples: "Black Student Union, Latinx Leadership Alliance, Pride Alliance", href: "/student-life/organizations?category=cultural" },
      { name: "Academic and professional", count: "87", examples: "Pre-Health Society, Women in Engineering, Model UN", href: "/student-life/organizations?category=academic" },
      { name: "Service and advocacy", count: "46", examples: "Habitat for Humanity, Campus Food Pantry, Sunrise Northfield", href: "/student-life/organizations?category=service" },
      { name: "Club and intramural sports", count: "39", examples: "Club Rugby, Ultimate Frisbee, Climbing Team", href: "/student-life/organizations?category=sports" },
      { name: "Faith and spirituality", count: "28", examples: "Interfaith Council, Newman Center, Muslim Students Association", href: "/student-life/organizations?category=faith" },
      { name: "Media and publications", count: "17", examples: "The Northfield Ledger, KNSU 89.3 FM, Prairie Review", href: "/student-life/organizations?category=media" },
      { name: "Gaming and hobbies", count: "73", examples: "Esports Club, Board Game Guild, Birding Club", href: "/student-life/organizations?category=hobbies" },
    ],
    footnote: "Sample counts from the Office of Student Involvement, fall 2026.",
  },
  render: ({ eyebrow, heading, headingLevel, intro, totalValue, totalLabel, ctaLabel, ctaHref, categories, footnote }) => {
    const H = headingLevel || "h2";
    const Sub = childHeading[headingLevel] || "h3";
    const list = (categories ?? []).filter((c) => c?.name);

    return (
      <section className="bg-white px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto grid max-w-7xl grid-cols-1 gap-12 lg:grid-cols-12 lg:gap-16">
          <div className="lg:col-span-4">
            <div className="lg:sticky lg:top-8">
              {eyebrow ? <p className="text-sm font-semibold tracking-wide text-indigo-700 uppercase">{eyebrow}</p> : null}
              {heading ? (
                <H className={`text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl lg:text-5xl ${eyebrow ? "mt-3" : ""}`}>{heading}</H>
              ) : null}
              {intro ? <p className="mt-5 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
              {totalValue || ctaLabel ? (
                <div className="mt-8 rounded-2xl bg-indigo-600 p-6 text-white sm:p-8">
                  {totalValue ? (
                    <p>
                      <span className="block text-6xl font-semibold tracking-tighter tabular-nums sm:text-7xl">{totalValue}</span>
                      {totalLabel ? <span className="mt-2 block text-base leading-6 text-indigo-100">{totalLabel}</span> : null}
                    </p>
                  ) : null}
                  {ctaLabel ? (
                    <a
                      href={ctaHref || "#"}
                      className={`group inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-lg bg-white px-5 py-3 text-base font-semibold text-indigo-700 shadow-sm transition hover:bg-indigo-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white ${totalValue ? "mt-6" : ""}`}
                    >
                      {ctaLabel}
                      <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 transition motion-safe:group-hover:translate-x-0.5">
                        <path fillRule="evenodd" d="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" clipRule="evenodd" />
                      </svg>
                    </a>
                  ) : null}
                </div>
              ) : null}
              {footnote ? <p className="mt-4 text-sm leading-6 text-neutral-600">{footnote}</p> : null}
            </div>
          </div>

          {list.length ? (
            <ul role="list" className="grid grid-cols-1 gap-px overflow-hidden rounded-2xl bg-neutral-200 ring-1 ring-neutral-200 sm:grid-cols-2 lg:col-span-8">
              {list.map((cat, i) => {
                const examples = (cat.examples || "")
                  .split(",")
                  .map((e) => e.trim())
                  .filter(Boolean)
                  .slice(0, 3);
                return (
                  <li key={`${cat.name}-${i}`} className="group relative flex flex-col bg-white p-6 transition hover:bg-indigo-50/50 sm:p-7">
                    <div className="flex items-start justify-between gap-4">
                      <Sub className="text-lg leading-7 font-semibold tracking-tight text-balance text-neutral-950">
                        <a
                          href={cat.href || "#"}
                          className="after:absolute after:inset-0 focus-visible:outline-none focus-visible:after:outline-2 focus-visible:after:-outline-offset-2 focus-visible:after:outline-indigo-600"
                        >
                          {cat.name}
                          {cat.count ? <span className="sr-only">, {cat.count} organizations</span> : null}
                        </a>
                      </Sub>
                      {cat.count ? (
                        <span aria-hidden="true" className="shrink-0 text-3xl font-semibold tracking-tight text-indigo-700 tabular-nums">
                          {cat.count}
                        </span>
                      ) : null}
                    </div>
                    {examples.length ? (
                      <ul role="list" className="mt-4 space-y-1.5">
                        {examples.map((ex) => (
                          <li key={ex} className="flex items-center gap-2 text-sm leading-6 text-neutral-600">
                            <span aria-hidden="true" className="size-1.5 shrink-0 rounded-full bg-neutral-300 transition group-hover:bg-indigo-500" />
                            <span className="min-w-0">{ex}</span>
                          </li>
                        ))}
                      </ul>
                    ) : null}
                  </li>
                );
              })}
            </ul>
          ) : null}
        </div>
      </section>
    );
  },
};
```
