Plans the Contact page and records unit 1 as generated

Workspace detection, a reverse engineering delta, requirements with the
approved layout mockups, the execution plan and the application design
for the Contact page, plus the code generation plan and summary of the
webPage helper. Corrects the contact payload in the shared API notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 16:59:38 +01:00
co-authored by Claude Opus 5.5
parent a58bc1c1d6
commit 4c257b7ac0
23 changed files with 1766 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

@@ -0,0 +1,131 @@
# Verduidelijkingsvragen — Contactpagina
Je antwoorden op vraag 1–6, 9–13 en 15–19 zijn duidelijk. Bij drie vragen vroeg je om een voorstel:
- **Vraag 7**: iconen in plaats van koppen bij de contactgegevens. Die "hangen" nu onder de foto.
- **Vraag 8**: op mobiel is de foto erg groot, terwijl het formulier en de contactgegevens belangrijker zijn.
- **Vraag 14**: je koos B (de titel houden), maar met een uitgebreidere beschrijving en een breder werkgebied dan alleen Huizen, en je vroeg om suggesties.
## Wat er nu misgaat in het ontwerp
- **Desktop**: links een hoge foto (4:5). Daaronder, na een lijn, drie koppen met elk een link. Dat stuk valt ver onder het formulier, waardoor de kolommen ongelijk eindigen.
- **Mobiel**: de kolommen komen onder elkaar. Eerst een foto over de volle breedte (op een telefoon ruim 450px hoog), dan de gegevens, en pas daarna het formulier.
## Wat in alle voorstellen hetzelfde is (uit vraag 7)
- Elke contactregel krijgt een **icoon** (envelop, Instagram, Facebook) uit de icoonset die de site al gebruikt (`@iconify-icons/ant-design`), met de link als zichtbare tekst ("info@andreaslop.nl", "@andreaslopfotografie"). Het icoon is decoratie en wordt niet voorgelezen. De hele regel is klikbaar en minstens 44px hoog.
- De gegevens staan als **lijst** (`ul`) met één kleine, zichtbare kop in de labelstijl, bijvoorbeeld "Direct contact" (een h2). Geen losse h3's per kanaal.
- Het formulier krijgt een **h2 die alleen screenreaders zien**, "Stuur me een bericht". De volgorde van koppen blijft dan logisch: h1 → h2.
---
## Vraag A: Opbouw van de pagina
### Voorstel 1: formulier voorop, gegevens als kaart bij de foto (aanbevolen)
Desktop (variant 1a): het formulier links (de bredere kolom). Rechts de foto, met de contactgegevens als kaart die over de onderrand van de foto valt. Foto en kaart vormen één geheel, zodat de gegevens niet meer "los" hangen. De rechterkolom is ongeveer even hoog als het formulier.
```mermaid
block-beta
columns 5
A["Intro"]:5
B["Contactformulier"]:3
C["Foto met kaart Direct contact (iconen)"]:2
style A fill:#e76f51,stroke:#ad533d,color:#000
style B fill:#2a9d8f,stroke:#20766b,color:#000
style C fill:#f4a261,stroke:#b77a49,color:#000
```
Text alternative: desktop, intro over de volle breedte; daaronder het formulier links (drie vijfde) en de foto met contactkaart rechts (twee vijfde).
Mobiel: intro → compacte kaart met de drie contactregels (ongeveer 150px) → formulier. Op mobiel valt de foto weg (zie vraag B).
```mermaid
block-beta
columns 1
A["Intro"]
C["Kaart Direct contact (iconen)"]
B["Contactformulier"]
style A fill:#e76f51,stroke:#ad533d,color:#000
style C fill:#f4a261,stroke:#b77a49,color:#000
style B fill:#2a9d8f,stroke:#20766b,color:#000
```
Text alternative: mobiel, onder elkaar: intro, contactkaart, formulier.
Waarom: het formulier is waarvoor de meeste bezoekers komen en staat op desktop op de plek waar je begint te lezen. Wie liever mailt of een DM stuurt, ziet op mobiel meteen de snelle route zonder langs het formulier te hoeven scrollen. De foto geeft op desktop sfeer, maar duwt op mobiel niets naar beneden.
### Voorstel 2: snelle contactstrip onder de intro
Direct onder de intro een strip met de drie contactregels naast elkaar, gecentreerd. Daaronder foto en formulier, zoals in het ontwerp.
```mermaid
block-beta
columns 2
A["Intro"]:2
D["Strip: e-mail · Instagram · Facebook (iconen)"]:2
C["Foto"]
B["Contactformulier"]
style A fill:#e76f51,stroke:#ad533d,color:#000
style D fill:#264653,stroke:#1d353e,color:#000
style C fill:#f4a261,stroke:#b77a49,color:#000
style B fill:#2a9d8f,stroke:#20766b,color:#000
```
Text alternative: desktop, intro, daaronder een strip met de drie contactregels, daaronder foto links en formulier rechts.
Mobiel: intro → strip (drie regels onder elkaar) → formulier → foto (zie vraag B).
Nadeel: de foto en het formulier staan weer naast elkaar met verschillende hoogtes. De strip voelt ook meer als een menu dan als contactgegevens.
### Voorbeeldafbeeldingen
Mockups gemaakt met de stijl en de foto uit het ontwerp en de velden van het echte formulier. Iconen en maten zijn een indicatie; de uitwerking volgt de theme-tokens. Op mobiel is de foto weggelaten (zie vraag B).
| | Desktop | Mobiel |
| ------------------------ | ------------------------------------------------------ | ---------------------------------------------------- |
| Voorstel 1a: foto rechts | [desktop](mockups/voorstel-1a-foto-rechts-desktop.png) | [mobiel](mockups/voorstel-1a-foto-rechts-mobiel.png) |
| Voorstel 1b: foto links | [desktop](mockups/voorstel-1b-foto-links-desktop.png) | gelijk aan 1a |
| Voorstel 2: contactstrip | [desktop](mockups/voorstel-2-strip-desktop.png) | [mobiel](mockups/voorstel-2-strip-mobiel.png) |
Bij **1b** staat de foto links en het formulier rechts, net als in het ontwerp. Het formulier heeft dan wel de bredere kolom. Je leest eerst de foto met de contactkaart en daarna het formulier.
Welk voorstel?
- A) Voorstel 1a: formulier links, foto met contactkaart rechts (aanbevolen: het formulier staat waar je begint te lezen)
- B) Voorstel 1b: foto met contactkaart links, formulier rechts
- C) Voorstel 2: snelle contactstrip onder de intro, foto en formulier daaronder
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag B: De foto op mobiel
- A) Op mobiel weglaten. Op een telefoon voegt de foto weinig toe, en zo laadt hij daar ook niet (scheelt data en houdt de pagina snel). Op tablet en desktop blijft hij staan. (aanbevolen)
- B) Op mobiel als lage, brede foto (3:2, ongeveer 220px hoog) helemaal onderaan de pagina
- C) Op mobiel als kleine ronde portretfoto in de contactkaart, naast "Direct contact" en haar naam ([mockup mobiel](mockups/vraag-b-c-portret-mobiel.png)). Een aparte, kleine uitsnede van het gezicht (enkele kB), zodat de grote foto op mobiel niet geladen hoeft te worden.
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: C
## Vraag C: Titel (SEO)
Je koos B (de titel houden), maar je noemde ook "Fotoshoot boeken in Huizen en omgeving". Google kort een titel af na ongeveer 60 tekens; " | Andrea Slop Fotografie" telt daar al 25 van.
- A) "Contact – fotoshoot boeken in Huizen" → "Contact – fotoshoot boeken in Huizen | Andrea Slop Fotografie" (61 tekens). Het woord "Contact" blijft vooraan, zodat de pagina herkenbaar is in de zoekresultaten en in browsertabbladen. (aanbevolen)
- B) "Fotoshoot boeken in Huizen en omgeving" → 63 tekens; kan op telefoons net worden afgekort, en het woord "Contact" ontbreekt
- C) "Contact" laten staan → "Contact | Andrea Slop Fotografie" (32 tekens)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag D: Beschrijving (SEO)
Over het werkgebied heb ik de sessie van Soorten fotoshoots gevraagd wat je daar hebt aangegeven: "Huizen en omgeving of Huizen en Gooi en Vechtstreek, maar hoeft daar niet beperkt te blijven". Inmiddels heb je daar de formulering **"Huizen, het Gooi en omgeving"** goedgekeurd (in de gestructureerde data: Huizen en Gooi en Vechtstreek, niet heel Nederland), met één bron in `siteContent`. Die sessie past ook de gestructureerde data van het bedrijf aan. Ik sluit daarop aan. Alle opties hieronder blijven onder de 155 tekens.
- A) "Neem contact op voor een newborn-, zwangerschaps- of gezinsshoot in Huizen, het Gooi en omgeving. Ik denk graag met je mee en reageer binnen 1-2 werkdagen." (155) (aanbevolen: noemt de shoots, het gebied en de termijn, en de toon past bij de huidige tekst)
- B) "Fotoshoot boeken in Huizen, het Gooi of daarbuiten? Stuur me een bericht over je newborn-, zwangerschaps- of gezinsshoot. Ik reageer binnen 1-2 werkdagen." (154; zegt expliciet dat je ook buiten de regio komt)
- C) "Een fotoshoot in Huizen, het Gooi en omgeving? Vertel me over je newborn-, zwangerschaps-, gezins- of loveshoot. Ik reageer binnen 1-2 werkdagen." (145; noemt ook de loveshoot)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
@@ -0,0 +1,212 @@
# Verificatievragen — Contactpagina
Al vastgelegd (geen vraag nodig):
- **Route** `/contact` bestaat al als placeholder ([contact.tsx](../../../../../web/src/routes/contact.tsx)) en wordt de echte pagina. Het hoofdmenu en de footer verwijzen er al naar.
- **Layout en stijl** komen uit het ontwerp ([contact.html](../../../../../design/andreaslop-static/contact.html)): page head (eyebrow "Neem contact op", h1 "Contact", intro), daaronder een sectie met twee kolommen: foto met contactgegevens, en het formulier.
- **Hergebruik eerst**: `PageIntro`, `PageSection` (`spacing="flushTop"`), `FramedImage`/`DeferredImage`, `Reveal`, `Eyebrow`, `ContactForm`, `ContactFormGate`, de pure logica (`contactFormReducer`, `validateContact`, `isLikelySpam`, `emailAddress`, `visibleSocials`, `mailtoLink`) en de theme-tokens. Geen hardgecodeerde kleuren, geen CSS-bestanden, geen nieuwe dependencies.
- **Formulier direct laden**: op deze pagina staat het formulier boven de vouw, dus het wordt niet lazy geladen zoals op de homepage.
- **E-mailadres** wordt, net als nu, pas in de browser samengesteld en komt nergens leesbaar in de bundle of de JSON-LD.
- **Toegankelijkheid**: dezelfde lat als Over mij: één h1, secties met een toegankelijke naam, contrast ≥ 4.5:1, `prefers-reduced-motion`, axe in de tests en Lighthouse accessibility 1.0.
- **Afspraken met de parallelle features**: generieke `webPage()`-helper voor JSON-LD als aparte eerste commit (Portfolio en Soorten fotoshoots bouwen erop), en alleen eigen regels in `sitePages.ts`, `lighthouserc.cjs` en `active-features.md`.
Wat ik zag op het ontwerp, in de code en op de live site (andreaslop.nl/contact):
| Onderdeel | Ontwerp | Huidige code (formulier homepage) | Live site |
| --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| Velden | naam, e-mail, **onderwerp** (vrije tekst), bericht | naam, e-mail, **"In welke shoot heb je interesse?"** (Zwangerschap / Newborn / Gezin / Overig), bericht | zelfde als de code (Familie i.p.v. Gezin) |
| Reactietermijn | "binnen **2-3** werkdagen" (intro) | "binnen **1-2** werkdagen" (bedankbericht) | "binnen **1** werkdag" (intro) |
| Verzendknop | "Verzenden" | "(Aan)vraag versturen" | "(Aan)vraag versturen" |
| Contactgegevens | E-mail, Instagram, Facebook (h3 + link) onder de foto | bestaat nog niet als blok | Email en Instagram, plus social-iconen |
| Foto | `contact.jpg`, alt "Andrea Slop met haar camera" | — | zelfde foto, **zonder alt-tekst** |
| LAYOUT.md | — | Intro / Photo + Contact form / Contact details over de volle breedte | — |
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
---
## Vraag 1: Velden van het formulier
- A) Hetzelfde formulier als op de homepage en de live site: naam, e-mail, de shoot-keuzelijst en bericht. Eén formulier, één payload (`{ naam, email, shoot, bericht }`) voor de API, en de keuzelijst blijft gekoppeld aan de pakketten. (aanbevolen)
- B) Zoals in het ontwerp: een vrij onderwerpveld in plaats van de keuzelijst. Dan krijgt `ContactForm` een variant, en de API twee soorten berichten.
- C) Allebei: de keuzelijst én een vrij onderwerpveld
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 2: Reactietermijn
Ontwerp, code en live site beloven alle drie iets anders. Ik zet de termijn op één plek in de content (`siteContent`), zodat de intro van deze pagina en het bedankbericht van het formulier (ook op de homepage) altijd hetzelfde zeggen. Welke termijn?
- A) 1-2 werkdagen (wat het formulier nu al zegt) (aanbevolen: haalbaar en al eerder goedgekeurd)
- B) 1 werkdag (live site)
- C) 2-3 werkdagen (ontwerp)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 3: Shoot voorselecteren via de link
Soorten fotoshoots wil vanaf elke shoot linken naar het formulier met die shoot alvast gekozen. Op de homepage werkt dat al met `/?pakket=newborn#contact` (een onbekende waarde wordt genegeerd en nooit op de pagina getoond).
- A) Dezelfde parameter op deze pagina: `/contact?pakket=<id>`, met dezelfde logica als de homepage (`packageFromSearch`). Bekende waarden: `zwangerschap`, `newborn`, `gezin`. Een shoot zonder pakket (bijvoorbeeld een loveshoot) linkt gewoon naar `/contact`. (aanbevolen)
- B) Een nieuwe parameter `/contact?onderwerp=<slug>` met de slugs van de shoot-types van Soorten fotoshoots, die ook naar "Overig" kan
- C) Geen voorselectie: altijd gewoon `/contact`
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 4: Formulier zolang er geen back-end is
Het formulier kan nog niets versturen. Op de homepage staat het daarom gedimd en onbedienbaar onder een "Binnenkort"-melding met een mailknop (`siteContent.contactForm.enabled = false`).
- A) Hier precies hetzelfde gedrag, via dezelfde schakelaar. Zodra de API er is, gaan beide formulieren tegelijk aan. (aanbevolen)
- B) Op deze pagina het formulier verbergen tot de API er is, en alleen de contactgegevens en een mailknop tonen
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 5: Hergebruik van de formulier-opbouw
Op de homepage regelt `ContactSection` de koppeling tussen de gate, het formulier, de shoot-opties en de voorselectie. Deze pagina heeft precies hetzelfde nodig, alleen zonder lazy loading.
- A) Die koppeling uit `ContactSection` halen in een gedeeld blok (werktitel `ContactPanel`) dat zowel de homepage als deze pagina gebruikt. Het gedrag op de homepage blijft gelijk. (aanbevolen)
- B) Op deze pagina zelf `ContactFormGate` en `ContactForm` samenstellen en `ContactSection` laten zoals hij is
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 6: Welke contactgegevens
- A) E-mail, Instagram en Facebook, zoals in het ontwerp. Ze komen uit `siteContent`, dezelfde bron als de footer, en worden alleen getoond als ze geldig zijn. Gemaakt als herbruikbaar blok (werktitel `ContactDetails`). (aanbevolen)
- B) Alleen e-mail en Instagram, zoals op de live site
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 7: Koppen en structuur
In het ontwerp staan onder de h1 meteen h3's ("E-mail", "Instagram", "Facebook"). Het formulier heeft geen kop. Een sprong van h1 naar h3 maakt de pagina lastiger te scannen met een screenreader.
- A) Twee benoemde secties: het formulier krijgt een h2 die alleen voor screenreaders zichtbaar is (bijvoorbeeld "Stuur me een bericht"), de contactgegevens een zichtbare of verborgen h2 "Contactgegevens" met h3's per kanaal in de stijl van het ontwerp. Visueel verandert er niets. (aanbevolen)
- B) De kanalen worden h2's in de kleine labelstijl, zonder extra kop voor het formulier
- C) Letterlijk het ontwerp: alleen h3's
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: X, Ik denk dat de contactgegevens mooier kunnen. Gebruik een icon bij de verschillende gegevens in plaats van een header. Kijk ook ove onder elkaar dan nog steeds de meest logische keuze is, maar de contactgegevens hanger er nu een beetje onder. Dat moet beter kunnen.
## Vraag 8: Plaats van de contactgegevens
In het ontwerp staan de contactgegevens onder de foto, in dezelfde kolom. In [LAYOUT.md](../../../../../LAYOUT.md) staan ze als apart blok over de volle breedte onder foto en formulier.
- A) Zoals in het ontwerp (onder de foto), en LAYOUT.md daarop aanpassen volgens [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md). Op telefoon komen foto en gegevens boven het formulier. (aanbevolen)
- B) Zoals in het ontwerp, maar op telefoon het formulier eerst, dan foto en gegevens (het formulier is waarvoor de bezoeker komt)
- C) Zoals in LAYOUT.md: een apart blok over de volle breedte onder foto en formulier
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: Doe een suggestie. Op mobiel is de foto ook erg groot terwijl het formulier en de contactgegevens de belangrijkere elementen zijn. Kan je een suggestie doen voor een verbetering. Ook rekening houdend met mijn antwoor din vraag 7.
## Vraag 9: Foto en alt-tekst
- A) De originele foto van andreaslop.nl downloaden, eenmalig verkleinen en comprimeren (zoals bij Over mij) en een beschrijvende Nederlandse alt-tekst schrijven die Andrea later kan nalezen (aanbevolen)
- B) De foto uit het ontwerp gebruiken (`assets/img/contact.jpg`) met de alt-tekst uit het ontwerp
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 10: Tekst van de verzendknop
- A) "(Aan)vraag versturen" houden, zoals op de homepage en de live site. Eén formulier, één tekst. (aanbevolen)
- B) "Verzenden" uit het ontwerp, voor beide formulieren
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 11: Privacy bij het formulier
Het formulier vraagt om een naam en e-mailadres. Volgens de AVG hoort de bezoeker te kunnen lezen wat er met die gegevens gebeurt. `/privacyverklaring` is nog een placeholder.
- A) Onder het formulier één korte regel met een link: "Lees in de privacyverklaring wat ik met je gegevens doe." Op beide formulieren, want ze zijn gedeeld. (aanbevolen)
- B) Nu nog geen privacyregel, wel als de privacyverklaring af is
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 12: Links die nu naar `/#contact` gaan
Op Over mij gaan "neem contact op" en "Boek je shoot" voorlopig naar het contactblok op de homepage (`/#contact`), tot deze pagina af is (besluit uit Over mij, vraag 3).
- A) Die twee links omzetten naar `/contact`. De "Boek"-knoppen op de prijskaarten van de homepage blijven naar het formulier op de homepage zelf gaan, want daar hoef je de pagina niet voor te verlaten. (aanbevolen)
- B) Alle links laten zoals ze zijn
- C) Ook de "Boek"-knoppen op de homepage naar `/contact?pakket=…` laten gaan
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 13: Indexeren door zoekmachines
`/contact` staat nu op `noindex` en ontbreekt in `sitemap.xml`.
- A) Bij het mergen op **geïndexeerd** zetten: geen `noindex` meer, in de sitemap, in Lighthouse CI als geïndexeerde pagina controleren. Ook met het formulier nog achter de "Binnenkort"-melding is de pagina bruikbaar dankzij de mailknop en de contactgegevens. (aanbevolen)
- B) Op `noindex` laten tot het formulier echt werkt
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 14: Titel en beschrijving (SEO)
Nu: titel "Contact | Andrea Slop Fotografie", beschrijving "Neem contact op met Andrea Slop Fotografie voor een fotoshoot in Huizen en omgeving. Ik denk graag met je mee over jullie wensen."
- A) Titel met zoekwoorden, bijvoorbeeld "Contact – fotoshoot boeken in Huizen", en een beschrijving die de shoots en de reactietermijn noemt. Ik stel ze voor in requirements.md en jij keurt ze goed. (aanbevolen)
- B) Titel en beschrijving laten zoals ze zijn
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: B, in beschrijving kanje wat uitgebreider zijn. Bij Soorten Fotoshoots had ik ook al wat aangegeven over de locatie dat dat breder is dan huizen. Misschien dat je daar kan navragen. Misschien "Fotoshoot boeken in Huizen en omgeving"? Geef mij suggesties
## Vraag 15: Gestructureerde data (JSON-LD)
- A) Een `ContactPage` via de nieuwe `webPage()`-helper, met als onderwerp de bestaande `ProfessionalService` (verwijzing naar `businessId`). Zonder e-mailadres, zoals nu overal. `aboutPage()` gaat op dezelfde helper draaien, met dezelfde uitvoer. (aanbevolen)
- B) Alleen de bestaande `ProfessionalService`, niets extra (de helper komt er dan toch, voor Portfolio en Soorten fotoshoots)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 16: Preview-afbeelding bij delen (Open Graph)
- A) Een eigen preview voor deze pagina: de contactfoto, bijgesneden tot 1200×630 in `web/public/` (aanbevolen)
- B) De standaardafbeelding van de site houden
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 17: Beveiligingsextensies
Moeten de beveiligingsregels als harde vereisten worden afgedwongen voor dit project? (Bij homepage en Over mij: ja.)
- A) Ja — dwing alle BEVEILIGINGSREGELS af als blokkerende vereisten (aanbevolen voor productietoepassingen)
- B) Nee — sla alle BEVEILIGINGSREGELS over (geschikt voor PoC's, prototypes en experimentele projecten)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 18: Property-Based Testing Extensie
Moeten de property-based testing (PBT) regels worden afgedwongen voor dit project? (Bij homepage en Over mij: ja, volledig.)
- A) Ja — dwing alle PBT-regels af als blokkerende vereisten (aanbevolen voor projecten met bedrijfslogica, datatransformaties, serialisatie of stateful componenten)
- B) Gedeeltelijk — dwing PBT-regels alleen af voor pure functies en serialisatie round-trips (geschikt voor projecten met beperkte algoritmische complexiteit)
- C) Nee — sla alle PBT-regels over (geschikt voor eenvoudige CRUD-applicaties, UI-only projecten of dunne integratielagen zonder significante bedrijfslogica)
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: A
## Vraag 19: Operations-fase
Moet deze feature na Construction de Operations-fase doorlopen (deployment en monitoring inrichten)? (Bij Over mij: nee, de CI deployt al naar test.)
- A) Ja — na Construction de Operations-fase uitvoeren (deployment + monitoring)
- B) Nee — stoppen na Build and Test (deployment/monitoring vallen buiten deze feature)
- C) Weet ik nog niet — vraag het me opnieuw na de Construction-fase
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
[Answer]: B
@@ -0,0 +1,198 @@
# Requirements — Contact Page
## Intent Analysis
- **User Request**: build the Contact page, again with attention to SEO, accessibility and reuse of code elements, Chakra and theming, like the previous feature (Over mij).
- **Request Type**: New Feature (replaces the `/contact` placeholder with the real page) with supporting refactors (shared contact form panel, shared contact details block, generic structured-data helper)
- **Scope Estimate**: Multiple components within one package (`web/`), plus [LAYOUT.md](../../../../../LAYOUT.md); one shared helper (`webPage()` in `seo.ts`) consumed by two parallel features
- **Complexity Estimate**: Moderate — one page with a layout that deviates from the design on purpose, two extractions from the homepage contact section, a URL parameter, responsive image handling (large photo not loaded on phones), SEO additions
- **Requirements Depth**: Standard
## Source of Truth
- **Layout**: the approved mockup **proposal 1a** ([desktop](mockups/voorstel-1a-foto-rechts-desktop.png), [mobile with portrait](mockups/vraag-b-c-portret-mobiel.png)), which deviates from [design/andreaslop-static/contact.html](../../../../../design/andreaslop-static/contact.html) on purpose. Styling (colours, type, spacing, form fields) follows the design and the existing theme. *Source: clarification A = A, B = C*
- **Form behaviour**: the existing homepage contact form (homepage-sections feature), unchanged except where stated here.
- **Decisions**: [requirement-verification-questions.md](requirement-verification-questions.md), [requirement-clarification-questions.md](requirement-clarification-questions.md)
## Page Structure
Shell header → **Intro** (page head, h1) → **Contact** section: **Contact form** (left) and **Photo with contact card** (right) on wide screens; **Contact card** (with small portrait) above the **Contact form** on narrow screens → shell footer.
## Out of Scope
- The back-end (`POST /api/contact`), the robot check (Friendly Captcha) and switching the form on: the form stays behind the existing "Binnenkort" gate. *Source: Q4 = A*
- The content of `/privacyverklaring` (still a placeholder; only linked). *Source: Q11 = A*
- The service area wording in `siteContent` and `areaServed` in `professionalService()`: owned by the soorten-fotoshoots-page feature; this page only uses the same visible wording.
- A responsive image pipeline (srcset/WebP) beyond what FR-CP-05 needs.
- Operations phase. *Source: Q19 = B*
---
## Functional Requirements
### FR-CP-01 Intro (page head)
- Eyebrow **"Neem contact op"**, the page's only h1 **"Contact"** and an intro sentence, via the existing `PageIntro`.
- Intro (proposal, to confirm at review): **"Wil je een fotoshoot boeken of meer informatie ontvangen? Stuur me een berichtje, ik reageer binnen 1-2 werkdagen."** The design's "via onderstaand formulier" is dropped, because while the form is gated the visitor reaches Andrea via the mail button or the contact card. The reply time comes from the shared value in FR-CP-07.
### FR-CP-02 Contact form
- The same form as on the homepage: **Naam**, **E-mail**, **"In welke shoot heb je interesse?"** (the shown packages, then "Overig") and **"Stel hier je vraag"**; same validation, honeypot, time check, focus handling, sent and failed states, and payload `{ naam, email, shoot, bericht }`. *Source: Q1 = A*
- Submit label stays **"(Aan)vraag versturen"**. *Source: Q10 = A*
- Behind the same "Binnenkort" gate as on the homepage, controlled by the same switch (`siteContent.contactForm.enabled`), so both forms go live together. *Source: Q4 = A*
- On this page the form loads with the page (it is above the fold); on the homepage it keeps loading lazily as today.
- Field ids are unique per page (`idPrefix`), so both forms can coexist in the code without clashes.
- The form section has a heading visible only to assistive technology: **"Stuur me een bericht"** (h2). *Source: clarification on Q7*
### FR-CP-03 Preselect a shoot via the URL
- `/contact?pakket=<packageId>` preselects that shoot in the form, with exactly the homepage rules: case and surrounding spaces ignored, unknown or non-text values ignored, the value is never shown on the page. Known ids today: `zwangerschap`, `newborn`, `gezin`. *Source: Q3 = A*
- The chosen package also goes into the mail subject of the gate's mail button and the failure message ("Aanvraag fotoshoot: Newborn"), as on the homepage.
- After applying it, `?pakket=` is removed from the address bar without a new history entry. The page is a fresh page load, so focus stays at the start of the page (no focus move).
- This URL format is the contract for the soorten-fotoshoots-page feature ("Stuur een berichtje" links per shoot; shoots without a package link to plain `/contact`).
### FR-CP-04 Contact card ("Direct contact")
- A card with a small visible heading **"Direct contact"** (h2, eyebrow style) and a list of contact channels, each an **icon plus link text**, no per-channel headings: *Source: Q6 = A, clarification on Q7*
- **E-mail**: the address as link text, `mailto:` with the default subject "Vraag via andreaslop.nl";
- **Instagram** and **Facebook**: a readable name or handle as link text, opening the profile.
- Data from `siteContent` (same source as the footer): the e-mail address is only assembled in the browser and the item is left out if it is invalid; social items only for valid links (`visibleSocials`). If no channel is valid, the card is not rendered.
- Icons come from the icon set already used (`@iconify-icons/ant-design`, offline) and are decorative (hidden from assistive technology). Each row is fully clickable with a target of at least 44 px high.
- Built as a reusable component (working name `ContactDetails`), not tied to this page.
### FR-CP-05 Layout and photo
- **Wide screens** (from the breakpoint where two columns fit; the design switches at 960 px): the form in the wider left column (about 3/5), on the right the contact photo (portrait crop 4:5) with the contact card overlapping its bottom edge, so photo and card read as one unit. *Source: clarification A = A (proposal 1a)*
- **Narrow screens**: intro → contact card → form. The large photo is not shown **and not downloaded**. Instead the card shows a **small round portrait** (a separate small face crop, a few kB) next to "Direct contact" and the name "Andrea Slop". *Source: clarification B = C*
- The large photo: the original from andreaslop.nl, resized once and compressed (as for Over mij), with a descriptive Dutch alt text for Andrea to review. The small portrait is decorative (the name next to it says who it is). *Source: Q9 = A*
- Scroll reveal as on the other pages (existing `Reveal`), respecting `prefers-reduced-motion`.
### FR-CP-06 Privacy line
- Below the submit button of **both** forms (shared component): **"Lees in de privacyverklaring wat ik met je gegevens doe."**, with "privacyverklaring" linking to `/privacyverklaring` (`underline` link variant). *Source: Q11 = A*
### FR-CP-07 Reply time in one place
- The reply time **"1-2 werkdagen"** is one content value (in `siteContent`), used by the intro of this page and by the form's thank-you message ("Bedankt voor je bericht! Ik reageer binnen 1-2 werkdagen."), so they never disagree. *Source: Q2 = A*
### FR-CP-08 Shared contact form panel
- The wiring that the homepage `ContactSection` does today (gate, form, shoot options from the packages, preselect from `?pakket=`, mail subject) moves into one shared component (working name `ContactPanel`), used by the homepage section and this page. The homepage looks and behaves exactly as before, including lazy loading, the placeholder height, the URL clean-up and moving focus to its heading after a "Boek …" click. *Source: Q5 = A*
### FR-CP-09 Links to the contact page
- On Over mij, "neem contact op" and "Boek je shoot" change from `/#contact` to **`/contact`**. The "Boek …" links on the homepage price cards keep going to the homepage form (`/?pakket=…#contact`). *Source: Q12 = A*
### FR-CP-10 Content
- All page texts and images live as API-shaped static data in `web/src/content/` (a new content object with an interface in `content/types.ts`), passed into the components from the route, as for the other pages.
### FR-CP-11 LAYOUT.md
- Update the "Contact" diagram to the approved structure (Intro; Contact form beside Photo with contact details), following [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md).
---
## SEO Requirements
### SEO-CP-01 Indexing
- `/contact` becomes **indexed** when this feature merges: `indexed: true` in `sitePages.ts` (no `robots noindex`, in `sitemap.xml`), and moved to the indexed paths in `web/lighthouserc.cjs` / `.desktop.cjs` (the sync test must pass). *Source: Q13 = A*
### SEO-CP-02 Title and description
- Title: **"Contact – fotoshoot boeken in Huizen"** → "Contact – fotoshoot boeken in Huizen | Andrea Slop Fotografie" (61 characters; one over the ~60 guideline, accepted to keep "Contact" first). *Source: clarification C = A (supersedes Q14 = B)*
- Description: **"Neem contact op voor een newborn-, zwangerschaps- of gezinsshoot in Huizen, het Gooi en omgeving. Ik denk graag met je mee en reageer binnen 1-2 werkdagen."** (155 characters). The service area wording matches the one approved in soorten-fotoshoots-page. *Source: clarification D = A*
### SEO-CP-03 Structured data
- A `ContactPage` JSON-LD on this page whose subject is the existing business (`about` / `mainEntity` referencing `businessId`). No e-mail address, as everywhere. Escaped through `jsonLdScript`. *Source: Q15 = A*
- Built on a new generic, pure helper **`webPage(type: WebPageType, path, extra)`** in `seo.ts` (`@context`, `@type`, `@id` = `url` = canonical URL, `name` and `description` from `sitePages`, `inLanguage: 'nl-NL'`, then `extra`), with `WebPageType = 'WebPage' | 'AboutPage' | 'ContactPage' | 'ImageGallery' | 'CollectionPage'`.
- `aboutPage()` is rebuilt on `webPage()` with **identical output** and an unchanged signature.
- `webPage()` (with the `aboutPage()` refactor and tests, nothing else) is delivered as a **separate first commit**, because portfolio-page and soorten-fotoshoots-page build on it (agreed with those sessions; hash to be sent to them).
### SEO-CP-04 Preview image (Open Graph)
- A page-specific preview image: the contact photo cropped to **1200×630** in `web/public/`, set as the page's `ogImage` in `sitePages.ts` with its own alt text. *Source: Q16 = A*
### SEO-CP-05 Semantic structure
- One h1; heading outline h1 "Contact" → h2 "Stuur me een bericht" (visually hidden) and h2 "Direct contact"; `section` landmarks with accessible names; descriptive link texts; images with width and height.
---
## Non-Functional Requirements
### NFR-CP-01 Accessibility (WCAG 2.1 AA as guideline)
- Heading outline as in SEO-CP-05, no skipped levels.
- Form: visible labels linked to the fields, errors linked and announced as today, focus to the first invalid field, the gate keeps keyboard and screen reader users out of the inactive form (`inert`) and offers the mail button.
- Contact card: a list with an accessible name; decorative icons hidden; link texts that make sense on their own; focus ring from the theme; targets ≥ 44×44 px.
- Text contrast ≥ 4.5:1 (`accent.deep` for eyebrow-styled text, `ink.soft` for running text); the card's border and shadow are not the only cue for its boundaries.
- Order in the DOM matches the visual order on every screen size (no CSS reordering that changes the reading order).
- `prefers-reduced-motion` respected; works at 200% zoom and 320 px wide without horizontal scrolling.
- Axe checks in component and route tests; Lighthouse accessibility 1.0 for `/contact` (mobile and desktop).
### NFR-CP-02 Styling and reuse
- Reuse before building: `PageIntro`, `PageSection` (`flushTop`), `FramedImage` / `DeferredImage` where they fit, `Reveal`, `Eyebrow`, `ContactForm`, `ContactFormGate`, `Link` (`underline`), the `linkButton` recipe, theme tokens and text styles.
- New shared pieces (`ContactPanel`, `ContactDetails`, the privacy line, `webPage()`) are generic and live in `components/` or `seo.ts`, not inside the route. Styling that another page may need goes into tokens, text styles or recipes, not inline per page.
- No hard-coded colours, CSS files or Tailwind; Chakra primitives where they fit; Prettier style; code comments in English in new code; visitor-facing texts in Dutch.
- Coordination with parallel features: only this feature's own entries in `sitePages.ts`, `lighthouserc*.cjs` and `active-features.md`; `PageIntro` not changed without notifying the other sessions; components claimed by portfolio-page (PortfolioGrid, Lightbox, InstagramGrid) and soorten-fotoshoots-page (shootTypes, CallToAction, MediaText `reverse`) are not touched.
### NFR-CP-03 Testing
- **Example-based**: page structure (heading outline, landmarks, the card's channels and their targets, the privacy link), layout per breakpoint where testable, `?pakket=` preselect and URL clean-up on this page, the homepage contact section unchanged in output and behaviour after the `ContactPanel` extraction, the Over mij link targets, head tags (title, description, no `noindex`, canonical, `og:image`), axe checks.
- **Property-based** (fast-check, existing arbitraries): `webPage()` invariants (`@id` = `url` = canonical URL of the path, `@type` preserved, `extra` merged, never an e-mail address), `aboutPage()` output equal to the previous implementation for generated content, and any new pure helper (e.g. deriving the channel label from a social link). *Source: PBT = A (full)*
- `pnpm check` (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse) passes.
### NFR-CP-04 Security (Security Baseline extension enabled)
- No new third parties: no external scripts, fonts, embeds or endpoints; CSP unchanged.
- No e-mail address in markup at build time, bundle, content or structured data (assembled in the browser).
- `?pakket=` is validated against the known package ids and never reflected; form input is validated client-side as today (server-side validation belongs to the API feature).
- Structured data through `jsonLdScript`; no new runtime dependencies; image processing is a one-off local step.
### NFR-CP-05 Performance
- On wide screens the contact photo is likely the largest contentful paint and must not be deferred; on narrow screens it must not be downloaded at all (only the small portrait). How this is done (e.g. `<picture>` with a media query, or rendering by breakpoint) is decided in design.
- Lighthouse performance for `/contact` ≥ 0.9 on mobile and desktop, including the form loading with the page.
- No layout shift from images or the form (intrinsic sizes, reserved space).
### NFR-CP-06 Content for the future API
- The page content is plain data (strings, `ContentImage`, link targets) so the API can deliver it 1-to-1; the reply time is one value.
---
## Extension Compliance — Requirements Level
### Security Baseline
| Rule | Status | Rationale |
|---|---|---|
| SECURITY-01 Encryption | N/A | No data stores; nothing is sent while the form is gated |
| SECURITY-02 Access logging | N/A | No intermediaries added; hosting unchanged |
| SECURITY-03 Application logging | N/A | No server-side component; client errors already go to Sentry |
| SECURITY-04 HTTP security headers | Compliant | Existing header set unchanged; no CSP loosening (NFR-CP-04) |
| SECURITY-05 Input validation | Compliant | Existing client-side form validation and length limits; `?pakket=` checked against an allow-list and never reflected (FR-CP-03); server-side validation is part of the API feature |
| SECURITY-06 Least privilege | N/A | No IAM |
| SECURITY-07 Network configuration | N/A | No network infrastructure |
| SECURITY-08 Access control | N/A | Public content |
| SECURITY-09 Hardening | Compliant | No debug output; no new configuration; submit errors show a generic message only |
| SECURITY-10 Supply chain | Compliant | No new dependencies |
| SECURITY-11 Secure design | Compliant | E-mail kept out of the page source; honeypot and time check kept; structured data escaped |
| SECURITY-12 Authentication | N/A | No authentication |
| SECURITY-13 Integrity | Compliant | No external CDN resources; all assets self-hosted |
| SECURITY-14 Alerting | N/A | No server-side component; existing monitoring unchanged |
| SECURITY-15 Exception handling | Compliant | Failed submit falls back to a generic message with the mail address; global error page unchanged |
### Property-Based Testing
| Rule | Status | Rationale |
|---|---|---|
| PBT-01 Property identification | Planned | Properties of `webPage()`, `aboutPage()` and new helpers identified in design |
| PBT-02 Round-trip | Planned | Structured data through `jsonLdScript` parses back to the same object (extend if not covered) |
| PBT-03 Invariants | Planned | `@id` = `url` = canonical; no e-mail in structured data; card shows only valid channels |
| PBT-04 Idempotency | Planned | Applying the same `?pakket=` twice gives the same form state (if a new pure function is introduced) |
| PBT-05 Oracle | Planned | New `aboutPage()` equals the previous implementation for generated content |
| PBT-06 Stateful | Compliant | `contactFormReducer` is already covered; unchanged |
| PBT-07 Generators | Planned | Reuse/extend `src/test/arbitraries.ts` |
| PBT-08 Shrinking/reproducibility | Compliant | Existing seed logging (`config/testSeed.ts`) |
| PBT-09 Framework | Compliant | fast-check already configured |
| PBT-10 Complementary testing | Planned | Example-based tests for the page and components alongside PBT |
---
## Summary of Key Decisions
| # | Decision |
|---|---|
| Q1 | Same form fields as the homepage (shoot select), one payload |
| Q2 | Reply time "1-2 werkdagen", one content value for intro and thank-you |
| Q3 | Preselect via `/contact?pakket=<packageId>` (contract for soorten-fotoshoots-page) |
| Q4 | Same "Binnenkort" gate and switch as the homepage |
| Q5 | Shared `ContactPanel` for the homepage and this page |
| Q6 | Contact card with e-mail, Instagram and Facebook from `siteContent` |
| Q7 / A | Icons instead of per-channel headings; layout proposal 1a (form left, photo with overlapping card right) |
| Q8 / B | Phones: card above the form, no large photo, small round portrait in the card |
| Q9 | Original live photo, resized once, descriptive alt text |
| Q10 | Submit label "(Aan)vraag versturen" |
| Q11 | Privacy line with link under both forms |
| Q12 | Over mij links → `/contact`; homepage "Boek" links unchanged |
| Q13 | Indexed on merge |
| C / D | Title "Contact – fotoshoot boeken in Huizen"; description with "Huizen, het Gooi en omgeving" |
| Q15 | `ContactPage` JSON-LD via a generic `webPage()` helper, delivered as a separate first commit |
| Q16 | Own 1200×630 preview image |
| Ext. | Security Baseline: Yes · PBT: Yes (full) · Operations: No |