B-secties: nav, hero, Over, Werkwijze, contactblok en footer volgens ontwerp B

Nieuwe tokens (brand, inv, panel, field, prog, body), Archivo als lettertype
(Sora en Instrument Sans verwijderd), witte toggles op het rode kopblok, en tests
voor structuur, landmarks en contrast in alle vier de thema's.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 00:10:27 +01:00
co-authored by Claude Sonnet 5.5
parent 0854e3a096
commit e1d950cd33
25 changed files with 715 additions and 170 deletions
@@ -0,0 +1,28 @@
# Code Summary — b-modern-sections (U2)
## What was built (design B, light and dark)
- **Tokens**: seven new semantic tokens in all four variant×mode sets (`brand`, `on-brand`, `body`, `inv`, `panel`, `field`, `prog`) plus Tailwind names; the constant brand red `#7A1414` (E: `#AC0000`) is used for hero, contact and featured elements in both modes, as in the canvas. Archivo Variable is now the face for `sans` and `display`; Sora and Instrument Sans (fonts and npm packages) are removed; JetBrains Mono stays for the code strip.
- **Header/nav** (`Nav.tsx`): brand block, not sticky, white text, white CTA block "Start project", both round toggles in the white `onBrand` tone (`toggleTone.ts`), mobile hamburger menu kept; `<nav aria-label="Hoofdnavigatie">` inside a `<header>`; no years in the menu.
- **Hero** (`Hero.tsx`): display headline "Websites, / apps / & meer." (`heroContent.displayHeading`, screen readers read the live heading via `aria-label`), lead from `content.ts`, buttons to `#pakketten` and `#contact`, black code strip with blinking caret and the eyebrow "Web & .NET development".
- **Over** (`AboutSection.tsx`): offset brand block behind a 3:4 photo (existing WebP/JPG variants), heading "Eén ontwikkelaar, korte lijnen", paragraphs from `content.ts`, three facts (`aboutFacts`).
- **Werkwijze** (`ProcessSection.tsx`, `ProcessStep.tsx`): black section, ordered list of three steps with progress bar (33/66/100 %), outlined numbers (decorative), phase, title and text from `content.ts` (`phase` added).
- **Contact frame** (`ContactSection.tsx`): brand block, display heading "Klaar om / te bouwen?", intro, mail link and a panel that holds the mailto call-to-action until the form (U4).
- **Footer**: black strip. **Layout**: `<header><Nav/></header>`, `<main id="main">`, footer; base text 17px/1.55.
- **Content additions** (`content.ts`): `heroContent.displayHeading`, `processSteps[].phase`, `aboutFacts`, `contactInfo.displayHeading`. Existing copy unchanged.
## Verification (Step 13.5, real output)
- Baseline of this unit (after U1): 10 files / 56 tests. After: **13 files / 122 tests passed**, `pnpm lint` 0 errors (same 2 existing warnings), `pnpm build` OK (main bundle 447 kB JS, 57 kB CSS; E chunk 0.9 kB; no Sora/Instrument files in `dist`; the new utilities `font-stretch`, `bg-brand`, `bg-inv`, `text-on-brand`, `bg-panel`, text-stroke are generated).
- New tests: WCAG contrast (text/body/muted/accent/on-brand/panel/field pairs ≥ 4.5:1) for all four token sets, parsed from `index.css`; section tests (headline parts, content text, links, anchors, facts, progress bars, panel button, footer); layout landmark test (banner with named navigation, one `main#main`, contentinfo, order, onBrand toggles, live region); updated nav tests.
## Deviations and notes for review
- **Hero headline**: the design's display headline replaces the visible "SLP software: websites, apps & meer"; the accessible name is still the live headline. To revert: render `heroContent.heading` instead of `displayHeading` in `Hero.tsx`.
- **Texts**: the live copy (`content.ts`, "wij bouwen ...") wins over the canvas wording ("ik bouw ..."). The contact panel intro sentence ("Stuur een bericht met je idee of vraag...") is new filler text for the panel until U4 replaces it with the form.
- **Packages block** (U3) is untouched and keeps the old card styling for now; it inherits the new tokens and the Archivo font.
- **Nav** is not sticky (as in the design); the old `scroll-mt-16` offsets on the packages eyebrow are harmless.
- **No browser screenshots** were possible here; visual fidelity (spacing, photo crop at 3:4 with `object-position 50% 30%`, dark mode look) needs a review in the browser.
- Lockfile contains the same peer-suffix churn as in U1 plus the removal of the two font packages.
## Hand-offs
- U3: replace `PackagesSection` (B styling, filter chips, swipe row); the section anchor `#pakketten` currently sits on its eyebrow `span`.
- U4: replace the panel content in `ContactSection` with the form; keep `data-testid="contact-panel"` and the `#contact` anchor.
- U5: reuse `toggleTone` for E where needed.