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
@@ -5,7 +5,7 @@
- **Feature Slug**: redesign-modern-timetravel - **Feature Slug**: redesign-modern-timetravel
- **Project Type**: Brownfield - **Project Type**: Brownfield
- **Start Date**: 2026-11-09T13:00:00Z - **Start Date**: 2026-11-09T13:00:00Z
- **Current Stage**: CONSTRUCTION - U1 theme-foundation Code Generation (in progress) - **Current Stage**: CONSTRUCTION - U2 b-modern-sections Code Generation (in progress)
- **Branch**: feature/redesign-modern-timetravel - **Branch**: feature/redesign-modern-timetravel
## Workspace State ## Workspace State
@@ -514,3 +514,75 @@
**Context**: Leading the builder. Summary file to be read when preparing the frontend handoff (U4). **Context**: Leading the builder. Summary file to be read when preparing the frontend handoff (U4).
--- ---
## U1 Code Generation Complete
**Timestamp**: 2026-11-10T06:30:00Z
**User Input**: "Akkoord op jouw bouwplan"
**AI Response**: "Executed all 13 steps of theme-foundation-code-generation-plan.md. Baseline 6 files / 24 tests; after: 10 files / 56 tests passed, lint 0 errors (2 pre-existing warnings), pnpm build OK, E as separate lazy chunk. Docs commit 1047c73 and code commit made on feature/redesign-modern-timetravel; no push. Prettier run on touched folders reformatted two unrelated files (Footer.tsx, routes/index.tsx), reverted. Summary at construction/theme-foundation/code/summary.md. Completion message presented; awaiting approval."
**Context**: Code Generation U1 complete (Step 13.5 verified).
---
## Builder CMS-U3b Accepted
**Timestamp**: 2026-11-10T06:50:00Z
**User Input**: "(cross-session message from SLS Software - CMS: CMS-U3b openapi-export done, commit 0813656)"
**AI Response**: "Accepted on the builder's report: committed openapi/slpsoftware.v1.json (no hosts/addresses/secrets), snapshot test with UPDATE_OPENAPI=1 regeneration and drift detection verified by changing one value, contact contract details in the document (reusable Validation/TooLarge/RateLimited, Idempotency-Key header, required fields and maxLength, 404 form closed). Findings: controller without [ApiController] needs ApiExplorerSettings(IgnoreApi=false); class-wide Produces overwrote problem+json (caught by own test, removed). Contact.Tests 117, Core 205, Availability 95, Offerings 86, Identity 37, Master 57, Api 4 passed. Contract status line updated. Builder continues with CMS-U4."
**Context**: Leading the builder.
---
## Resume After Credits Top-up
**Timestamp**: 2026-11-10T07:30:00Z
**User Input**: "Credits zijn aangevuld kan je kijken of de andere sessie of jij iets moeten hervatten"
**AI Response**: "Checked sessions and worktree. SLS Software - CMS [9d882f] is idle with unfinished CMS-U4 work in its worktree (uncommitted admin API, settings, gates, migration AddContactSettings, tests, plus a stray Scratch.cs); sent a resume instruction (verify state, remove Scratch.cs, finish per plan, report). CMS & API [df4818] is busy with its own work. This session: U1 code committed (0854e3a), waiting for the user's approval before U2; no unfinished work on this side."
**Context**: Coordination.
---
## Builder CMS-U4 Accepted; Phase 1 Complete
**Timestamp**: 2026-11-10T08:10:00Z
**User Input**: "(cross-session message from SLS Software - CMS: CMS-U4 contact-admin-api done, commit 44f161a)"
**AI Response**: "Accepted on the builder's report: seven AdminOnly routes (list, detail, patch, delete, resend, GET/PUT contact-settings), two-layer gate (host flag first, CMS switch cached 5 s, default off), migration AddContactSettings, OpenAPI snapshot regenerated. Real bug caught by the pipeline test (statuses.Contains query -> 500) fixed. Tests: Contact 223, Core 205, Availability 95, Offerings 86, Identity 37, Master 57, Api 4 passed. Deviation from plan accepted: with the CMS disabled (availability) a verified Owner/Administrator still passes the gate (existing gate design); others get 503. No data lost by the interruption; container removed. CMS phase 1 (U0, U1, U1b, U2, U3, U3b, U4) done; phase 2 (U5 mail+retry, U6 admin UI, U7 availability PUT) waits for Bryan's decision on merging feature/identity-email-notifications. Builder on stand-by; asked for a consolidated phase-1 handoff file."
**Context**: Leading the builder. Open for Bryan: merge decision of the ASF branch; whether the CMS branch feature/contact-forms-module is pushed for a test deploy.
---
## U1 Approved; U2 Code Generation Plan Ready
**Timestamp**: 2026-11-10T09:00:00Z
**User Input**: "Jij kan verder naar u2. De cms moet nog even wachten"
**AI Response**: "U1 treated as approved (user said to continue to U2); CMS phase 2 stays on hold. U2 (b-modern-sections) skips Functional Design/NFR/Infrastructure per the execution plan because the design exists in the canvas. Read the canvas file Modern.dc.html and created construction/plans/b-modern-sections-code-generation-plan.md (9 steps). Key points: new brand/inv/panel/field/prog/body tokens, Archivo for all text (Sora and Instrument Sans removed), text stays from content.ts with only structural content additions, display headline from the design flagged, mobile menu kept, contact panel shows mailto until U4, packages untouched until U3. Plan approval prompt presented."
**Context**: Code Generation Part 1 (planning) for U2.
---
## U2 Plan Approved; ASF Branch Merge Authorized
**Timestamp**: 2026-11-10T09:30:00Z
**User Input**: "Approve plan. K denk dat de cms sessie ook wel kan mergen. De grootste changes zijn al gedaan en de rest kan wel later worden gemerged vanaf master"
**AI Response**: "U2 Code Generation plan approved; starting Part 2. Interpreted 'de cms sessie kan mergen' as: the ASF CMS session (AndreaSlopFotografie, owner of feature/identity-email-notifications) may merge that branch into SlpModularCms master; relayed as Bryan's decision, asked it to merge by its normal process, report the merge commit and expected conflicts to this session and to the builder, and to flag any concrete risk first. Builder (SLS Software - CMS) told to wait for the merge message, then rebase feature/contact-forms-module on master (no push), switch ContactRateLimitPartition to ClientPartitionKey if present, run all tests, and send the rebase result plus plans for CMS-U5, U6, U7 for approval. Contact:Enabled stays off; nothing deployed or pushed."
**Context**: CMS phase 2 unblocked pending the merge; U2 Code Generation starts.
---
@@ -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.
@@ -0,0 +1,44 @@
# Code Generation Plan — b-modern-sections (U2)
Single source of truth for U2 Code Generation. Inputs: `unit-of-work.md` (U2), requirements FR-1, NFR-1, NFR-2, execution plan (Functional Design, NFR and Infrastructure skipped for U2: the design exists in the Claude Design canvas, `Modern.dc.html` = B), U1 summary (`construction/theme-foundation/code/summary.md`).
## Unit context
- **Scope**: nav, hero, Over, Werkwijze, footer and the frame of the contact block in design B, light and dark, responsive 360px–1440px+. **Not in U2**: the packages block (U3: the existing `PackagesSection` stays as is, only inheriting tokens and font) and the contact form (U4: the panel inside the contact block shows the existing mailto call-to-action until then).
- **Workspace root**: `K:\Development\SlpSoftware\Projects\SlpSoftware`; modify in place. Branch `feature/redesign-modern-timetravel`; one commit for U2; no push.
- **Dependencies**: U1 (variant × mode tokens, toggles). **Blocks**: U3, U4 (frames).
- **Requirement mapping**: FR-1 (design B), NFR-1 (WCAG AA, landmarks, focus, reduced motion), NFR-2 (responsive), NFR-7.
## Design decisions taken from the canvas (and where content stays leading)
- **Layout/typography** as in `Modern.dc.html`: Archivo Variable with width axis (`font-stretch` 112–125%, weights 800–900), max width 1280px, section paddings 128–152px (smaller on mobile), square corners (no rounded cards), flat colour blocks.
- **Colour blocks**: hero and contact sit on the constant brand red `#7A1414` in light *and* dark mode (as in the canvas), black strips (`inv`) for the code line, Werkwijze and footer. New semantic tokens (all four variant×mode sets): `--color-brand`, `--color-on-brand`, `--color-body`, `--color-inv`, `--color-panel`, `--color-field`, `--color-prog`; Tailwind names `brand`, `on-brand`, `body`, `inv`, `panel`, `field`, `prog`. E gets matching values (`brand #AC0000`).
- **Text stays leading** (decision in requirements): body texts come from `content.ts` (the November text update). Where the design shows a different wording ("Maatwerk van SLP Software ... ik bouw het allemaal" vs the live "wij bouwen"), the live copy wins. Only structural additions are new content fields: `heroContent.displayHeading = ['Websites,', 'apps', '& meer.']` (display headline from the design; the live eyebrow "Web & .NET development" moves to the code strip), `aboutFacts` (3 facts: Direct contact / Eén werkdag / Vaste prijs, from the design), `processSteps[].phase` (Intake / Bouwen / Live), `contactInfo.displayHeading = ['Klaar om', 'te bouwen?']`.
- **Nav**: part of the hero header (not sticky, as in the design), white text on brand; the CTA "Start project" as white block; both toggles as white outlined circles (`tone="onBrand"` prop). The existing mobile menu (hamburger) is kept for small screens (better than wrapping links); years are not in the menu.
- **Over**: rectangular 3:4 photo with the offset brand block (real photo with the existing WebP/JPG variants), h2, two paragraphs, three-fact list.
- **Werkwijze**: black section, three steps with progress bar (33/66/100%), large outlined numbers (`-webkit-text-stroke`), phase, title, text; fixed `<ol>`.
- **Contact frame**: brand block, display heading, intro, mailto link, and a panel (`panel` colour) that contains the mailto button for now; U4 replaces the panel content with the form.
- **Reduced motion**: caret animation off (existing rule), no hover motion that moves layout.
## Steps
- [x] **Step 1 — Tokens**: extend `src/index.css` (four sets) and `tailwind.config.ts` (colors, `fontFamily.sans`/`display` → Archivo Variable, keep `mono`); remove the Sora and Instrument Sans imports from `src/fonts.ts` and the two packages from `package.json` (`pnpm remove`), keep JetBrains Mono and Archivo. Check contrast pairs in a small test (ratios computed from the token values: text/bg, muted/bg, on-brand/brand, accent/bg in both modes ≥ 4.5:1; large text ≥ 3:1).
- [x] **Step 2 — Content**: add the structural fields to `src/features/landing/data/content.ts` (types + values), without changing existing copy.
- [x] **Step 3 — Toggles**: add a `tone?: 'default' | 'onBrand'` prop to `ModeToggle` and `VariantToggle` (white outline/text variant for use on the brand block); defaults unchanged.
- [x] **Step 4 — Shell**: rewrite `Nav.tsx` (header band with nav; mobile menu kept; anchors without years), `Hero.tsx` (display headline, lead, two buttons, black code strip with caret), `Footer.tsx` (black strip); `RootLayout.tsx` places the hero header (nav + hero) inside the B shell as designed (Nav is rendered by `Hero`'s header wrapper or as sibling with the same brand background: decided in code, tested by landmarks).
- [x] **Step 5 — Sections**: rewrite `AboutSection.tsx`, `ProcessSection.tsx`, `ProcessStep.tsx`, `ContactSection.tsx` as described; `PackagesSection.tsx` untouched except removing classes that no longer exist if any (verify visually via tests only).
- [x] **Step 6 — Tests**: Vitest + Testing Library: nav (links without years, CTA, both toggles with onBrand styling, mobile menu), hero (headline parts, lead from content, code line, buttons link to `#pakketten` and `#contact`), about (heading, paragraphs from content, three facts, photo alt), process (ordered list of three steps, progress bars, numbers aria-hidden, phase/title/text), contact frame (heading parts, mailto link, panel with the mailto button), footer; landmarks (`header`, `nav aria-label`, `main`, `footer`, one `h1`, heading order), contrast test from Step 1. Update `Nav.test.tsx`.
- [x] **Step 7 — Build and test (automatic, Step 13.5)**: `pnpm lint`, `pnpm test`, `pnpm build`; fix and retry until green; report real counts. No manual browser check can be done by the AI in this environment; screenshots/visual check by the user at review time.
- [x] **Step 8 — Docs**: `construction/b-modern-sections/code/summary.md` (files, decisions, copy deviations from the canvas, hand-offs for U3/U4/U5).
- [x] **Step 9 — Commit**: one commit (Dutch message, `Co-Authored-By`), no push.
## Files (M modify, C create, D delete)
M `src/index.css`, `tailwind.config.ts`, `src/fonts.ts`, `package.json`, `pnpm-lock.yaml`, `src/features/landing/data/content.ts`, `src/components/ui/{ModeToggle,VariantToggle}.tsx`, `src/components/layout/{Nav,Footer,RootLayout}.tsx`, `src/features/landing/components/{Hero,AboutSection,ProcessSection,ProcessStep,ContactSection}.tsx`, tests; C `src/test/contrast.ts` (helper) and new test files under the touched folders; D none.
## Explicitly NOT touched in U2
`PackagesSection`, `PackageCard`, `PackageCardSkeleton`, `usePackagesQuery` (U3); the contact form and `cms-client` (U4); anything in `src/variants/e` beyond using the toggles (U5); router, Sentry, Umami.
## Risks
- The canvas hero headline ("Websites, apps & meer.") differs from the live H1 ("SLP software: websites, apps & meer"); treated as a display headline decision of the design, flagged in the summary so the user can revert it in one line.
- The package block keeps its old look until U3 and may look out of place between the new sections; accepted because units are not deployed separately.
- Visual fidelity cannot be screenshot-verified by the AI here; tests cover structure, text, links, landmarks and contrast.
## Traceability
FR-1, NFR-1, NFR-2, NFR-7; canvas `Modern.dc.html` (+ `ModernDark`); U1 token model; Security Baseline: no new external requests (fonts self-hosted), no inline scripts.
@@ -2,7 +2,7 @@
**Version**: 0.3.1-draft (2026-11-09) — incorporates the reviews of `SLS Software - CMS` (API side), `CMS & API` (ASF website) and `AndreaSlopFotografie` (ASF CMS/hosting) and the product decisions of Bryan (admin view in scope, spam stored as `spam`, captcha fail-open). **Version**: 0.3.1-draft (2026-11-09) — incorporates the reviews of `SLS Software - CMS` (API side), `CMS & API` (ASF website) and `AndreaSlopFotografie` (ASF CMS/hosting) and the product decisions of Bryan (admin view in scope, spam stored as `spam`, captcha fail-open).
**Status**: DRAFT for confirmation by the builders. Product decisions still open are marked **[Bryan]** (see § 10). **Status**: DRAFT for confirmation by the builders. Product decisions still open are marked **[Bryan]** (see § 10).
**Source of truth** once agreed: the OpenAPI document generated by the CMS (`AddOpenApi`/`MapOpenApi`), exported as a **committed artifact** in SlpModularCms so `cms-client` can generate types from it. This file carries the behaviour agreements and the intended shape. **Source of truth** once agreed: the OpenAPI document generated by the CMS (`AddOpenApi`/`MapOpenApi`), exported as a **committed artifact** in SlpModularCms so `cms-client` can generate types from it. **Status (CMS-U3b, commit 0813656):** the file for the SlpSoftware host is `openapi/slpsoftware.v1.json` (the Andrea host later gets `openapi/andreaslopfotografie.v1.json`); regenerate with `UPDATE_OPENAPI=1 dotnet test --filter OpenApiSnapshot` (needs the test database); without that variable the same test fails when the document served by the real host differs from the file. The document has no hosts, addresses or secrets and documents `404` as "form closed" on both public contact routes. This file carries the behaviour agreements and the intended shape.
**Compatibility**: breaking changes → `/api/v2`; additive changes allowed within `/api/v1`. The frontend package `cms-client` follows semver. **Compatibility**: breaking changes → `/api/v2`; additive changes allowed within `/api/v1`. The frontend package `cms-client` follows semver.
## 1. Scope ## 1. Scope
-2
View File
@@ -14,9 +14,7 @@
}, },
"dependencies": { "dependencies": {
"@fontsource-variable/archivo": "^5.3.0", "@fontsource-variable/archivo": "^5.3.0",
"@fontsource/instrument-sans": "^5.1.0",
"@fontsource/jetbrains-mono": "^5.1.1", "@fontsource/jetbrains-mono": "^5.1.1",
"@fontsource/sora": "^5.1.0",
"@sentry/react": "^10.68.0", "@sentry/react": "^10.68.0",
"@tanstack/react-query": "^5.59.0", "@tanstack/react-query": "^5.59.0",
"@tanstack/react-router": "^1.79.0", "@tanstack/react-router": "^1.79.0",
-16
View File
@@ -11,15 +11,9 @@ importers:
'@fontsource-variable/archivo': '@fontsource-variable/archivo':
specifier: ^5.3.0 specifier: ^5.3.0
version: 5.3.0 version: 5.3.0
'@fontsource/instrument-sans':
specifier: ^5.1.0
version: 5.2.8
'@fontsource/jetbrains-mono': '@fontsource/jetbrains-mono':
specifier: ^5.1.1 specifier: ^5.1.1
version: 5.2.8 version: 5.2.8
'@fontsource/sora':
specifier: ^5.1.0
version: 5.2.8
'@sentry/react': '@sentry/react':
specifier: ^10.68.0 specifier: ^10.68.0
version: 10.68.0(react@18.3.1) version: 10.68.0(react@18.3.1)
@@ -403,15 +397,9 @@ packages:
'@fontsource-variable/archivo@5.3.0': '@fontsource-variable/archivo@5.3.0':
resolution: {integrity: sha512-HogK8FJelrD1o7TlZlkIVtHgc20bO5PZRWE7mUeUTdMN055alznQV6/00J00IBeu8FQAH4s3zW9UJNvKExXf+g==} resolution: {integrity: sha512-HogK8FJelrD1o7TlZlkIVtHgc20bO5PZRWE7mUeUTdMN055alznQV6/00J00IBeu8FQAH4s3zW9UJNvKExXf+g==}
'@fontsource/instrument-sans@5.2.8':
resolution: {integrity: sha512-TJRYVbjZPx4DGMMU5lb5eFKrP3iLe9h7rz8Pk+dP958IZKiyHjYGXXwQZapVbBXcQN+YOiviVhAWxrjv8g6Z6g==}
'@fontsource/jetbrains-mono@5.2.8': '@fontsource/jetbrains-mono@5.2.8':
resolution: {integrity: sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ==} resolution: {integrity: sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ==}
'@fontsource/sora@5.2.8':
resolution: {integrity: sha512-1G6iTXUx8rcCKzi3mjaTQ1DE8PQz0OmW3Qnku+64S+bqRr1o/gGeiw8fxIQhhBU9ZP8ZofIqai7o00DNOPnlDw==}
'@humanfs/core@0.19.2': '@humanfs/core@0.19.2':
resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==}
engines: {node: '>=18.18.0'} engines: {node: '>=18.18.0'}
@@ -2196,12 +2184,8 @@ snapshots:
'@fontsource-variable/archivo@5.3.0': {} '@fontsource-variable/archivo@5.3.0': {}
'@fontsource/instrument-sans@5.2.8': {}
'@fontsource/jetbrains-mono@5.2.8': {} '@fontsource/jetbrains-mono@5.2.8': {}
'@fontsource/sora@5.2.8': {}
'@humanfs/core@0.19.2': '@humanfs/core@0.19.2':
dependencies: dependencies:
'@humanfs/types': 0.15.0 '@humanfs/types': 0.15.0
+2 -2
View File
@@ -1,7 +1,7 @@
export function Footer() { export function Footer() {
return ( return (
<footer className="border-t border-line py-7 text-[0.85rem] text-muted"> <footer className="bg-inv text-[#b9b3ae]">
<div className="mx-auto flex max-w-[1080px] flex-wrap justify-between gap-2.5 px-6"> <div className="mx-auto flex max-w-[1280px] flex-wrap justify-between gap-3 p-8 text-sm">
<span>© 2026 SLP Software</span> <span>© 2026 SLP Software</span>
<span className="font-mono">slp.Bouw(uwIdee);</span> <span className="font-mono">slp.Bouw(uwIdee);</span>
</div> </div>
+18 -13
View File
@@ -4,6 +4,10 @@ import { ModeToggle } from '../ui/ModeToggle';
import { VariantToggle } from '../ui/VariantToggle'; import { VariantToggle } from '../ui/VariantToggle';
import { handleAnchorClick } from '../../utils/scrollToHash'; import { handleAnchorClick } from '../../utils/scrollToHash';
/**
* Navigation of design B: part of the brand-red header (not sticky), white text, the CTA as a
* white block. The mobile menu (hamburger) is kept for small screens; years are not in the menu.
*/
export function Nav() { export function Nav() {
const [isMenuOpen, setIsMenuOpen] = useState(false); const [isMenuOpen, setIsMenuOpen] = useState(false);
@@ -13,23 +17,24 @@ export function Nav() {
} }
return ( return (
<nav className="sticky top-0 z-50 border-b border-line bg-bg/80 backdrop-blur-md"> <nav aria-label="Hoofdnavigatie" className="bg-brand text-on-brand">
<div className="mx-auto flex h-16 max-w-[1080px] items-center justify-between px-6"> <div className="mx-auto flex min-h-[84px] max-w-[1280px] items-center justify-between gap-6 px-6 sm:px-8">
<a <a
href="#top" href="#top"
onClick={(event) => handleAnchorClick(event, '#top')} onClick={(event) => handleAnchorClick(event, '#top')}
className="font-mono text-base font-bold tracking-wide text-text" className="flex items-baseline gap-2 py-2.5 no-underline"
> >
SLP<span className="text-accent">.</span>Software <span className="text-2xl font-black tracking-tight [font-stretch:125%]">SLP</span>
<span className="text-base font-normal">Software</span>
</a> </a>
<ul className="flex items-center gap-3 sm:gap-7"> <ul className="flex items-center gap-3 sm:gap-8">
{navLinks.map((link) => {navLinks.map((link) =>
link.isCta ? ( link.isCta ? (
<li key={link.href} className="hidden sm:block"> <li key={link.href} className="hidden sm:block">
<a <a
href={link.href} href={link.href}
onClick={(event) => handleAnchorClick(event, link.href)} onClick={(event) => handleAnchorClick(event, link.href)}
className="font-mono rounded-lg border border-accent-line bg-accent-soft px-4 py-2 text-sm font-medium text-text" className="inline-block bg-white px-[18px] py-[11px] text-[15px] font-bold text-brand no-underline hover:opacity-90"
data-testid="nav-cta-link" data-testid="nav-cta-link"
> >
{link.label} {link.label}
@@ -40,7 +45,7 @@ export function Nav() {
<a <a
href={link.href} href={link.href}
onClick={(event) => handleAnchorClick(event, link.href)} onClick={(event) => handleAnchorClick(event, link.href)}
className="text-sm font-medium text-muted transition-colors hover:text-text" className="inline-block py-3 text-[15px] font-medium no-underline hover:opacity-85"
> >
{link.label} {link.label}
</a> </a>
@@ -48,10 +53,10 @@ export function Nav() {
), ),
)} )}
<li> <li>
<ModeToggle /> <ModeToggle tone="onBrand" />
</li> </li>
<li> <li>
<VariantToggle /> <VariantToggle tone="onBrand" />
</li> </li>
<li className="sm:hidden"> <li className="sm:hidden">
<button <button
@@ -61,7 +66,7 @@ export function Nav() {
aria-expanded={isMenuOpen} aria-expanded={isMenuOpen}
aria-controls="mobile-nav-menu" aria-controls="mobile-nav-menu"
data-testid="nav-mobile-toggle" data-testid="nav-mobile-toggle"
className="flex h-8 w-8 items-center justify-center rounded-full border border-line text-text transition-colors hover:border-accent-line" className="flex h-11 w-11 items-center justify-center rounded-full border border-white/70 text-on-brand transition-colors hover:border-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
> >
<span className="sr-only">{isMenuOpen ? 'Sluit menu' : 'Open menu'}</span> <span className="sr-only">{isMenuOpen ? 'Sluit menu' : 'Open menu'}</span>
<svg <svg
@@ -88,7 +93,7 @@ export function Nav() {
<ul <ul
id="mobile-nav-menu" id="mobile-nav-menu"
data-testid="nav-mobile-menu" data-testid="nav-mobile-menu"
className="flex flex-col gap-1 border-t border-line bg-bg px-6 py-3 sm:hidden" className="flex flex-col gap-1 border-t border-white/30 px-6 py-3 sm:hidden"
> >
{navLinks.map((link) => ( {navLinks.map((link) => (
<li key={link.href}> <li key={link.href}>
@@ -97,8 +102,8 @@ export function Nav() {
onClick={(event) => handleMobileLinkClick(event, link.href)} onClick={(event) => handleMobileLinkClick(event, link.href)}
className={ className={
link.isCta link.isCta
? 'font-mono block rounded-lg border border-accent-line bg-accent-soft px-4 py-2 text-sm font-medium text-text' ? 'mt-1 block bg-white px-4 py-3 text-[15px] font-bold text-brand no-underline'
: 'block px-1 py-2 text-sm font-medium text-muted transition-colors hover:text-text' : 'block px-1 py-3 text-[15px] font-medium no-underline hover:opacity-85'
} }
> >
{link.label} {link.label}
+4 -2
View File
@@ -10,12 +10,14 @@ import { SentryTestButton } from '../shared/SentryTestButton';
export function RootLayout({ children }: { children: ReactNode }) { export function RootLayout({ children }: { children: ReactNode }) {
return ( return (
<div className="font-sans min-h-screen bg-bg text-text"> <div className="font-sans min-h-screen bg-bg text-[17px] leading-[1.55] text-text">
<UmamiAnalytics /> <UmamiAnalytics />
<VariantRenderer <VariantRenderer
b={ b={
<> <>
<Nav /> <header>
<Nav />
</header>
<main id="main" tabIndex={-1} className="outline-none"> <main id="main" tabIndex={-1} className="outline-none">
{children} {children}
</main> </main>
@@ -0,0 +1,47 @@
import { render, screen, within } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { RootLayout } from '../RootLayout';
import { ThemeProvider } from '../../../theme/ThemeProvider';
function renderLayout() {
return render(
<ThemeProvider>
<RootLayout>
<h1>Inhoud</h1>
</RootLayout>
</ThemeProvider>,
);
}
describe('RootLayout landmarks (NFR-1)', () => {
it('has a banner with the main navigation, one main region and a footer', () => {
renderLayout();
const banner = screen.getByRole('banner');
expect(within(banner).getByRole('navigation', { name: 'Hoofdnavigatie' })).toBeInTheDocument();
const main = screen.getByRole('main');
expect(main).toHaveAttribute('id', 'main');
expect(main).toHaveAttribute('tabindex', '-1');
expect(within(main).getByRole('heading', { level: 1, name: 'Inhoud' })).toBeInTheDocument();
expect(screen.getByRole('contentinfo')).toBeInTheDocument();
});
it('renders the banner before the main region and the footer after it', () => {
renderLayout();
const banner = screen.getByRole('banner');
const main = screen.getByRole('main');
const footer = screen.getByRole('contentinfo');
expect(banner.compareDocumentPosition(main) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
expect(main.compareDocumentPosition(footer) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
});
it('shows both toggles in white on the brand header', () => {
renderLayout();
expect(screen.getByTestId('mode-toggle-button')).toHaveClass('text-on-brand');
expect(screen.getByTestId('variant-toggle-button')).toHaveClass('text-on-brand');
});
it('has a live region for variant announcements', () => {
renderLayout();
expect(screen.getByRole('status')).toBeInTheDocument();
});
});
+3 -2
View File
@@ -1,10 +1,11 @@
import { useTheme } from '../../theme/ThemeProvider'; import { useTheme } from '../../theme/ThemeProvider';
import { TONE_CLASSES, type ToggleTone } from './toggleTone';
/** /**
* Light/dark switch (requirements FR-4, BR-U1-4, BR-U1-12). Two states; starts from the system * Light/dark switch (requirements FR-4, BR-U1-4, BR-U1-12). Two states; starts from the system
* preference and remembers the visitor's choice after the first click. * preference and remembers the visitor's choice after the first click.
*/ */
export function ModeToggle() { export function ModeToggle({ tone = 'default' }: { tone?: ToggleTone }) {
const { mode, toggleMode } = useTheme(); const { mode, toggleMode } = useTheme();
const isDark = mode === 'dark'; const isDark = mode === 'dark';
@@ -16,7 +17,7 @@ export function ModeToggle() {
aria-pressed={isDark} aria-pressed={isDark}
title="Donkere weergave" title="Donkere weergave"
data-testid="mode-toggle-button" data-testid="mode-toggle-button"
className="flex h-11 w-11 items-center justify-center rounded-full border border-line text-text transition-colors hover:border-accent-line focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent sm:h-8 sm:w-8" className={`flex h-11 w-11 items-center justify-center rounded-full border transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 sm:h-8 sm:w-8 ${TONE_CLASSES[tone]}`}
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
+3 -2
View File
@@ -1,10 +1,11 @@
import { useTheme } from '../../theme/ThemeProvider'; import { useTheme } from '../../theme/ThemeProvider';
import { TONE_CLASSES, type ToggleTone } from './toggleTone';
/** /**
* Icon-only button next to the mode toggle that switches between B and E (FR-4, BR-U1-6, * Icon-only button next to the mode toggle that switches between B and E (FR-4, BR-U1-6,
* BR-U1-12). The label changes with the current variant; the tooltip equals the label. * BR-U1-12). The label changes with the current variant; the tooltip equals the label.
*/ */
export function VariantToggle() { export function VariantToggle({ tone = 'default' }: { tone?: ToggleTone }) {
const { variant, toggleVariant, transition } = useTheme(); const { variant, toggleVariant, transition } = useTheme();
const inE = variant === 'e'; const inE = variant === 'e';
const label = inE ? 'Terug naar nu' : 'Tijdreis: bekijk de site zoals vroeger'; const label = inE ? 'Terug naar nu' : 'Tijdreis: bekijk de site zoals vroeger';
@@ -17,7 +18,7 @@ export function VariantToggle() {
title={label} title={label}
disabled={transition.phase !== 'idle'} disabled={transition.phase !== 'idle'}
data-testid="variant-toggle-button" data-testid="variant-toggle-button"
className="flex h-11 w-11 items-center justify-center rounded-full border border-line text-text transition-colors hover:border-accent-line focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:opacity-60 sm:h-8 sm:w-8" className={`flex h-11 w-11 items-center justify-center rounded-full border transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:opacity-60 sm:h-8 sm:w-8 ${TONE_CLASSES[tone]}`}
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
+10
View File
@@ -0,0 +1,10 @@
/**
* Colour treatment of the round nav buttons: `default` on the page background, `onBrand` on the
* brand-red header of design B (white outline, white text, white focus ring).
*/
export type ToggleTone = 'default' | 'onBrand';
export const TONE_CLASSES: Record<ToggleTone, string> = {
default: 'border-line text-text hover:border-accent-line focus-visible:outline-accent',
onBrand: 'border-white/70 text-on-brand hover:border-white focus-visible:outline-white',
};
@@ -0,0 +1,156 @@
import { render, screen, within } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { Hero } from '../components/Hero';
import { AboutSection } from '../components/AboutSection';
import { ProcessSection } from '../components/ProcessSection';
import { ContactSection } from '../components/ContactSection';
import { Footer } from '../../../components/layout/Footer';
import {
aboutContent,
aboutFacts,
contactInfo,
heroContent,
navLinks,
processSteps,
} from '../data/content';
describe('Hero (design B)', () => {
it('has one h1 that reads as the live headline and shows the display lines', () => {
render(<Hero />);
const h1 = screen.getByRole('heading', { level: 1, name: heroContent.heading });
expect(h1).toBeInTheDocument();
heroContent.displayHeading.forEach((line, index) => {
expect(screen.getByTestId(`hero-line-${index}`)).toHaveTextContent(line);
});
});
it('shows the lead from the content and links to packages and contact', () => {
render(<Hero />);
expect(screen.getByText(heroContent.lead)).toBeInTheDocument();
expect(screen.getByRole('link', { name: 'Bekijk pakketten' })).toHaveAttribute(
'href',
'#pakketten',
);
expect(screen.getByRole('link', { name: 'Plan een gesprek' })).toHaveAttribute(
'href',
'#contact',
);
});
it('shows the code line with caret (decorative) and the eyebrow in the black strip', () => {
render(<Hero />);
expect(screen.getByTestId('hero-caret')).toBeInTheDocument();
expect(screen.getByText(heroContent.eyebrow)).toBeInTheDocument();
expect(screen.getByText(heroContent.codeLine, { exact: false })).toBeInTheDocument();
});
it('is the target of the #top anchor', () => {
const { container } = render(<Hero />);
expect(container.querySelector('#top')).not.toBeNull();
});
});
describe('AboutSection (design B)', () => {
it('renders heading, content paragraphs, photo with alt text and three facts', () => {
render(<AboutSection />);
expect(screen.getByRole('heading', { level: 2, name: /Eén ontwikkelaar/ })).toBeInTheDocument();
aboutContent.paragraphs.forEach((p) => expect(screen.getByText(p)).toBeInTheDocument());
expect(screen.getByAltText('Bryan Slop, oprichter van SLP Software')).toBeInTheDocument();
expect(aboutFacts).toHaveLength(3);
aboutFacts.forEach((fact) => {
expect(screen.getByText(fact.title)).toBeInTheDocument();
expect(screen.getByText(fact.text)).toBeInTheDocument();
});
});
it('uses the #over anchor and a decorative offset block', () => {
const { container } = render(<AboutSection />);
expect(container.querySelector('#over')).not.toBeNull();
expect(screen.getByTestId('about-photo-block')).toHaveAttribute('aria-hidden', 'true');
});
});
describe('ProcessSection (design B)', () => {
it('renders an ordered list of three steps with phase, title and text', () => {
render(<ProcessSection />);
expect(
screen.getByRole('heading', { level: 2, name: 'Van idee naar live in drie stappen' }),
).toBeInTheDocument();
const list = screen.getByRole('list');
expect(list.tagName).toBe('OL');
const items = within(list).getAllByRole('listitem');
expect(items).toHaveLength(processSteps.length);
processSteps.forEach((step) => {
expect(screen.getByText(step.phase)).toBeInTheDocument();
expect(screen.getByRole('heading', { level: 3, name: step.title })).toBeInTheDocument();
expect(screen.getByText(step.description)).toBeInTheDocument();
});
});
it('fills the progress bar 33 / 66 / 100 percent and hides the decorative numbers', () => {
render(<ProcessSection />);
const bars = screen.getAllByTestId('process-progress');
expect(bars.map((bar) => parseFloat((bar as HTMLElement).style.width))).toEqual([
expect.closeTo(33.33, 1),
expect.closeTo(66.67, 1),
100,
]);
const first = screen.getByTestId('process-step-01');
expect(within(first).getByText('01')).toHaveAttribute('aria-hidden', 'true');
});
it('uses the #werkwijze anchor', () => {
const { container } = render(<ProcessSection />);
expect(container.querySelector('#werkwijze')).not.toBeNull();
});
});
describe('ContactSection frame (design B)', () => {
it('shows the display heading that reads as the live heading, the intro and the mail link', () => {
render(<ContactSection />);
expect(
screen.getByRole('heading', { level: 2, name: contactInfo.heading }),
).toBeInTheDocument();
expect(screen.getByText(contactInfo.description)).toBeInTheDocument();
expect(screen.getByTestId('contact-email-link')).toHaveAttribute(
'href',
`mailto:${contactInfo.email}`,
);
});
it('keeps the mailto call-to-action in the panel until the form arrives (U4)', () => {
render(<ContactSection />);
const panel = screen.getByTestId('contact-panel');
const button = within(panel).getByTestId('contact-mailto-button');
expect(button.getAttribute('href')).toContain(`mailto:${contactInfo.email}?subject=`);
});
it('uses the #contact anchor', () => {
const { container } = render(<ContactSection />);
expect(container.querySelector('#contact')).not.toBeNull();
});
});
describe('Footer', () => {
it('is a contentinfo landmark with the copyright and the code line', () => {
render(<Footer />);
expect(screen.getByRole('contentinfo')).toHaveTextContent('© 2026 SLP Software');
expect(screen.getByText('slp.Bouw(uwIdee);')).toBeInTheDocument();
});
});
describe('navigation anchors match the sections', () => {
it('every non-CTA nav link points to an existing section id', () => {
const { container } = render(
<>
<Hero />
<AboutSection />
<ProcessSection />
<ContactSection />
</>,
);
const ids = ['over', 'werkwijze', 'contact', 'top'];
ids.forEach((id) => expect(container.querySelector(`#${id}`), id).not.toBeNull());
expect(navLinks.map((l) => l.href)).toEqual(['#over', '#pakketten', '#werkwijze', '#contact']);
});
});
@@ -1,46 +1,55 @@
import { aboutContent } from '../data/content'; import { aboutContent, aboutFacts } from '../data/content';
/** "Over" of design B: offset-block photo on the left, text and three facts on the right. */
export function AboutSection() { export function AboutSection() {
return ( return (
<section className="py-[88px]"> <section id="over" aria-labelledby="over-heading" className="bg-bg">
<div className="mx-auto max-w-[1080px] px-6"> <div className="mx-auto grid max-w-[1280px] grid-cols-1 items-center gap-x-[104px] gap-y-[72px] px-6 py-20 sm:px-8 md:grid-cols-2 md:py-[136px]">
<div className="grid grid-cols-1 items-start gap-8 sm:grid-cols-[1.2fr_0.8fr] sm:grid-rows-[auto_1fr] sm:items-stretch sm:gap-12"> <div className="relative mb-7 mr-7 max-w-[480px]">
<div className="order-1 mb-3 sm:col-start-1 sm:row-start-1 sm:mb-0"> <div
<span aria-hidden="true"
id="over" className="absolute -bottom-7 -right-7 h-[55%] w-[55%] bg-brand"
className="font-mono block scroll-mt-16 text-sm uppercase tracking-wider text-accent" data-testid="about-photo-block"
> />
// over <picture>
</span> <source
<h2 className="font-display mt-3.5 text-3xl font-bold sm:text-4xl"> type="image/webp"
Eén ontwikkelaar, korte lijnen srcSet="/bryan-slop-400.webp 400w, /bryan-slop-800.webp 800w"
</h2> sizes="(min-width: 768px) 480px, 90vw"
</div> />
<div className="order-2 flex items-center justify-center sm:order-3 sm:col-start-2 sm:row-start-1 sm:row-span-2"> <img
<picture> src="/bryan-slop-800.jpg"
<source srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w"
type="image/webp" sizes="(min-width: 768px) 480px, 90vw"
srcSet="/bryan-slop-400.webp 400w, /bryan-slop-800.webp 800w" alt="Bryan Slop, oprichter van SLP Software"
sizes="(min-width: 640px) 224px, 160px" width={480}
/> height={640}
<img className="relative block aspect-[3/4] w-full object-cover object-[50%_30%]"
src="/bryan-slop-800.jpg" />
srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w" </picture>
sizes="(min-width: 640px) 224px, 160px" </div>
alt="Bryan Slop, oprichter van SLP Software" <div>
width={224} <h2
height={224} id="over-heading"
className="h-40 w-40 rounded-full border-2 border-accent-line object-cover shadow-lg sm:h-56 sm:w-56" className="mb-9 text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%]"
/> >
</picture> Eén ontwikkelaar, korte lijnen
</div> </h2>
<div className="order-3 sm:order-2 sm:col-start-1 sm:row-start-2"> {aboutContent.paragraphs.map((paragraph) => (
{aboutContent.paragraphs.map((paragraph) => ( <p key={paragraph} className="mb-[18px] max-w-[52ch] text-body">
<p key={paragraph} className="mb-4 text-muted"> {paragraph}
{paragraph} </p>
</p> ))}
<dl className="mt-14 grid grid-cols-1 gap-7 sm:grid-cols-3 sm:gap-x-8">
{aboutFacts.map((fact) => (
<div key={fact.title} className="border-t-[3px] border-text pt-3.5">
<dt className="text-[22px] font-extrabold leading-[1.15] [font-stretch:112%]">
{fact.title}
</dt>
<dd className="mt-1.5 text-[15px] text-muted">{fact.text}</dd>
</div>
))} ))}
</div> </dl>
</div> </div>
</div> </div>
</section> </section>
@@ -1,34 +1,56 @@
import { contactInfo } from '../data/content'; import { contactInfo } from '../data/content';
/**
* Contact block of design B: brand-red section with the display heading, intro, mail link and a
* panel on the right. Until the contact form (unit U4) the panel holds the mailto call-to-action.
*/
export function ContactSection() { export function ContactSection() {
const mailtoHref = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`; const mailtoHref = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`;
return ( return (
<section className="pb-[110px]"> <section id="contact" aria-labelledby="contact-heading" className="bg-brand text-on-brand">
<div className="mx-auto max-w-[1080px] px-6"> <div className="mx-auto max-w-[1280px] px-6 pb-24 pt-20 sm:px-8 md:pb-[152px] md:pt-36">
<div className="rounded-[20px] border border-accent-line bg-gradient-to-br from-surface-2 to-surface px-10 py-14 text-center"> <h2
<span id="contact-heading"
id="contact" className="text-[clamp(56px,10.5vw,168px)] font-extrabold leading-[0.88] tracking-[-0.03em] [font-stretch:125%]"
className="font-mono block scroll-mt-16 text-sm uppercase tracking-wider text-accent" aria-label={contactInfo.heading}
> >
// contact {contactInfo.displayHeading.map((line) => (
</span> <span key={line} className="block" aria-hidden="true">
<h2 className="font-display mt-3.5 text-3xl font-bold sm:text-4xl"> {line}
{contactInfo.heading} </span>
</h2> ))}
<p className="mx-auto mb-8 mt-3.5 max-w-[46ch] text-muted">{contactInfo.description}</p> </h2>
<a <div className="mt-12 flex flex-wrap items-end justify-between gap-x-16 gap-y-10 md:mt-[72px]">
href={mailtoHref} <div className="flex-[1_1_320px] self-start">
className="rounded-lg bg-accent px-6 py-3.5 text-[0.98rem] font-semibold text-[var(--color-accent-contrast)] transition-colors hover:bg-[var(--color-accent-hover)]" <p className="mb-10 max-w-[40ch] text-[19px]">{contactInfo.description}</p>
> <p className="mb-2 text-[15px] font-semibold">Liever direct mailen?</p>
Stuur een bericht <a
</a> href={`mailto:${contactInfo.email}`}
<span className="font-mono mt-5 block text-[0.9rem] text-muted"> className="break-words text-[clamp(24px,2.6vw,36px)] font-bold tracking-[-0.02em] underline decoration-[3px] underline-offset-8 [font-stretch:112%]"
of mail direct naar{' '} data-testid="contact-email-link"
<a href={`mailto:${contactInfo.email}`} className="text-accent underline-offset-2 hover:underline"> >
{contactInfo.email} {contactInfo.email}
</a> </a>
</span> </div>
<div
className="min-w-0 flex-[1.4_1_520px] bg-panel p-[clamp(24px,4vw,48px)] text-text"
data-testid="contact-panel"
>
<p className="mb-3 text-[clamp(28px,3vw,40px)] font-extrabold leading-none tracking-[-0.02em] [font-stretch:112%]">
Vertel wat je voor ogen hebt
</p>
<p className="mb-7 max-w-[44ch] text-body">
Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.
</p>
<a
href={mailtoHref}
className="inline-block bg-brand px-6 py-[18px] text-[17px] font-bold text-on-brand no-underline hover:opacity-90"
data-testid="contact-mailto-button"
>
Stuur een bericht
</a>
</div>
</div> </div>
</div> </div>
</section> </section>
+49 -31
View File
@@ -1,41 +1,59 @@
import { heroContent } from '../data/content'; import { heroContent } from '../data/content';
import { handleAnchorClick } from '../../../utils/scrollToHash'; import { handleAnchorClick } from '../../../utils/scrollToHash';
/**
* Hero of design B: display headline on the brand-red block, lead + two buttons, and the black
* code strip with the blinking caret. The nav sits directly above in the same colour.
*/
export function Hero() { export function Hero() {
return ( return (
<header id="top" className="relative overflow-hidden pb-[88px] pt-24"> <section id="top" aria-labelledby="hero-heading" className="bg-brand text-on-brand">
<div className="mx-auto max-w-[1080px] px-6"> <div className="mx-auto max-w-[1280px] px-6 pb-16 pt-10 sm:px-8 sm:pb-24 sm:pt-16">
<span className="font-mono mb-5 block text-sm uppercase tracking-wider text-accent"> <h1
{heroContent.eyebrow} id="hero-heading"
</span> className="text-[clamp(56px,10.5vw,168px)] font-extrabold leading-[0.88] tracking-[-0.03em] [font-stretch:125%]"
<h1 className="font-display mb-6 max-w-[15ch] text-4xl font-extrabold leading-tight tracking-tight sm:text-5xl"> aria-label={heroContent.heading}
{heroContent.heading}
</h1>
<p className="mb-9 max-w-[52ch] text-lg text-muted">{heroContent.lead}</p>
<div
aria-hidden="true"
className="font-mono mb-10 inline-flex max-w-full items-center gap-2 overflow-x-auto whitespace-nowrap rounded border border-line bg-surface px-6 py-4 shadow-lg"
> >
<span>{heroContent.codeLine}</span> {heroContent.displayHeading.map((line, index) => (
<span className="caret" data-testid="hero-caret" /> <span
</div> key={line}
<div className="flex flex-col gap-4 sm:flex-row sm:flex-wrap"> className="block"
<a aria-hidden="true"
href="#pakketten" data-testid={`hero-line-${index}`}
onClick={(event) => handleAnchorClick(event, '#pakketten')} >
className="rounded-lg bg-accent px-6 py-3.5 text-center text-[0.98rem] font-semibold text-[var(--color-accent-contrast)] transition-transform hover:bg-[var(--color-accent-hover)] active:scale-[0.98] sm:text-left" {line}
> </span>
Bekijk pakketten ))}
</a> </h1>
<a <div className="mt-12 flex flex-wrap items-end justify-between gap-10 sm:mt-[72px] lg:gap-x-16">
href="#contact" <p className="max-w-[48ch] text-[19px] leading-[1.55]">{heroContent.lead}</p>
onClick={(event) => handleAnchorClick(event, '#contact')} <div className="flex flex-wrap gap-3">
className="rounded-lg border border-line px-6 py-3.5 text-center text-[0.98rem] font-semibold text-text transition-colors hover:border-accent-line sm:text-left" <a
> href="#pakketten"
Plan een gesprek onClick={(event) => handleAnchorClick(event, '#pakketten')}
</a> className="bg-white px-[26px] py-[17px] text-base font-bold text-[#0e0d0d] no-underline hover:opacity-90"
>
Bekijk pakketten
</a>
<a
href="#contact"
onClick={(event) => handleAnchorClick(event, '#contact')}
className="border-2 border-white px-6 py-[15px] text-base font-bold text-white no-underline hover:opacity-90"
>
Plan een gesprek
</a>
</div>
</div> </div>
</div> </div>
</header> <div className="bg-inv">
<div className="font-mono mx-auto flex max-w-[1280px] flex-wrap items-center justify-between gap-x-8 gap-y-2 px-6 py-[22px] text-base sm:px-8">
<span className="text-white" aria-hidden="true">
<span className="text-[#a8a29c]">~/slp $</span> {heroContent.codeLine}
<span className="caret ml-1.5 !bg-white" data-testid="hero-caret" />
</span>
<span className="text-sm text-[#a8a29c]">{heroContent.eyebrow}</span>
</div>
</div>
</section>
); );
} }
@@ -1,26 +1,22 @@
import { processSteps } from '../data/content'; import { processSteps } from '../data/content';
import { ProcessStep } from './ProcessStep'; import { ProcessStep } from './ProcessStep';
/** "Werkwijze" of design B: black section with three steps, progress bars and outlined numbers. */
export function ProcessSection() { export function ProcessSection() {
return ( return (
<section className="py-[88px]"> <section id="werkwijze" aria-labelledby="werkwijze-heading" className="bg-inv text-white">
<div className="mx-auto max-w-[1080px] px-6"> <div className="mx-auto max-w-[1280px] px-6 pb-24 pt-20 sm:px-8 md:pb-[136px] md:pt-32">
<div className="mb-[52px]"> <h2
<span id="werkwijze-heading"
id="werkwijze" className="mb-16 max-w-[14ch] text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%] md:mb-[88px]"
className="font-mono block scroll-mt-16 text-sm uppercase tracking-wider text-accent" >
> Van idee naar live in drie stappen
// werkwijze </h2>
</span> <ol className="grid grid-cols-1 gap-x-10 gap-y-16 md:grid-cols-3">
<h2 className="font-display mt-3.5 text-3xl font-bold sm:text-4xl"> {processSteps.map((step, index) => (
Van idee naar live in drie stappen <ProcessStep key={step.label} step={step} index={index} total={processSteps.length} />
</h2>
</div>
<div className="grid grid-cols-1 gap-[22px] sm:grid-cols-3">
{processSteps.map((step) => (
<ProcessStep key={step.label} step={step} />
))} ))}
</div> </ol>
</div> </div>
</section> </section>
); );
@@ -1,11 +1,32 @@
import type { ProcessStepData } from '../data/content'; import type { ProcessStepData } from '../data/content';
export function ProcessStep({ step }: { step: ProcessStepData }) { interface ProcessStepProps {
step: ProcessStepData;
/** 0-based position and total, used for the number and the progress bar (33 / 66 / 100 %). */
index: number;
total: number;
}
export function ProcessStep({ step, index, total }: ProcessStepProps) {
const number = String(index + 1).padStart(2, '0');
const progress = `${((index + 1) / total) * 100}%`;
return ( return (
<div className="border-l-2 border-line py-1 pl-6 transition-colors hover:border-accent"> <li data-testid={`process-step-${number}`}>
<span className="font-mono mb-2.5 block text-[0.78rem] text-accent">{step.label}</span> <div aria-hidden="true" className="mb-8 h-1 bg-[#34302e]">
<h3 className="mb-2 text-[1.08rem]">{step.title}</h3> <div className="h-1 bg-prog" style={{ width: progress }} data-testid="process-progress" />
<p className="text-[0.93rem] text-muted">{step.description}</p> </div>
</div> <div
aria-hidden="true"
className="mb-8 text-[120px] font-black leading-[0.9] text-transparent [-webkit-text-stroke:1.5px_#ffffff] [font-stretch:125%]"
>
{number}
</div>
<p className="mb-2 text-sm font-semibold text-[#b9b3ae]">{step.phase}</p>
<h3 className="mb-3 text-[26px] font-extrabold leading-[1.1] [font-stretch:112%]">
{step.title}
</h3>
<p className="max-w-[36ch] text-base text-[#cfcac5]">{step.description}</p>
</li>
); );
} }
+22
View File
@@ -21,6 +21,8 @@ export interface NavLink {
export interface HeroContent { export interface HeroContent {
eyebrow: string; eyebrow: string;
heading: string; heading: string;
/** Display headline of design B, one entry per line ("Websites," / "apps" / "& meer."). */
displayHeading: string[];
lead: string; lead: string;
codeLine: string; codeLine: string;
} }
@@ -39,16 +41,25 @@ export interface PackageCardData {
export interface ProcessStepData { export interface ProcessStepData {
label: string; label: string;
/** Short phase name shown above the title in design B ("Intake", "Bouwen", "Live"). */
phase: string;
title: string; title: string;
description: string; description: string;
} }
export interface AboutFact {
title: string;
text: string;
}
export interface AboutContent { export interface AboutContent {
paragraphs: string[]; paragraphs: string[];
} }
export interface ContactInfo { export interface ContactInfo {
heading: string; heading: string;
/** Display headline of design B, one entry per line ("Klaar om" / "te bouwen?"). */
displayHeading: string[];
description: string; description: string;
email: string; email: string;
mailSubject: string; mailSubject: string;
@@ -64,6 +75,7 @@ export const navLinks: NavLink[] = [
export const heroContent: HeroContent = { export const heroContent: HeroContent = {
eyebrow: 'Web & .NET development', eyebrow: 'Web & .NET development',
heading: 'SLP software: websites, apps & meer', heading: 'SLP software: websites, apps & meer',
displayHeading: ['Websites,', 'apps', '& meer.'],
lead: 'Bij SLP Software kun je terecht voor maatwerk oplossingen. Of het nou gaat om een website, cms of app: wij bouwen het allemaal. Voor ondernemers die geen verrassingen willen — niet in de code, niet op de factuur.', lead: 'Bij SLP Software kun je terecht voor maatwerk oplossingen. Of het nou gaat om een website, cms of app: wij bouwen het allemaal. Voor ondernemers die geen verrassingen willen — niet in de code, niet op de factuur.',
codeLine: 'var website = slp.Bouw(uwIdee);', codeLine: 'var website = slp.Bouw(uwIdee);',
}; };
@@ -120,18 +132,21 @@ export const packages: PackageCardData[] = [
export const processSteps: ProcessStepData[] = [ export const processSteps: ProcessStepData[] = [
{ {
label: 'stap 01 — intake', label: 'stap 01 — intake',
phase: 'Intake',
title: 'Kennismaken', title: 'Kennismaken',
description: description:
'We bespreken je idee, doelgroep en wensen. Je krijgt direct een eerlijk advies over welk pakket past bij jouw doel.', 'We bespreken je idee, doelgroep en wensen. Je krijgt direct een eerlijk advies over welk pakket past bij jouw doel.',
}, },
{ {
label: 'stap 02 — bouwen', label: 'stap 02 — bouwen',
phase: 'Bouwen',
title: 'Ontwerpen & ontwikkelen', title: 'Ontwerpen & ontwikkelen',
description: description:
'Ik bouw je site of applicatie en houd je onderweg op de hoogte, zodat er geen verrassingen zijn bij de oplevering.', 'Ik bouw je site of applicatie en houd je onderweg op de hoogte, zodat er geen verrassingen zijn bij de oplevering.',
}, },
{ {
label: 'stap 03 — live', label: 'stap 03 — live',
phase: 'Live',
title: 'Opleveren', title: 'Opleveren',
description: description:
'Je site gaat live en je krijgt uitleg over hoe alles werkt. Later uitbreiden? Dat kan altijd.', 'Je site gaat live en je krijgt uitleg over hoe alles werkt. Later uitbreiden? Dat kan altijd.',
@@ -145,8 +160,15 @@ export const aboutContent: AboutContent = {
], ],
}; };
export const aboutFacts: AboutFact[] = [
{ title: 'Direct contact', text: 'met de ontwikkelaar zelf' },
{ title: 'Eén werkdag', text: 'tot je een reactie hebt' },
{ title: 'Vaste prijs', text: 'per pakket, vooraf bekend' },
];
export const contactInfo: ContactInfo = { export const contactInfo: ContactInfo = {
heading: 'Klaar om te bouwen?', heading: 'Klaar om te bouwen?',
displayHeading: ['Klaar om', 'te bouwen?'],
description: description:
'Vertel kort wat je voor ogen hebt. Je krijgt binnen één werkdag reactie met een eerlijk advies — vrijblijvend.', 'Vertel kort wat je voor ogen hebt. Je krijgt binnen één werkdag reactie met een eerlijk advies — vrijblijvend.',
email: 'info@slpsoftware.nl', email: 'info@slpsoftware.nl',
+2 -11
View File
@@ -3,19 +3,10 @@
* Google Fonts CDN, avoiding an external dependency and the SRI concerns that would * Google Fonts CDN, avoiding an external dependency and the SRI concerns that would
* otherwise apply to a CDN-loaded stylesheet). * otherwise apply to a CDN-loaded stylesheet).
* *
* Weights match the reference designs' Google Fonts request: * Archivo (variable: weight 100-900, width 62-125%) is the face of design B.
* Sora: 400;600;700;800 — Instrument Sans: 400;500;600 — JetBrains Mono: 400;500;700 * JetBrains Mono: 400;500;700 (code line, mono labels).
*/ */
// Archivo (variable: weight 100-900, width 62-125%) is the display/body face of design B.
// The three families below are removed when the B sections are restyled (unit U2).
import '@fontsource-variable/archivo/wdth.css'; import '@fontsource-variable/archivo/wdth.css';
import '@fontsource/sora/400.css';
import '@fontsource/sora/600.css';
import '@fontsource/sora/700.css';
import '@fontsource/sora/800.css';
import '@fontsource/instrument-sans/400.css';
import '@fontsource/instrument-sans/500.css';
import '@fontsource/instrument-sans/600.css';
import '@fontsource/jetbrains-mono/400.css'; import '@fontsource/jetbrains-mono/400.css';
import '@fontsource/jetbrains-mono/500.css'; import '@fontsource/jetbrains-mono/500.css';
import '@fontsource/jetbrains-mono/700.css'; import '@fontsource/jetbrains-mono/700.css';
+28
View File
@@ -24,6 +24,13 @@ html[data-variant='b'][data-mode='light'] {
--color-accent-line: rgba(122, 20, 20, 0.35); --color-accent-line: rgba(122, 20, 20, 0.35);
--color-accent-hover: #911a1a; --color-accent-hover: #911a1a;
--color-accent-contrast: #ffffff; --color-accent-contrast: #ffffff;
--color-brand: #7a1414;
--color-on-brand: #ffffff;
--color-body: #3f3b38;
--color-inv: #0e0d0d;
--color-panel: #ffffff;
--color-field: #f1efec;
--color-prog: #7a1414;
} }
html[data-variant='b'][data-mode='dark'] { html[data-variant='b'][data-mode='dark'] {
@@ -39,6 +46,13 @@ html[data-variant='b'][data-mode='dark'] {
--color-accent-line: rgba(229, 82, 74, 0.4); --color-accent-line: rgba(229, 82, 74, 0.4);
--color-accent-hover: #ec6a62; --color-accent-hover: #ec6a62;
--color-accent-contrast: #0f0e0e; --color-accent-contrast: #0f0e0e;
--color-brand: #7a1414;
--color-on-brand: #ffffff;
--color-body: #d2cdc8;
--color-inv: #050404;
--color-panel: #1c1918;
--color-field: #0f0e0e;
--color-prog: #e5524a;
} }
html[data-variant='e'][data-mode='light'] { html[data-variant='e'][data-mode='light'] {
@@ -54,6 +68,13 @@ html[data-variant='e'][data-mode='light'] {
--color-accent-line: rgba(172, 0, 0, 0.35); --color-accent-line: rgba(172, 0, 0, 0.35);
--color-accent-hover: #c40000; --color-accent-hover: #c40000;
--color-accent-contrast: #ffffff; --color-accent-contrast: #ffffff;
--color-brand: #ac0000;
--color-on-brand: #ffffff;
--color-body: #333333;
--color-inv: #111111;
--color-panel: #ffffff;
--color-field: #f3f3f3;
--color-prog: #ac0000;
} }
html[data-variant='e'][data-mode='dark'] { html[data-variant='e'][data-mode='dark'] {
@@ -69,6 +90,13 @@ html[data-variant='e'][data-mode='dark'] {
--color-accent-line: rgba(255, 107, 94, 0.4); --color-accent-line: rgba(255, 107, 94, 0.4);
--color-accent-hover: #ff8277; --color-accent-hover: #ff8277;
--color-accent-contrast: #1b1b1d; --color-accent-contrast: #1b1b1d;
--color-brand: #ac0000;
--color-on-brand: #ffffff;
--color-body: #cfcfd3;
--color-inv: #0e0e10;
--color-panel: #232326;
--color-field: #1b1b1d;
--color-prog: #ff6b5e;
} }
html { html {
+80
View File
@@ -0,0 +1,80 @@
import { describe, expect, it } from 'vitest';
import css from '../../index.css?raw';
/** WCAG relative luminance / contrast ratio for #rrggbb values. */
function luminance(hex: string): number {
const channels = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
const [r, g, b] = channels.map((c) => (c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}
function contrast(a: string, b: string): number {
const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x);
return (hi + 0.05) / (lo + 0.05);
}
/** Token values of one variant x mode block of src/index.css. */
function tokens(variant: 'b' | 'e', mode: 'light' | 'dark'): Record<string, string> {
const selector = `html[data-variant='${variant}'][data-mode='${mode}'] {`;
const start = css.indexOf(selector);
expect(start, `block for ${variant}/${mode}`).toBeGreaterThan(-1);
const block = css.slice(start, css.indexOf('}', start));
const result: Record<string, string> = {};
for (const match of block.matchAll(/--color-([a-z0-9-]+):\s*(#[0-9a-fA-F]{6})\s*;/g)) {
result[match[1]] = match[2];
}
return result;
}
const SETS = [
['b', 'light'],
['b', 'dark'],
['e', 'light'],
['e', 'dark'],
] as const;
describe('token contrast (NFR-1, WCAG AA)', () => {
describe.each(SETS)('variant %s, mode %s', (variant, mode) => {
const t = tokens(variant, mode);
it('defines every token the design uses', () => {
for (const name of [
'bg',
'surface',
'surface-2',
'line',
'text',
'muted',
'accent',
'accent-contrast',
'brand',
'on-brand',
'body',
'inv',
'panel',
'field',
'prog',
]) {
expect(t[name], name).toBeDefined();
}
});
it.each([
['text', 'bg'],
['text', 'surface'],
['body', 'bg'],
['muted', 'bg'],
['muted', 'surface'],
['accent', 'bg'],
['accent-contrast', 'accent'],
['on-brand', 'brand'],
['text', 'panel'],
['muted', 'panel'],
['text', 'field'],
])('%s on %s has at least 4.5:1', (fg, bg) => {
expect(contrast(t[fg], t[bg]), `${fg} ${t[fg]} on ${bg} ${t[bg]}`).toBeGreaterThanOrEqual(
4.5,
);
});
});
});
+12 -2
View File
@@ -14,10 +14,20 @@ export default {
accent: 'var(--color-accent)', accent: 'var(--color-accent)',
'accent-soft': 'var(--color-accent-soft)', 'accent-soft': 'var(--color-accent-soft)',
'accent-line': 'var(--color-accent-line)', 'accent-line': 'var(--color-accent-line)',
// Design B colour blocks (constant brand red, black strips, form panel); see index.css.
brand: 'var(--color-brand)',
'on-brand': 'var(--color-on-brand)',
body: 'var(--color-body)',
inv: 'var(--color-inv)',
panel: 'var(--color-panel)',
field: 'var(--color-field)',
prog: 'var(--color-prog)',
}, },
fontFamily: { fontFamily: {
sans: ['Instrument Sans', 'system-ui', 'sans-serif'], // Archivo Variable (weight 100-900, width 62-125%) is the face of design B; use
display: ['Sora', 'sans-serif'], // `[font-stretch:125%]` for the wide display type.
sans: ['Archivo Variable', 'system-ui', 'sans-serif'],
display: ['Archivo Variable', 'system-ui', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'], mono: ['JetBrains Mono', 'monospace'],
archivo: ['Archivo Variable', 'system-ui', 'sans-serif'], archivo: ['Archivo Variable', 'system-ui', 'sans-serif'],
}, },