Adds the inception docs and design for the homepage sections
Refreshes the shared reverse engineering docs, adds the requirements, application design and units for the homepage-sections feature, and updates the static design: live prices and form fields, the new Lieve woorden block and the coming-soon gate over the contact form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ Used by every page except Shell (see exception below):
|
|||||||
- If a page needs more blocks than the template currently has letters for, add a new letter/color rather than cycling back to `A` — never reuse a color, since that would visually suggest two different blocks are "the same element." A new color's stroke is always its fill at 25% darker (multiply each RGB channel by 0.75, round, convert back to hex), kept in the same style: medium-high saturation, similar lightness to the existing set.
|
- If a page needs more blocks than the template currently has letters for, add a new letter/color rather than cycling back to `A` — never reuse a color, since that would visually suggest two different blocks are "the same element." A new color's stroke is always its fill at 25% darker (multiply each RGB channel by 0.75, round, convert back to hex), kept in the same style: medium-high saturation, similar lightness to the existing set.
|
||||||
- For two sections that sit side-by-side in one row (e.g. Contact's Photo + Contact form), switch that page's diagram to `columns 2`, give full-width blocks a `:2` span, and place the side-by-side pair as plain unspanned nodes next to each other in the code (no composite container needed) — small manual width tweaks to line them up are fine, it only needs to look "good enough."
|
- For two sections that sit side-by-side in one row (e.g. Contact's Photo + Contact form), switch that page's diagram to `columns 2`, give full-width blocks a `:2` span, and place the side-by-side pair as plain unspanned nodes next to each other in the code (no composite container needed) — small manual width tweaks to line them up are fine, it only needs to look "good enough."
|
||||||
|
|
||||||
Current letter → color template (extend with a new letter using the same formula if a 7th block is ever needed):
|
Current letter → color template (extend with a new letter using the same formula if an 8th block is ever needed):
|
||||||
|
|
||||||
```
|
```
|
||||||
style A fill:#e76f51,stroke:#ad533d,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style A fill:#e76f51,stroke:#ad533d,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
@@ -22,6 +22,7 @@ style C fill:#2a9d8f,stroke:#20766b,color:#fff,font-size:16px,width:400px,height
|
|||||||
style D fill:#264653,stroke:#1d353e,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style D fill:#264653,stroke:#1d353e,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
style E fill:#e9c46a,stroke:#af9350,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style E fill:#e9c46a,stroke:#af9350,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
style F fill:#b56576,stroke:#884c59,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style F fill:#b56576,stroke:#884c59,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
|
style G fill:#6d7fcc,stroke:#525f99,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
```
|
```
|
||||||
|
|
||||||
## Exception — Shell
|
## Exception — Shell
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ columns 1
|
|||||||
B["Highlights"]
|
B["Highlights"]
|
||||||
C["About me"]
|
C["About me"]
|
||||||
D["Prices"]
|
D["Prices"]
|
||||||
E["Contact"]
|
E["Testimonials"]
|
||||||
F["Instagram"]
|
F["Contact"]
|
||||||
|
G["Instagram"]
|
||||||
|
|
||||||
style A fill:#e76f51,stroke:#ad533d,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style A fill:#e76f51,stroke:#ad533d,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
style B fill:#f4a261,stroke:#b77a49,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style B fill:#f4a261,stroke:#b77a49,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
@@ -33,6 +34,7 @@ columns 1
|
|||||||
style D fill:#264653,stroke:#1d353e,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style D fill:#264653,stroke:#1d353e,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
style E fill:#e9c46a,stroke:#af9350,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style E fill:#e9c46a,stroke:#af9350,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
style F fill:#b56576,stroke:#884c59,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
style F fill:#b56576,stroke:#884c59,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
|
style G fill:#6d7fcc,stroke:#525f99,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
|
||||||
```
|
```
|
||||||
|
|
||||||
## About me
|
## About me
|
||||||
|
|||||||
@@ -1,42 +1,67 @@
|
|||||||
# API Documentation
|
# API Documentation
|
||||||
|
|
||||||
## REST APIs
|
## REST APIs
|
||||||
None. The project has no back-end yet. The static design README anticipates these future endpoints on a .NET API:
|
None. There is no back-end yet (`api/` is empty). The static design README anticipates these endpoints on a .NET API:
|
||||||
- `POST /api/contact` — contact form, payload `{ naam, email, onderwerp, bericht }`
|
- `POST /api/contact` — contact form, payload `{ naam, email, onderwerp, bericht }` (maps to a C# `ContactRequest` record)
|
||||||
- `/api/pages`, `/api/portfolio`, `/api/packages` — CMS content
|
- `/api/pages`, `/api/portfolio`, `/api/packages` — CMS content
|
||||||
|
|
||||||
## Internal APIs
|
## Internal APIs
|
||||||
|
|
||||||
### Routes (TanStack Router, file-based)
|
### Routes (TanStack Router, file-based)
|
||||||
| Path | File | Head | Component |
|
| Path | File | Head | Component | Indexed |
|
||||||
|------|------|------|-----------|
|
|------|------|------|-----------|---------|
|
||||||
| (root) | `routes/__root.tsx` | `siteHead` | `AppShell` via `RootLayout` |
|
| (root) | `routes/__root.tsx` | `siteHead(siteContent)` | `AppShell` | — |
|
||||||
| `/` | `routes/index.tsx` | `pageHead(...)` | `Hero` |
|
| `/` | `routes/index.tsx` | `pageHead('/')` | `Hero` | yes |
|
||||||
| `/over-mij` | `routes/over-mij.tsx` | `pageHead(...)` | placeholder |
|
| `/over-mij` | `routes/over-mij.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||||
|
| `/portfolio` | `routes/portfolio.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||||
|
| `/soorten-fotoshoots` | `routes/soorten-fotoshoots.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||||
|
| `/contact` | `routes/contact.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||||
|
| `/privacyverklaring` | `routes/privacyverklaring.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||||
|
| (not found) | — | — | `NotFound` | — |
|
||||||
|
|
||||||
### seo.ts
|
### seo.ts / sitePages.ts / sitemap.ts
|
||||||
- **Methods**: `pageHead({ title: string, description: string })` → `{ meta: [...] }`; `siteHead` constant
|
- `pageHead(path: RoutePath)` → `{ meta, links }` (title, description, robots noindex if not indexed, OG tags, canonical)
|
||||||
- **Return Types**: TanStack Router `head` option object (title, description, og:title, og:description)
|
- `siteHead(content: SiteContent)` → `{ meta, scripts }` (OG basics, JSON-LD ProfessionalService)
|
||||||
|
- `canonicalUrl(path, base?)`, `jsonLdScript(data)`, `professionalService(content)`
|
||||||
|
- `sitePages: Record<RoutePath, PageMeta>`, `pageList(pages)`
|
||||||
|
- `sitemapXml(...)` — used by `config/sitemapPlugin.ts`
|
||||||
|
|
||||||
### Components (props)
|
### Components (props)
|
||||||
- `AppShell()` — no props
|
- `AppShell()`, `NavigationBar()`, `BackToTop()`, `NotFound()` — no props
|
||||||
- `NavigationBar()` — no props; reads route via `useRouterState`, scroll via `useScrolledPast`
|
- `MobileNav({ id, open, onClose })`, `NavLink(RouterLink props)`
|
||||||
- `NavLink(props: ComponentProps<ChakraLink>)`
|
- `Footer({ content: SiteContent })`, `FooterColumn({ title, children })`, `FooterLink(LinkProps)`
|
||||||
- `MobileNav({ id: string, open: boolean, onClose: () => void })`
|
- `Hero({ content: HeroContent, socials: SocialLink[] })`, `HeroArrows({ onPrev, onNext })`, `HeroPauseButton({ stopped, onToggle })`, `HeroSocials({ socials })`
|
||||||
- `Footer()` — no props
|
- `PageIntro({ title, eyebrow?, children? })` — renders the page's only h1
|
||||||
- `LinkButton(props: ChakraLink props & { variant?: 'outline' | 'accent' | 'light' })`
|
- `StatusPage({ title, children, actions? })`, `ErrorPage({ error, reset })`
|
||||||
- `Hero({ content: HeroContent })`, `HeroArrows({ onPrev, onNext })`, `HeroSocials({ socials: HeroSocial[] })`
|
- `LinkButton(RouterLink props & { variant?: 'outline' | 'accent' | 'light' })`
|
||||||
|
- `UmamiAnalytics({ hostname? })`
|
||||||
|
|
||||||
### Hooks
|
### Hooks
|
||||||
- `useScrolledPast(getThreshold: () => number): boolean` — `getThreshold` must be referentially stable (it is an effect dependency)
|
- `useHeroSlider(count)` → slider state, controls, handlers, `HeroAnnouncement`
|
||||||
- `useHeroSlider(count: number)` → `{ active, reducedMotion, autoplay, paused, next, prev, handlers }`
|
- `useScrolledPast(getThreshold)` → boolean (stable `getThreshold` required)
|
||||||
|
- `useRouteFocus()` — focuses `<main>` after navigation
|
||||||
|
|
||||||
|
### Pure helpers (`lib/`)
|
||||||
|
- `emailAddress({ user, domain }): string | null`
|
||||||
|
- `visibleSocials(socials): SocialLink[]` — only valid https links
|
||||||
|
- `copyrightLine(year): string`
|
||||||
|
- `slidesToLoad(active, count): number[]`
|
||||||
|
- `backToTopThreshold(viewportHeight): number`
|
||||||
|
|
||||||
|
### Monitoring
|
||||||
|
- `monitoringFor(hostname): Monitoring | null`, `startSentry(hostname?)`, `reportError(error)`
|
||||||
|
|
||||||
## Data Models
|
## Data Models
|
||||||
### NavItem (`navItems.ts`)
|
### SiteContent (`content/types.ts`)
|
||||||
- **Fields**: `to` (route path), `label` (Dutch menu label)
|
- **Fields**: `footerIntro: string`, `socials: SocialLink[]`, `email: EmailAddress`
|
||||||
- **Validation**: `as const` — `to` must be a registered route for type-safe `Link`
|
### SocialLink
|
||||||
|
- **Fields**: `platform: SocialPlatform` (`facebook` | `instagram`), `href: string`
|
||||||
### HeroContent (`Hero/types.ts`)
|
- **Validation**: shown only if `href` is a valid https URL
|
||||||
- **Fields**: `title`, `tagline`, `cta: { label, to }`, `slides: { id, src, alt }[]`, `socials: { platform, href }[]`
|
### EmailAddress
|
||||||
- **Relationships**: `HeroSocial.platform` is a `SocialPlatform` key from `socialPlatforms.ts`
|
- **Fields**: `user`, `domain` — assembled only in the browser; invalid parts → hidden
|
||||||
- **Validation**: empty `href` → social not shown
|
### HeroContent
|
||||||
|
- **Fields**: `title`, `tagline`, `cta: { label, to }`, `slides: { id, src, alt }[]`
|
||||||
|
### NavItem (`navigation.ts`)
|
||||||
|
- **Fields**: `to: RoutePath`, `label: string`
|
||||||
|
### PageMeta (`sitePages.ts`)
|
||||||
|
- **Fields**: `title`, `description`, `indexed`, `ogImage?`
|
||||||
|
|||||||
@@ -1,79 +1,107 @@
|
|||||||
# System Architecture
|
# System Architecture
|
||||||
|
|
||||||
## System Overview
|
## System Overview
|
||||||
A single client-side React SPA (`web/`) built with Vite. Routing is file-based via TanStack Router; styling uses Chakra UI v3 with a custom theme system (tokens taken from the static design). There is no back-end, API, database or deployment pipeline yet; the README states a .NET API is planned. Content is currently hard-coded in TypeScript modules shaped so they can later come from that API.
|
A single client-side React SPA (`web/`) built with Vite. Routing is file-based via TanStack Router; styling uses Chakra UI v3 with a custom system (tokens from the static design). There is no back-end, API or database; `api/` is an empty placeholder for the planned .NET API. Content lives in typed TypeScript modules under `web/src/content/`, shaped so the API can later deliver it 1-to-1. One build serves both environments; the hostname decides whether monitoring is active.
|
||||||
|
|
||||||
## Architecture Diagram
|
## Architecture Diagram
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
graph TD
|
graph TD
|
||||||
Main["main.tsx: ChakraProvider + ThemeProvider + RouterProvider"] --> Root["routes/__root.tsx: HeadContent + AppShell + Devtools"]
|
Main["main.tsx: Sentry start, router, ChakraProvider"] --> Root["routes/__root.tsx: HeadContent, AppShell, 404 and error components"]
|
||||||
Root --> Shell["components/AppShell.tsx"]
|
Root --> Shell["components/AppShell.tsx"]
|
||||||
Shell --> Nav["NavigationBar (+ NavLink, MobileNav, navItems)"]
|
Shell --> Skip["SkipNavLink and main landmark"]
|
||||||
|
Shell --> Nav["NavigationBar (NavLink, MobileNav)"]
|
||||||
Shell --> Outlet["Outlet (active page route)"]
|
Shell --> Outlet["Outlet (active page route)"]
|
||||||
Shell --> Footer["Footer (placeholder)"]
|
Shell --> Footer["Footer (FooterColumn, FooterLink)"]
|
||||||
|
Shell --> ToTop["BackToTop"]
|
||||||
|
Shell --> Umami["UmamiAnalytics"]
|
||||||
Outlet --> Home["routes/index.tsx: Hero"]
|
Outlet --> Home["routes/index.tsx: Hero"]
|
||||||
Outlet --> About["routes/over-mij.tsx: placeholder"]
|
Outlet --> Placeholders["over-mij, portfolio, soorten-fotoshoots, contact, privacyverklaring: PageIntro"]
|
||||||
Home --> Hero["Hero (+ HeroArrows, HeroSocials, useHeroSlider)"]
|
Home --> Hero["Hero (HeroArrows, HeroPauseButton, HeroSocials, useHeroSlider)"]
|
||||||
Hero --> Content["heroContent.ts (static content)"]
|
Content["content/: siteContent, heroContent, types"] -.-> Shell
|
||||||
Nav --> Scroll["hooks/useScrolledPast"]
|
Content -.-> Home
|
||||||
Theme["theme.ts + recipes/linkButton.ts"] -.-> Main
|
Nav --> NavData["navigation.ts: mainNav, footerNav"]
|
||||||
Seo["seo.ts: pageHead / siteHead"] -.-> Root
|
Footer --> NavData
|
||||||
|
Seo["seo.ts + sitePages.ts"] -.-> Root
|
||||||
Seo -.-> Home
|
Seo -.-> Home
|
||||||
|
Theme["theme.ts + recipes/"] -.-> Main
|
||||||
classDef entry fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
classDef entry fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
classDef shell fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
classDef shell fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
classDef page fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
classDef page fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
classDef support fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
classDef support fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
||||||
class Main,Root entry;
|
class Main,Root entry;
|
||||||
class Shell,Nav,Footer,Outlet shell;
|
class Shell,Skip,Nav,Footer,ToTop,Umami,Outlet shell;
|
||||||
class Home,About,Hero page;
|
class Home,Placeholders,Hero page;
|
||||||
class Content,Scroll,Theme,Seo support;
|
class Content,NavData,Seo,Theme support;
|
||||||
```
|
```
|
||||||
|
|
||||||
Text alternative: main.tsx mounts providers and the router; the root route renders AppShell (NavigationBar, the active page via Outlet, Footer); the home route renders the Hero; theme and SEO helpers support all of it.
|
Text alternative: main.tsx starts Sentry and mounts the router; the root route renders AppShell (skip link, NavigationBar, the page via Outlet, Footer, BackToTop, Umami); the home route renders the Hero, the other routes render placeholder PageIntros; content, navigation, SEO and theme modules support all of it.
|
||||||
|
|
||||||
## Component Descriptions
|
## Component Descriptions
|
||||||
### main.tsx
|
### main.tsx
|
||||||
- **Purpose**: Application bootstrap
|
- **Purpose**: Application bootstrap
|
||||||
- **Responsibilities**: Creates the router, registers types, mounts ChakraProvider (custom system), next-themes ThemeProvider (light only), loads self-hosted fonts, removes static fallback head tags
|
- **Responsibilities**: Starts Sentry (deferred), creates the router (scroll restoration, default error component), mounts ChakraProvider (light only), loads self-hosted fonts, removes static fallback head tags
|
||||||
- **Dependencies**: routeTree.gen.ts, theme.ts
|
|
||||||
- **Type**: Application
|
- **Type**: Application
|
||||||
|
|
||||||
### routes/__root.tsx
|
### routes/__root.tsx
|
||||||
- **Purpose**: Root route / layout
|
- **Purpose**: Root route / layout
|
||||||
- **Responsibilities**: Site-wide head tags (`siteHead`), renders `HeadContent`, `AppShell` and router devtools
|
- **Responsibilities**: Site-wide head (`siteHead`: OG basics + JSON-LD), `HeadContent`, `AppShell`, dev-only router devtools, `NotFound` and `ErrorPage`
|
||||||
- **Dependencies**: AppShell, seo.ts
|
|
||||||
- **Type**: Application
|
- **Type**: Application
|
||||||
|
|
||||||
### components/AppShell.tsx
|
### components/AppShell.tsx
|
||||||
- **Purpose**: Application shell
|
- **Purpose**: Application shell (LAYOUT.md "Shell")
|
||||||
- **Responsibilities**: Renders NavigationBar, `<Outlet />`, Footer. No `<main>` landmark, skip link or to-top button yet
|
- **Responsibilities**: Skip link + `<main id="main">`, NavigationBar, Outlet, Footer, BackToTop, UmamiAnalytics; moves focus to main on route change (`useRouteFocus`)
|
||||||
- **Type**: Application
|
- **Type**: Application
|
||||||
|
|
||||||
### components/NavigationBar/
|
### components/NavigationBar/
|
||||||
- **Purpose**: Site header and navigation
|
- **Purpose**: Site header and navigation
|
||||||
- **Responsibilities**: Fixed header; transparent over the hero on desktop on `/` until scrolled 150px; shrinks after scroll (desktop); swaps dark/light logo; desktop link list with animated underline (`NavLink`); hamburger button and full-screen `MobileNav` below `lg` (Escape to close, body scroll lock, clip-path reveal). `navItems.ts` is the single menu source (currently Home, Over mij)
|
- **Responsibilities**: Fixed header, transparent over the hero on desktop until scrolled; shrinks after scroll; logo links home; desktop links and full-screen mobile menu from `mainNav`
|
||||||
- **Type**: Application
|
- **Type**: Application
|
||||||
|
|
||||||
### components/Footer.tsx
|
### components/Footer/
|
||||||
- **Purpose**: Site footer
|
- **Purpose**: Site footer
|
||||||
- **Responsibilities**: Placeholder copyright line only; uses Tailwind-style `className`s that have no effect (Tailwind is not installed)
|
- **Responsibilities**: Logo + intro text, Socials column, Contact column (e-mail assembled in the browser), copyright line, footer menu from `footerNav`; empty columns are omitted
|
||||||
- **Type**: Application
|
- **Type**: Application
|
||||||
|
|
||||||
### components/Hero/
|
### components/Hero/
|
||||||
- **Purpose**: Homepage hero slider
|
- **Purpose**: Homepage hero slider (the only homepage section so far)
|
||||||
- **Responsibilities**: Crossfade slides with zoom, progress bar driven autoplay, arrows, swipe, pause on hover/focus/hidden tab, reduced-motion support, social icons. Content typed in `types.ts` for future API use; `socialPlatforms.ts` maps platform keys to offline Iconify icons
|
- **Responsibilities**: Crossfade slides, progress-driven autoplay, arrows, swipe, pause button, pause on hover/focus/hidden tab, reduced motion, live-region announcements, lazy loading of nearby slides, social icons
|
||||||
- **Type**: Application
|
- **Type**: Application
|
||||||
|
|
||||||
### theme.ts / recipes/linkButton.ts
|
### components/PageIntro/, StatusPage/
|
||||||
- **Purpose**: Design system
|
- **Purpose**: Shared page building blocks
|
||||||
- **Responsibilities**: Colour, font, spacing, easing, duration tokens; semantic `bg`/`fg`, `header` size tokens; `eyebrow`/`display` text styles; `linkButton` recipe (outline / accent / light)
|
- **Responsibilities**: `PageIntro` — eyebrow, the page's h1 and an intro (used by placeholders); `StatusPage` — layout for 404 and error pages
|
||||||
- **Type**: Application (shared UI foundation)
|
- **Type**: Application
|
||||||
|
|
||||||
### seo.ts
|
### content/
|
||||||
- **Purpose**: Head tag helpers
|
- **Purpose**: Static content until the CMS API exists
|
||||||
- **Responsibilities**: `pageHead({title, description})` for route `head` options; `siteHead` for site-wide Open Graph tags
|
- **Responsibilities**: `types.ts` (API-shaped interfaces), `siteContent.ts` (footer intro, socials, e-mail parts), `heroContent.ts` (title, tagline, CTA, slides), `socialPlatforms.ts` (platform → name + offline icon)
|
||||||
- **Type**: Application (utility)
|
- **Type**: Application (data)
|
||||||
|
|
||||||
|
### lib/
|
||||||
|
- **Purpose**: Pure, fully tested helpers
|
||||||
|
- **Responsibilities**: `emailAddress`, `visibleSocials`, `copyrightLine`, `slidesToLoad`, `backToTopThreshold`
|
||||||
|
- **Type**: Application (utility, 100% coverage threshold)
|
||||||
|
|
||||||
|
### seo.ts, sitePages.ts, sitemap.ts
|
||||||
|
- **Purpose**: SEO
|
||||||
|
- **Responsibilities**: Page registry (title, description, `indexed`), `pageHead(path)`, canonical URLs, JSON-LD, sitemap generation at build time (via `config/sitemapPlugin.ts`)
|
||||||
|
- **Type**: Application (utility, 100% coverage threshold)
|
||||||
|
|
||||||
|
### monitoring/
|
||||||
|
- **Purpose**: Error reporting and analytics configuration
|
||||||
|
- **Responsibilities**: Hostname → environment map, Sentry DSN and origins; Sentry loaded after the load event with a queue
|
||||||
|
- **Type**: Application
|
||||||
|
|
||||||
|
### config/ (build-time, Node)
|
||||||
|
- **Purpose**: Server configuration as code
|
||||||
|
- **Responsibilities**: `securityHeaders.ts` (CSP + headers for dev/preview/prod), `serverConfig.ts` (generates `deploy/iis/web.config` and nginx confs; a test checks they are in sync), sitemap plugin, test seed
|
||||||
|
- **Type**: Infrastructure-as-code (small)
|
||||||
|
|
||||||
|
### theme.ts / recipes/
|
||||||
|
- **Purpose**: Design system
|
||||||
|
- **Responsibilities**: Colour, font, spacing, easing, duration, z-index tokens; semantic `bg`/`fg`/`focusRing`, `header`/`content`/`pageTop` sizes; `eyebrow`/`display`/`pageTitle` text styles; recipes `container`, `link` (subtle), `linkButton` (outline/accent/light), `iconControl`, `skipNavLink`
|
||||||
|
- **Type**: Application (shared UI foundation)
|
||||||
|
|
||||||
## Data Flow
|
## Data Flow
|
||||||
|
|
||||||
@@ -90,18 +118,19 @@ sequenceDiagram
|
|||||||
V->>R: Open URL or click nav link
|
V->>R: Open URL or click nav link
|
||||||
R->>S: Render root layout
|
R->>S: Render root layout
|
||||||
S->>P: Render matched route via Outlet
|
S->>P: Render matched route via Outlet
|
||||||
P-->>R: head() title and meta
|
P-->>R: head() title and meta from sitePages
|
||||||
R-->>V: Updated page and head tags
|
R-->>V: Updated page, head tags, focus on main
|
||||||
```
|
```
|
||||||
|
|
||||||
Text alternative: a visitor navigates, the router renders the root layout (AppShell), which renders the matched page through the Outlet; the page's head() supplies title/meta tags.
|
Text alternative: a visitor navigates, the router renders the root layout (AppShell), which renders the matched page through the Outlet; the page's head() supplies title/meta from the page registry and focus moves to main.
|
||||||
|
|
||||||
## Integration Points
|
## Integration Points
|
||||||
- **External APIs**: None yet (planned .NET API for content and contact form)
|
- **External APIs**: None yet (planned .NET API for content and the contact form — design README: `POST /api/contact` with `{ naam, email, onderwerp, bericht }`)
|
||||||
- **Databases**: None
|
- **Databases**: None
|
||||||
- **Third-party Services**: Outbound links only — Facebook, Instagram profiles
|
- **Third-party Services**: Sentry (errors, EU ingest), Umami at analytics.slpsoftware.nl (cookieless stats), UptimeRobot (availability, external), outbound links to Facebook/Instagram
|
||||||
|
|
||||||
## Infrastructure Components
|
## Infrastructure Components
|
||||||
- **CDK Stacks**: None
|
- **IaC**: None beyond generated web server configs in `web/deploy/`
|
||||||
- **Deployment Model**: Not defined yet; output is a static Vite build (`dist/`)
|
- **Deployment Model**: Static `dist/` build. Test: scp to nginx on a Raspberry Pi (auto on push to master). Production: FTPS to an IIS webhost (manual, `release/*` only, after Lighthouse)
|
||||||
|
- **Security headers**: Strict CSP — `script-src 'self'` + Umami, `connect-src 'self'` + Umami + Sentry, **`form-action 'self'`**, `frame-ancestors 'none'`. Any third-party form or script endpoint must be added here (and regenerated into the server configs)
|
||||||
- **Networking**: N/A
|
- **Networking**: N/A
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ graph LR
|
|||||||
Visitor["Website visitor (prospective client)"] --> Site["Andrea Slop Fotografie website (React SPA)"]
|
Visitor["Website visitor (prospective client)"] --> Site["Andrea Slop Fotografie website (React SPA)"]
|
||||||
Crawler["Search engines and link previews"] --> Site
|
Crawler["Search engines and link previews"] --> Site
|
||||||
Site --> Social["Facebook and Instagram profiles"]
|
Site --> Social["Facebook and Instagram profiles"]
|
||||||
Site --> Mail["E-mail (info@andreaslop.nl)"]
|
Site --> Mail["E-mail (mailto, address assembled in the browser)"]
|
||||||
|
Site --> Umami["Umami (cookieless visitor stats)"]
|
||||||
|
Site --> Sentry["Sentry (JS error reports)"]
|
||||||
Owner["Andrea (photographer, content owner)"] -.-> CMS["Planned .NET API / CMS"]
|
Owner["Andrea (photographer, content owner)"] -.-> CMS["Planned .NET API / CMS"]
|
||||||
CMS -.-> Site
|
CMS -.-> Site
|
||||||
classDef person fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
classDef person fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
@@ -16,32 +18,46 @@ graph LR
|
|||||||
classDef planned fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,stroke-dasharray:5 5,color:#000;
|
classDef planned fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,stroke-dasharray:5 5,color:#000;
|
||||||
class Visitor,Owner,Crawler person;
|
class Visitor,Owner,Crawler person;
|
||||||
class Site system;
|
class Site system;
|
||||||
class Social,Mail external;
|
class Social,Mail,Umami,Sentry external;
|
||||||
class CMS planned;
|
class CMS planned;
|
||||||
```
|
```
|
||||||
|
|
||||||
Text alternative: visitors and crawlers use the website, which links out to social profiles and e-mail; a planned .NET API/CMS (dashed) will later supply content managed by Andrea.
|
Text alternative: visitors and crawlers use the website, which links out to social profiles and e-mail and reports to Umami and Sentry; a planned .NET API/CMS (dashed) will later supply content managed by Andrea.
|
||||||
|
|
||||||
## Business Description
|
## Business Description
|
||||||
- **Business Description**: Portfolio and marketing website for Andrea Slop Fotografie, a lifestyle photographer in Huizen (NL). It presents her work (loveshoots, family, pregnancy and newborn shoots), tells who she is, lists shoot types and prices, and gets prospective clients to make contact. It replaces an existing WordPress (Solene theme) site at andreaslop.nl.
|
- **Business Description**: Portfolio and marketing website for Andrea Slop Fotografie, a lifestyle photographer in Huizen (NL). It presents her work (loveshoots, family, pregnancy and newborn shoots), tells who she is, lists shoot types and prices, and gets prospective clients to make contact. It will replace the existing WordPress (Solene theme) site at andreaslop.nl; a test build runs at test.andreaslop.nl.
|
||||||
- **Business Transactions** (current state — front-end only, no back-end yet):
|
- **Business Transactions** (current state — front-end only, no back-end):
|
||||||
- **Browse the homepage** — hero slider with featured photos, call-to-action to "Over mij"
|
- **Browse the homepage** — hero slider with featured photos (autoplay, arrows, swipe, pause button, screen reader announcements), call-to-action to "Over mij"
|
||||||
- **Navigate between pages** — header navigation (desktop) and hamburger menu (mobile)
|
- **Navigate between pages** — header navigation (desktop), full-screen menu (mobile), footer menu, skip link, back-to-top button
|
||||||
- **Visit social profiles** — Facebook / Instagram links in the hero
|
- **Visit social profiles** — Facebook / Instagram links in the hero and footer
|
||||||
- **Share / discover pages** — per-page title, meta description and Open Graph tags for search engines and link previews
|
- **E-mail the photographer** — mailto link in the footer
|
||||||
- *Planned (static design only)*: portfolio browsing with lightbox, shoot types and pricing, contact form, Instagram feed
|
- **Share / discover pages** — per-page title, description, canonical URL, Open Graph tags, JSON-LD (ProfessionalService), sitemap.xml, robots.txt
|
||||||
|
- **Recover from errors** — 404 page inside the shell, error page with retry
|
||||||
|
- *Placeholder pages (noindex)*: Over mij, Portfolio, Soorten fotoshoots, Contact, Privacyverklaring
|
||||||
|
- *Planned (static design only)*: homepage sections below the hero (lifestyle gallery, about, prices, contact form, Instagram), portfolio with lightbox, shoot types and pricing page, contact page
|
||||||
- **Business Dictionary**:
|
- **Business Dictionary**:
|
||||||
- **Shell** — the Header / page content / Footer frame shared by every page (see LAYOUT.md)
|
- **Shell** — the Header / page content / Footer frame shared by every page (see LAYOUT.md)
|
||||||
- **Hero** — full-screen photo slider at the top of the homepage
|
- **Hero** — full-screen photo slider at the top of the homepage
|
||||||
- **Info menu / side area** — slide-in panel from the design with socials and e-mail (out of scope for this site, by owner decision)
|
- **Highlights / Lifestyle fotografie** — homepage intro section with a four-photo gallery
|
||||||
|
- **Package (pakket)** — a priced shoot offer (Newborn, Zwangerschap, Loveshoot) with what is included
|
||||||
- **Shoot** — a photo session type (newborn, pregnancy, loveshoot, portraits)
|
- **Shoot** — a photo session type (newborn, pregnancy, loveshoot, portraits)
|
||||||
- **CMS** — the planned .NET API that will provide page content; content is hard-coded until then
|
- **Info menu / side area** — slide-in panel from the design (out of scope, by owner decision)
|
||||||
|
- **CMS** — the planned .NET API that will provide page content and receive the contact form; content is hard-coded in `web/src/content/` until then
|
||||||
|
- **Placeholder page** — a route that exists for navigation but shows "in de maak" and is `noindex`
|
||||||
|
|
||||||
## Component Level Business Descriptions
|
## Component Level Business Descriptions
|
||||||
### web (React front-end)
|
### web (React front-end)
|
||||||
- **Purpose**: The public website visitors see
|
- **Purpose**: The public website visitors see
|
||||||
- **Responsibilities**: Page routing, layout shell, homepage hero, SEO head tags, design system (colours, fonts, buttons)
|
- **Responsibilities**: Page routing, layout shell, homepage hero, SEO, monitoring, design system, server configuration for test (nginx) and production (IIS)
|
||||||
|
|
||||||
|
### .gitea/workflows (CI/CD)
|
||||||
|
- **Purpose**: Quality gate and delivery
|
||||||
|
- **Responsibilities**: Lint, format, tests, build, audit, Lighthouse; deploy to test on merge to master; deploy to production manually from `release/*`
|
||||||
|
|
||||||
### design/andreaslop-static (reference only)
|
### design/andreaslop-static (reference only)
|
||||||
- **Purpose**: Static HTML/CSS/JS rebuild of the live site, used as the visual and structural source of truth
|
- **Purpose**: Static HTML/CSS/JS rebuild of the live site, the visual and structural source of truth
|
||||||
- **Responsibilities**: Defines page sections, header/footer markup, design tokens and interactions to port to React
|
- **Responsibilities**: Defines page sections, markup, design tokens and interactions to port to React
|
||||||
|
|
||||||
|
### api (planned)
|
||||||
|
- **Purpose**: .NET back-end for content and the contact form
|
||||||
|
- **Responsibilities**: None yet — the folder is empty
|
||||||
|
|||||||
@@ -1,26 +1,23 @@
|
|||||||
# Code Quality Assessment
|
# Code Quality Assessment
|
||||||
|
|
||||||
## Test Coverage
|
## Test Coverage
|
||||||
- **Overall**: None
|
- **Overall**: Good. Vitest with v8 coverage; 100% threshold enforced for `src/lib/**`, `src/seo.ts`, `src/sitemap.ts`; other files reported
|
||||||
- **Unit Tests**: None (no test runner installed)
|
- **Unit Tests**: Pure helpers, SEO, sitemap, monitoring config, security headers, server config (incl. drift check against `deploy/`)
|
||||||
- **Integration Tests**: None
|
- **Component Tests**: AppShell, NavigationBar, Footer, Hero (+ slider hook), BackToTop, PageIntro, StatusPage, Umami — with axe accessibility checks
|
||||||
- Verification so far is `tsc` type-checking during `pnpm build` and manual browser checks
|
- **Property-based Tests**: fast-check, shared arbitraries in `src/test/arbitraries.ts`, seed logged in CI
|
||||||
|
- **Integration / E2E**: No browser E2E; Lighthouse CI covers built pages (accessibility, best practices, SEO, performance)
|
||||||
|
|
||||||
## Code Quality Indicators
|
## Code Quality Indicators
|
||||||
- **Linting**: Not configured (TypeScript `noUnused*` flags only)
|
- **Linting**: ESLint (typescript-eslint, react-hooks, jsx-a11y), enforced in CI
|
||||||
- **Code Style**: Mostly consistent (Prettier: 4 spaces, single quotes). Exception: `routes/over-mij.tsx` uses double quotes and 2-space indent
|
- **Code Style**: Consistent, Prettier-enforced in CI
|
||||||
- **Documentation**: Good inline comments in Dutch explaining intent; README is a stub
|
- **Documentation**: Short Dutch comments explaining *why*, often referencing requirement IDs (FR-xx, BR-xx, NFR-xx, Mx) from earlier AI-DLC features
|
||||||
|
|
||||||
## Technical Debt
|
## Technical Debt
|
||||||
- `theme.ts` `globalCss.body.height: '250vh'` — temporary scroll-testing hack; forces every page to be 2.5 screens tall
|
- Homepage mobile Lighthouse performance target is lowered to 0.8 (images not responsive, title after JavaScript); back to 0.9 is planned with responsive images from the API and prerendering
|
||||||
- `components/Footer.tsx` and `routes/over-mij.tsx` use Tailwind-style `className`s (`p-2`, `text-sm`, …) that do nothing — Tailwind is not installed
|
- Five routes are placeholders (`noindex`); `lighthouserc.cjs` keeps its own list of indexed/noindex paths, guarded by a test against `sitePages.ts`
|
||||||
- `AppShell` has no `<main>` landmark; static design has a skip link targeting `#main`
|
- Static design images for the homepage sections (intro gallery, about photo, pricing decorations) are not yet in `web/src/assets`
|
||||||
- Header logo is not a link to the homepage (design: link with aria-label)
|
- No responsive image pipeline (srcset/sizes); hero photos are single large JPEGs
|
||||||
- Social links are defined inside `Hero/heroContent.ts`; the footer in the design needs the same links → candidate for shared site-level content
|
|
||||||
- `NavigationBar.tsx` uses `let [open, setOpen]` (should be `const`)
|
|
||||||
- Unused Vite starter assets: `assets/hero.png`, `assets/typescript.svg`, `assets/vite.svg`
|
|
||||||
- Design asset `footer-mark.png` (footer logo) not yet present in `web/src/assets`
|
|
||||||
|
|
||||||
## Patterns and Anti-patterns
|
## Patterns and Anti-patterns
|
||||||
- **Good Patterns**: design tokens as single source of truth; API-shaped static content; accessible interactions (aria labels, Escape to close, reduced motion, focus-visible handling); shared `navItems` for desktop and mobile
|
- **Good Patterns**: API-shaped content; pure, property-tested helpers; tokens and recipes as single source of truth; configuration as code for headers; strong accessibility baseline (axe in tests, Lighthouse accessibility 1.0)
|
||||||
- **Anti-patterns**: no-op `className` usage (see above); global body height hack
|
- **Anti-patterns**: None significant found
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
# Code Structure
|
# Code Structure
|
||||||
|
|
||||||
## Build System
|
## Build System
|
||||||
- **Type**: npm-compatible via **pnpm** (lockfile `web/pnpm-lock.yaml`)
|
- **Type**: pnpm (`packageManager: pnpm@12.11.2`, lockfile `web/pnpm-lock.yaml`)
|
||||||
- **Configuration**:
|
- **Configuration**:
|
||||||
- `web/package.json` — scripts `dev` (vite), `build` (`tsc && vite build`), `preview`, `typegen` (Chakra typegen for theme)
|
- `web/package.json` — scripts `dev`, `build` (`tsc && vite build`), `preview`, `test` (vitest + coverage), `lint`, `format:check`, `audit:deps`, `audit:dev`, `lighthouse`, `server-config`, and `check` (all of them in sequence)
|
||||||
- `web/vite.config.js` — TanStack Router plugin (`autoCodeSplitting`) before `@vitejs/plugin-react`; `resolve.tsconfigPaths`
|
- `web/vite.config.ts` — TanStack Router plugin (`autoCodeSplitting`) before React plugin, sitemap plugin, security headers on dev/preview, Vitest config (jsdom, 20 s timeout, 100% coverage threshold for `src/lib/**`, `seo.ts`, `sitemap.ts`)
|
||||||
- `web/tsconfig.json` — strict-ish bundler mode, `@/*` → `src/*` alias, `noUnusedLocals/Parameters`, `erasableSyntaxOnly`
|
- `web/tsconfig.json` — bundler mode, `@/*` → `src/*`
|
||||||
|
- `web/eslint.config.js` — JS + typescript-eslint + react-hooks + jsx-a11y recommended
|
||||||
- `web/.prettierrc` — 4 spaces, single quotes, semicolons
|
- `web/.prettierrc` — 4 spaces, single quotes, semicolons
|
||||||
|
- `web/lighthouserc.cjs` / `.desktop.cjs` — Lighthouse CI against `pnpm preview` (accessibility and best practices 1.0, performance 0.9; home mobile 0.8)
|
||||||
|
- `.gitea/workflows/continuous_integration.yaml` — jobs `check`, `deploy-test`, `lighthouse`, `deploy-production`
|
||||||
|
|
||||||
## Key Classes/Modules
|
## Key Classes/Modules
|
||||||
|
|
||||||
@@ -14,80 +17,97 @@
|
|||||||
graph TD
|
graph TD
|
||||||
Root["routes/__root.tsx"] --> AppShell["components/AppShell.tsx"]
|
Root["routes/__root.tsx"] --> AppShell["components/AppShell.tsx"]
|
||||||
AppShell --> NavigationBar["NavigationBar/NavigationBar.tsx"]
|
AppShell --> NavigationBar["NavigationBar/NavigationBar.tsx"]
|
||||||
AppShell --> Footer["components/Footer.tsx"]
|
AppShell --> Footer["Footer/Footer.tsx"]
|
||||||
|
AppShell --> BackToTop["BackToTop/BackToTop.tsx"]
|
||||||
|
AppShell --> Umami["Analytics/UmamiAnalytics.tsx"]
|
||||||
NavigationBar --> NavLink["NavigationBar/NavLink.tsx"]
|
NavigationBar --> NavLink["NavigationBar/NavLink.tsx"]
|
||||||
NavigationBar --> MobileNav["NavigationBar/MobileNav.tsx"]
|
NavigationBar --> MobileNav["NavigationBar/MobileNav.tsx"]
|
||||||
NavigationBar --> navItems["NavigationBar/navItems.ts"]
|
NavigationBar --> navigation["navigation.ts"]
|
||||||
MobileNav --> navItems
|
Footer --> navigation
|
||||||
NavigationBar --> useScrolledPast["hooks/useScrolledPast.tsx"]
|
|
||||||
Index["routes/index.tsx"] --> Hero["Hero/Hero.tsx"]
|
Index["routes/index.tsx"] --> Hero["Hero/Hero.tsx"]
|
||||||
Hero --> HeroArrows["Hero/HeroArrows.tsx"]
|
Hero --> HeroArrows["Hero/HeroArrows.tsx"]
|
||||||
|
Hero --> HeroPause["Hero/HeroPauseButton.tsx"]
|
||||||
Hero --> HeroSocials["Hero/HeroSocials.tsx"]
|
Hero --> HeroSocials["Hero/HeroSocials.tsx"]
|
||||||
Hero --> useHeroSlider["Hero/useHeroSlider.ts"]
|
Hero --> useHeroSlider["Hero/useHeroSlider.ts"]
|
||||||
Hero --> LinkButton["components/LinkButton.tsx"]
|
Hero --> LinkButton["components/LinkButton.tsx"]
|
||||||
HeroSocials --> socialPlatforms["Hero/socialPlatforms.ts"]
|
LinkButton --> RouterLink["components/RouterLink.tsx"]
|
||||||
|
Placeholder["routes/contact.tsx and other placeholders"] --> PageIntro["PageIntro/PageIntro.tsx"]
|
||||||
classDef shell fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
classDef shell fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
classDef page fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
classDef page fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
classDef util fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
classDef util fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
||||||
class Root,AppShell,NavigationBar,Footer,NavLink,MobileNav shell;
|
class Root,AppShell,NavigationBar,Footer,BackToTop,Umami,NavLink,MobileNav shell;
|
||||||
class Index,Hero,HeroArrows,HeroSocials page;
|
class Index,Hero,HeroArrows,HeroPause,HeroSocials,Placeholder,PageIntro page;
|
||||||
class navItems,useScrolledPast,useHeroSlider,LinkButton,socialPlatforms util;
|
class navigation,useHeroSlider,LinkButton,RouterLink util;
|
||||||
```
|
```
|
||||||
|
|
||||||
Text alternative: the root route renders AppShell (NavigationBar with NavLink/MobileNav/navItems, plus Footer); the index route renders Hero with its arrows, socials, slider hook and the shared LinkButton.
|
Text alternative: the root route renders AppShell (NavigationBar, Footer, BackToTop, Umami); NavigationBar and Footer read navigation.ts; the index route renders the Hero with its sub-components and LinkButton; placeholder routes render PageIntro.
|
||||||
|
|
||||||
### Existing Files Inventory
|
### Existing Files Inventory
|
||||||
- `web/index.html` — HTML entry; static fallback title/meta for non-JS crawlers (`data-fallback`)
|
Candidates for modification are marked with ★ for the homepage-sections feature.
|
||||||
- `web/src/main.tsx` — bootstrap: providers, router, fonts, removes fallback head tags
|
- `web/index.html` — HTML entry; static fallback head for non-JS crawlers
|
||||||
- `web/src/routeTree.gen.ts` — generated by TanStack Router plugin (do not edit)
|
- `web/src/main.tsx` — bootstrap
|
||||||
- `web/src/routes/__root.tsx` — root layout route, site-wide head
|
- `web/src/routeTree.gen.ts` — generated (do not edit)
|
||||||
- `web/src/routes/index.tsx` — home page (`/`), renders Hero
|
- `web/src/routes/__root.tsx` — root layout, site head, 404/error
|
||||||
- `web/src/routes/over-mij.tsx` — about page (`/over-mij`), placeholder content
|
- ★ `web/src/routes/index.tsx` — home (`/`), currently only the Hero
|
||||||
- `web/src/components/AppShell.tsx` — shell: NavigationBar + Outlet + Footer
|
- `web/src/routes/{over-mij,portfolio,soorten-fotoshoots,contact,privacyverklaring}.tsx` — placeholders with `PageIntro`
|
||||||
- `web/src/components/Footer.tsx` — placeholder footer
|
- `web/src/components/AppShell.tsx` — shell
|
||||||
- `web/src/components/LinkButton.tsx` — router `Link` styled with `linkButton` recipe
|
- `web/src/components/NavigationBar/*` — header, NavLink, MobileNav
|
||||||
- `web/src/components/NavigationBar/NavigationBar.tsx` — header, logo, desktop nav, hamburger
|
- `web/src/components/Footer/*` — footer, FooterColumn, FooterLink
|
||||||
- `web/src/components/NavigationBar/NavLink.tsx` — desktop nav link with underline animation
|
- `web/src/components/Hero/*` — hero slider, arrows, pause button, socials, slider hook
|
||||||
- `web/src/components/NavigationBar/MobileNav.tsx` — full-screen mobile menu
|
- `web/src/components/BackToTop/BackToTop.tsx` — back-to-top button
|
||||||
- `web/src/components/NavigationBar/navItems.ts` — menu items (Home, Over mij)
|
- `web/src/components/Analytics/UmamiAnalytics.tsx` — Umami script injection
|
||||||
- `web/src/components/Hero/*` — hero slider (component, arrows, socials, hook, content, types, platforms)
|
- `web/src/components/PageIntro/PageIntro.tsx` — page head block (eyebrow, h1, intro)
|
||||||
- `web/src/hooks/useScrolledPast.tsx` — boolean "scrolled past threshold" hook
|
- `web/src/components/StatusPage/*` — StatusPage layout, NotFound, ErrorPage
|
||||||
- `web/src/recipes/linkButton.ts` — Chakra recipe for the square design button
|
- `web/src/components/LinkButton.tsx`, `RouterLink.tsx` — router links (button style / Chakra-wrapped)
|
||||||
- `web/src/theme.ts` — Chakra system config (tokens, semantic tokens, text styles, recipes)
|
- ★ `web/src/content/types.ts` — content interfaces (API shape)
|
||||||
- `web/src/seo.ts` — `pageHead` / `siteHead` helpers
|
- ★ `web/src/content/siteContent.ts`, `heroContent.ts`, `socialPlatforms.ts` — static content
|
||||||
- `web/src/assets/*` — hero photos, light/dark logos, unused Vite starter assets (`hero.png`, `typescript.svg`, `vite.svg`)
|
- `web/src/hooks/useRouteFocus.ts`, `useScrolledPast.tsx`
|
||||||
- `web/public/favicon.png`, `web/public/icons.svg` — static public assets
|
- `web/src/lib/*.ts` — pure helpers with tests
|
||||||
|
- `web/src/monitoring/*` — Sentry/Umami config and loader
|
||||||
|
- `web/src/navigation.ts` — `RoutePath`, `mainNav`, `footerNav`
|
||||||
|
- ★ `web/src/seo.ts`, `sitePages.ts`, `sitemap.ts` — SEO (home description may change)
|
||||||
|
- `web/src/theme.ts`, `web/src/recipes/*.ts` — design system
|
||||||
|
- `web/src/test/*` — `renderWithProviders`, axe matcher, fast-check arbitraries, setup
|
||||||
|
- `web/src/assets/*` — hero photos (8), light/dark logos
|
||||||
|
- ★ `web/config/securityHeaders.ts` — CSP (only if the contact form posts to a third party)
|
||||||
|
- `web/config/serverConfig.ts`, `writeServerConfig.ts`, `sitemapPlugin.ts`, `testSeed.ts`
|
||||||
|
- `web/deploy/iis/web.config`, `web/deploy/nginx/*.conf` — generated server configs
|
||||||
|
- `web/public/*` — favicon, logo, og-image, robots.txt, icons.svg
|
||||||
|
|
||||||
## Design Patterns
|
## Design Patterns
|
||||||
### Chakra `chakra()` factory around router `Link`
|
### API-shaped static content
|
||||||
- **Location**: NavLink, MobileNav, LinkButton
|
- **Location**: `content/types.ts` + `content/*.ts`
|
||||||
- **Purpose**: Router-aware links with Chakra style props and `_currentPage` / `aria-current` styling
|
- **Purpose**: Hard-coded today, swappable for API responses later
|
||||||
- **Implementation**: `const ChakraLink = chakra(Link)`
|
- **Implementation**: Plain data objects typed with interfaces, passed to components as props from the route (or AppShell)
|
||||||
|
|
||||||
|
### Pure helpers with property-based tests
|
||||||
|
- **Location**: `lib/`, `seo.ts`, `sitemap.ts`
|
||||||
|
- **Purpose**: Logic that decides what is shown (e.g. invalid social → hidden, invalid e-mail → column omitted) lives outside components and is tested with fast-check
|
||||||
|
- **Implementation**: Small exported functions, 100% coverage threshold, shared arbitraries in `test/arbitraries.ts`
|
||||||
|
|
||||||
### Design tokens + recipes
|
### Design tokens + recipes
|
||||||
- **Location**: theme.ts, recipes/
|
- **Location**: `theme.ts`, `recipes/`
|
||||||
- **Purpose**: Single source for colours, fonts, spacing, motion; reusable component variants
|
- **Purpose**: Single source for colours, fonts, spacing, motion; reusable component variants
|
||||||
- **Implementation**: `defineConfig` tokens/semanticTokens/textStyles, `defineRecipe` + `useRecipe`
|
- **Implementation**: `defineConfig` tokens/semanticTokens/textStyles, `defineRecipe` + `useRecipe`
|
||||||
|
|
||||||
### API-shaped static content
|
### Page registry
|
||||||
- **Location**: Hero/heroContent.ts + types.ts, navItems.ts
|
- **Location**: `sitePages.ts`, typed by `RoutePath`
|
||||||
- **Purpose**: Hard-coded content today, swappable for CMS API responses later
|
- **Purpose**: One source for head tags and the sitemap; `indexed: false` for placeholders
|
||||||
- **Implementation**: Plain data objects typed with interfaces; components receive them as props
|
|
||||||
|
|
||||||
### Route-level head management
|
### Configuration as code for hosting
|
||||||
- **Location**: seo.ts, each route's `head` option, `HeadContent` in root
|
- **Location**: `config/securityHeaders.ts` → `config/serverConfig.ts` → `deploy/`
|
||||||
- **Purpose**: Per-page SEO without SSR
|
- **Purpose**: Same headers in dev, preview, nginx (test) and IIS (production); a test guards drift
|
||||||
|
|
||||||
|
### Accessibility by default
|
||||||
|
- **Location**: across components; `test/axe.ts` in component tests; Lighthouse in CI
|
||||||
|
- **Implementation**: landmarks, skip link, focus management, live regions, visible focus ring, 44px targets, reduced motion
|
||||||
|
|
||||||
## Critical Dependencies
|
## Critical Dependencies
|
||||||
### @chakra-ui/react
|
### @chakra-ui/react ^3.37.0
|
||||||
- **Version**: ^3.37.0
|
- **Usage**: All layout and styling; typegen from `theme.ts` on install
|
||||||
- **Usage**: All layout and styling
|
### @tanstack/react-router ^1.170.39 (+ router-plugin ^1.168.40)
|
||||||
- **Purpose**: Component library and styling system
|
- **Usage**: File-based routes, `Link`, `Outlet`, `HeadContent`, typed `RoutePath`
|
||||||
### @tanstack/react-router (+ router-plugin)
|
### @sentry/react ^11.8.0
|
||||||
- **Version**: ^1.170.39 / ^1.168.40
|
- **Usage**: Error reporting, lazy-loaded after the load event
|
||||||
- **Usage**: File-based routes, `Link`, `Outlet`, `HeadContent`, `useRouterState`
|
### @iconify/react ^6.0.2 + @iconify-icons/ant-design 2.0.1
|
||||||
- **Purpose**: Routing and head management
|
- **Usage**: Offline icons (bundled at build time)
|
||||||
### @iconify/react + @iconify-icons/ant-design
|
|
||||||
- **Version**: ^6.0.2 / 2.0.1
|
|
||||||
- **Usage**: Offline icons in Hero
|
|
||||||
- **Purpose**: Icons bundled at build time (no API calls)
|
|
||||||
|
|||||||
@@ -4,21 +4,23 @@
|
|||||||
- `web` — React 19 SPA (Vite, Chakra UI v3, TanStack Router): the public website
|
- `web` — React 19 SPA (Vite, Chakra UI v3, TanStack Router): the public website
|
||||||
|
|
||||||
## Infrastructure Packages
|
## Infrastructure Packages
|
||||||
- None (no IaC, Docker, or CI/CD configuration present)
|
- `.gitea/workflows/continuous_integration.yaml` — Gitea Actions CI/CD (check, lighthouse, deploy-test, deploy-production)
|
||||||
|
- `web/config/` + `web/deploy/` — security headers and generated nginx (test) / IIS (production) configuration
|
||||||
|
|
||||||
## Shared Packages
|
## Shared Packages
|
||||||
- None as separate packages. Inside `web`, shared modules are `theme.ts`, `recipes/`, `seo.ts`, `hooks/`, `components/LinkButton.tsx`
|
- None as separate packages. Inside `web`: `theme.ts`, `recipes/`, `content/`, `lib/`, `seo.ts`, `navigation.ts`, `hooks/`, `components/LinkButton.tsx`, `components/RouterLink.tsx`, `components/PageIntro/`
|
||||||
|
|
||||||
## Test Packages
|
## Test Packages
|
||||||
- None
|
- None as separate packages. Tests are co-located (`*.test.ts(x)`) and run with Vitest (unit, component, property-based with fast-check, accessibility with axe-core); Lighthouse CI for quality budgets
|
||||||
|
|
||||||
## Reference (non-code)
|
## Reference (non-code)
|
||||||
- `design/andreaslop-static` — static HTML/CSS/JS design reference (not built or deployed)
|
- `design/andreaslop-static` — static HTML/CSS/JS design reference (not built or deployed)
|
||||||
- `design/AndreaSlopFotografie_React.zip` — archive of design files
|
- `design/AndreaSlopFotografie_React.zip` — archive of design files
|
||||||
|
- `api/` — empty placeholder for the planned .NET API
|
||||||
|
|
||||||
## Total Count
|
## Total Count
|
||||||
- **Total Packages**: 1
|
- **Total Packages**: 1 (plus CI workflow and server config)
|
||||||
- **Application**: 1
|
- **Application**: 1
|
||||||
- **Infrastructure**: 0
|
- **Infrastructure**: 1 (CI/CD + server config, inside the repo)
|
||||||
- **Shared**: 0
|
- **Shared**: 0
|
||||||
- **Test**: 0
|
- **Test**: 0 (co-located)
|
||||||
|
|||||||
@@ -4,51 +4,51 @@
|
|||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
graph LR
|
graph LR
|
||||||
routes["routes/*"] --> components["components/*"]
|
main["main.tsx"] --> theme["theme.ts + recipes"]
|
||||||
routes --> seo["seo.ts"]
|
main --> routes["routes/*"]
|
||||||
|
main --> monitoring["monitoring/*"]
|
||||||
|
routes --> components["components/*"]
|
||||||
|
routes --> content["content/*"]
|
||||||
|
routes --> seo["seo.ts + sitePages.ts"]
|
||||||
|
components --> lib["lib/*"]
|
||||||
components --> hooks["hooks/*"]
|
components --> hooks["hooks/*"]
|
||||||
components --> theme["theme.ts tokens (via Chakra props)"]
|
components --> navigation["navigation.ts"]
|
||||||
components --> assets["assets/*"]
|
components --> assets["assets/*"]
|
||||||
main["main.tsx"] --> theme
|
config["config/* (Node, build time)"] --> monitoring
|
||||||
main --> routes
|
config --> seo
|
||||||
classDef app fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
classDef app fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
classDef support fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
classDef support fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
||||||
|
classDef build fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
class main,routes,components app;
|
class main,routes,components app;
|
||||||
class seo,hooks,theme,assets support;
|
class theme,monitoring,content,seo,lib,hooks,navigation,assets support;
|
||||||
|
class config build;
|
||||||
```
|
```
|
||||||
|
|
||||||
Text alternative: main depends on theme and routes; routes depend on components and seo; components depend on hooks, theme tokens and assets.
|
Text alternative: main depends on theme, routes and monitoring; routes depend on components, content and SEO; components depend on lib, hooks, navigation and assets; build-time config reads monitoring (CSP origins) and SEO (sitemap).
|
||||||
|
|
||||||
### routes depend on components
|
### routes depend on content and components
|
||||||
- **Type**: Compile
|
- **Type**: Compile
|
||||||
- **Reason**: Routes render AppShell (root) and page components
|
- **Reason**: Routes pass static content objects into components as props
|
||||||
|
|
||||||
|
### config depends on monitoring/config.ts
|
||||||
|
- **Type**: Build time (Node)
|
||||||
|
- **Reason**: CSP `script-src`/`connect-src` include the Umami and Sentry origins; that file therefore has no Vite imports
|
||||||
|
|
||||||
### components depend on theme tokens
|
### components depend on theme tokens
|
||||||
- **Type**: Runtime (string token references such as `bg="paper"`, `h="header"`)
|
- **Type**: Runtime (string token references such as `bg="paper.alt"`, `textStyle="eyebrow"`)
|
||||||
- **Reason**: All visual values come from the Chakra system
|
|
||||||
|
|
||||||
## External Dependencies
|
## External Dependencies
|
||||||
### @chakra-ui/react
|
### @chakra-ui/react ^3.37.0, @emotion/react ^11.14.0
|
||||||
- **Version**: ^3.37.0
|
- **Purpose**: Styling system and UI primitives — **License**: MIT
|
||||||
- **Purpose**: Styling system and UI primitives
|
### @tanstack/react-router ^1.170.39
|
||||||
- **License**: MIT
|
- **Purpose**: Routing — **License**: MIT
|
||||||
### @tanstack/react-router
|
### react / react-dom ^19.3.0
|
||||||
- **Version**: ^1.170.39
|
- **Purpose**: UI runtime — **License**: MIT
|
||||||
- **Purpose**: Routing
|
### @sentry/react ^11.8.0
|
||||||
- **License**: MIT
|
- **Purpose**: Error reporting — **License**: MIT
|
||||||
### react / react-dom
|
### @fontsource/jost, @fontsource/marcellus ^5.3.0
|
||||||
- **Version**: ^19.3.0
|
- **Purpose**: Self-hosted fonts — **License**: OFL-1.1
|
||||||
- **Purpose**: UI runtime
|
### @iconify/react ^6.0.2, @iconify-icons/ant-design 2.0.1 (dev)
|
||||||
- **License**: MIT
|
- **Purpose**: Icons, bundled at build time — **License**: MIT
|
||||||
### next-themes
|
### Dev tooling
|
||||||
- **Version**: ^0.4.6
|
- Vite, Vitest, Testing Library, fast-check, axe-core, ESLint, Prettier, Lighthouse CI, Chakra CLI — all MIT/Apache-2.0/MPL-2.0 (axe-core)
|
||||||
- **Purpose**: Colour mode
|
|
||||||
- **License**: MIT
|
|
||||||
### @iconify/react, @iconify-icons/ant-design
|
|
||||||
- **Version**: ^6.0.2, 2.0.1
|
|
||||||
- **Purpose**: Icons
|
|
||||||
- **License**: MIT (icons: Ant Design, MIT)
|
|
||||||
### @fontsource/jost, @fontsource/marcellus
|
|
||||||
- **Version**: ^5.3.0
|
|
||||||
- **Purpose**: Self-hosted web fonts
|
|
||||||
- **License**: OFL-1.1
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
# Reverse Engineering Metadata
|
# Reverse Engineering Metadata
|
||||||
|
|
||||||
**Analysis Date**: 2026-10-14T09:58:04Z
|
**Analysis Date**: 2026-10-19T19:19:38Z (refresh; previous analysis 2026-10-14T09:58:04Z at 8f5841c)
|
||||||
**Analyzer**: AI-DLC
|
**Analyzer**: AI-DLC
|
||||||
**Workspace**: C:\Users\bdslo\Documents\Development\AndreaSlopFotografie
|
**Workspace**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie
|
||||||
**Codebase Commit**: 8f5841c (branch feature/hero-slider-and-navigation)
|
**Codebase Commit**: 38c5c3e (branch master)
|
||||||
**Total Files Analyzed**: 30 (web/src, web config files, design/andreaslop-static shell markup and README)
|
**Total Files Analyzed**: ~95 (web/src, web/config, web/deploy, web config files, CI workflow, design/andreaslop-static pages and README)
|
||||||
|
**Refreshed for**: feature homepage-sections
|
||||||
|
|
||||||
## Artifacts Generated
|
## Artifacts Generated
|
||||||
- [x] business-overview.md
|
- [x] business-overview.md
|
||||||
|
|||||||
@@ -1,28 +1,37 @@
|
|||||||
# Technology Stack
|
# Technology Stack
|
||||||
|
|
||||||
## Programming Languages
|
## Programming Languages
|
||||||
- TypeScript — ~6.0.2 — all application code (TSX)
|
- TypeScript — ~6.0.2 — all application, config and test code (TSX)
|
||||||
- HTML/CSS/JS — design reference only (`design/andreaslop-static`)
|
- HTML/CSS/JS — design reference only (`design/andreaslop-static`)
|
||||||
- C# / .NET — planned back-end (not present)
|
- C# / .NET — planned back-end (not present)
|
||||||
|
|
||||||
## Frameworks
|
## Frameworks
|
||||||
- React — ^19.3.0 — UI
|
- React — ^19.3.0 — UI
|
||||||
- Chakra UI — ^3.37.0 (+ @emotion/react ^11.14.0) — styling system and components
|
- Chakra UI — ^3.37.0 (+ @emotion/react ^11.14.0) — styling system and components
|
||||||
- TanStack Router — ^1.170.39 — file-based routing, head management (devtools ^1.167.2)
|
- TanStack Router — ^1.170.39 — file-based routing, head management (devtools ^1.167.2, dev only)
|
||||||
- next-themes — ^0.4.6 — colour mode provider (fixed to light)
|
|
||||||
- @fontsource/jost, @fontsource/marcellus — ^5.3.0 — self-hosted fonts
|
- @fontsource/jost, @fontsource/marcellus — ^5.3.0 — self-hosted fonts
|
||||||
- @iconify/react ^6.0.2 + @iconify-icons/ant-design 2.0.1 — offline icons
|
- @iconify/react ^6.0.2 + @iconify-icons/ant-design 2.0.1 — offline icons
|
||||||
|
- @sentry/react — ^11.8.0 — error reporting
|
||||||
|
|
||||||
## Infrastructure
|
## Infrastructure
|
||||||
- None yet; static build output suitable for any static host
|
- Gitea Actions — CI/CD (runners: Raspberry Pi arm64 and a pc)
|
||||||
|
- nginx on Raspberry Pi — test environment (test.andreaslop.nl)
|
||||||
|
- IIS at a webhost via FTPS — production (andreaslop.nl)
|
||||||
|
- Sentry (SaaS, EU), Umami (self-hosted, analytics.slpsoftware.nl), UptimeRobot — monitoring
|
||||||
|
|
||||||
## Build Tools
|
## Build Tools
|
||||||
- Vite — ^8.3.0 — dev server and bundler
|
- Vite — ^8.3.0 — dev server and bundler
|
||||||
- @vitejs/plugin-react — ^6.1.1
|
- @vitejs/plugin-react — ^6.1.2
|
||||||
- @tanstack/router-plugin — ^1.168.40 — route tree generation, code splitting
|
- @tanstack/router-plugin — ^1.168.40 — route tree generation, code splitting
|
||||||
- @chakra-ui/cli — ^3.37.0 — theme typegen
|
- @chakra-ui/cli — ^3.37.0 — theme typegen
|
||||||
- pnpm — package manager
|
- pnpm — 12.11.2 — package manager
|
||||||
- Prettier — ^3.9.9 — formatting
|
- Node — 24 (CI)
|
||||||
|
|
||||||
## Testing Tools
|
## Quality and Testing Tools
|
||||||
- None configured (no test runner, no linter such as ESLint)
|
- Vitest ^5.0.5 + @vitest/coverage-v8 — unit and component tests, coverage thresholds
|
||||||
|
- @testing-library/react ^16.3.3, user-event, jest-dom, jsdom ^30.1.3
|
||||||
|
- fast-check ^4.10.2 — property-based tests
|
||||||
|
- axe-core ^4.14.0 — accessibility checks in component tests
|
||||||
|
- ESLint ^9.39.5 + typescript-eslint, react-hooks, jsx-a11y
|
||||||
|
- Prettier ^3.9.9
|
||||||
|
- @lhci/cli ^0.15.1 — Lighthouse CI (mobile and desktop)
|
||||||
|
|||||||
@@ -4,3 +4,4 @@
|
|||||||
|------|------|--------|--------|---------------------|---------------|
|
|------|------|--------|--------|---------------------|---------------|
|
||||||
| Bug | [hero-carousel-announce-and-pause](bugs/hero-carousel-announce-and-pause/bug-fix.md) | ✅ Complete | fix/hero-carousel-announce-and-pause | web/src/components/Hero (Hero, HeroArrows, useHeroSlider) | 2026-10-19 |
|
| Bug | [hero-carousel-announce-and-pause](bugs/hero-carousel-announce-and-pause/bug-fix.md) | ✅ Complete | fix/hero-carousel-announce-and-pause | web/src/components/Hero (Hero, HeroArrows, useHeroSlider) | 2026-10-19 |
|
||||||
| Feature | frontend-shell | ✅ Complete | feature/frontend-shell | web/src (AppShell, NavigationBar, Footer, Hero socials, new BackToTop/SkipLink/404/error pages, routes, theme.ts, main.tsx), web/vite.config.js, web/package.json | 2026-10-14 |
|
| Feature | frontend-shell | ✅ Complete | feature/frontend-shell | web/src (AppShell, NavigationBar, Footer, Hero socials, new BackToTop/SkipLink/404/error pages, routes, theme.ts, main.tsx), web/vite.config.js, web/package.json | 2026-10-14 |
|
||||||
|
| Feature | homepage-sections | 🔵 Inception | feature/homepage-sections | web/src/routes/index.tsx, new homepage section components, web/src/content (types + static content), possibly web/config/securityHeaders.ts (contact form) | 2026-10-19 |
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# AI-DLC State Tracking
|
||||||
|
|
||||||
|
## Project Information
|
||||||
|
- **Feature Name**: Homepage sections below the hero (Lifestyle photography, About me, Prices, Lieve woorden, Contact, Instagram)
|
||||||
|
- **Feature Slug**: homepage-sections
|
||||||
|
- **Project Type**: Brownfield
|
||||||
|
- **Start Date**: 2026-10-19T19:19:38Z
|
||||||
|
- **Current Stage**: CONSTRUCTION - Unit 1 Lifestyle fotografie - Code Generation (planning)
|
||||||
|
- **Branch**: feature/homepage-sections (to be created before Code Generation)
|
||||||
|
|
||||||
|
## Workspace State
|
||||||
|
- **Existing Code**: Yes
|
||||||
|
- **Programming Languages**: TypeScript (React/TSX)
|
||||||
|
- **Build System**: pnpm + Vite (`tsc && vite build`), Gitea Actions CI
|
||||||
|
- **Project Structure**: Single front-end SPA in `web/`; static HTML design reference in `design/andreaslop-static/`; `api/` folder present but empty (.NET back-end planned)
|
||||||
|
- **Reverse Engineering Needed**: Yes (refresh — artifacts stale since commit 8f5841c)
|
||||||
|
- **Workspace Root**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie
|
||||||
|
|
||||||
|
## Code Location Rules
|
||||||
|
- **Application Code**: Workspace root (NEVER in aidlc-docs/) — front-end lives in `web/`
|
||||||
|
- **Feature Documentation**: aidlc-docs/features/homepage-sections/ only
|
||||||
|
- **Shared Artifacts**: aidlc-docs/_shared/
|
||||||
|
- **Structure patterns**: See code-generation.md Critical Rules
|
||||||
|
|
||||||
|
## Language Configuration
|
||||||
|
- **Documentation Language**: English
|
||||||
|
- **Conversation Language**: User Language (Dutch)
|
||||||
|
- **Source**: inherited from aidlc-docs/language-preference.md (answer A); user may override
|
||||||
|
|
||||||
|
## Extension Configuration
|
||||||
|
| Extension | Enabled | Decided At |
|
||||||
|
|---|---|---|
|
||||||
|
| Security Baseline | Yes | Requirements Analysis |
|
||||||
|
| Property-Based Testing | Yes (full enforcement) | Requirements Analysis |
|
||||||
|
|
||||||
|
## Operations Configuration
|
||||||
|
- **Include Operations Phase**: Undecided
|
||||||
|
- **Decided At**: Pending — asked at Requirements Analysis
|
||||||
|
|
||||||
|
## Scope Notes (from user)
|
||||||
|
- One feature, one unit per homepage block: Lifestyle photography, About me, Prices, Lieve woorden (testimonials, new — from the live site), Contact, Instagram
|
||||||
|
- Contact form: built with anti-spam and a robot check, but covered by an overlay ("coming soon, e-mail info@andreaslop.nl for now") until the API exists
|
||||||
|
- Lieve woorden: user asked for a design proposal, possibly added to design/andreaslop-static
|
||||||
|
- Hero already exists and is out of scope
|
||||||
|
|
||||||
|
## Execution Plan Summary
|
||||||
|
- **Stages to Execute**: Application Design (incl. static design update, FR-HP-01), Units Generation, Functional Design (Prijzen, Lieve woorden, Contact), Code Generation (6 units), Build and Test
|
||||||
|
- **Stages to Skip**: User Stories (single persona), Functional Design for Lifestyle fotografie / Over mij / Instagram (presentational), NFR Requirements (NFRs set at requirements level), NFR Design (no new patterns), Infrastructure Design (no infrastructure changes)
|
||||||
|
- **Operations**: Undecided (asked again at Build and Test)
|
||||||
|
- **Delivery**: one branch feature/homepage-sections, commits per unit, one PR at the end; full `pnpm check` (incl. Lighthouse) after each unit
|
||||||
|
- **Unit order**: 1 Lifestyle fotografie (+ shared blocks) → 2 Over mij → 3 Prijzen → 4 Lieve woorden → 5 Contact → 6 Instagram
|
||||||
|
|
||||||
|
## Stage Progress
|
||||||
|
|
||||||
|
### 🔵 INCEPTION PHASE
|
||||||
|
- [x] Workspace Detection
|
||||||
|
- [x] Reverse Engineering (refresh, approved)
|
||||||
|
- [x] Requirements Analysis (approved)
|
||||||
|
- [x] User Stories - SKIP (single visitor persona, concrete FRs)
|
||||||
|
- [x] Workflow Planning (approved)
|
||||||
|
- [x] Application Design - EXECUTE (approved)
|
||||||
|
- [x] Units Generation - EXECUTE (approved)
|
||||||
|
|
||||||
|
### 🟢 CONSTRUCTION PHASE
|
||||||
|
- [ ] Functional Design - EXECUTE (Prijzen, Lieve woorden, Contact) / SKIP (Lifestyle fotografie, Over mij, Instagram)
|
||||||
|
- [ ] NFR Requirements - SKIP
|
||||||
|
- [ ] NFR Design - SKIP
|
||||||
|
- [ ] Infrastructure Design - SKIP
|
||||||
|
- [ ] Code Generation - EXECUTE (per unit)
|
||||||
|
- [ ] Build and Test - EXECUTE
|
||||||
|
|
||||||
|
### 🟡 OPERATIONS PHASE
|
||||||
|
- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation - UNDECIDED
|
||||||
|
|
||||||
|
## Current Status
|
||||||
|
- **Lifecycle Phase**: CONSTRUCTION
|
||||||
|
- **Current Stage**: Unit 1 Lifestyle fotografie — Code Generation (planning)
|
||||||
|
- **Next Stage**: CONSTRUCTION - Unit 1 Code Generation
|
||||||
|
|
||||||
|
## Reverse Engineering Status
|
||||||
|
- [x] Reverse Engineering - Artifacts refreshed on 2026-10-19T19:19:38Z at commit 38c5c3e (approved 2026-10-19T19:31:00Z)
|
||||||
|
- **Artifacts Location**: aidlc-docs/_shared/reverse-engineering/
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
# AI-DLC Audit Log — homepage-sections
|
||||||
|
|
||||||
|
## Initial User Request
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T19:19:38Z
|
||||||
|
|
||||||
|
**User Input**: "Ik wil met aidlc de homepage toe gaan voegen. De Hero staat er al, maar de 4 blokken eronder nog niet. Die wil ik in 1 feature opppakken met elk blok als een losse unit. Voor de duidleijkheid. De 4 blokken zijn:
|
||||||
|
1. Lifestyle fotografie
|
||||||
|
2. Over mij
|
||||||
|
3. Prijzen
|
||||||
|
4. Contact
|
||||||
|
|
||||||
|
Nou is het nog een statische site zonder back-end dus het contactformulier kan nog niet functioneel gemaakt worden dus ik hoor graag een suggestie hoe ik dit tijdelijk kan oplossen totdat we een API hebben."
|
||||||
|
|
||||||
|
**AI Response**: "Started AI-DLC workflow (existing multi-feature workspace, no welcome message). Began Workspace Detection."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Workspace Detection (start)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Workspace Detection
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T19:19:38Z
|
||||||
|
|
||||||
|
**User Input**: (none — automatic stage)
|
||||||
|
|
||||||
|
**AI Response**: "Feature resolution: all existing items (frontend-shell, hero-carousel-announce-and-pause) are ✅ Complete and the request is clearly new work, so a new feature was started without a feature-selection prompt. Classification: Feature (new user-facing sections, no defect). Slug: homepage-sections. Brownfield (React SPA in web/). Language configuration inherited from aidlc-docs/language-preference.md (answer A: English docs, Dutch conversation) and stated to the user for correction instead of re-asking. Reverse engineering artifacts in _shared/ are stale: generated at commit 8f5841c (2026-10-14), before the front-end shell, CI/CD, monitoring and the hero fix landed (HEAD 38c5c3e). Next: refresh Reverse Engineering."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Workspace Detection (complete). Parallel features: none active. Conflicts: none.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Reverse Engineering (refresh)
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T19:19:38Z
|
||||||
|
|
||||||
|
**User Input**: (none — automatic stage)
|
||||||
|
|
||||||
|
**AI Response**: "Refreshed all eight artifacts in aidlc-docs/_shared/reverse-engineering/ against commit 38c5c3e: CI/CD (Gitea Actions, test on Pi nginx, production FTPS to IIS), monitoring (Sentry, Umami), complete shell (footer, skip link, back-to-top, 404/error), content/ modules, pure lib/ helpers with property-based tests, page registry and sitemap, security headers as code. Key finding for this feature: CSP has form-action 'self' and connect-src limited to self/Umami/Sentry, so a third-party contact form endpoint requires a CSP change in web/config/securityHeaders.ts plus regenerated server configs. LAYOUT.md Home lists six blocks (Hero, Highlights, About me, Prices, Contact, Instagram); the user named four — Instagram is to be confirmed in requirements questions. Design images for the four blocks exist in design/andreaslop-static/assets/img. Presented completion message and awaited approval."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Reverse Engineering (complete, awaiting approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Reverse Engineering — User Response
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T19:31:00Z
|
||||||
|
|
||||||
|
**User Input**: "Oh je hebt gelijk. Die Instagram-module moet er ook komen, die ben ik gewoon vergeten. Sterker nog. In het design staat het niet, want het is later op de live werbsite gekomen. Op de huidige website op https://andreaslop.nl/ is het blok \"Lieve woorden\" erbij gekomen. Zou je daar ook een voorstel voor design kunnen doen? Eventueel verwerken in het design in deze workspace?. Voor het formulier moet er inderdaad ook nog anti-spam inkomen en een robot check. Misschien kunnen we voor het formulier wel bouwen, maar dan een overlay er overheen met een tekst dat die binnenkort komt en dta je voor nu een email moet sturen naar info@andreaslop.nl?"
|
||||||
|
|
||||||
|
**AI Response**: "Treated as implicit approval of the Reverse Engineering refresh (no changes requested to the analysis). Scope extended: Instagram block added; new 'Lieve woorden' (testimonials) block from the live site added, needing a design proposal and possibly an update to design/andreaslop-static. Contact form: build it with anti-spam and a robot check, covered by an overlay saying the form is coming soon and to e-mail info@andreaslop.nl for now. Proceeding to Requirements Analysis; inspecting the live site's 'Lieve woorden' block first."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Reverse Engineering approved; scope change recorded
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements Analysis — Clarifying Questions
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T20:07:00Z
|
||||||
|
|
||||||
|
**User Input**: (none — AI-initiated)
|
||||||
|
|
||||||
|
**AI Response**: "Inspected live andreaslop.nl: 'Lieve Woorden' is an owl-slider testimonial widget (photo, shoot-type title, text, author) with two reviews; live prices differ from the static design (Zwangerschap 175, Newborn 185, Gezin 175, richer inclusions); live form has a shoot-type select (Zwangerschap/Newborn/Familie/Overig) instead of a free-text subject plus a honeypot; live Instagram widget is broken. Created inception/requirements/requirement-verification-questions.md with 16 content questions plus the Security, PBT and Operations opt-in questions (Dutch, matching the previous feature's question files). Depth: Standard."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Requirements Analysis (awaiting answers)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements Analysis — Answers Received
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T20:40:00Z
|
||||||
|
|
||||||
|
**User Input**: "ik heb de vragen beantwoord"
|
||||||
|
|
||||||
|
**AI Response**: "Read answers: Q1–Q13 A, Q11 A with note 'Als we het er dan toch inbouwen dan kan ik het later ook makkelijk uitzetten mocht dat nodig zijn.', Q14 B (Friendly Captcha), Q15 A, Q16 A, Security Baseline A, PBT A, Operations C. No contradictions or ambiguities found. Loaded security-baseline.md and property-based-testing.md (opted in). Generated inception/requirements/requirements.md (12 functional, 6 non-functional requirements, extension compliance tables). Recorded extension and operations configuration in aidlc-state.md. User Stories proposed to be skipped (single visitor persona, concrete requirements). Presented completion message and awaited approval."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Requirements Analysis (complete, awaiting approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements Analysis — Change Request
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T20:48:00Z
|
||||||
|
|
||||||
|
**User Input**: "NFR-HP-02: Code comments wil ik liever in het Engels."
|
||||||
|
|
||||||
|
**AI Response**: "Updated NFR-HP-02: code comments in English for all new code, including new comments in existing files; existing Dutch comments are not translated in this feature; visitor-facing texts stay Dutch. Re-presented the completion message."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Requirements Analysis (change applied, awaiting approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements Analysis — Approval
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T20:52:00Z
|
||||||
|
|
||||||
|
**User Input**: "Ga verder naar de volgende stage"
|
||||||
|
|
||||||
|
**AI Response**: "Requirements approved; User Stories skipped (user did not choose 'Add User Stories'). The question whether English code comments should become a standing preference for future features was not answered; treated as applying to this feature only. Proceeding to Workflow Planning."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Requirements Analysis approved; User Stories SKIP
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Workflow Planning
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T20:55:00Z
|
||||||
|
|
||||||
|
**User Input**: (none — AI-initiated)
|
||||||
|
|
||||||
|
**AI Response**: "Created inception/plans/execution-plan.md. Execute: Application Design (incl. FR-HP-01 static design + LAYOUT.md update as a review gate before React work), Units Generation (six units), Functional Design for Prijzen, Lieve woorden and Contact, Code Generation per unit, Build and Test. Skip: User Stories, Functional Design for presentational units, NFR Requirements, NFR Design, Infrastructure Design. Operations undecided. Risk: Low. Prompt: 'Ready to proceed with this plan?'"
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Workflow Planning (awaiting approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Workflow Planning — Approval
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T21:00:00Z
|
||||||
|
|
||||||
|
**User Input**: "akkoord, ga verder"
|
||||||
|
|
||||||
|
**AI Response**: "Execution plan approved. Proceeding to Application Design."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Workflow Planning approved
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Application Design — Plan and Questions
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T21:05:00Z
|
||||||
|
|
||||||
|
**User Input**: (none — AI-initiated)
|
||||||
|
|
||||||
|
**AI Response**: "Created inception/plans/application-design-plan.md with the plan (incl. FR-HP-01 static design steps) and 6 design questions: folder structure, content modules, testimonial carousel (Chakra Carousel available in the installed @chakra-ui/react), Prijzen → Contact handover, location of contactFormEnabled, testimonial photo style. Recorded already-decided items (SectionHeading, HomeSection, Reveal/useReveal, Chakra Field/Input/Textarea/NativeSelect, no form library, submitContactForm adapter)."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Application Design (awaiting answers)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Application Design — Answers and Artifacts
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T21:40:00Z
|
||||||
|
|
||||||
|
**User Input**: "ik heb de vragen beantwoord"
|
||||||
|
|
||||||
|
**AI Response**: "Answers: Q1 B, Q2 A, Q3 A, Q4 A, Q5 A, Q6 A — no ambiguities. Executed FR-HP-01: design/andreaslop-static index.html (live packages with ?pakket preselect links, new Lieve woorden section, live contact fields with honeypot and coming-soon gate, contact section moved to plain background), style.css (13b testimonials, select, honeypot, form gate, responsive), main.js (contact form handles shoot/onderwerp, honeypot + time check, preselect, initFormGate, initTestimonials), manifest intro-3 updated to the live photo; LAYOUT.md Home now seven blocks with new colour G (also added to .ai/layout-conventions.md). Verified with headless Chrome screenshots (desktop 1440, mobile 520). contact.html left unchanged (out of scope). Generated components.md, component-methods.md, services.md, component-dependency.md, application-design.md. Security/PBT compliance included; no blocking findings."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Application Design (complete, awaiting approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Application Design — Approval
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T21:50:00Z
|
||||||
|
|
||||||
|
**User Input**: "ga verder naar de volgende stage"
|
||||||
|
|
||||||
|
**AI Response**: "Application design (incl. static design update) approved. Proceeding to Units Generation."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Application Design approved
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Units Generation — Plan and Questions
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T21:52:00Z
|
||||||
|
|
||||||
|
**User Input**: (none — AI-initiated)
|
||||||
|
|
||||||
|
**AI Response**: "Created inception/plans/unit-of-work-plan.md: six units per block in the approved order, shared pieces assigned to the first unit that needs them; two questions on delivery (one PR vs PR per unit) and per-unit verification depth (full pnpm check incl. Lighthouse vs without)."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Units Generation, Part 1 Planning (awaiting answers)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Units Generation — Answers
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T21:58:00Z
|
||||||
|
|
||||||
|
**User Input**: "ik heb de vragen beantwoord"
|
||||||
|
|
||||||
|
**AI Response**: "Answers: Q1 A (one PR for the whole feature, commits per unit on feature/homepage-sections, optional manual 'Deploy to Test' on the branch), Q2 A (full pnpm check incl. Lighthouse per unit). No ambiguities. Prompt: 'Unit of work plan complete. Review the plan in aidlc-docs/features/homepage-sections/inception/plans/unit-of-work-plan.md. Ready to proceed to generation?'"
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Units Generation, Part 1 Planning (awaiting plan approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Units Generation — Plan Approval and Generation
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T22:02:00Z
|
||||||
|
|
||||||
|
**User Input**: "ja genereer de unit-documenten"
|
||||||
|
|
||||||
|
**AI Response**: "Plan approved. Generated inception/application-design/unit-of-work.md (six units with scope, shared pieces, images, Functional Design execute/skip, done criteria), unit-of-work-dependency.md (matrix, order diagram), unit-of-work-story-map.md (requirement-to-unit map; all FR-HP/NFR-HP assigned). Presented completion message."
|
||||||
|
|
||||||
|
**Context**: INCEPTION - Units Generation (complete, awaiting approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Units Generation — Approval
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T22:08:00Z
|
||||||
|
|
||||||
|
**User Input**: "Ga verder naar de volgende stage"
|
||||||
|
|
||||||
|
**AI Response**: "Units approved. Inception complete. Proceeding to CONSTRUCTION — Unit 1 Lifestyle fotografie (Functional Design skipped per plan) → Code Generation Part 1 Planning."
|
||||||
|
|
||||||
|
**Context**: INCEPTION complete; CONSTRUCTION start
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Unit 1 Lifestyle fotografie — Code Generation Plan
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T22:15:00Z
|
||||||
|
|
||||||
|
**User Input**: (none — AI-initiated)
|
||||||
|
|
||||||
|
**AI Response**: "Created construction/plans/lifestyle-fotografie-code-generation-plan.md (20 steps): branch + baseline commit, image resize to 800x1200 via one-off System.Drawing script (ImageMagick not available; no project dependency), theme tokens, content types and homeContent, useReveal/Reveal, SectionHeading, HomeSection, IntroGallery, route, tests, pnpm check, code summary, commit (not pushed). Functional Design skipped; PBT-01 recorded as N/A (no logic). Test names in English proposed. Prompt: approve plan or request changes."
|
||||||
|
|
||||||
|
**Context**: CONSTRUCTION - Unit 1 Code Generation Part 1 (awaiting plan approval)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Unit 1 Lifestyle fotografie — Plan Approval
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-19T22:20:00Z
|
||||||
|
|
||||||
|
**User Input**: "approve plan"
|
||||||
|
|
||||||
|
**AI Response**: "Plan approved (incl. local commits on feature/homepage-sections, not pushed). Starting Code Generation Part 2."
|
||||||
|
|
||||||
|
**Context**: CONSTRUCTION - Unit 1 Code Generation Part 2 (start)
|
||||||
|
|
||||||
|
---
|
||||||
+77
@@ -0,0 +1,77 @@
|
|||||||
|
# Code Generation Plan — Unit 1: Lifestyle fotografie
|
||||||
|
|
||||||
|
**This plan is the single source of truth for Code Generation of unit 1.**
|
||||||
|
|
||||||
|
## Unit context
|
||||||
|
- **Requirements**: FR-HP-02 (section), FR-HP-11 (scroll reveal, introduced), FR-HP-12 (content + images), NFR-HP-01/02/03/05/06
|
||||||
|
- **Design**: [unit-of-work.md](../../inception/application-design/unit-of-work.md) unit 1; [components.md](../../inception/application-design/components.md); [component-methods.md](../../inception/application-design/component-methods.md)
|
||||||
|
- **Design reference**: `design/andreaslop-static/index.html` (`.section`, `.section__head--center`, `.lead`, `.intro-gallery`) and `assets/css/style.css` §4, §11, §19
|
||||||
|
- **Depends on**: nothing (first unit); introduces the shared blocks every later unit uses
|
||||||
|
- **Functional Design**: skipped (presentational). **PBT-01**: no business logic, data transformation or algorithm in this unit → no property-based tests; this is recorded as N/A, not skipped silently. Example-based tests cover the components and hook (PBT-10).
|
||||||
|
- **Workspace**: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie`, code in `web/`
|
||||||
|
|
||||||
|
## Conventions for this unit
|
||||||
|
- Code comments in English; visitor-facing text (headings, alt texts) in Dutch. **Test names in English** too, since they are code, not visitor-facing (existing tests stay Dutch).
|
||||||
|
- `data-testid` on the section and its gallery (`intro-gallery`, `intro-gallery-photo-{n}`).
|
||||||
|
- Styling via theme tokens/text styles and Chakra primitives; no CSS files, no hard-coded colours.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
### Branch and baseline
|
||||||
|
- [ ] **Step 1** — Create branch `feature/homepage-sections` from `master`. First commit: the inception artifacts so far (`aidlc-docs/…/homepage-sections/`, refreshed `aidlc-docs/_shared/reverse-engineering/`, `active-features.md`) and the static design update (`design/andreaslop-static/`, `LAYOUT.md`, `.ai/layout-conventions.md`). Not pushed.
|
||||||
|
|
||||||
|
### Images
|
||||||
|
- [ ] **Step 2** — Resize the four live gallery photos (`design/andreaslop-static/assets/img/intro-1…4.jpg`, 1067×1600) to **800×1200**, JPEG quality ~80, into `web/src/assets/home/intro-1.jpg … intro-4.jpg`. Tool: a one-off PowerShell script using .NET `System.Drawing` (already on Windows; not added to the project). The script and its parameters are recorded in the code summary so later units reuse them. Target ≤ ~150 KB per photo.
|
||||||
|
|
||||||
|
### Theme (shared)
|
||||||
|
- [ ] **Step 3** — `web/src/theme.ts`: add tokens from the design that later units also need:
|
||||||
|
- spacing `sectionY` (`clamp(4.5rem, 9vw, 8.5rem)`), `sectionYTight` (60% of it), `gridGap` (`clamp(1rem, 2.2vw, 2rem)`), `sectionHeadGap` (`clamp(2.5rem, 5vw, 4.5rem)`)
|
||||||
|
- size `contentNarrow` (`820px`)
|
||||||
|
- text styles `sectionTitle` (Marcellus; 1.85 / 2.125 / 2.5rem, line-height 1.15) and `lead` (1.25rem, weight 300, line-height 1.6)
|
||||||
|
- duration `reveal` (`0.8s`)
|
||||||
|
- then run `pnpm typegen`
|
||||||
|
|
||||||
|
### Content
|
||||||
|
- [ ] **Step 4** — `web/src/content/types.ts`: add `ContentImage` and `HomeContent` with the `intro` part only (`{ title, lead, photos: ContentImage[] }`); later units extend `HomeContent`.
|
||||||
|
- [ ] **Step 5** — Create `web/src/content/homeContent.ts`: title "Lifestyle fotografie", lead "Jouw favoriete momenten, vastgelegd op een natuurlijke en ongedwongen manier.", four photos with width/height 800×1200 and alt texts:
|
||||||
|
1. "Babyhandje in de hand van de moeder, op een gebreid dekentje"
|
||||||
|
2. "Moeder drukt haar pasgeboren baby in een gebreid truitje tegen zich aan"
|
||||||
|
3. "Zwangere vrouw op blote voeten in het zand bij zonsondergang"
|
||||||
|
4. "Aanstaande vader omarmt zijn zwangere partner in de duinen"
|
||||||
|
|
||||||
|
### Shared blocks
|
||||||
|
- [ ] **Step 6** — `web/src/hooks/useReveal.ts`: returns `{ ref, visible }`; visible immediately when `prefers-reduced-motion: reduce` or `IntersectionObserver` is missing; otherwise observes once (threshold 0.12, rootMargin `0px 0px -60px 0px`, as in the design) and disconnects on reveal and on unmount.
|
||||||
|
- [ ] **Step 7** — `web/src/hooks/useReveal.test.tsx`: visible without IntersectionObserver (jsdom); visible under reduced motion; hidden until intersecting with a mocked observer, then visible, then unobserved; disconnect on unmount.
|
||||||
|
- [ ] **Step 8** — `web/src/components/Reveal/Reveal.tsx`: wraps children in a `Box`; opacity 0 + translateY(24px) until visible, transition `reveal` duration with the `smooth` easing; optional `delay` (seconds) for staggering.
|
||||||
|
- [ ] **Step 9** — `web/src/components/Reveal/Reveal.test.tsx`: children always in the DOM and accessible; visible state without observer.
|
||||||
|
- [ ] **Step 10** — `web/src/components/SectionHeading/SectionHeading.tsx`: optional eyebrow (`eyebrow` text style, `accent.deep`), h2 with `id` (`sectionTitle` text style), optional lead (`lead` text style, `ink.soft`); `align` center (default, max width 620px, centred) or start; bottom margin `sectionHeadGap`.
|
||||||
|
- [ ] **Step 11** — `web/src/components/SectionHeading/SectionHeading.test.tsx`: h2 with id, optional eyebrow/lead, axe clean.
|
||||||
|
- [ ] **Step 12** — `web/src/components/HomeSection/HomeSection.tsx`: `<section aria-labelledby>` with `py="sectionY"` (or `sectionYTight`), `bg` `paper` or `paper.alt` (`tone`), inner `Container` (`content` or `contentNarrow` width), optional `id` and `data-testid`.
|
||||||
|
- [ ] **Step 13** — `web/src/components/HomeSection/HomeSection.test.tsx`: region named by its heading, tone and width variants render, id passes through.
|
||||||
|
|
||||||
|
### The section
|
||||||
|
- [ ] **Step 14** — `web/src/components/home/IntroGallery/IntroGallery.tsx`: `HomeSection` + `SectionHeading` (in `Reveal`) + grid of four `figure`s, each in a `Reveal` with a staggered delay; 4 columns from `lg`, 2 from `sm`, 1 below; 2nd and 4th photo offset downward from `sm` (design `margin-top`); image `aspectRatio 3/4`, `objectFit cover`, `loading="lazy"`, explicit width/height; slow hover zoom (1.05, `fade` duration), none under reduced motion.
|
||||||
|
- [ ] **Step 15** — `web/src/components/home/IntroGallery/IntroGallery.test.tsx`: region "Lifestyle fotografie", h2 + lead, four images with their alt texts and lazy loading, works with any number of photos (0 shows only the heading), axe clean.
|
||||||
|
- [ ] **Step 16** — `web/src/routes/index.tsx`: render `IntroGallery` with `homeContent.intro` after the Hero.
|
||||||
|
- [ ] **Step 17** — `web/src/app.test.tsx`: the homepage shows the "Lifestyle fotografie" section after the hero, still exactly one h1, axe clean (extend the existing home checks).
|
||||||
|
|
||||||
|
### Verification and wrap-up
|
||||||
|
- [ ] **Step 18** — Run `pnpm check` (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse mobile + desktop). Fix and rerun until green.
|
||||||
|
- [ ] **Step 19** — Write `aidlc-docs/features/homepage-sections/construction/lifestyle-fotografie/code/code-summary.md`: files created/modified, image script + parameters and resulting sizes, test results, Lighthouse scores, extension compliance.
|
||||||
|
- [ ] **Step 20** — Commit unit 1 on `feature/homepage-sections` ("Adds the Lifestyle fotografie section to the homepage" + attribution). Not pushed.
|
||||||
|
|
||||||
|
## Requirement traceability
|
||||||
|
| Requirement | Steps |
|
||||||
|
|---|---|
|
||||||
|
| FR-HP-02 | 5, 14–17 |
|
||||||
|
| FR-HP-11 | 6–9, 14 |
|
||||||
|
| FR-HP-12 | 2, 4, 5 |
|
||||||
|
| NFR-HP-01 | 10–15, 17, 18 (Lighthouse a11y) |
|
||||||
|
| NFR-HP-02 | 3, 8–14 |
|
||||||
|
| NFR-HP-03 | 7, 9, 11, 13, 15, 17, 18 |
|
||||||
|
| NFR-HP-05 | 2, 14, 18 |
|
||||||
|
| NFR-HP-06 | 4, 5 |
|
||||||
|
|
||||||
|
## Extension compliance (planned)
|
||||||
|
- **Security**: no new dependencies or external resources (SECURITY-10/13); no input handling; other rules N/A.
|
||||||
|
- **PBT**: PBT-01 N/A for this unit (no logic); PBT-08/09 unchanged; PBT-10 example-based tests present.
|
||||||
+82
@@ -0,0 +1,82 @@
|
|||||||
|
# Application Design — homepage-sections
|
||||||
|
|
||||||
|
Consolidated design. Details: [components.md](components.md), [component-methods.md](component-methods.md), [services.md](services.md), [component-dependency.md](component-dependency.md). Decisions: [application-design-plan.md](../plans/application-design-plan.md) (Q1–Q6 all A, except Q1 = B).
|
||||||
|
|
||||||
|
## 1. Design reference (FR-HP-01, done in this stage)
|
||||||
|
- `design/andreaslop-static/index.html` + `assets/css/style.css` + `assets/js/main.js`:
|
||||||
|
- Prijzen: live packages (Zwangerschap € 175, Newborn € 185, Gezin € 175 with the live inclusions); "Boek je shoot" → `index.html?pakket=<id>#contact`, preselected by the script
|
||||||
|
- **Lieve woorden** (new, section 13b in the CSS): between Prijzen and Contact on `paper.alt`; one review at a time — framed photo (same sand offset block as the about block), large Marcellus quotation mark in heidegroen, shoot type as eyebrow, quote in Marcellus, names in small caps; prev/next arrows and dots (44 px hit areas); polite live region; no autoplay; stacked below 1024 px
|
||||||
|
- Contact: live fields (Naam, E-mail, "In welke shoot heb je interesse?" select, "Stel hier je vraag"), button "(Aan)vraag versturen", honeypot, time check; the form sits dimmed and `inert` under a "Binnenkort" notice with "Stuur een e-mail" (`data-form-disabled` switch); now on a plain `paper` background so backgrounds keep alternating
|
||||||
|
- Lifestyle fotografie: `intro-3.jpg` replaced by the current live photo (manifest updated)
|
||||||
|
- `LAYOUT.md`: Home now has seven blocks (Hero, Highlights, About me, Prices, **Testimonials**, Contact, Instagram); new letter G colour added to `.ai/layout-conventions.md`.
|
||||||
|
- `contact.html` (the `/contact` page design) is unchanged — out of scope (Q16); the script supports both forms.
|
||||||
|
|
||||||
|
## 2. Structure
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph TD
|
||||||
|
Route["routes/index.tsx (validateSearch pakket)"] --> Hero["Hero (exists)"]
|
||||||
|
Route --> S1["home/IntroGallery"]
|
||||||
|
Route --> S2["home/AboutBlock"]
|
||||||
|
Route --> S3["home/Pricing"]
|
||||||
|
Route --> S4["home/Testimonials"]
|
||||||
|
Route --> S5["home/ContactSection"]
|
||||||
|
Route --> S6["home/InstagramGrid"]
|
||||||
|
S5 --> Gate["ContactForm/ContactFormGate"]
|
||||||
|
Gate --> Form["ContactForm/ContactForm"]
|
||||||
|
Form --> Adapter["contact/submitContactForm"]
|
||||||
|
classDef route fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
|
classDef home fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
|
classDef shared fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
|
classDef existing fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
||||||
|
class Route route;
|
||||||
|
class S1,S2,S3,S4,S5,S6 home;
|
||||||
|
class Gate,Form,Adapter shared;
|
||||||
|
class Hero existing;
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: the home route renders the Hero and six home sections in page order; the contact section wraps the reusable form in a gate, and the form submits through a single adapter.
|
||||||
|
|
||||||
|
- **Folders** (Q1 = B): `components/home/{IntroGallery,AboutBlock,Pricing,Testimonials,ContactSection,InstagramGrid}`; reusable pieces in `components/{HomeSection,SectionHeading,Reveal,FramedImage,ContactForm}`; `hooks/useReveal.ts`; `contact/{types,submitContactForm}.ts`.
|
||||||
|
- **Shared building blocks**: `HomeSection` (padding, tone, width, `aria-labelledby`, anchor), `SectionHeading` (eyebrow, h2, lead), `Reveal` (+ `useReveal`), `FramedImage` (photo + sand offset block).
|
||||||
|
|
||||||
|
## 3. Content (Q2 = A)
|
||||||
|
- `content/packages.ts` (`PricingPackage[]`), `content/testimonials.ts` (`Testimonial[]`), `content/homeContent.ts` (`HomeContent`: section texts, gallery, about, instagram), `siteContent.contactForm.enabled = false` (Q5 = A).
|
||||||
|
- Images as `ContentImage { src, alt, width, height }` from `web/src/assets`.
|
||||||
|
- Only the route imports content; components get props.
|
||||||
|
|
||||||
|
## 4. Key interactions
|
||||||
|
- **Testimonials** (Q3 = A): Chakra `Carousel` (Ark UI) — keyboard, swipe, indicators and slide semantics built in; no autoplay; custom styling; live-region text from `slideLabel`; controls hidden for a single review.
|
||||||
|
- **Prijzen → Contact** (Q4 = A): `/?pakket=<id>#contact`; `packageFromSearch` ignores unknown ids; preselected value flows into the form as `initialShoot`.
|
||||||
|
- **Contact form**: Chakra `Field`/`Input`/`Textarea`/`NativeSelect`; plain React state; `validateContact` → per-field errors, focus to the first invalid field; `isLikelySpam` (honeypot + time check) → silent success; `submitContactForm` adapter (today rejects generically).
|
||||||
|
- **Gate**: `ContactFormGate` with `enabled` from `siteContent.contactForm`; when off, the form is dimmed and `inert`, the notice shows the e-mail address (assembled with the existing `emailAddress`) and a mailto button; without a valid address only the coming-soon text.
|
||||||
|
- **Instagram**: profile URL derived from `siteContent.socials` via `visibleSocials`; section hidden without one.
|
||||||
|
|
||||||
|
## 5. Pure helpers (`lib/`, PBT candidates)
|
||||||
|
`formatPrice`, `shootOptions`, `packageFromSearch`, `validateContact`, `toContactPayload`, `isLikelySpam`, `slideLabel`. Property identification per unit in Functional Design (PBT-01).
|
||||||
|
|
||||||
|
## 6. Requirements coverage
|
||||||
|
| Requirement | Covered by |
|
||||||
|
|---|---|
|
||||||
|
| FR-HP-01 | §1 (done) |
|
||||||
|
| FR-HP-02 | IntroGallery |
|
||||||
|
| FR-HP-03 | AboutBlock, FramedImage |
|
||||||
|
| FR-HP-04 | Pricing, PriceCard, packages.ts, formatPrice, package handover |
|
||||||
|
| FR-HP-05 | Testimonials (Chakra Carousel), testimonials.ts, slideLabel |
|
||||||
|
| FR-HP-06 | ContactSection, ContactForm, validateContact, shootOptions, submitContactForm |
|
||||||
|
| FR-HP-07 | ContactFormGate, siteContent.contactForm |
|
||||||
|
| FR-HP-08 | isLikelySpam, honeypot field, max lengths |
|
||||||
|
| FR-HP-09 | Widget slot in ContactForm (no script); integration in the API feature |
|
||||||
|
| FR-HP-10 | InstagramGrid, homeContent.instagram |
|
||||||
|
| FR-HP-11 | Reveal, useReveal |
|
||||||
|
| FR-HP-12 | content modules, ContentImage, assets |
|
||||||
|
| NFR-HP-01 | HomeSection labelling, Field wiring, Carousel semantics, inert gate, 44 px targets |
|
||||||
|
| NFR-HP-02 | Shared blocks, Chakra built-ins, theme reuse, English comments |
|
||||||
|
| NFR-HP-03 | Injectable submit, pure helpers, arbitraries |
|
||||||
|
| NFR-HP-04 | No new third parties, adapter + gate, spam filter, generic errors |
|
||||||
|
| NFR-HP-05 | Lazy images with dimensions |
|
||||||
|
| NFR-HP-06 | API-shaped content and payload types |
|
||||||
|
|
||||||
|
## 7. Extension compliance (Application Design)
|
||||||
|
- **Security Baseline**: SECURITY-04 compliant (no CSP change, no external resources); SECURITY-05 compliant at design level (client-side validation designed, server-side assigned to the API feature); SECURITY-10 compliant (no new dependencies — Chakra Carousel is part of the installed `@chakra-ui/react`); SECURITY-11 compliant (submission isolated in one adapter; misuse case: form spam — gate, honeypot, time check; captcha and rate limiting assigned to the API feature); SECURITY-13 compliant (no CDN resources); SECURITY-15 compliant (adapter failure → generic message, input kept). SECURITY-01/02/03/06/07/08/09/12/14 N/A (no server, data store, IAM or authentication in this feature).
|
||||||
|
- **Property-Based Testing**: PBT-01 planned per unit in Functional Design; pure helpers are isolated in `lib/` to make them property-testable; PBT-07 generators to be added to `test/arbitraries.ts`; PBT-08/09 compliant (existing fast-check setup with seed logging).
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
# Component Dependencies — homepage-sections
|
||||||
|
|
||||||
|
## Dependency matrix
|
||||||
|
|
||||||
|
Rows depend on columns (✓).
|
||||||
|
|
||||||
|
| Component | HomeSection | SectionHeading | Reveal | FramedImage | LinkButton | ContactForm(+Gate) | lib/ helpers | content types | Chakra built-ins |
|
||||||
|
|---|---|---|---|---|---|---|---|---|---|
|
||||||
|
| IntroGallery | ✓ | ✓ | ✓ | | | | | ✓ | Grid, Image |
|
||||||
|
| AboutBlock | ✓ | ✓ | ✓ | ✓ | | | | ✓ | Grid, Text, Link |
|
||||||
|
| Pricing / PriceCard | ✓ | ✓ | ✓ | | ✓ | | formatPrice | ✓ | SimpleGrid, List |
|
||||||
|
| Testimonials | ✓ | ✓ | ✓ | ✓ | | | slideLabel | ✓ | Carousel, Blockquote |
|
||||||
|
| ContactSection | ✓ | ✓ | ✓ | | | ✓ | shootOptions | ✓ | — |
|
||||||
|
| ContactForm | | | | | linkButton recipe | | validateContact, toContactPayload, isLikelySpam | ✓ | Field, Input, Textarea, NativeSelect |
|
||||||
|
| ContactFormGate | | | | | ✓ (mail button) | | emailAddress (exists) | ✓ | — |
|
||||||
|
| InstagramGrid | ✓ | ✓ | ✓ | | | | | ✓ | Grid, Link, VisuallyHidden |
|
||||||
|
| routes/index.tsx | | | | | | | packageFromSearch, visibleSocials (exists) | content modules | — |
|
||||||
|
|
||||||
|
No section depends on another section; the only cross-section link (Prijzen → Contact) goes through the URL.
|
||||||
|
|
||||||
|
## Data flow
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph LR
|
||||||
|
Content["content/ homeContent, packages, testimonials, siteContent"] --> Route["routes/index.tsx"]
|
||||||
|
URL["URL search pakket"] --> Route
|
||||||
|
Route -->|"props"| Sections["Six home sections"]
|
||||||
|
Route -->|"preselected id"| Contact["ContactSection / ContactForm"]
|
||||||
|
Sections -->|"Link with pakket + #contact"| URL
|
||||||
|
Contact -->|"ContactPayload"| Adapter["submitContactForm"]
|
||||||
|
Adapter -.->|"later"| API["POST /api/contact"]
|
||||||
|
classDef data fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
|
classDef comp fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
|
classDef ext fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,stroke-dasharray:5 5,color:#000;
|
||||||
|
class Content,URL data;
|
||||||
|
class Route,Sections,Contact,Adapter comp;
|
||||||
|
class API ext;
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: static content and the URL's pakket parameter flow into the home route, which passes props to the sections and the preselected package to the contact form; price cards write the package back into the URL; the form sends its payload through the single adapter, which will call the API later.
|
||||||
|
|
||||||
|
## Communication patterns
|
||||||
|
- **Props down** from the route; no context or global store.
|
||||||
|
- **URL as the shared channel** between Prijzen and Contact.
|
||||||
|
- **Callback-free sections**: sections emit nothing upward.
|
||||||
|
- **Injectable submit** on ContactForm for tests; default is the real adapter.
|
||||||
|
|
||||||
|
## Coupling notes
|
||||||
|
- `ContactForm` depends on `ShootOption[]`, not on `PricingPackage`, so the `/contact` page can reuse it with the same options.
|
||||||
|
- `InstagramGrid` receives `profileUrl` from the route (derived from `siteContent.socials` via `visibleSocials`), so the Instagram URL has one source.
|
||||||
|
- `FramedImage` is the only new shared visual primitive; anything else reuses theme tokens, text styles and recipes.
|
||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
# Component Methods — homepage-sections
|
||||||
|
|
||||||
|
Signatures and data shapes. Detailed rules (validation messages, limits, carousel behaviour, spam thresholds) follow in Functional Design per unit.
|
||||||
|
|
||||||
|
## Content types (`content/types.ts`, additions)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// An image as the API will deliver it; src is a URL (bundled asset today)
|
||||||
|
interface ContentImage {
|
||||||
|
src: string;
|
||||||
|
alt: string;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PricingPackage {
|
||||||
|
id: string; // stable slug, e.g. 'newborn'; used in ?pakket= and as the shoot value
|
||||||
|
name: string; // 'Newborn'
|
||||||
|
price: number; // whole euros, e.g. 185
|
||||||
|
features: string[]; // '1-2 uur fotografie', ...
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Testimonial {
|
||||||
|
id: string;
|
||||||
|
shoot: string; // label, e.g. 'Newbornshoot'
|
||||||
|
quote: string;
|
||||||
|
author: string; // 'Demi & Kevin'
|
||||||
|
image: ContentImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface HomeContent {
|
||||||
|
intro: { title: string; lead: string; photos: ContentImage[] };
|
||||||
|
about: {
|
||||||
|
eyebrow: string;
|
||||||
|
title: string;
|
||||||
|
paragraphs: string[];
|
||||||
|
image: ContentImage;
|
||||||
|
link: { label: string; to: RoutePath };
|
||||||
|
};
|
||||||
|
pricing: { title: string; lead: string };
|
||||||
|
testimonials: { title: string };
|
||||||
|
contact: { title: string; lead: string };
|
||||||
|
instagram: { title: string; handle: string; photos: ContentImage[] };
|
||||||
|
}
|
||||||
|
|
||||||
|
// SiteContent gains:
|
||||||
|
interface SiteContent {
|
||||||
|
// ...existing fields
|
||||||
|
contactForm: { enabled: boolean };
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Content modules (design Q2 = A): `content/packages.ts` → `PricingPackage[]`, `content/testimonials.ts` → `Testimonial[]`, `content/homeContent.ts` → `HomeContent`.
|
||||||
|
|
||||||
|
## Contact types (`contact/types.ts`)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
interface ContactValues { // what the visitor typed
|
||||||
|
naam: string;
|
||||||
|
email: string;
|
||||||
|
shoot: string; // '' | a package id | 'overig'
|
||||||
|
bericht: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ContactField = keyof ContactValues;
|
||||||
|
type ContactErrors = Partial<Record<ContactField, string>>;
|
||||||
|
|
||||||
|
interface ContactPayload { // what goes to POST /api/contact
|
||||||
|
naam: string;
|
||||||
|
email: string;
|
||||||
|
shoot: string;
|
||||||
|
bericht: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ShootOption { value: string; label: string }
|
||||||
|
```
|
||||||
|
|
||||||
|
## Components (props)
|
||||||
|
|
||||||
|
| Component | Props |
|
||||||
|
|---|---|
|
||||||
|
| `HomeSection` | `{ labelledBy: string; id?: string; tone?: 'paper' \| 'alt'; width?: 'default' \| 'narrow'; spacing?: 'default' \| 'tight'; children: ReactNode }` |
|
||||||
|
| `SectionHeading` | `{ id: string; title: string; eyebrow?: string; lead?: string; align?: 'center' \| 'start' }` |
|
||||||
|
| `Reveal` | `{ children: ReactNode; delay?: number }` |
|
||||||
|
| `FramedImage` | `{ image: ContentImage; aspectRatio: string }` |
|
||||||
|
| `IntroGallery` | `{ content: HomeContent['intro'] }` |
|
||||||
|
| `AboutBlock` | `{ content: HomeContent['about'] }` |
|
||||||
|
| `Pricing` | `{ content: HomeContent['pricing']; packages: PricingPackage[] }` |
|
||||||
|
| `PriceCard` | `{ pkg: PricingPackage }` |
|
||||||
|
| `Testimonials` | `{ content: HomeContent['testimonials']; testimonials: Testimonial[] }` |
|
||||||
|
| `ContactSection` | `{ content: HomeContent['contact']; packages: PricingPackage[]; enabled: boolean; email: EmailAddress; preselected?: string }` |
|
||||||
|
| `ContactFormGate` | `{ enabled: boolean; email: EmailAddress; children: ReactNode }` |
|
||||||
|
| `ContactForm` | `{ idPrefix: string; options: ShootOption[]; initialShoot?: string; submit?: (payload: ContactPayload) => Promise<void> }` (`submit` defaults to `submitContactForm`; injectable for tests) |
|
||||||
|
| `InstagramGrid` | `{ content: HomeContent['instagram']; profileUrl: string }` |
|
||||||
|
|
||||||
|
## Hooks
|
||||||
|
|
||||||
|
- `useReveal<T extends Element>(): { ref: RefObject<T>; visible: boolean }` — `visible` starts `true` when reduced motion is on or IntersectionObserver is missing; otherwise flips to `true` once and stops observing.
|
||||||
|
|
||||||
|
## Pure helpers (`lib/`, 100% coverage, property-based tests)
|
||||||
|
|
||||||
|
| Function | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `formatPrice(euros: number): string` | `185` → `'€ 185'` (nl-NL, no decimals) |
|
||||||
|
| `shootOptions(packages: PricingPackage[]): ShootOption[]` | package names in order + `{ value: 'overig', label: 'Overig' }` |
|
||||||
|
| `packageFromSearch(value: unknown, packages: PricingPackage[]): string \| undefined` | returns the id only if it matches a package |
|
||||||
|
| `validateContact(values: ContactValues, options: ShootOption[]): ContactErrors` | required fields, e-mail format, max lengths, shoot must be a known option |
|
||||||
|
| `toContactPayload(values: ContactValues): ContactPayload` | trims fields |
|
||||||
|
| `isLikelySpam(input: { honeypot: string; shownAt: number; now: number }): boolean` | honeypot filled or submitted too fast |
|
||||||
|
| `slideLabel(index: number, count: number): string` | `'Review 2 van 3'` for the live region and slide `aria-label` |
|
||||||
|
|
||||||
|
## Services / adapters
|
||||||
|
|
||||||
|
- `submitContactForm(payload: ContactPayload): Promise<void>` (`contact/submitContactForm.ts`) — today rejects with a generic error (no back-end); later `POST /api/contact`.
|
||||||
|
- Route search: `validateSearch: (search) => ({ pakket: typeof search.pakket === 'string' ? search.pakket : undefined })` on `/`; the page then resolves it with `packageFromSearch`.
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# Components — homepage-sections
|
||||||
|
|
||||||
|
Folder structure per design Q1 = B: the six homepage blocks live under `components/home/`; anything reusable elsewhere stays directly under `components/`.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph TD
|
||||||
|
Route["routes/index.tsx"] --> Hero["Hero (exists)"]
|
||||||
|
Route --> Intro["home/IntroGallery"]
|
||||||
|
Route --> About["home/AboutBlock"]
|
||||||
|
Route --> Pricing["home/Pricing"]
|
||||||
|
Route --> Testimonials["home/Testimonials"]
|
||||||
|
Route --> ContactSection["home/ContactSection"]
|
||||||
|
Route --> Instagram["home/InstagramGrid"]
|
||||||
|
Pricing --> PriceCard["home/Pricing/PriceCard"]
|
||||||
|
ContactSection --> Gate["ContactForm/ContactFormGate"]
|
||||||
|
Gate --> Form["ContactForm/ContactForm"]
|
||||||
|
About --> Framed["FramedImage"]
|
||||||
|
Testimonials --> Framed
|
||||||
|
Intro --> Shared["HomeSection + SectionHeading + Reveal"]
|
||||||
|
About --> Shared
|
||||||
|
Pricing --> Shared
|
||||||
|
Testimonials --> Shared
|
||||||
|
ContactSection --> Shared
|
||||||
|
Instagram --> Shared
|
||||||
|
classDef route fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
|
classDef home fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
|
classDef shared fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
|
classDef existing fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
|
||||||
|
class Route route;
|
||||||
|
class Intro,About,Pricing,PriceCard,Testimonials,ContactSection,Instagram home;
|
||||||
|
class Gate,Form,Framed,Shared shared;
|
||||||
|
class Hero existing;
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: the home route renders the existing Hero and six new home sections; Pricing uses PriceCard, ContactSection wraps the reusable ContactForm in a ContactFormGate, AboutBlock and Testimonials share FramedImage, and every section uses HomeSection, SectionHeading and Reveal.
|
||||||
|
|
||||||
|
## Shared components (`components/`)
|
||||||
|
|
||||||
|
### HomeSection
|
||||||
|
- **Purpose**: the design's `.section` wrapper for a content block
|
||||||
|
- **Responsibilities**: vertical padding (`section-y`), optional `paper.alt` background (`tone`), optional tight padding, `Container` width (default or narrow), `aria-labelledby` pointing at its heading, optional `id` (anchor)
|
||||||
|
- **Interface**: `<HomeSection labelledBy tone? width? spacing? id?>children</HomeSection>`
|
||||||
|
|
||||||
|
### SectionHeading
|
||||||
|
- **Purpose**: the design's `.section__head`
|
||||||
|
- **Responsibilities**: optional eyebrow (`eyebrow` text style, `accent.deep`), the h2 (with `id` for `aria-labelledby`), optional lead (`ink.soft`); centred or start-aligned
|
||||||
|
- **Interface**: `<SectionHeading id title eyebrow? lead? align?>`
|
||||||
|
|
||||||
|
### Reveal
|
||||||
|
- **Purpose**: the design's `.reveal` fade-in on scroll
|
||||||
|
- **Responsibilities**: wraps children; hidden-then-visible transition once the element enters the viewport; immediately visible under reduced motion, without IntersectionObserver, or before JavaScript runs (no content hidden by default in markup)
|
||||||
|
- **Interface**: `<Reveal delay?>children</Reveal>`; logic in `hooks/useReveal.ts`
|
||||||
|
|
||||||
|
### FramedImage
|
||||||
|
- **Purpose**: the photo with the sand offset block behind it (`.about__media`), shared by AboutBlock and Testimonials (design Q6 = A)
|
||||||
|
- **Responsibilities**: image with fixed aspect ratio, `loading="lazy"`, explicit width/height; decorative offset block hidden below `sm`
|
||||||
|
- **Interface**: `<FramedImage image aspectRatio>`
|
||||||
|
|
||||||
|
### ContactForm (`components/ContactForm/`)
|
||||||
|
- **ContactForm** — the form itself: fields Naam, E-mail, shoot select, Bericht; honeypot; per-field errors via Chakra `Field`; submit button; status message. Owns its form state. Reusable on `/contact` later.
|
||||||
|
- **ContactFormGate** — wraps ContactForm; when `enabled` is false the form is dimmed and `inert` and the coming-soon notice with the mail button is shown over it; when true the form is shown as is.
|
||||||
|
- **submitContactForm** (`src/contact/submitContactForm.ts`) — the single submission adapter (see services.md).
|
||||||
|
|
||||||
|
## Homepage sections (`components/home/`)
|
||||||
|
|
||||||
|
| Component | Unit | Purpose | Key responsibilities |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `IntroGallery` | 1 Lifestyle fotografie | Heading + four-photo gallery | Staggered 4-column grid (2 on tablet, 1 on mobile), hover zoom, alt texts |
|
||||||
|
| `AboutBlock` | 2 Over mij | Photo + intro text | FramedImage, eyebrow, h2, paragraphs, "Lees mijn verhaal" link to `/over-mij`, `paper.alt` |
|
||||||
|
| `Pricing` + `PriceCard` | 3 Prijzen | Package cards | Decorations, card grid (1 column below `lg`), price formatting, "Boek je shoot" link with `pakket` search param + `#contact` |
|
||||||
|
| `Testimonials` | 4 Lieve woorden | One review at a time | Chakra `Carousel` (no autoplay), FramedImage, quotation mark, shoot label, `Blockquote`, author; prev/next + indicators; live-region status; no controls for a single review; `paper.alt` |
|
||||||
|
| `ContactSection` | 5 Contact | Contact block | Heading + lead, `id="contact"`, ContactFormGate with ContactForm, passes the preselected package and the e-mail address |
|
||||||
|
| `InstagramGrid` | 6 Instagram | Heading + photo grid | Handle link, six tiles (6/3/2 columns) linking to the profile, external link attributes; not rendered without a valid Instagram profile URL |
|
||||||
|
|
||||||
|
## Modified existing components / modules
|
||||||
|
|
||||||
|
| File | Change |
|
||||||
|
|---|---|
|
||||||
|
| `routes/index.tsx` | Renders the six sections after the Hero; `validateSearch` for `pakket` |
|
||||||
|
| `content/types.ts` | New content interfaces (see component-methods.md) |
|
||||||
|
| `content/siteContent.ts` | `contactForm: { enabled: false }` (design Q5 = A) |
|
||||||
|
| `recipes/linkButton.ts` | Usable on a `<button>` (submit) — no new variant |
|
||||||
|
| `theme.ts` | Possibly a `sectionY` spacing token and field styling (Functional Design / code plan decide) |
|
||||||
|
| `test/arbitraries.ts` | Generators for packages, contact values, testimonials |
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Services — homepage-sections
|
||||||
|
|
||||||
|
The site has no back-end; "services" here are the front-end mechanisms that provide content, connect sections and will later talk to the API.
|
||||||
|
|
||||||
|
## 1. Content provisioning
|
||||||
|
- **Responsibility**: deliver section content to the components.
|
||||||
|
- **Today**: static modules `content/homeContent.ts`, `content/packages.ts`, `content/testimonials.ts` and the existing `content/siteContent.ts`, imported by `routes/index.tsx` and passed down as props. Images are imported from `web/src/assets` (Vite-hashed URLs, typed as `ContentImage`).
|
||||||
|
- **Later**: the same shapes come from the .NET API (`/api/pages`, `/api/packages`, testimonials and the Instagram feed server-side) through a route loader; components do not change.
|
||||||
|
- **Rule**: components never import content modules directly — only the route does. Keeps them testable with generated content.
|
||||||
|
|
||||||
|
## 2. Package handover (Prijzen → Contact)
|
||||||
|
- **Responsibility**: "Boek je shoot" brings the visitor to the form with the package chosen (design Q4 = A).
|
||||||
|
- **Flow**: `PriceCard` renders a router `Link` to `/` with `search={{ pakket: pkg.id }}` and `hash="contact"`. The `/` route's `validateSearch` keeps `pakket` as an optional string; the page resolves it with `packageFromSearch` against the package list (unknown values are ignored) and passes it to `ContactSection` → `ContactForm` as `initialShoot`. The router scrolls to `#contact`.
|
||||||
|
- **Properties**: survives a reload, shareable, no shared mutable state between sections.
|
||||||
|
|
||||||
|
## 3. Contact submission adapter
|
||||||
|
- **Responsibility**: the only place that sends a contact request.
|
||||||
|
- **Today**: `submitContactForm` rejects with a generic error; with `contactForm.enabled = false` it is never reached because the form is inert.
|
||||||
|
- **Later (API feature)**: `POST /api/contact` with `ContactPayload` plus the Friendly Captcha token; server-side validation, spam checks and rate limiting; CSP additions for Friendly Captcha.
|
||||||
|
- **Switch**: `siteContent.contactForm.enabled` (design Q5 = A) — can be turned on and off again; later deliverable by the CMS.
|
||||||
|
|
||||||
|
## 4. Spam filtering (browser side)
|
||||||
|
- **Responsibility**: drop obvious bot submissions before they reach the adapter.
|
||||||
|
- **Flow**: on submit, after validation, `isLikelySpam({ honeypot, shownAt, now })`; spam gets the normal success message and nothing is sent.
|
||||||
|
|
||||||
|
## 5. Scroll reveal
|
||||||
|
- **Responsibility**: fade sections in as they enter the viewport (`useReveal` + `Reveal`), disabled under reduced motion.
|
||||||
|
|
||||||
|
## Orchestration
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
box rgba(246,224,94,0.4) Visitor
|
||||||
|
participant V as Visitor
|
||||||
|
end
|
||||||
|
box rgba(99,179,237,0.4) Homepage
|
||||||
|
participant P as PriceCard
|
||||||
|
participant R as Route /
|
||||||
|
participant C as ContactForm
|
||||||
|
participant A as submitContactForm
|
||||||
|
end
|
||||||
|
V->>P: Click Boek je shoot (Newborn)
|
||||||
|
P->>R: Navigate to /?pakket=newborn#contact
|
||||||
|
R->>R: packageFromSearch checks the id
|
||||||
|
R->>C: initialShoot newborn, scroll to contact
|
||||||
|
V->>C: Fill in and submit
|
||||||
|
C->>C: validateContact, isLikelySpam
|
||||||
|
C->>A: ContactPayload (only when enabled and not spam)
|
||||||
|
A-->>C: Resolved or generic error
|
||||||
|
C-->>V: Status message
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: clicking "Boek je shoot" navigates to the homepage with the package in the URL; the route checks it and preselects it in the form; on submit the form validates and filters spam before calling the single submission adapter and showing a status message.
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
# Unit Dependencies — homepage-sections
|
||||||
|
|
||||||
|
## Dependency matrix
|
||||||
|
|
||||||
|
Rows depend on columns (✓ = needs something that unit introduces).
|
||||||
|
|
||||||
|
| Unit | 1 Lifestyle | 2 Over mij | 3 Prijzen | 4 Lieve woorden | 5 Contact | 6 Instagram |
|
||||||
|
|---|---|---|---|---|---|---|
|
||||||
|
| 1 Lifestyle fotografie | — | | | | | |
|
||||||
|
| 2 Over mij | ✓ HomeSection, SectionHeading, Reveal, ContentImage | — | | | | |
|
||||||
|
| 3 Prijzen | ✓ | | — | | | |
|
||||||
|
| 4 Lieve woorden | ✓ | ✓ FramedImage | | — | | |
|
||||||
|
| 5 Contact | ✓ | | ✓ packages, packageFromSearch, `pakket` search | | — | |
|
||||||
|
| 6 Instagram | ✓ | | | | | — |
|
||||||
|
|
||||||
|
## Order
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph LR
|
||||||
|
U1["1 Lifestyle fotografie (shared blocks)"] --> U2["2 Over mij (FramedImage)"]
|
||||||
|
U2 --> U3["3 Prijzen (packages)"]
|
||||||
|
U3 --> U4["4 Lieve woorden"]
|
||||||
|
U4 --> U5["5 Contact"]
|
||||||
|
U5 --> U6["6 Instagram"]
|
||||||
|
U6 --> BT["Build and Test + one PR"]
|
||||||
|
U1 -.-> U3
|
||||||
|
U1 -.-> U6
|
||||||
|
U2 -.-> U4
|
||||||
|
U3 -.-> U5
|
||||||
|
classDef unit fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
|
classDef shared fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
|
classDef final fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
|
class U2,U4,U5,U6 unit;
|
||||||
|
class U1,U3 shared;
|
||||||
|
class BT final;
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: the units run in page order 1 to 6, then Build and Test; dashed arrows show the real dependencies — unit 1's shared blocks are used by all, unit 2's FramedImage by unit 4, and unit 3's packages by unit 5.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- The build order equals the page order, so the homepage is always correct up to the last finished unit.
|
||||||
|
- Units 4 and 6 could be swapped without impact; unit 5 must come after unit 3.
|
||||||
|
- Integration points checked at Build and Test: section order in `routes/index.tsx`, background alternation, Prijzen → Contact preselection, full-page Lighthouse.
|
||||||
|
- One branch, commits per unit, one PR at the end; no unit is merged to `master` on its own.
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
# Requirement-to-Unit Map — homepage-sections
|
||||||
|
|
||||||
|
User Stories were skipped (single visitor persona), so this maps every requirement from [requirements.md](../requirements/requirements.md) to the unit(s) that deliver it.
|
||||||
|
|
||||||
|
| Requirement | Unit(s) | Notes |
|
||||||
|
|---|---|---|
|
||||||
|
| FR-HP-01 Static design and LAYOUT.md | — | Done in Application Design |
|
||||||
|
| FR-HP-02 Lifestyle fotografie | 1 | |
|
||||||
|
| FR-HP-03 Over mij | 2 | |
|
||||||
|
| FR-HP-04 Prijzen | 3 (cards, link) · 5 (preselection in the form) | |
|
||||||
|
| FR-HP-05 Lieve woorden | 4 | |
|
||||||
|
| FR-HP-06 Contact form | 5 | Shoot options from unit 3's packages |
|
||||||
|
| FR-HP-07 Coming-soon overlay | 5 | |
|
||||||
|
| FR-HP-08 Anti-spam (browser) | 5 | |
|
||||||
|
| FR-HP-09 Robot check (slot only) | 5 | Integration in the future API feature |
|
||||||
|
| FR-HP-10 Instagram | 6 | |
|
||||||
|
| FR-HP-11 Scroll reveal | 1 (introduced) · 2–6 (used) | |
|
||||||
|
| FR-HP-12 Content and images | 1–6 | Each unit adds its own content and images |
|
||||||
|
| NFR-HP-01 Accessibility | 1–6 · Build and Test (Lighthouse full page) | Carousel (4) and form/gate (5) carry the most rules |
|
||||||
|
| NFR-HP-02 Styling and consistency | 1–6 | Shared blocks in 1 and 2 |
|
||||||
|
| NFR-HP-03 Testing | 1–6 · Build and Test | PBT for helpers in 3, 4, 5 |
|
||||||
|
| NFR-HP-04 Security | 5 (form, adapter, spam) · 6 (external links) · all (no third parties) | |
|
||||||
|
| NFR-HP-05 Performance | 1–6 (per-unit `pnpm check` incl. Lighthouse) · Build and Test | |
|
||||||
|
| NFR-HP-06 API-shaped content | 1–6 | Payload type in 5 |
|
||||||
|
|
||||||
|
All requirements are assigned; none is left without a unit or stage.
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Units of Work — homepage-sections
|
||||||
|
|
||||||
|
Six units, one per homepage block (user request), built in order on one branch, `feature/homepage-sections`, and delivered in **one pull request** at the end (units Q1 = A). After each unit's Code Generation the full **`pnpm check`** runs, Lighthouse included (units Q2 = A). Each unit adds its section to `routes/index.tsx`, so the homepage is complete up to that unit and never broken in between.
|
||||||
|
|
||||||
|
All units are modules inside the single deployable `web/` SPA (no separate services).
|
||||||
|
|
||||||
|
## Common conventions (apply to every unit)
|
||||||
|
- **Images**: downloaded from andreaslop.nl (source URLs in `design/andreaslop-static/assets/img/manifest.txt`), resized once to at most ±1600 px on the long side and compressed, stored in `web/src/assets/home/`, typed as `ContentImage` with real width/height, rendered with `loading="lazy"`. The resize tool is picked in unit 1's code plan; it must not become a project dependency.
|
||||||
|
- **Tests**: example-based component test with axe per section; property-based tests for every new `lib/` helper (PBT extension, full); shared generators in `src/test/arbitraries.ts`.
|
||||||
|
- **Code comments in English**; visitor-facing text in Dutch (NFR-HP-02).
|
||||||
|
- **Design reference**: `design/andreaslop-static/index.html` + `style.css` (updated in Application Design).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Unit 1 — Lifestyle fotografie
|
||||||
|
- **Section**: `components/home/IntroGallery` — heading "Lifestyle fotografie", lead, four photos in the staggered grid (4 / 2 / 1 columns), hover zoom.
|
||||||
|
- **Shared pieces introduced**: `components/HomeSection`, `components/SectionHeading`, `components/Reveal` + `hooks/useReveal.ts`.
|
||||||
|
- **Content**: `ContentImage` and `HomeContent` (intro part, extended by later units) in `content/types.ts`; `content/homeContent.ts`.
|
||||||
|
- **Images**: intro-1 … intro-4 (live photos).
|
||||||
|
- **Functional Design**: skipped (presentational).
|
||||||
|
- **Done when**: section renders below the hero with correct heading structure; reveal works and is off under reduced motion; `pnpm check` green.
|
||||||
|
|
||||||
|
## Unit 2 — Over mij
|
||||||
|
- **Section**: `components/home/AboutBlock` — framed photo, eyebrow "Over mij", h2, three paragraphs, "Lees mijn verhaal" → `/over-mij`, on `paper.alt`.
|
||||||
|
- **Shared pieces introduced**: `components/FramedImage` (sand offset block).
|
||||||
|
- **Content**: `HomeContent.about`.
|
||||||
|
- **Images**: andrea-home (live).
|
||||||
|
- **Functional Design**: skipped (presentational).
|
||||||
|
- **Done when**: section renders after Lifestyle fotografie; link works; offset block hidden on small screens; `pnpm check` green.
|
||||||
|
|
||||||
|
## Unit 3 — Prijzen
|
||||||
|
- **Section**: `components/home/Pricing` + `PriceCard` — heading "Prijzen", lead "Pakketten", decorations, three cards, "Boek je shoot" → `/?pakket=<id>#contact`.
|
||||||
|
- **Logic**: `lib/formatPrice`, `lib/packageFromSearch`; `validateSearch` for `pakket` on the `/` route.
|
||||||
|
- **Content**: `PricingPackage` type, `content/packages.ts` (Zwangerschap, Newborn, Gezin), `HomeContent.pricing`.
|
||||||
|
- **Images**: deco-1.png, deco-2.png (design decorations).
|
||||||
|
- **Functional Design**: **executed** — package/price rules, search param handling, properties for PBT-01.
|
||||||
|
- **Done when**: cards match the live content; the link carries the package; unknown `pakket` values are ignored; `pnpm check` green. (The preselection itself becomes visible in unit 5.)
|
||||||
|
|
||||||
|
## Unit 4 — Lieve woorden
|
||||||
|
- **Section**: `components/home/Testimonials` — heading "Lieve woorden", Chakra `Carousel` without autoplay, FramedImage, quotation mark, shoot label, `Blockquote`, author; prev/next and indicators; live-region status; no controls for one review; on `paper.alt`.
|
||||||
|
- **Logic**: `lib/slideLabel`.
|
||||||
|
- **Content**: `Testimonial` type, `content/testimonials.ts` (Trouwshoot – Majella & Mark, Newbornshoot – Demi & Kevin), `HomeContent.testimonials`.
|
||||||
|
- **Images**: the two live review photos.
|
||||||
|
- **Functional Design**: **executed** — carousel behaviour, announcements, edge cases (0 / 1 / many reviews), properties for PBT-01.
|
||||||
|
- **Done when**: keyboard, swipe and indicator navigation work and are announced; axe clean; `pnpm check` green.
|
||||||
|
|
||||||
|
## Unit 5 — Contact
|
||||||
|
- **Section**: `components/home/ContactSection` (`id="contact"`, heading, lead) with `components/ContactForm/ContactFormGate` around `components/ContactForm/ContactForm`.
|
||||||
|
- **Logic**: `lib/shootOptions`, `lib/validateContact`, `lib/toContactPayload`, `lib/isLikelySpam`; `contact/types.ts`, `contact/submitContactForm.ts` (adapter, rejects generically today).
|
||||||
|
- **Content**: `siteContent.contactForm = { enabled: false }`, `HomeContent.contact`.
|
||||||
|
- **Theme**: field styling (square inputs, select chevron, error colour with sufficient contrast); `linkButton` recipe on a `<button>`.
|
||||||
|
- **Functional Design**: **executed** — validation rules and messages, limits, spam rules, gate behaviour (on/off, invalid e-mail), submit states, preselection from unit 3, properties for PBT-01.
|
||||||
|
- **Done when**: gate shows the coming-soon notice with mail button and the form is inert; with `enabled: true` (in tests) validation, spam filter and submit states work; preselection from "Boek je shoot" works; `pnpm check` green.
|
||||||
|
|
||||||
|
## Unit 6 — Instagram
|
||||||
|
- **Section**: `components/home/InstagramGrid` — heading "Instagram", handle link, six square tiles (6 / 3 / 2 columns) linking to the profile in a new tab.
|
||||||
|
- **Content**: `HomeContent.instagram` (title, handle, six photos); profile URL derived from `siteContent.socials` in the route.
|
||||||
|
- **Images**: six existing site photos, reusing already-bundled assets where possible (Andrea can swap them).
|
||||||
|
- **Functional Design**: skipped (presentational).
|
||||||
|
- **Done when**: section renders last; hidden without a valid Instagram URL; external link attributes and screen reader hint present; `pnpm check` green.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## After the units
|
||||||
|
**Build and Test** for the whole homepage (section order, Prijzen → Contact across sections, Lighthouse on the complete page), then one PR from `feature/homepage-sections` to `master`. The Operations decision is asked again there.
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
# Application Design Plan — homepage-sections
|
||||||
|
|
||||||
|
Depth: **standard**. One front-end package; the design pins down component boundaries, props, content modules, the Prijzen → Contact interaction and what is reused from Chakra and the theme (NFR-HP-02). Detailed behaviour rules (validation, carousel, anti-spam) follow in Functional Design per unit.
|
||||||
|
|
||||||
|
## Plan
|
||||||
|
|
||||||
|
- [x] 1. Answer the design questions below
|
||||||
|
- [x] 2. Analyze answers for ambiguities (follow-up questions if needed)
|
||||||
|
- [x] 3. Static design reference (FR-HP-01)
|
||||||
|
- [x] 3a. Download the live photos (gallery, Andrea, reviews) into `design/andreaslop-static/assets/img` and add them to `manifest.txt`
|
||||||
|
- [x] 3b. `index.html`: live content for Lifestyle fotografie (photos), Prijzen (packages), Contact (form fields); new Lieve woorden section between Prijzen and Contact
|
||||||
|
- [x] 3c. `style.css`: styles for Lieve woorden (and the select field); `main.js`: prev/next/dots for the reviews
|
||||||
|
- [x] 3d. `LAYOUT.md`: Home diagram with seven blocks, per `.ai/layout-conventions.md`
|
||||||
|
- [x] 4. Generate `components.md` — component definitions and responsibilities
|
||||||
|
- [x] 5. Generate `component-methods.md` — props/signatures of components, hooks and helpers
|
||||||
|
- [x] 6. Generate `services.md` — content provisioning, Prijzen → Contact handover, contact submission adapter
|
||||||
|
- [x] 7. Generate `component-dependency.md` — dependency matrix, data flow
|
||||||
|
- [x] 8. Generate `application-design.md` — consolidated design
|
||||||
|
- [x] 9. Validate completeness and consistency (FR-HP-01…12, NFR-HP-01…06, Security/PBT applicability)
|
||||||
|
|
||||||
|
## Already decided (no question needed)
|
||||||
|
|
||||||
|
These follow from the requirements and the reuse principle (NFR-HP-02):
|
||||||
|
|
||||||
|
- **Shared section heading**: one `SectionHeading` component (optional eyebrow, the h2, optional lead; centred or left), used by all six sections — the design's `.section__head`.
|
||||||
|
- **Section wrapper**: one `HomeSection` component for the padding (`--section-y`), the optional `paper.alt` background and the accessible name (`aria-labelledby` on its heading).
|
||||||
|
- **Scroll reveal**: a `Reveal` wrapper component on top of a `useReveal` hook (IntersectionObserver), no-op under reduced motion.
|
||||||
|
- **Form fields**: Chakra's `Field` (label, error text, `aria-invalid`/`aria-describedby` wiring), `Input`, `Textarea` and `NativeSelect`, styled to the design's square fields via a recipe or theme slot overrides.
|
||||||
|
- **Buttons**: the existing `LinkButton` (`linkButton` recipe) for "Boek je shoot"; a `button` variant of the same recipe for the submit button.
|
||||||
|
- **Form state**: plain React state plus pure helpers in `lib/` — no form library (no new dependencies).
|
||||||
|
- **Contact payload**: `{ naam, email, shoot, bericht }`; `submitContactForm(payload): Promise<void>` in its own module, the single place the API call goes later.
|
||||||
|
- **Images**: imported from `web/src/assets` (Vite hashes them), with explicit width/height and `loading="lazy"`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Questions
|
||||||
|
|
||||||
|
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. Waar ik een voorkeur heb staat **(aanbevolen)**.
|
||||||
|
|
||||||
|
## Vraag 1: Mappenstructuur van de componenten
|
||||||
|
|
||||||
|
- A) Plat, net als nu: elk component een eigen map onder `components/`, met Engelse namen uit de README van het ontwerp: `IntroGallery/`, `AboutBlock/`, `Pricing/`, `Testimonials/`, `ContactSection/` + `ContactForm/`, `InstagramGrid/`, en de gedeelde `HomeSection/`, `SectionHeading/`, `Reveal/`.
|
||||||
|
- B) Gegroepeerd: de zes blokken onder `components/home/` (bijv. `components/home/Pricing/`), en wat elders terugkomt (ContactForm, SectionHeading, HomeSection, Reveal) gewoon onder `components/`. Zo zie je in één oogopslag wat bij de homepage hoort, en blijft wat herbruikbaar is apart. (aanbevolen)
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: B
|
||||||
|
|
||||||
|
## Vraag 2: Contentmodules
|
||||||
|
|
||||||
|
Hoe verdelen we de nieuwe vaste data over `content/`?
|
||||||
|
|
||||||
|
- A) Per onderwerp: `packages.ts` (pakketten; straks ook nodig op Soorten fotoshoots), `testimonials.ts` (reviews; kunnen later ook op andere pagina's) en `homeContent.ts` (teksten van de blokken, galerij, Over mij-foto, Instagram). Dat sluit aan op de API-endpoints uit het ontwerp (`/api/packages`, `/api/pages`). (aanbevolen)
|
||||||
|
- B) Alles in één `homeContent.ts`
|
||||||
|
- C) Eén bestand per blok (zes bestanden)
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 3: De slider van Lieve woorden
|
||||||
|
|
||||||
|
- A) **Chakra's ingebouwde `Carousel`** (op Ark UI). Toegankelijkheid zit erin: rol en labels per slide, puntjes, toetsenbord en swipe. Wij voegen alleen de stijl en een melding voor schermlezers toe. Minder eigen code om te onderhouden. (aanbevolen)
|
||||||
|
- B) Zelf bouwen met een kleine eigen hook, naar het voorbeeld van `useHeroSlider` (zonder autoplay)
|
||||||
|
- C) Een gedeelde `useCarousel`-hook uit `useHeroSlider` halen, die zowel de hero als de reviews gebruikt. Dat refactort de hero, die net is opgeleverd.
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 4: Hoe geeft "Boek je shoot" het pakket door aan het formulier?
|
||||||
|
|
||||||
|
- A) Via de URL: de knop linkt naar `/?pakket=newborn#contact`. De route controleert de waarde (alleen bestaande pakketten), het formulier leest hem en de browser scrollt naar `#contact`. Werkt ook na een refresh, en de link is te delen ("boek een newbornshoot"). (aanbevolen)
|
||||||
|
- B) Via gedeelde React-state op de homepage (de route geeft een callback aan Prijzen en een waarde aan Contact). Geen zichtbare URL-wijziging; gaat verloren bij een refresh.
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 5: Waar staat de instelling `contactFormEnabled`?
|
||||||
|
|
||||||
|
- A) In de content (`siteContent.contactForm.enabled`), naast het e-mailadres. Hoort bij de vorm die de API straks levert, zodat het formulier dan ook vanuit het CMS aan of uit kan. (aanbevolen)
|
||||||
|
- B) Als constante in de code (bijv. `src/features.ts`), los van de content
|
||||||
|
- C) Per omgeving via de hostname, net als monitoring: dan kan het formulier eerst alleen op test aan
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 6: Foto in Lieve woorden
|
||||||
|
|
||||||
|
Hoe ziet de foto bij een review eruit? (De tekst krijgt in alle gevallen het grote aanhalingsteken in heidegroen.)
|
||||||
|
|
||||||
|
- A) Zoals bij Over mij: een rechthoekige foto met de verschoven zandkleurige rand erachter (`.about__media`). Consistent met de rest van de site. (aanbevolen)
|
||||||
|
- B) Een boogvorm (afgeronde bovenkant), een veelgebruikte, zachte stijl bij fotografen. Nieuw element in het ontwerp.
|
||||||
|
- C) Een kleine ronde foto boven de tekst, de tekst zelf centraal
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
# Execution Plan — Homepage Sections
|
||||||
|
|
||||||
|
## Detailed Analysis Summary
|
||||||
|
|
||||||
|
### Transformation Scope
|
||||||
|
- **Transformation Type**: Single component (application change inside `web/`), plus the static design reference and LAYOUT.md
|
||||||
|
- **Primary Changes**: six new homepage section components, a reusable contact form, shared section building blocks (section heading, scroll reveal), new content types and static content, new images
|
||||||
|
- **Related Components**: `routes/index.tsx`, `content/types.ts`, `content/*`, `lib/*`, `test/arbitraries.ts`, `design/andreaslop-static/index.html` + `style.css`, `LAYOUT.md`
|
||||||
|
|
||||||
|
### Change Impact Assessment
|
||||||
|
- **User-facing changes**: Yes — the homepage gains six sections below the hero
|
||||||
|
- **Structural changes**: No — the shell, routing and hosting stay the same
|
||||||
|
- **Data model changes**: Yes (front-end only) — new content interfaces (`PricingPackage`, `Testimonial`, `GalleryPhoto`, `InstagramContent`, section texts) and the contact payload shape
|
||||||
|
- **API changes**: No live API; the contact payload is designed for the future `POST /api/contact`
|
||||||
|
- **NFR impact**: Yes, contained — accessibility (carousel, form, overlay), performance (lazy images within the Lighthouse budget), security (no new third parties, CSP unchanged)
|
||||||
|
|
||||||
|
### Component Relationships
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph LR
|
||||||
|
Home["routes/index.tsx"] --> Sections["New section components (6)"]
|
||||||
|
Sections --> Shared["Shared: SectionHeading, useReveal, LinkButton"]
|
||||||
|
Sections --> Content["content/ (types + static data)"]
|
||||||
|
Prices["Prijzen"] -->|"package list + preselect"| Contact["Contact form"]
|
||||||
|
Contact --> Lib["lib/ (validation, honeypot, time check)"]
|
||||||
|
Contact --> Site["siteContent.email"]
|
||||||
|
Design["design/andreaslop-static + LAYOUT.md"] -.->|"reference"| Sections
|
||||||
|
classDef route fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||||
|
classDef comp fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||||
|
classDef data fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||||
|
classDef ref fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,stroke-dasharray:5 5,color:#000;
|
||||||
|
class Home route;
|
||||||
|
class Sections,Shared,Prices,Contact comp;
|
||||||
|
class Content,Lib,Site data;
|
||||||
|
class Design ref;
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: the home route renders six new sections that use shared building blocks and content data; Prijzen feeds the package list and preselection into the contact form, which uses pure helpers in lib/ and the site e-mail; the static design is the reference.
|
||||||
|
|
||||||
|
| Component | Change Type | Priority |
|
||||||
|
|---|---|---|
|
||||||
|
| `routes/index.tsx` | Minor (adds sections) | Critical |
|
||||||
|
| New section components | Major (new) | Critical |
|
||||||
|
| `content/types.ts`, new content modules | Minor (additive) | Critical |
|
||||||
|
| `lib/` new helpers | Minor (additive) | Important |
|
||||||
|
| `design/andreaslop-static`, `LAYOUT.md` | Minor | Important (gate for React work) |
|
||||||
|
| `config/securityHeaders.ts` | None (unchanged) | — |
|
||||||
|
|
||||||
|
### Risk Assessment
|
||||||
|
- **Risk Level**: Low — additive changes on one page, no infrastructure or dependency changes
|
||||||
|
- **Rollback Complexity**: Easy — revert the merge
|
||||||
|
- **Testing Complexity**: Moderate — carousel and form behaviour, overlay/inert, property-based tests for helpers, Lighthouse budget
|
||||||
|
|
||||||
|
## Workflow Visualization
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
Start(["User Request"])
|
||||||
|
|
||||||
|
subgraph INCEPTION["🔵 INCEPTION PHASE"]
|
||||||
|
WD["Workspace Detection<br/><b>COMPLETED</b>"]
|
||||||
|
RE["Reverse Engineering<br/><b>COMPLETED</b>"]
|
||||||
|
RA["Requirements Analysis<br/><b>COMPLETED</b>"]
|
||||||
|
US["User Stories<br/><b>SKIP</b>"]
|
||||||
|
WP["Workflow Planning<br/><b>IN PROGRESS</b>"]
|
||||||
|
AD["Application Design<br/>+ static design update<br/><b>EXECUTE</b>"]
|
||||||
|
UG["Units Generation<br/><b>EXECUTE</b>"]
|
||||||
|
end
|
||||||
|
|
||||||
|
subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE (per unit)"]
|
||||||
|
FD["Functional Design<br/><b>EXECUTE for Prijzen, Lieve woorden, Contact</b>"]
|
||||||
|
NFRA["NFR Requirements<br/><b>SKIP</b>"]
|
||||||
|
NFRD["NFR Design<br/><b>SKIP</b>"]
|
||||||
|
ID["Infrastructure Design<br/><b>SKIP</b>"]
|
||||||
|
CG["Code Generation<br/>(Planning + Generation)<br/><b>EXECUTE</b>"]
|
||||||
|
BT["Build and Test<br/><b>EXECUTE</b>"]
|
||||||
|
end
|
||||||
|
|
||||||
|
Start --> WD
|
||||||
|
WD --> RE
|
||||||
|
RE --> RA
|
||||||
|
RA -.-> US
|
||||||
|
RA --> WP
|
||||||
|
WP --> AD
|
||||||
|
AD --> UG
|
||||||
|
UG --> FD
|
||||||
|
FD --> CG
|
||||||
|
UG --> CG
|
||||||
|
CG -.->|"next unit"| FD
|
||||||
|
CG --> BT
|
||||||
|
BT --> End(["Complete (Operations decided at Build and Test)"])
|
||||||
|
|
||||||
|
style WD fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||||
|
style RE fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||||
|
style RA fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||||
|
style WP fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||||
|
style CG fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||||
|
style BT fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||||
|
style US fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style NFRA fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style NFRD fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style ID fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style AD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style UG fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style FD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
||||||
|
style INCEPTION fill:#BBDEFB,stroke:#1565C0,stroke-width:3px,color:#000
|
||||||
|
style CONSTRUCTION fill:#C8E6C9,stroke:#2E7D32,stroke-width:3px,color:#000
|
||||||
|
style Start fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
||||||
|
style End fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
||||||
|
linkStyle default stroke:#333,stroke-width:2px
|
||||||
|
```
|
||||||
|
|
||||||
|
Text alternative: Inception runs Application Design (including the static design update) and Units Generation, skipping User Stories; Construction loops per unit through Functional Design (only for Prijzen, Lieve woorden and Contact) and Code Generation, skipping the NFR and Infrastructure stages, then Build and Test; Operations is omitted until decided at Build and Test.
|
||||||
|
|
||||||
|
## Phases to Execute
|
||||||
|
|
||||||
|
### 🔵 INCEPTION PHASE
|
||||||
|
- [x] Workspace Detection (COMPLETED)
|
||||||
|
- [x] Reverse Engineering (COMPLETED — refresh)
|
||||||
|
- [x] Requirements Analysis (COMPLETED)
|
||||||
|
- [x] User Stories (SKIPPED — single visitor persona, concrete requirements)
|
||||||
|
- [x] Execution Plan (IN PROGRESS)
|
||||||
|
- [ ] Application Design — EXECUTE
|
||||||
|
- **Rationale**: new components (six sections, reusable ContactForm, testimonial carousel, SectionHeading, `useReveal`), new content interfaces and one cross-section interaction (Prijzen → Contact preselection). This stage also delivers **FR-HP-01**: the Lieve woorden design and the live content in `design/andreaslop-static` plus the updated LAYOUT.md, so the design can be reviewed in the browser before any React work.
|
||||||
|
- [ ] Units Generation — EXECUTE
|
||||||
|
- **Rationale**: the user asked for one unit per block; this stage fixes the six units, their order and dependencies, and where the shared building blocks land.
|
||||||
|
|
||||||
|
### 🟢 CONSTRUCTION PHASE
|
||||||
|
Proposed unit order: **1 Lifestyle fotografie** (also introduces the shared SectionHeading, `useReveal` and image conventions) → **2 Over mij** → **3 Prijzen** → **4 Lieve woorden** → **5 Contact** (needs the package list from Prijzen) → **6 Instagram**.
|
||||||
|
|
||||||
|
- [ ] Functional Design — EXECUTE for **Prijzen**, **Lieve woorden** and **Contact**; SKIP for Lifestyle fotografie, Over mij and Instagram
|
||||||
|
- **Rationale**: those three contain logic (package → shoot options and preselection; carousel index and announcements; validation, honeypot, time check, overlay/toggle, submit states) and need PBT-01 property identification. The other three are presentational: content + layout already defined by the design and the application design.
|
||||||
|
- [ ] NFR Requirements — SKIP
|
||||||
|
- **Rationale**: NFRs are fully set at requirements level (NFR-HP-01…06); the tech stack is fixed and no new dependencies are added.
|
||||||
|
- [ ] NFR Design — SKIP
|
||||||
|
- **Rationale**: no new NFR patterns beyond what Functional Design and the code plans cover (inert overlay, lazy images, reduced motion).
|
||||||
|
- [ ] Infrastructure Design — SKIP
|
||||||
|
- **Rationale**: no infrastructure changes; the CSP and server configs stay unchanged.
|
||||||
|
- [ ] Code Generation — EXECUTE (ALWAYS), per unit
|
||||||
|
- [ ] Build and Test — EXECUTE (ALWAYS)
|
||||||
|
|
||||||
|
### 🟡 OPERATIONS PHASE
|
||||||
|
- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation — UNDECIDED
|
||||||
|
- **Rationale**: Operations Configuration = Undecided; asked again at Build and Test. The existing pipeline already deploys to test on merge to master.
|
||||||
|
|
||||||
|
## Package Change Sequence
|
||||||
|
Single package (`web/`). Sequence inside it: static design + LAYOUT.md (Application Design) → shared building blocks (unit 1) → units 2–6 in order. Feature branch `feature/homepage-sections`, created before the first Code Generation.
|
||||||
|
|
||||||
|
## Estimated Timeline
|
||||||
|
- **Total Stages to execute**: Application Design, Units Generation, 3× Functional Design, 6× Code Generation, Build and Test
|
||||||
|
- **Estimated Duration**: several working sessions; one unit per session is a comfortable pace
|
||||||
|
|
||||||
|
## Success Criteria
|
||||||
|
- **Primary Goal**: the homepage shows all six sections below the hero, matching the (updated) design, with live-site content
|
||||||
|
- **Key Deliverables**: updated static design + LAYOUT.md; six section components; reusable ContactForm with overlay, validation and browser-side anti-spam; content modules; images; tests
|
||||||
|
- **Quality Gates**: `pnpm check` green (lint, format, tests incl. PBT and axe, build, audits, Lighthouse: accessibility/best practices 1.0, home mobile performance ≥ 0.8); Security Baseline and PBT compliance per stage; CI green on the PR
|
||||||
|
- **Integration Testing**: home route renders all sections in order; "Boek je shoot" → contact preselection works across sections
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Unit of Work Plan — homepage-sections
|
||||||
|
|
||||||
|
The decomposition itself is already decided: one unit per homepage block (user request), in the order approved in the execution plan, with the shared building blocks introduced by the first unit that needs them. This plan fixes the boundaries and asks how the units are delivered.
|
||||||
|
|
||||||
|
## Plan
|
||||||
|
|
||||||
|
- [x] 1. Answer the questions below
|
||||||
|
- [x] 2. Analyze answers for ambiguities (follow-up questions if needed)
|
||||||
|
- [x] 3. Generate `unit-of-work.md` — the six units, their scope (components, content, helpers, images, tests) and where shared pieces land
|
||||||
|
- [x] 4. Generate `unit-of-work-dependency.md` — dependency matrix and order
|
||||||
|
- [x] 5. Generate `unit-of-work-story-map.md` — no user stories were written, so this maps every requirement (FR-HP / NFR-HP) to its unit(s)
|
||||||
|
- [x] 6. Validate boundaries and dependencies; check that every requirement is assigned
|
||||||
|
|
||||||
|
## Already decided (no question needed)
|
||||||
|
|
||||||
|
| # | Unit | Brings in (besides the section itself) |
|
||||||
|
| --- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| 1 | Lifestyle fotografie | `HomeSection`, `SectionHeading`, `Reveal` + `useReveal`, `ContentImage` and `HomeContent` types, `homeContent.ts`, image conventions (download, resize, dimensions) |
|
||||||
|
| 2 | Over mij | `FramedImage` |
|
||||||
|
| 3 | Prijzen | `PricingPackage`, `packages.ts`, `formatPrice`, `packageFromSearch`, `validateSearch` on `/` |
|
||||||
|
| 4 | Lieve woorden | `Testimonial`, `testimonials.ts`, `slideLabel`, Chakra Carousel styling |
|
||||||
|
| 5 | Contact | `ContactForm` + `ContactFormGate`, `contact/` types and adapter, `shootOptions`, `validateContact`, `toContactPayload`, `isLikelySpam`, `siteContent.contactForm`, field styling |
|
||||||
|
| 6 | Instagram | profile URL derived from `siteContent.socials` |
|
||||||
|
|
||||||
|
- Work happens on one branch, `feature/homepage-sections`, created before the first Code Generation.
|
||||||
|
- Each unit adds its section to `routes/index.tsx`, so the homepage grows unit by unit and is never broken in between.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Questions
|
||||||
|
|
||||||
|
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. Waar ik een voorkeur heb staat **(aanbevolen)**.
|
||||||
|
|
||||||
|
## Vraag 1: Opleveren per unit of per feature
|
||||||
|
|
||||||
|
Een merge naar `master` gaat automatisch naar test.andreaslop.nl.
|
||||||
|
|
||||||
|
- A) **Eén pull request voor de hele feature.** Per unit één of meer commits op `feature/homepage-sections`; aan het eind één PR naar `master`. Test krijgt de homepage pas als hij af is. Een unit tussendoor op test bekijken kan via de handmatige run "Deploy to Test" op de branch. (aanbevolen)
|
||||||
|
- B) **Een pull request per unit.** Na elke unit een PR naar `master`, dus de homepage groeit stap voor stap op test. Meer PR's en CI-runs, maar kleinere reviews.
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 2: Controle na elke unit
|
||||||
|
|
||||||
|
Elke unit wordt na het genereren automatisch gebouwd en getest. Hoe zwaar is die controle?
|
||||||
|
|
||||||
|
- A) **Volledige `pnpm check` per unit**, inclusief Lighthouse. Een unit met grote foto's die het performancebudget van de homepage overschrijdt, valt dan meteen op en niet pas aan het eind. Kost een paar minuten per unit. (aanbevolen)
|
||||||
|
- B) Lint, opmaak, tests en build per unit; Lighthouse alleen bij Build and Test
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
+213
@@ -0,0 +1,213 @@
|
|||||||
|
# Verificatievragen — Homepage-secties
|
||||||
|
|
||||||
|
Al vastgelegd (geen vraag nodig):
|
||||||
|
|
||||||
|
- **Zes blokken** onder de hero, elk een eigen unit: Lifestyle fotografie, Over mij, Prijzen, **Lieve woorden** (nieuw, van de live site), Contact en **Instagram**.
|
||||||
|
- **Contactformulier**: wordt gebouwd, inclusief anti-spam en een robotcheck, maar staat achter een **overlay** met de tekst dat het formulier binnenkort komt en dat je voor nu mailt naar info@andreaslop.nl. Het e-mailadres in de overlay komt uit `siteContent.email` en wordt pas in de browser samengevoegd, net als in de footer (anti-spam).
|
||||||
|
- **Layout en stijl** komen uit het ontwerp (`design/andreaslop-static`). Teksten en afbeeldingen staan als vaste data in `content/`, in de vorm die de API straks levert.
|
||||||
|
- **"Lees mijn verhaal"** in het blok Over mij linkt naar `/over-mij` (nu nog een placeholder).
|
||||||
|
|
||||||
|
Wat ik op de live site (andreaslop.nl) zag en wat afwijkt van het ontwerp:
|
||||||
|
|
||||||
|
| Onderdeel | Ontwerp | Live site |
|
||||||
|
| ------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| Prijzen | Newborn € 185, Zwangerschap € 175, **Loveshoot** € 175 · "1 uur, 15–20 foto's" | Zwangerschap € 175, Newborn € 185, **Gezin** € 175 · "1 uur (newborn 1–2 uur), minstens 30/40 zorgvuldig nabewerkte foto's, persoonlijke online fotogalerij" |
|
||||||
|
| Galerij | intro-1 t/m 4 | 4 andere, nieuwere foto's (2025/2026) |
|
||||||
|
| Formulier | Naam, E-mail, Onderwerp (vrije tekst), Bericht | Naam, E-mail, **"In welke shoot heb je interesse?"** (Zwangerschap / Newborn / Familie / Overig), Bericht · knop "(Aan)vraag versturen" |
|
||||||
|
| Lieve woorden | ontbreekt | slider met per review een foto, de soort shoot als titel, de tekst en de namen (2 reviews: Trouwshoot – Majella & Mark, Newbornshoot – Demi & Kevin) |
|
||||||
|
| Instagram | raster van 6 vaste foto's met link naar het profiel | WordPress-widget die op dit moment **niet werkt** ("you haven't connected with your Instagram account") |
|
||||||
|
|
||||||
|
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Vraag 1: Bron voor de inhoud
|
||||||
|
|
||||||
|
Waar komen teksten, prijzen en foto's vandaan als ontwerp en live site verschillen?
|
||||||
|
|
||||||
|
- A) De live site voor de inhoud (prijzen, pakketten, galerijfoto's, formuliervelden, reviews) en het ontwerp voor layout en stijl. De live site is het nieuwst. (aanbevolen)
|
||||||
|
- B) Het ontwerp voor alles; de live inhoud zet Andrea later via de API/CMS goed
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 2: Ontwerp van "Lieve woorden"
|
||||||
|
|
||||||
|
Hoe moet het blok eruitzien? In alle varianten: kop "Lieve woorden", de stijl van het ontwerp (Marcellus-koppen, papierkleuren, heidegroen accent) en per review de soort shoot, de tekst en de namen.
|
||||||
|
|
||||||
|
- A) **Eén review tegelijk, groot.** Foto links, aan de rechterkant een groot aanhalingsteken als decoratie, de soort shoot als label, de tekst in Marcellus en daaronder de namen. Vorige/volgende-knoppen en puntjes; **geen automatisch doorspelen**. Lijkt het meest op de live site en blijft rustig. (aanbevolen)
|
||||||
|
- B) **Kaarten naast elkaar.** Twee of drie kaarten in een raster (op mobiel onder elkaar), elk met een kleine ronde foto, de tekst en de namen. Geen slider: alle reviews zijn meteen zichtbaar. Werkt goed tot ongeveer 3–6 reviews.
|
||||||
|
- C) **Alleen tekst, gecentreerd.** Eén grote quote zonder foto op een `paper.alt`-achtergrond, met vorige/volgende-knoppen. Het meest minimalistisch; de foto's van de live site vervallen.
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 3: Ontwerp eerst in de statische design-map?
|
||||||
|
|
||||||
|
Het ontwerp in `design/andreaslop-static` is de bron voor layout ([LAYOUT.md](../../../../../LAYOUT.md)). Lieve woorden staat er nog niet in.
|
||||||
|
|
||||||
|
- A) Ja: eerst het gekozen ontwerp toevoegen aan `design/andreaslop-static` (index.html + style.css) en [LAYOUT.md](../../../../../LAYOUT.md) bijwerken. Dan kun je het in de browser bekijken en goedkeuren voordat het in React komt. De inhoud van het ontwerp (prijzen, formuliervelden) zet ik daarbij ook gelijk aan de live site, als je bij vraag 1 voor A kiest. (aanbevolen)
|
||||||
|
- B) Alleen [LAYOUT.md](../../../../../LAYOUT.md) bijwerken en het ontwerp direct in React bouwen; de statische map blijft zoals hij is
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 4: Positie van "Lieve woorden"
|
||||||
|
|
||||||
|
Op de live site staat het blok tussen Prijzen en Contact.
|
||||||
|
|
||||||
|
- A) Tussen Prijzen en Contact, zoals op de live site. Volgorde: Hero, Lifestyle fotografie, Over mij, Prijzen, Lieve woorden, Contact, Instagram (aanbevolen)
|
||||||
|
- B) Tussen Over mij en Prijzen
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 5: Foto's
|
||||||
|
|
||||||
|
De foto's van de live site (galerij, Andrea, reviews) moeten in de repo komen. Hoe gaan we daarmee om?
|
||||||
|
|
||||||
|
- A) Ik download ze van andreaslop.nl, verklein ze eenmalig (maximaal ±1600 px breed, goed gecomprimeerd) en zet ze in `web/src/assets`. Geen nieuwe dependency, en de homepage blijft binnen het Lighthouse-budget. (aanbevolen)
|
||||||
|
- B) Zoals A, maar ook automatisch meerdere formaten (srcset/WebP) bij het bouwen, met een Vite-plugin. Dat is een nieuwe dependency; het verhelpt ook de bekende schuld bij de hero-foto's.
|
||||||
|
- C) Andrea levert de foto's zelf aan; tot die tijd gebruik ik de foto's uit het ontwerp
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 6: Instagram-blok
|
||||||
|
|
||||||
|
Een echte live feed kan alleen via de API van Meta met een toegangstoken. Op een statische site staat dat token voor iedereen leesbaar in de browser. Een externe widget laadt scripts en cookies van derden, en daarvoor moet de CSP worden aangepast.
|
||||||
|
|
||||||
|
- A) Kop "Instagram", @andreaslopfotografie als link en een raster van 6 vast gekozen foto's die naar het profiel linken, zoals in het ontwerp. De lijst foto's staat in `content/`, zodat de .NET API hem later kan vullen met de echte feed (die haalt hem dan veilig op aan de serverkant). (aanbevolen)
|
||||||
|
- B) Een externe widget (bijv. Behold of SnapWidget) voor een live feed nu al, inclusief CSP-aanpassing en een vermelding in de privacyverklaring
|
||||||
|
- C) Alleen de kop, de handle en een knop "Volg mij op Instagram", zonder foto's
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 7: Velden van het contactformulier
|
||||||
|
|
||||||
|
- A) Zoals op de live site: Naam, E-mail, "In welke shoot heb je interesse?" (keuzelijst) en Bericht, met de knop "(Aan)vraag versturen" (aanbevolen)
|
||||||
|
- B) Zoals in het ontwerp: Naam, E-mail, Onderwerp (vrije tekst) en Bericht, met de knop "Verzenden"
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 8: Keuzes in de keuzelijst (alleen bij 7A)
|
||||||
|
|
||||||
|
Op de live site heet het pakket **Gezin**, maar in de keuzelijst staat **Familie**.
|
||||||
|
|
||||||
|
- A) Dezelfde namen als de pakketten: Zwangerschap, Newborn, Gezin, Overig. De lijst komt dan uit dezelfde data als de prijskaarten en loopt daardoor nooit uit de pas. (aanbevolen)
|
||||||
|
- B) Precies zoals live: Zwangerschap, Newborn, Familie, Overig
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 9: Knop "Boek je shoot" bij de prijskaarten
|
||||||
|
|
||||||
|
- A) Scrollt naar het contactblok op de homepage en kiest het bijbehorende pakket alvast in de keuzelijst. Nu het formulier nog achter de overlay zit, kom je zo direct bij de e-mailtekst uit. (aanbevolen)
|
||||||
|
- B) Scrollt alleen naar het contactblok, zonder iets voor te kiezen
|
||||||
|
- C) Gaat naar de pagina `/contact` (nu nog een placeholder)
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 10: De overlay over het formulier
|
||||||
|
|
||||||
|
Wat ziet en kan een bezoeker zolang het formulier nog niet werkt?
|
||||||
|
|
||||||
|
- A) Het formulier is zichtbaar maar gedempt (vervaagd) en is **niet** te bedienen: de velden zijn `inert`, dus toetsenbord- en schermlezergebruikers komen niet in een formulier terecht dat niets doet. Over het formulier staat een paneel met de tekst "Het contactformulier komt binnenkort. Mail me voor nu op info@andreaslop.nl" en een knop "Stuur een e-mail" (mailto). (aanbevolen)
|
||||||
|
- B) Zoals A, maar het formulier is wel in te vullen; bij Verzenden opent het e-mailprogramma met de ingevulde gegevens (naam, shoot en bericht al in de mail)
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 11: Hoe zetten we de overlay later uit?
|
||||||
|
|
||||||
|
- A) Met één instelling in de code (bijv. `contactFormEnabled: false`), gekoppeld aan de verzendfunctie `submitContactForm`. Als de API er is: de functie invullen en de instelling op `true` zetten (aanbevolen)
|
||||||
|
- B) Als het formulier aangaat, haal ik de overlay helemaal weg; nu geen instelling
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A, Als we het er dan toch inbouwen dan kan ik het later ook makkelijk uitzetten mocht dat nodig zijn.
|
||||||
|
|
||||||
|
## Vraag 12: Anti-spam
|
||||||
|
|
||||||
|
Welke maatregelen bouwen we nu al in het formulier? Let op: echte bescherming vraagt altijd ook controle aan de serverkant (de API). Wat hier staat, is de kant van de browser.
|
||||||
|
|
||||||
|
- A) Een honeypot (verborgen veld dat alleen bots invullen) en een tijdcheck (minder dan ±3 seconden tussen laden en verzenden = bot). Beide als kleine, geteste functies in `lib/`. Daarnaast een maximale lengte per veld. Rate limiting en de echte controle komen in de API-feature. (aanbevolen)
|
||||||
|
- B) Alleen een honeypot
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 13: Robotcheck (captcha)
|
||||||
|
|
||||||
|
Een captcha geeft een token dat de server moet controleren. Zonder API kan het formulier de check dus nog niet echt gebruiken.
|
||||||
|
|
||||||
|
- A) **Nu kiezen, inbouwen in de API-feature.** We kiezen nu de dienst (zie vraag 14) en leggen dat vast. Het formulier krijgt een plek voor de widget, maar het script wordt pas geladen als het formulier aangaat. Zo komt er nu geen script van derden op de site voor een formulier dat nog niets doet. (aanbevolen)
|
||||||
|
- B) **Nu al inbouwen** achter de overlay, inclusief CSP-aanpassing (script-src, frame-src, connect-src) en een vermelding in de privacyverklaring
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 14: Welke robotcheck?
|
||||||
|
|
||||||
|
- A) **Cloudflare Turnstile**: gratis, meestal onzichtbaar (geen puzzels), zonder tracking-cookies. Een goede balans tussen gemak en privacy (aanbevolen)
|
||||||
|
- B) **Friendly Captcha**: Europees (Duits), volledig AVG-gericht, onzichtbaar (proof-of-work); gratis voor kleine sites
|
||||||
|
- C) **hCaptcha**: gratis, maar vaker puzzels voor bezoekers
|
||||||
|
- D) **Google reCAPTCHA**: bekend, maar stuurt gegevens naar Google; minder geschikt onder de AVG
|
||||||
|
- E) Nog niet kiezen; beslissen in de API-feature
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: B
|
||||||
|
|
||||||
|
## Vraag 15: Animatie bij het scrollen
|
||||||
|
|
||||||
|
Het ontwerp laat blokken zacht invagen bij het scrollen (`.reveal`).
|
||||||
|
|
||||||
|
- A) Ja, overnemen als kleine hook (`useReveal` met IntersectionObserver), uitgeschakeld bij `prefers-reduced-motion`. Zonder JavaScript of observer is de inhoud gewoon zichtbaar (aanbevolen)
|
||||||
|
- B) Nee, geen scroll-animaties
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag 16: De pagina /contact
|
||||||
|
|
||||||
|
Het contactformulier wordt een herbruikbaar component. Komt het in deze feature ook op `/contact`?
|
||||||
|
|
||||||
|
- A) Nee, `/contact` blijft een placeholder. De contactpagina wordt een eigen feature en gebruikt dan hetzelfde component (aanbevolen)
|
||||||
|
- B) Ja, het formulier (met overlay) komt ook op `/contact`
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: A
|
||||||
|
|
||||||
|
## Vraag: Beveiligingsextensies
|
||||||
|
|
||||||
|
Moeten de beveiligingsregels als harde vereisten worden afgedwongen voor dit project? (Bij de shell stond dit op 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: Property-Based Testing Extensie
|
||||||
|
|
||||||
|
Moeten de property-based testing (PBT) regels worden afgedwongen voor dit project? (Bij de shell stond dit op 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: Operations-fase
|
||||||
|
|
||||||
|
Moet deze feature na Construction door de Operations-fase (deployment en monitoring)? De pipeline en monitoring bestaan al sinds de shell.
|
||||||
|
|
||||||
|
- A) Ja — draai de Operations-fase na Construction (deployment + monitoring)
|
||||||
|
- B) Nee — stop na Build and Test; de bestaande pipeline deployt naar test bij een merge naar master
|
||||||
|
- C) Weet ik nog niet — vraag het me opnieuw na de Construction-fase
|
||||||
|
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||||
|
|
||||||
|
[Answer]: C
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
# Requirements — Homepage Sections
|
||||||
|
|
||||||
|
## Intent Analysis
|
||||||
|
- **User Request**: add the homepage blocks below the existing hero with AI-DLC, one feature with one unit per block; suggest a temporary solution for the contact form while there is no back-end. Extended at Reverse Engineering review with the Instagram block and the "Lieve woorden" (testimonials) block from the live site, and with a contact form overlay, anti-spam and a robot check.
|
||||||
|
- **Request Type**: New Feature (new user-facing sections on an existing page)
|
||||||
|
- **Scope Estimate**: Multiple components within one package (`web/`), plus the static design reference (`design/andreaslop-static/`) and [LAYOUT.md](../../../../../LAYOUT.md)
|
||||||
|
- **Complexity Estimate**: Moderate — six mostly presentational sections, one small carousel, one form with validation and anti-spam logic, content and image preparation
|
||||||
|
- **Requirements Depth**: Standard
|
||||||
|
|
||||||
|
## Source of Truth
|
||||||
|
- **Layout and styling**: `design/andreaslop-static/` (`index.html`, `assets/css/style.css`) and [LAYOUT.md](../../../../../LAYOUT.md). *Source: Q1 = A*
|
||||||
|
- **Content** (texts, prices, packages, photos, form fields, reviews): the live site https://andreaslop.nl/ as of 2026-10-19, because it is newer than the design. *Source: Q1 = A*
|
||||||
|
- **Decisions**: [requirement-verification-questions.md](requirement-verification-questions.md)
|
||||||
|
|
||||||
|
## Section Order
|
||||||
|
Hero (exists) → **Lifestyle fotografie** → **Over mij** → **Prijzen** → **Lieve woorden** → **Contact** → **Instagram**. *Source: Q4 = A*
|
||||||
|
|
||||||
|
Each of the six new sections is a separate unit of work.
|
||||||
|
|
||||||
|
## Out of Scope
|
||||||
|
- The hero (exists; unchanged)
|
||||||
|
- A working contact form submission, server-side spam checks, rate limiting and the actual robot check integration — all part of the future API feature
|
||||||
|
- The `/contact` page (stays a placeholder; it will reuse the contact form component in its own feature). *Source: Q16 = A*
|
||||||
|
- A live Instagram feed (needs the API). *Source: Q6 = A*
|
||||||
|
- The decorative banner image between Prices and Lieve woorden on the live site (`landing-img-18.png`) and the decoration next to the live contact form — the design's own pricing decorations are used instead
|
||||||
|
- Responsive image pipeline (srcset/WebP). *Source: Q5 = A*
|
||||||
|
- Operations phase: undecided, asked again at Build and Test. *Source: Operations = C*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Functional Requirements
|
||||||
|
|
||||||
|
### FR-HP-01 Static design and LAYOUT.md updated first
|
||||||
|
- Add the **Lieve woorden** section to `design/andreaslop-static/index.html` and its styles to `assets/css/style.css`, following the chosen design (FR-HP-05), so it can be reviewed in the browser before it is built in React.
|
||||||
|
- Align the static design's homepage **content** with the live site: price cards (FR-HP-04) and contact form fields (FR-HP-06).
|
||||||
|
- Update the Home diagram in [LAYOUT.md](../../../../../LAYOUT.md) to the seven blocks in the section order above, following [.ai/layout-conventions.md](../../../../../.ai/layout-conventions.md).
|
||||||
|
- *Source: Q3 = A, user request ("eventueel verwerken in het design in deze workspace")*
|
||||||
|
|
||||||
|
### FR-HP-02 Lifestyle fotografie
|
||||||
|
- Heading **"Lifestyle fotografie"** (h2) with lead text "Jouw favoriete momenten, vastgelegd op een natuurlijke en ongedwongen manier."
|
||||||
|
- A gallery of **four photos** (the four current live photos), layout as `.intro-gallery` in the design.
|
||||||
|
- Every photo has a descriptive Dutch alt text (to be reviewed by Andrea).
|
||||||
|
- The live page's stray headings "Foto2" and "Foto" are not carried over.
|
||||||
|
- *Source: Q1 = A*
|
||||||
|
|
||||||
|
### FR-HP-03 Over mij
|
||||||
|
- Photo of Andrea (live photo) next to the text block, layout as `.about` in the design, on the `paper.alt` background.
|
||||||
|
- Eyebrow **"Over mij"**, heading **"Lifestyle fotograaf met een passie voor storytelling"** (h2) and the three paragraphs from the live site / design (identical).
|
||||||
|
- Link **"Lees mijn verhaal"** to `/over-mij`.
|
||||||
|
|
||||||
|
### FR-HP-04 Prijzen
|
||||||
|
- Heading **"Prijzen"** (h2) with lead "Pakketten", and the design's two decorative images (`deco-1.png`, `deco-2.png`, decorative only).
|
||||||
|
- Three price cards (h3 per package), in the live order and with the live content:
|
||||||
|
|
||||||
|
| Package | Price | Included |
|
||||||
|
|---|---|---|
|
||||||
|
| Zwangerschap | € 175 | 1 uur fotografie · Minstens 30 zorgvuldig nabewerkte foto's · Persoonlijke online fotogalerij |
|
||||||
|
| Newborn | € 185 | 1-2 uur fotografie · Minstens 40 zorgvuldig nabewerkte foto's · Persoonlijke online fotogalerij |
|
||||||
|
| Gezin | € 175 | 1 uur fotografie · Minstens 30 zorgvuldig nabewerkte foto's · Persoonlijke online fotogalerij |
|
||||||
|
|
||||||
|
- Each card has a **"Boek je shoot"** button that moves to the contact section on the homepage and preselects that package in the shoot field (FR-HP-06). *Source: Q9 = A*
|
||||||
|
- The packages are one data list in `content/`; the price cards and the shoot field options are both derived from it. *Source: Q8 = A*
|
||||||
|
|
||||||
|
### FR-HP-05 Lieve woorden (testimonials)
|
||||||
|
- Heading **"Lieve woorden"** (h2).
|
||||||
|
- **One review at a time, large**: photo on the left; on the right a large decorative quotation mark, the shoot type as a label, the review text in Marcellus and the names below it. Stacked on small screens. *Source: Q2 = A*
|
||||||
|
- **Previous/next buttons and dots**; **no autoplay**. Keyboard operable; the change of review is announced to screen readers. With only one review the controls are not shown.
|
||||||
|
- Content (from the live site, each with its live photo):
|
||||||
|
- **Trouwshoot** — "Super mooie foto's door Andrea gemaakt op onze trouwdag en pré-wedding shoot. Wij zijn er super blij mee! Een aantal hebben wij laten afdrukken en hangen nu ingelijst aan de muur, dus wij genieten er nog elke dag van." — *Majella & Mark*
|
||||||
|
- **Newbornshoot** — "Heel tevreden met de newbornshoot. De foto's zijn prachtig geworden en we zijn erg blij met het resultaat. Zeker aan te raden!" — *Demi & Kevin*
|
||||||
|
- The data list supports any number of reviews, so more can be added later without code changes.
|
||||||
|
- *Source: user request, Q2 = A, Q4 = A*
|
||||||
|
|
||||||
|
### FR-HP-06 Contact — form
|
||||||
|
- Heading **"Contact"** (h2) with lead "Wil je meer informatie ontvangen? Neem gerust contact met mij op." Section anchor `#contact`.
|
||||||
|
- Fields (live site): **Naam**, **E-mail**, **"In welke shoot heb je interesse?"** (select: the package names + **Overig**, with an empty "Kies een optie..." default), **Bericht** ("Stel hier je vraag"). Submit button **"(Aan)vraag versturen"**. *Source: Q7 = A, Q8 = A*
|
||||||
|
- Client-side validation with an error message per field and `aria-invalid`, as in the design: required fields, valid e-mail format, maximum lengths.
|
||||||
|
- Submission goes through **one function `submitContactForm(payload)`**. Until the API exists it is not called (see FR-HP-07); the payload shape is ready for `POST /api/contact`.
|
||||||
|
- The form is a reusable component so the `/contact` page can use it later. *Source: Q16 = A*
|
||||||
|
|
||||||
|
### FR-HP-07 Contact — "coming soon" overlay
|
||||||
|
- While the form is switched off, it is visible but **dimmed** and **cannot be used**: the fields are `inert`, so keyboard and screen reader users never land in a form that does nothing.
|
||||||
|
- Over the form is a panel with the text **"Het contactformulier komt binnenkort. Mail me voor nu op info@andreaslop.nl"** and a button **"Stuur een e-mail"** (mailto).
|
||||||
|
- The e-mail address comes from `siteContent.email` and is assembled only in the browser, as in the footer (anti-spam). If the address is invalid, the panel still shows the coming-soon text without the address and button.
|
||||||
|
- **One setting** (`contactFormEnabled`) switches between overlay and working form, in both directions, so the form can also be switched off again later if needed. *Source: Q10 = A, Q11 = A (+ user note)*
|
||||||
|
|
||||||
|
### FR-HP-08 Contact — anti-spam (browser side)
|
||||||
|
- A **honeypot** field: hidden from sighted users and assistive technology, not focusable, no autocomplete. A filled honeypot means the submission is treated as spam.
|
||||||
|
- A **time check**: a submission less than ±3 seconds after the form was shown is treated as spam.
|
||||||
|
- Spam is rejected silently (the visitor sees the normal success flow; nothing is sent).
|
||||||
|
- Both checks are small pure functions in `lib/` with tests.
|
||||||
|
- Server-side checks and rate limiting are required in the API feature; the browser checks are not the only line of defence.
|
||||||
|
- *Source: Q12 = A*
|
||||||
|
|
||||||
|
### FR-HP-09 Contact — robot check (decided, integrated later)
|
||||||
|
- The chosen service is **Friendly Captcha** (EU, privacy-friendly, invisible proof-of-work). *Source: Q14 = B*
|
||||||
|
- The form has a place for the widget, but **no Friendly Captcha script is loaded** in this feature; it is integrated, together with server-side token verification and the required CSP changes, in the API feature. *Source: Q13 = A*
|
||||||
|
|
||||||
|
### FR-HP-10 Instagram
|
||||||
|
- Heading **"Instagram"** (h2) with **@andreaslopfotografie** as a link to the profile.
|
||||||
|
- A grid of **six fixed photos**, each linking to the profile, layout as `.instagram__grid` in the design.
|
||||||
|
- The photo list lives in `content/`, so the API can later fill it with the real feed (fetched server-side).
|
||||||
|
- Initial selection: six existing site photos (Andrea can swap them).
|
||||||
|
- *Source: Q6 = A*
|
||||||
|
|
||||||
|
### FR-HP-11 Scroll reveal
|
||||||
|
- Sections fade in gently when scrolled into view, as `.reveal` in the design, via a small `useReveal` hook (IntersectionObserver).
|
||||||
|
- Disabled under `prefers-reduced-motion`. Without JavaScript or IntersectionObserver the content is simply visible.
|
||||||
|
- *Source: Q15 = A*
|
||||||
|
|
||||||
|
### FR-HP-12 Content and images
|
||||||
|
- All section content lives as API-shaped static data in `web/src/content/` with interfaces in `content/types.ts`, passed into the components from the home route.
|
||||||
|
- Photos are downloaded from andreaslop.nl (and the design for the decorations), resized once to at most ±1600 px wide, compressed, and stored in `web/src/assets`. No new dependency. *Source: Q5 = A*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Non-Functional Requirements
|
||||||
|
|
||||||
|
### NFR-HP-01 Accessibility (WCAG 2.1 AA as guideline)
|
||||||
|
- The hero title remains the page's only h1; sections use h2, cards and reviews h3 where a heading is needed.
|
||||||
|
- Each section is a `section` with an accessible name (its heading).
|
||||||
|
- Text contrast ≥ 4.5:1: reuse the shell's choices (`ink.soft` instead of `ink.muted`, `accent.deep` instead of `accent` for small text on light backgrounds). The overlay panel text keeps full contrast; only the form behind it is dimmed.
|
||||||
|
- Form: visible labels linked to fields, errors linked via `aria-describedby`, error announcement, focus to the first invalid field on submit.
|
||||||
|
- Carousel: buttons with Dutch labels, current dot marked (`aria-current`), polite live region for manual changes, no autoplay.
|
||||||
|
- Touch targets ≥ 44×44 px; keyboard operable; visible focus ring (theme).
|
||||||
|
- `prefers-reduced-motion` respected (reveal, carousel transitions, smooth scrolling to `#contact`).
|
||||||
|
- Axe checks in the component tests; Lighthouse accessibility stays 1.0.
|
||||||
|
|
||||||
|
### NFR-HP-02 Styling and consistency
|
||||||
|
- Same principles as the shell (frontend-shell NFR-02/02a): reuse theme tokens, text styles, recipes and components first (`LinkButton`, `linkButton` variants, `eyebrow`, `paper.alt`, `Container`); use Chakra primitives where they fit; lift repeated styling (e.g. the section heading block used by five sections) into a shared component or recipe; no hard-coded colours, CSS files or Tailwind.
|
||||||
|
- Components in their own folders under `components/`, Prettier style.
|
||||||
|
- **Code comments in English** in all new code, including new comments added to existing files. Existing Dutch comments are not translated as part of this feature. Visitor-facing texts (labels, messages, alt texts, aria labels) stay Dutch. *Source: user change request at Requirements review*
|
||||||
|
- Responsive from 320 px to ultrawide, mobile-first, no horizontal scroll, works at 200% zoom.
|
||||||
|
|
||||||
|
### NFR-HP-03 Testing
|
||||||
|
- **Example-based tests** per section: rendered content, links and attributes, carousel controls, form validation messages, overlay behaviour (inert form, mailto, toggle), "Boek je shoot" preselection, axe checks.
|
||||||
|
- **Property-based tests** (fast-check, existing setup and shared arbitraries) for the pure logic, e.g. form validation, honeypot/time check, shoot options derived from packages, carousel index wrapping.
|
||||||
|
- Coverage: new pure helpers in `src/lib/**` fall under the existing 100% threshold.
|
||||||
|
- `pnpm check` (lint, format, tests, build, audits, Lighthouse) passes.
|
||||||
|
- *Source: PBT extension = A (full)*
|
||||||
|
|
||||||
|
### NFR-HP-04 Security (Security Baseline extension enabled)
|
||||||
|
- **No new third parties**: no external scripts, widgets, fonts or form endpoints in this feature. The CSP in `web/config/securityHeaders.ts` stays unchanged (`form-action 'self'`, `connect-src` self/Umami/Sentry).
|
||||||
|
- **External links** (Instagram) use `target="_blank"` with `rel="noopener noreferrer"` and a "opent in nieuw tabblad" hint for screen readers, as in the footer.
|
||||||
|
- **E-mail address** never appears literally in HTML, bundle or content (assembled in the browser).
|
||||||
|
- **Input handling**: client-side length limits and format checks on all fields; user input is rendered only as text by React (no HTML injection). The payload is ready for server-side validation in the API (SECURITY-05 applies there).
|
||||||
|
- **Defence in depth / misuse**: honeypot + time check now; Friendly Captcha + server-side validation + rate limiting in the API feature (SECURITY-11). The overlay disables the form entirely while there is no server.
|
||||||
|
- **Fail safe**: a failing `submitContactForm` shows a generic message and leaves the visitor's input intact; no internal details (SECURITY-15).
|
||||||
|
- **Dependencies**: no new runtime dependencies (SECURITY-10).
|
||||||
|
- **For the API feature**: Friendly Captcha requires CSP additions (script/worker and connect to its EU endpoint) and a privacy statement entry — recorded here, not done now.
|
||||||
|
|
||||||
|
### NFR-HP-05 Performance
|
||||||
|
- The homepage mobile Lighthouse budget (performance 0.8, see `lighthouserc.cjs`) and desktop 0.9 still pass.
|
||||||
|
- All new images are below the fold: `loading="lazy"`, explicit width/height (no layout shift), compressed per FR-HP-12.
|
||||||
|
- No new network requests other than the bundled images.
|
||||||
|
|
||||||
|
### NFR-HP-06 Content for the future API
|
||||||
|
- Content interfaces are plain data (strings, numbers, arrays, image references) so the API can deliver them 1-to-1: `PricingPackage`, `Testimonial`, `GalleryPhoto`, `InstagramContent` and the section texts.
|
||||||
|
- The contact payload is `{ naam, email, shoot, bericht }` (the design's `onderwerp` becomes the shoot choice).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Extension Compliance — Requirements Level
|
||||||
|
|
||||||
|
### Security Baseline
|
||||||
|
| Rule | Status | Rationale |
|
||||||
|
|---|---|---|
|
||||||
|
| SECURITY-01 Encryption | N/A | No data stores |
|
||||||
|
| 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-HP-04) |
|
||||||
|
| SECURITY-05 Input validation | Compliant (planned) | No API endpoint in this feature; client-side limits/format checks now, server-side validation required in 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, no protected resources |
|
||||||
|
| SECURITY-09 Hardening | Compliant (planned) | No debug output; generic messages |
|
||||||
|
| SECURITY-10 Supply chain | Compliant (planned) | No new dependencies |
|
||||||
|
| SECURITY-11 Secure design | Compliant (planned) | Misuse case (form spam) addressed: overlay, honeypot, time check; captcha + rate limiting assigned to the API feature |
|
||||||
|
| SECURITY-12 Authentication | N/A | No authentication |
|
||||||
|
| SECURITY-13 Integrity | Compliant | No external CDN resources; captcha script deferred |
|
||||||
|
| SECURITY-14 Alerting | N/A | No server-side component; existing monitoring unchanged |
|
||||||
|
| SECURITY-15 Exception handling | Compliant (planned) | Generic failure message in the form; existing global error handling |
|
||||||
|
|
||||||
|
### Property-Based Testing
|
||||||
|
| Rule | Status | Rationale |
|
||||||
|
|---|---|---|
|
||||||
|
| PBT-01 Property identification | Planned | Done per unit in Functional Design |
|
||||||
|
| PBT-02 … PBT-06 | Planned | Applied to the pure helpers identified in Functional Design (validation invariants, carousel index wrapping, derived shoot options) |
|
||||||
|
| PBT-07 Generators | Planned | Domain generators added to `src/test/arbitraries.ts` |
|
||||||
|
| PBT-08 Shrinking/reproducibility | Compliant | Existing seed logging and shrinking (`config/testSeed.ts`) |
|
||||||
|
| PBT-09 Framework | Compliant | fast-check already configured |
|
||||||
|
| PBT-10 Complementary testing | Planned | Example-based tests per section alongside PBT |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Summary of Key Decisions
|
||||||
|
| # | Decision |
|
||||||
|
|---|---|
|
||||||
|
| Q1 | Content from the live site, layout/style from the design |
|
||||||
|
| Q2 | Lieve woorden: one large review at a time, photo + quote, prev/next + dots, no autoplay |
|
||||||
|
| Q3 | Add Lieve woorden (and live content) to the static design and LAYOUT.md first |
|
||||||
|
| Q4 | Lieve woorden between Prijzen and Contact |
|
||||||
|
| Q5 | Download live photos, resize once, no new dependency |
|
||||||
|
| Q6 | Instagram: fixed grid of 6 photos in `content/`, real feed later via the API |
|
||||||
|
| Q7 / Q8 | Live form fields; shoot options = package names + Overig |
|
||||||
|
| Q9 | "Boek je shoot" scrolls to contact and preselects the package |
|
||||||
|
| Q10 / Q11 | Dimmed, inert form under a coming-soon overlay with mailto; one setting toggles it both ways |
|
||||||
|
| Q12 | Honeypot + time check + length limits now |
|
||||||
|
| Q13 / Q14 | Robot check: Friendly Captcha, integrated in the API feature |
|
||||||
|
| Q15 | Scroll reveal with reduced-motion support |
|
||||||
|
| Q16 | `/contact` stays a placeholder |
|
||||||
|
| Ext. | Security Baseline: Yes · PBT: Yes (full) · Operations: undecided |
|
||||||
@@ -851,6 +851,101 @@ p:last-child { margin-bottom: 0; }
|
|||||||
.pricing__deco--2 { bottom: 6%; right: 3%; }
|
.pricing__deco--2 { bottom: 6%; right: 3%; }
|
||||||
.pricing .container { position: relative; z-index: 1; }
|
.pricing .container { position: relative; z-index: 1; }
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
13b. Lieve woorden (testimonials)
|
||||||
|
One review at a time: photo with the sand offset block (shared with the
|
||||||
|
about block), a large quotation mark, shoot type, quote and names.
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.testimonials__track { display: grid; }
|
||||||
|
|
||||||
|
.testimonial {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 5fr 7fr;
|
||||||
|
gap: clamp(2rem, 6vw, 5.5rem);
|
||||||
|
align-items: center;
|
||||||
|
animation: testimonial-in var(--dur) var(--ease);
|
||||||
|
}
|
||||||
|
.testimonial[hidden] { display: none; }
|
||||||
|
|
||||||
|
@keyframes testimonial-in {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.testimonial__media img { aspect-ratio: 4 / 5; }
|
||||||
|
|
||||||
|
.testimonial__body { position: relative; margin: 0; }
|
||||||
|
|
||||||
|
.testimonial__mark {
|
||||||
|
display: block;
|
||||||
|
height: .55em;
|
||||||
|
color: var(--c-accent);
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: clamp(5rem, 9vw, 7.5rem);
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.testimonial__quote {
|
||||||
|
margin: 0 0 1.75rem;
|
||||||
|
color: var(--c-ink);
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: clamp(1.35rem, 2.2vw, 1.75rem);
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.testimonial__author {
|
||||||
|
color: var(--c-ink-soft);
|
||||||
|
font-size: var(--fs-eyebrow);
|
||||||
|
letter-spacing: var(--ls-wide);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
.testimonial__author::before { content: '— '; }
|
||||||
|
|
||||||
|
.testimonials__controls {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-top: clamp(2.5rem, 5vw, 4rem);
|
||||||
|
}
|
||||||
|
.testimonials__controls[hidden] { display: none; }
|
||||||
|
|
||||||
|
.testimonials__arrow {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48px; height: 48px;
|
||||||
|
border: 1px solid var(--c-line);
|
||||||
|
background: transparent;
|
||||||
|
color: var(--c-ink);
|
||||||
|
font-size: 1.1rem;
|
||||||
|
transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
|
||||||
|
}
|
||||||
|
.testimonials__arrow:hover,
|
||||||
|
.testimonials__arrow:focus-visible { border-color: var(--c-ink); background: var(--c-paper); }
|
||||||
|
|
||||||
|
.testimonials__dots { display: flex; gap: .25rem; }
|
||||||
|
|
||||||
|
/* 44px hit area around a small visible dot */
|
||||||
|
.testimonials__dot {
|
||||||
|
position: relative;
|
||||||
|
width: 44px; height: 44px;
|
||||||
|
border: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.testimonials__dot::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 50% auto auto 50%;
|
||||||
|
width: 8px; height: 8px;
|
||||||
|
border: 1px solid var(--c-accent-deep);
|
||||||
|
border-radius: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
transition: background var(--dur) var(--ease);
|
||||||
|
}
|
||||||
|
.testimonials__dot[aria-current='true']::after { background: var(--c-accent-deep); }
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
14. Soorten fotoshoots
|
14. Soorten fotoshoots
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
@@ -1051,6 +1146,59 @@ p:last-child { margin-bottom: 0; }
|
|||||||
|
|
||||||
.form__textarea { min-height: 170px; resize: vertical; }
|
.form__textarea { min-height: 170px; resize: vertical; }
|
||||||
|
|
||||||
|
/* Native select in the input style, with a drawn chevron */
|
||||||
|
.form__select {
|
||||||
|
appearance: none;
|
||||||
|
padding-right: 2.75rem;
|
||||||
|
background-image: linear-gradient(45deg, transparent 50%, var(--c-ink-soft) 50%),
|
||||||
|
linear-gradient(135deg, var(--c-ink-soft) 50%, transparent 50%);
|
||||||
|
background-position: calc(100% - 1.4rem) 50%, calc(100% - 1.05rem) 50%;
|
||||||
|
background-size: .35rem .35rem;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.form__select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--c-accent);
|
||||||
|
box-shadow: 0 0 0 3px rgba(127, 139, 118, .18);
|
||||||
|
}
|
||||||
|
.form__select[aria-invalid='true'] { border-color: #a4443a; }
|
||||||
|
|
||||||
|
/* Honeypot: off-screen for people, still in the DOM for bots */
|
||||||
|
.form__hp {
|
||||||
|
position: absolute;
|
||||||
|
left: -10000px;
|
||||||
|
width: 1px; height: 1px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* "Coming soon" gate: the form stays visible but dimmed and inert under a
|
||||||
|
notice, until there is a back-end. */
|
||||||
|
.form-gate { position: relative; }
|
||||||
|
|
||||||
|
.form-gate[data-form-disabled] .form {
|
||||||
|
opacity: .35;
|
||||||
|
filter: blur(1.5px);
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-gate__notice {
|
||||||
|
position: absolute;
|
||||||
|
inset: 50% auto auto 50%;
|
||||||
|
width: min(100%, 520px);
|
||||||
|
padding: clamp(2rem, 4vw, 3rem);
|
||||||
|
border: 1px solid var(--c-line);
|
||||||
|
background: var(--c-white);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
text-align: center;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
.form-gate__notice[hidden] { display: none; }
|
||||||
|
|
||||||
|
.form-gate__text {
|
||||||
|
margin-bottom: 1.75rem;
|
||||||
|
color: var(--c-ink-soft);
|
||||||
|
}
|
||||||
|
|
||||||
.form__error {
|
.form__error {
|
||||||
color: #a4443a;
|
color: #a4443a;
|
||||||
font-size: var(--fs-small);
|
font-size: var(--fs-small);
|
||||||
@@ -1230,8 +1378,11 @@ p:last-child { margin-bottom: 0; }
|
|||||||
|
|
||||||
.about,
|
.about,
|
||||||
.shoot,
|
.shoot,
|
||||||
|
.testimonial,
|
||||||
.contact-layout { grid-template-columns: 1fr; }
|
.contact-layout { grid-template-columns: 1fr; }
|
||||||
|
|
||||||
|
.testimonial__media { max-width: 420px; }
|
||||||
|
|
||||||
.about--reverse .about__media,
|
.about--reverse .about__media,
|
||||||
.shoot:nth-child(even) .shoot__media { order: 0; }
|
.shoot:nth-child(even) .shoot__media { order: 0; }
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 425 KiB After Width: | Height: | Size: 420 KiB |
@@ -21,7 +21,7 @@ hero-6.jpg https://andreaslop.nl/wp-content/uploads/2024/09/DSC_0433-1-2048x1362
|
|||||||
# --- Home: introgalerij ---
|
# --- Home: introgalerij ---
|
||||||
intro-1.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7270_websize.jpg
|
intro-1.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7270_websize.jpg
|
||||||
intro-2.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7176_websize.jpg
|
intro-2.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7176_websize.jpg
|
||||||
intro-3.jpg https://andreaslop.nl/wp-content/uploads/2019/11/F41A8722_websize.jpg
|
intro-3.jpg https://andreaslop.nl/wp-content/uploads/2019/11/F41A9474_websize.jpg
|
||||||
intro-4.jpg https://andreaslop.nl/wp-content/uploads/2025/09/F41A7883_websize.jpg
|
intro-4.jpg https://andreaslop.nl/wp-content/uploads/2025/09/F41A7883_websize.jpg
|
||||||
|
|
||||||
# --- Portretten van Andrea ---
|
# --- Portretten van Andrea ---
|
||||||
@@ -45,6 +45,8 @@ portfolio-6.jpg https://andreaslop.nl/wp-content/uploads/2019/11/5-F41A4650-scal
|
|||||||
portfolio-7.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7138_websize.jpg
|
portfolio-7.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7138_websize.jpg
|
||||||
portfolio-8.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7284_websize.jpg
|
portfolio-8.jpg https://andreaslop.nl/wp-content/uploads/2026/04/F41A7284_websize.jpg
|
||||||
|
|
||||||
|
# --- Lieve woorden: hergebruikt hero-5.jpg (Trouwshoot) en portfolio-6.jpg (Newbornshoot) ---
|
||||||
|
|
||||||
# --- Decoratie prijzensectie ---
|
# --- Decoratie prijzensectie ---
|
||||||
deco-1.png https://andreaslop.nl/wp-content/uploads/2020/01/landing-img-18.png
|
deco-1.png https://andreaslop.nl/wp-content/uploads/2020/01/landing-img-18.png
|
||||||
deco-2.png https://andreaslop.nl/wp-content/uploads/2020/01/h1-img-16.png
|
deco-2.png https://andreaslop.nl/wp-content/uploads/2020/01/h1-img-16.png
|
||||||
|
|||||||
@@ -265,15 +265,36 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Submissions faster than this after the form appeared are treated as bots.
|
||||||
|
var MIN_FILL_MS = 3000;
|
||||||
|
|
||||||
function initContactForm() {
|
function initContactForm() {
|
||||||
var forms = Array.prototype.slice.call(document.querySelectorAll('[data-contact-form]'));
|
var forms = Array.prototype.slice.call(document.querySelectorAll('[data-contact-form]'));
|
||||||
if (!forms.length) return;
|
if (!forms.length) return;
|
||||||
|
|
||||||
var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
|
var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
|
||||||
|
|
||||||
|
// Required-field messages. The home form asks for a shoot type, the
|
||||||
|
// contact page still has a free-text subject; validate whichever exists.
|
||||||
|
var requiredMessages = {
|
||||||
|
naam: 'Vul je naam in.',
|
||||||
|
onderwerp: 'Vul een onderwerp in.',
|
||||||
|
shoot: 'Kies een soort shoot.',
|
||||||
|
bericht: 'Schrijf hier je vraag.'
|
||||||
|
};
|
||||||
|
|
||||||
|
// "Boek je shoot" links to ?pakket=<id>#contact; preselect that package.
|
||||||
|
var requestedPackage = new URLSearchParams(window.location.search).get('pakket');
|
||||||
|
|
||||||
forms.forEach(function (form) {
|
forms.forEach(function (form) {
|
||||||
var status = form.querySelector('[data-form-status]');
|
var status = form.querySelector('[data-form-status]');
|
||||||
var submit = form.querySelector('[type="submit"]');
|
var submit = form.querySelector('[type="submit"]');
|
||||||
|
var shownAt = Date.now();
|
||||||
|
|
||||||
|
if (requestedPackage && form.elements.shoot) {
|
||||||
|
var option = form.elements.shoot.querySelector('option[value="' + CSS.escape(requestedPackage) + '"]');
|
||||||
|
if (option) form.elements.shoot.value = requestedPackage;
|
||||||
|
}
|
||||||
|
|
||||||
function setError(field, message) {
|
function setError(field, message) {
|
||||||
var wrapper = field.closest('.form__field');
|
var wrapper = field.closest('.form__field');
|
||||||
@@ -286,8 +307,11 @@
|
|||||||
function validate() {
|
function validate() {
|
||||||
var valid = true;
|
var valid = true;
|
||||||
|
|
||||||
var naam = form.elements.naam;
|
Object.keys(requiredMessages).forEach(function (name) {
|
||||||
valid = setError(naam, naam.value.trim() ? '' : 'Vul je naam in.') && valid;
|
var field = form.elements[name];
|
||||||
|
if (!field) return;
|
||||||
|
valid = setError(field, field.value.trim() ? '' : requiredMessages[name]) && valid;
|
||||||
|
});
|
||||||
|
|
||||||
var email = form.elements.email;
|
var email = form.elements.email;
|
||||||
var emailValue = email.value.trim();
|
var emailValue = email.value.trim();
|
||||||
@@ -296,15 +320,21 @@
|
|||||||
else if (!emailPattern.test(emailValue)) emailMessage = 'Dit e-mailadres klopt nog niet.';
|
else if (!emailPattern.test(emailValue)) emailMessage = 'Dit e-mailadres klopt nog niet.';
|
||||||
valid = setError(email, emailMessage) && valid;
|
valid = setError(email, emailMessage) && valid;
|
||||||
|
|
||||||
var onderwerp = form.elements.onderwerp;
|
|
||||||
valid = setError(onderwerp, onderwerp.value.trim() ? '' : 'Vul een onderwerp in.') && valid;
|
|
||||||
|
|
||||||
var bericht = form.elements.bericht;
|
|
||||||
valid = setError(bericht, bericht.value.trim() ? '' : 'Schrijf hier je vraag.') && valid;
|
|
||||||
|
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Honeypot filled in, or submitted inhumanly fast.
|
||||||
|
function looksLikeSpam() {
|
||||||
|
var honeypot = form.elements.website;
|
||||||
|
return (honeypot && honeypot.value !== '') || Date.now() - shownAt < MIN_FILL_MS;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showStatus(message) {
|
||||||
|
if (!status) return;
|
||||||
|
status.hidden = false;
|
||||||
|
status.textContent = message;
|
||||||
|
}
|
||||||
|
|
||||||
form.addEventListener('submit', function (event) {
|
form.addEventListener('submit', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@@ -319,28 +349,29 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var payload = {
|
var thanks = 'Bedankt voor je bericht. Andrea reageert binnen 2-3 werkdagen.';
|
||||||
naam: form.elements.naam.value.trim(),
|
|
||||||
email: form.elements.email.value.trim(),
|
// Spam gets the normal thank-you, so bots learn nothing; nothing is sent.
|
||||||
onderwerp: form.elements.onderwerp.value.trim(),
|
if (looksLikeSpam()) {
|
||||||
bericht: form.elements.bericht.value.trim()
|
form.reset();
|
||||||
};
|
showStatus(thanks);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var payload = { naam: form.elements.naam.value.trim(), email: form.elements.email.value.trim() };
|
||||||
|
if (form.elements.shoot) payload.shoot = form.elements.shoot.value;
|
||||||
|
if (form.elements.onderwerp) payload.onderwerp = form.elements.onderwerp.value.trim();
|
||||||
|
payload.bericht = form.elements.bericht.value.trim();
|
||||||
|
|
||||||
if (submit) submit.disabled = true;
|
if (submit) submit.disabled = true;
|
||||||
|
|
||||||
submitContactForm(payload)
|
submitContactForm(payload)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
form.reset();
|
form.reset();
|
||||||
if (status) {
|
showStatus(thanks);
|
||||||
status.hidden = false;
|
|
||||||
status.textContent = 'Bedankt voor je bericht. Andrea reageert binnen 2-3 werkdagen.';
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function () {
|
||||||
if (status) {
|
showStatus('Versturen lukte niet. Mail gerust rechtstreeks naar info@andreaslop.nl.');
|
||||||
status.hidden = false;
|
|
||||||
status.textContent = 'Versturen lukte niet. Mail gerust rechtstreeks naar info@andreaslop.nl.';
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.finally(function () {
|
.finally(function () {
|
||||||
if (submit) submit.disabled = false;
|
if (submit) submit.disabled = false;
|
||||||
@@ -349,6 +380,72 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
/* Contact form gate ("coming soon" overlay) */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
// While there is no back-end the form stays visible but dimmed and inert
|
||||||
|
// under a notice with a mail button. Remove data-form-disabled to switch
|
||||||
|
// the form on.
|
||||||
|
function initFormGate() {
|
||||||
|
var gates = Array.prototype.slice.call(document.querySelectorAll('[data-form-gate]'));
|
||||||
|
|
||||||
|
gates.forEach(function (gate) {
|
||||||
|
var form = gate.querySelector('[data-contact-form]');
|
||||||
|
var notice = gate.querySelector('[data-form-notice]');
|
||||||
|
var disabled = gate.hasAttribute('data-form-disabled');
|
||||||
|
|
||||||
|
if (form) form.inert = disabled;
|
||||||
|
if (notice) notice.hidden = !disabled;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
/* Lieve woorden (testimonials) */
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
// One review at a time; previous/next and dots, no autoplay. Manual
|
||||||
|
// changes are announced politely to screen readers.
|
||||||
|
function initTestimonials() {
|
||||||
|
var root = document.querySelector('[data-testimonials]');
|
||||||
|
if (!root) return;
|
||||||
|
|
||||||
|
var slides = Array.prototype.slice.call(root.querySelectorAll('[data-testimonial]'));
|
||||||
|
var dots = Array.prototype.slice.call(root.querySelectorAll('[data-testimonials-dot]'));
|
||||||
|
var controls = root.querySelector('.testimonials__controls');
|
||||||
|
var status = root.querySelector('[data-testimonials-status]');
|
||||||
|
var active = 0;
|
||||||
|
|
||||||
|
// A single review needs no controls.
|
||||||
|
if (slides.length < 2) {
|
||||||
|
if (controls) controls.hidden = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function show(index) {
|
||||||
|
active = (index + slides.length) % slides.length;
|
||||||
|
|
||||||
|
slides.forEach(function (slide, i) {
|
||||||
|
var isActive = i === active;
|
||||||
|
slide.hidden = !isActive;
|
||||||
|
slide.classList.toggle('is-active', isActive);
|
||||||
|
});
|
||||||
|
|
||||||
|
dots.forEach(function (dot, i) {
|
||||||
|
if (i === active) dot.setAttribute('aria-current', 'true');
|
||||||
|
else dot.removeAttribute('aria-current');
|
||||||
|
});
|
||||||
|
|
||||||
|
if (status) status.textContent = 'Review ' + (active + 1) + ' van ' + slides.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
root.querySelector('[data-testimonials-prev]').addEventListener('click', function () { show(active - 1); });
|
||||||
|
root.querySelector('[data-testimonials-next]').addEventListener('click', function () { show(active + 1); });
|
||||||
|
dots.forEach(function (dot, i) {
|
||||||
|
dot.addEventListener('click', function () { show(i); });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
/* Scroll-reveal */
|
/* Scroll-reveal */
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
@@ -414,6 +511,8 @@
|
|||||||
initHeroSlider();
|
initHeroSlider();
|
||||||
initLightbox();
|
initLightbox();
|
||||||
initContactForm();
|
initContactForm();
|
||||||
|
initFormGate();
|
||||||
|
initTestimonials();
|
||||||
initReveal();
|
initReveal();
|
||||||
initToTop();
|
initToTop();
|
||||||
initYear();
|
initYear();
|
||||||
|
|||||||
@@ -191,77 +191,157 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pricing__grid">
|
<div class="pricing__grid">
|
||||||
<article class="price-card reveal">
|
|
||||||
<h3 class="price-card__name">Newborn</h3>
|
|
||||||
<p class="price-card__amount">€ 185</p>
|
|
||||||
<ul class="price-card__features">
|
|
||||||
<li>1 uur fotografie</li>
|
|
||||||
<li>20 nabewerkte foto's</li>
|
|
||||||
</ul>
|
|
||||||
<a class="btn" href="contact.html">Boek je shoot</a>
|
|
||||||
</article>
|
|
||||||
|
|
||||||
<article class="price-card reveal">
|
<article class="price-card reveal">
|
||||||
<h3 class="price-card__name">Zwangerschap</h3>
|
<h3 class="price-card__name">Zwangerschap</h3>
|
||||||
<p class="price-card__amount">€ 175</p>
|
<p class="price-card__amount">€ 175</p>
|
||||||
<ul class="price-card__features">
|
<ul class="price-card__features">
|
||||||
<li>1 uur fotografie</li>
|
<li>1 uur fotografie</li>
|
||||||
<li>15 nabewerkte foto's</li>
|
<li>Minstens 30 zorgvuldig nabewerkte foto's</li>
|
||||||
|
<li>Persoonlijke online fotogalerij</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a class="btn" href="contact.html">Boek je shoot</a>
|
<a class="btn" href="index.html?pakket=zwangerschap#contact">Boek je shoot</a>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="price-card reveal">
|
<article class="price-card reveal">
|
||||||
<h3 class="price-card__name">Loveshoot</h3>
|
<h3 class="price-card__name">Newborn</h3>
|
||||||
|
<p class="price-card__amount">€ 185</p>
|
||||||
|
<ul class="price-card__features">
|
||||||
|
<li>1-2 uur fotografie</li>
|
||||||
|
<li>Minstens 40 zorgvuldig nabewerkte foto's</li>
|
||||||
|
<li>Persoonlijke online fotogalerij</li>
|
||||||
|
</ul>
|
||||||
|
<a class="btn" href="index.html?pakket=newborn#contact">Boek je shoot</a>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="price-card reveal">
|
||||||
|
<h3 class="price-card__name">Gezin</h3>
|
||||||
<p class="price-card__amount">€ 175</p>
|
<p class="price-card__amount">€ 175</p>
|
||||||
<ul class="price-card__features">
|
<ul class="price-card__features">
|
||||||
<li>1 uur fotografie</li>
|
<li>1 uur fotografie</li>
|
||||||
<li>15 nabewerkte foto's</li>
|
<li>Minstens 30 zorgvuldig nabewerkte foto's</li>
|
||||||
|
<li>Persoonlijke online fotogalerij</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a class="btn" href="contact.html">Boek je shoot</a>
|
<a class="btn" href="index.html?pakket=gezin#contact">Boek je shoot</a>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- ================================================= Lieve woorden -->
|
||||||
|
<!-- One review at a time: photo with the sand offset block (like the
|
||||||
|
about block), large quotation mark, shoot type, quote and names.
|
||||||
|
No autoplay; browse with previous/next or the dots. -->
|
||||||
|
<section class="section section--alt" aria-labelledby="testimonials-title">
|
||||||
|
<div class="container">
|
||||||
|
<div class="section__head section__head--center reveal">
|
||||||
|
<h2 id="testimonials-title">Lieve woorden</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="testimonials reveal" data-testimonials role="region" aria-roledescription="carrousel" aria-label="Reviews">
|
||||||
|
<div class="testimonials__track">
|
||||||
|
<article class="testimonial is-active" data-testimonial aria-roledescription="review" aria-label="1 van 2">
|
||||||
|
<div class="testimonial__media about__media">
|
||||||
|
<img src="assets/img/hero-5.jpg" alt="Bruidegom schuift de trouwring om de vinger van de bruid" loading="lazy">
|
||||||
|
</div>
|
||||||
|
<figure class="testimonial__body">
|
||||||
|
<span class="testimonial__mark" aria-hidden="true">“</span>
|
||||||
|
<p class="eyebrow">Trouwshoot</p>
|
||||||
|
<blockquote class="testimonial__quote">
|
||||||
|
<p>Super mooie foto’s door Andrea gemaakt op onze trouwdag en pré-wedding shoot. Wij zijn er super blij mee! Een aantal hebben wij laten afdrukken en hangen nu ingelijst aan de muur, dus wij genieten er nog elke dag van.</p>
|
||||||
|
</blockquote>
|
||||||
|
<figcaption class="testimonial__author">Majella & Mark</figcaption>
|
||||||
|
</figure>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="testimonial" data-testimonial aria-roledescription="review" aria-label="2 van 2" hidden>
|
||||||
|
<div class="testimonial__media about__media">
|
||||||
|
<img src="assets/img/portfolio-6.jpg" alt="Pasgeboren baby tijdens een newbornshoot" loading="lazy">
|
||||||
|
</div>
|
||||||
|
<figure class="testimonial__body">
|
||||||
|
<span class="testimonial__mark" aria-hidden="true">“</span>
|
||||||
|
<p class="eyebrow">Newbornshoot</p>
|
||||||
|
<blockquote class="testimonial__quote">
|
||||||
|
<p>Heel tevreden met de newbornshoot. De foto’s zijn prachtig geworden en we zijn erg blij met het resultaat. Zeker aan te raden!</p>
|
||||||
|
</blockquote>
|
||||||
|
<figcaption class="testimonial__author">Demi & Kevin</figcaption>
|
||||||
|
</figure>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="testimonials__controls">
|
||||||
|
<button class="testimonials__arrow" type="button" data-testimonials-prev aria-label="Vorige review">←</button>
|
||||||
|
<div class="testimonials__dots">
|
||||||
|
<button class="testimonials__dot" type="button" data-testimonials-dot aria-label="Review 1" aria-current="true"></button>
|
||||||
|
<button class="testimonials__dot" type="button" data-testimonials-dot aria-label="Review 2"></button>
|
||||||
|
</div>
|
||||||
|
<button class="testimonials__arrow" type="button" data-testimonials-next aria-label="Volgende review">→</button>
|
||||||
|
</div>
|
||||||
|
<p class="visually-hidden" data-testimonials-status aria-live="polite"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<!-- ======================================================= Contact -->
|
<!-- ======================================================= Contact -->
|
||||||
<section class="section section--alt" id="contact">
|
<!-- The form is complete, but there is no back-end yet. Until then it
|
||||||
|
stays dimmed and inert under a notice with a mail button. Remove
|
||||||
|
data-form-disabled (and inert) to switch the form on. -->
|
||||||
|
<section class="section" id="contact">
|
||||||
<div class="container container--narrow">
|
<div class="container container--narrow">
|
||||||
<div class="section__head section__head--center reveal">
|
<div class="section__head section__head--center reveal">
|
||||||
<h2>Contact</h2>
|
<h2>Contact</h2>
|
||||||
<p class="lead">Wil je meer informatie ontvangen? Neem gerust contact met mij op.</p>
|
<p class="lead">Wil je meer informatie ontvangen? Neem gerust contact met mij op.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form class="form reveal" data-contact-form novalidate>
|
<div class="form-gate reveal" data-form-gate data-form-disabled>
|
||||||
|
<form class="form" data-contact-form novalidate inert>
|
||||||
<div class="form__row">
|
<div class="form__row">
|
||||||
<div class="form__field">
|
<div class="form__field">
|
||||||
<label class="form__label" for="home-naam">Naam</label>
|
<label class="form__label" for="home-naam">Naam</label>
|
||||||
<input class="form__input" id="home-naam" name="naam" type="text" autocomplete="name" required>
|
<input class="form__input" id="home-naam" name="naam" type="text" autocomplete="name" maxlength="100" placeholder="Jouw naam" required>
|
||||||
<span class="form__error" data-form-error role="alert"></span>
|
<span class="form__error" data-form-error role="alert"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form__field">
|
<div class="form__field">
|
||||||
<label class="form__label" for="home-email">E-mail</label>
|
<label class="form__label" for="home-email">E-mail</label>
|
||||||
<input class="form__input" id="home-email" name="email" type="email" autocomplete="email" required>
|
<input class="form__input" id="home-email" name="email" type="email" autocomplete="email" maxlength="254" placeholder="jouw@email.nl" required>
|
||||||
<span class="form__error" data-form-error role="alert"></span>
|
<span class="form__error" data-form-error role="alert"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form__field">
|
<div class="form__field">
|
||||||
<label class="form__label" for="home-onderwerp">Onderwerp</label>
|
<label class="form__label" for="home-shoot">In welke shoot heb je interesse?</label>
|
||||||
<input class="form__input" id="home-onderwerp" name="onderwerp" type="text" required>
|
<select class="form__input form__select" id="home-shoot" name="shoot" required>
|
||||||
|
<option value="">Kies een optie...</option>
|
||||||
|
<option value="zwangerschap">Zwangerschap</option>
|
||||||
|
<option value="newborn">Newborn</option>
|
||||||
|
<option value="gezin">Gezin</option>
|
||||||
|
<option value="overig">Overig</option>
|
||||||
|
</select>
|
||||||
<span class="form__error" data-form-error role="alert"></span>
|
<span class="form__error" data-form-error role="alert"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form__field">
|
<div class="form__field">
|
||||||
<label class="form__label" for="home-bericht">Bericht</label>
|
<label class="form__label" for="home-bericht">Stel hier je vraag</label>
|
||||||
<textarea class="form__textarea" id="home-bericht" name="bericht" placeholder="Stel hier je vraag" required></textarea>
|
<textarea class="form__textarea" id="home-bericht" name="bericht" maxlength="2000" placeholder="Vul hier je bericht in" required></textarea>
|
||||||
<span class="form__error" data-form-error role="alert"></span>
|
<span class="form__error" data-form-error role="alert"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Honeypot: only bots fill this in -->
|
||||||
|
<div class="form__hp" aria-hidden="true">
|
||||||
|
<label for="home-website">Website</label>
|
||||||
|
<input id="home-website" name="website" type="text" tabindex="-1" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="form__status" data-form-status hidden></p>
|
<p class="form__status" data-form-status hidden></p>
|
||||||
|
|
||||||
<button class="btn btn--accent form__submit" type="submit">Verzenden</button>
|
<button class="btn btn--accent form__submit" type="submit">(Aan)vraag versturen</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div class="form-gate__notice" data-form-notice>
|
||||||
|
<p class="eyebrow">Binnenkort</p>
|
||||||
|
<p class="form-gate__text">Het contactformulier komt binnenkort. Mail me voor nu op <a class="link-underline" href="mailto:info@andreaslop.nl">info@andreaslop.nl</a></p>
|
||||||
|
<a class="btn btn--accent" href="mailto:info@andreaslop.nl">Stuur een e-mail</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user