Records unit 2 of the Soorten fotoshoots page as generated
Adds the functional design and code generation plan of unit 2, its code summary with the verification, the agreements with the parallel features, and updates the shared reverse engineering lines, the state and the audit log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ None. There is no back-end yet (`api/` is empty). The static design README antic
|
||||
| `/` | `routes/index.tsx` | `pageHead('/')` | `Hero` + six home sections; search `?pakket=` | yes |
|
||||
| `/over-mij` | `routes/over-mij.tsx` | `pageHead('/over-mij')` + `AboutPage` JSON-LD | `PageIntro`, `AboutIntro`, `StorySection` ×2, `PhotoDuo`, `LinkButton` | yes |
|
||||
| `/portfolio` | `routes/portfolio.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||
| `/soorten-fotoshoots` | `routes/soorten-fotoshoots.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||
| `/soorten-fotoshoots` | `routes/soorten-fotoshoots.tsx` | `pageHead('/soorten-fotoshoots')` + `WebPage` JSON-LD (`webPage()` + `shootServices()`) | `PageIntro`, `shoots/ShootList` (5× `ShootBlock`), `CallToAction`, `RichParagraph`, `LinkButton` | yes |
|
||||
| `/contact` | `routes/contact.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||
| `/privacyverklaring` | `routes/privacyverklaring.tsx` | `pageHead(...)` | `PageIntro` placeholder | no |
|
||||
| (not found) | — | — | `NotFound` | — |
|
||||
@@ -33,14 +33,16 @@ None. There is no back-end yet (`api/` is empty). The static design README antic
|
||||
- `Hero({ content: HeroContent, socials: SocialLink[] })`, `HeroArrows({ onPrev, onNext })`, `HeroPauseButton({ stopped, onToggle })`, `HeroSocials({ socials })`
|
||||
- `PageIntro({ title, eyebrow?, children? })` — renders the page's only h1
|
||||
- `PageSection({ labelledBy, id?, tone?: 'paper' | 'alt', width?: 'default' | 'narrow' | 'full', spacing?: 'default' | 'tight' | 'flushTop', 'data-testid'?, children })` (was `HomeSection`)
|
||||
- `MediaText({ image, aspectRatio, 'data-testid'?, children })` — framed photo next to a text column
|
||||
- `MediaText({ image, aspectRatio, priority?, reverse?, frameColor?, 'data-testid'?, children })` — framed photo next to a text column; `reverse` puts the photo right from `lg`, `frameColor` colours the block behind it (default `sand`)
|
||||
- `CallToAction({ title, titleId, lead?, 'data-testid'?, children })` — closing block of a page: h2, lead, action, on `paper.alt`
|
||||
- `RichParagraph({ paragraph: RichText })` — paragraph with inline links (moved from `about/`)
|
||||
- `Eyebrow(TextProps & { as?: 'p' | 'span' | 'h2' | 'h3' | 'h4' })` — accent label, optionally a heading
|
||||
- `SectionHeading({ id, title, eyebrow?, lead?, align?: 'center' | 'start', spacing?: 'default' | 'compact', focusable? })` — renders an h2
|
||||
- `FramedImage({ image: ContentImage, aspectRatio })`, `DeferredImage(ImageProps & { image, near? })`, `Reveal(BoxProps & { delay? })`
|
||||
- `IntroGallery({ content })`, `AboutBlock({ content })`, `Pricing({ content, packages })`, `PriceCard(...)`, `Testimonials({ content, testimonials })`, `ContactSection({ content, packages, enabled, email, pakket? })`, `InstagramGrid({ content, profileUrl })`
|
||||
- `ContactForm(...)`, `ContactFormGate({ enabled, email, ... })`
|
||||
- `PhotoDuo({ photos: [ContentImage, ContentImage], label, 'data-testid'? })`
|
||||
- `about/AboutIntro({ content })`, `about/StorySection({ content, titleId, tone?, spacing?, children? })`, `about/RichParagraph({ paragraph: RichText })`
|
||||
- `about/AboutIntro({ content })`, `about/StorySection({ content, titleId, tone?, spacing?, children? })`, `shoots/ShootList({ shoots, packages, portfolioLive })`, `shoots/ShootBlock({ shoot, packages, reverse, priority, portfolioLive })`
|
||||
- `StatusPage({ title, children, actions? })`, `ErrorPage({ error, reset })`
|
||||
- `LinkButton(RouterLink props & { variant?: 'outline' | 'accent' | 'light' })`
|
||||
- `UmamiAnalytics({ hostname? })`
|
||||
|
||||
@@ -17,10 +17,10 @@ graph TD
|
||||
Shell --> Umami["UmamiAnalytics"]
|
||||
Outlet --> Home["routes/index.tsx: Hero + six sections"]
|
||||
Outlet --> About["routes/over-mij.tsx: about page"]
|
||||
Outlet --> Placeholders["portfolio, soorten-fotoshoots, contact, privacyverklaring: PageIntro"]
|
||||
Outlet --> Placeholders["portfolio, contact, privacyverklaring: PageIntro"]
|
||||
Home --> Hero["Hero (HeroArrows, HeroPauseButton, HeroSocials, useHeroSlider)"]
|
||||
Home --> Sections["components/home/: IntroGallery, AboutBlock, Pricing, Testimonials, ContactSection, InstagramGrid"]
|
||||
Sections --> Blocks["Shared blocks: PageSection, MediaText, Eyebrow, SectionHeading, FramedImage, DeferredImage, Reveal"]
|
||||
Sections --> Blocks["Shared blocks: PageSection, MediaText, CallToAction, RichParagraph, Eyebrow, SectionHeading, FramedImage, DeferredImage, Reveal"]
|
||||
Sections --> Form["ContactForm + ContactFormGate (lazy), contact/"]
|
||||
Content["content/: siteContent, heroContent, homeContent, packages, testimonials, types"] -.-> Shell
|
||||
Content -.-> Home
|
||||
@@ -79,7 +79,7 @@ Text alternative: main.tsx starts Sentry and mounts the router; the root route r
|
||||
|
||||
### Shared section building blocks
|
||||
- **Purpose**: Reusable pieces extracted during homepage-sections; `HomeSection` was renamed to `PageSection` and `MediaText`/`Eyebrow` were extracted in over-mij-page
|
||||
- **Responsibilities**: `PageSection` (section frame: `aria-labelledby`, tone `paper`/`alt`, width `default`/`narrow`/`full`, spacing `default`/`tight`/`flushTop`, anchor offset), `MediaText` (framed photo next to a text column, design `.about`), `Eyebrow` (accent label, optionally a heading), `SectionHeading` (eyebrow + h2 + lead, align start/center, compact spacing), `FramedImage` (photo with sand-coloured offset block, design `.about__media`), `DeferredImage` (loads after page load and near the viewport, reserves space), `Reveal` (fade-in on scroll, content always in the DOM, reduced motion respected)
|
||||
- **Responsibilities**: `PageSection` (section frame: `aria-labelledby`, tone `paper`/`alt`, width `default`/`narrow`/`full`, spacing `default`/`tight`/`flushTop`, anchor offset), `MediaText` (framed photo next to a text column, design `.about`), `Eyebrow` (accent label, optionally a heading), `SectionHeading` (eyebrow + h2 + lead, align start/center, compact spacing), `FramedImage` (photo with a coloured offset block, sand by default, design `.about__media`), `CallToAction` (closing block: h2, lead, action; added in soorten-fotoshoots-page), `RichParagraph` (paragraph with inline links), `DeferredImage` (loads after page load and near the viewport, reserves space), `Reveal` (fade-in on scroll, content always in the DOM, reduced motion respected)
|
||||
- **Type**: Application (shared UI)
|
||||
|
||||
### components/PageIntro/, StatusPage/
|
||||
|
||||
@@ -36,7 +36,8 @@ Text alternative: visitors and crawlers use the website, which links out to soci
|
||||
- **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
|
||||
- **Read about the photographer** — Over mij page: introduction with portrait, how it started, two photos, life outside photography, links to the portfolio and contact, "Boek je shoot"
|
||||
- *Placeholder pages (noindex)*: Portfolio, Soorten fotoshoots, Contact, Privacyverklaring
|
||||
- *Soorten fotoshoots* (`/soorten-fotoshoots`, indexed): the five shoot types (Newborn, Zwangerschap, Gezin, Loveshoot, Portretten) with photo, text, a contact link (package preselected where one exists) and, once the portfolio is live, a filtered portfolio link; closing call to action to the prices
|
||||
- *Placeholder pages (noindex)*: Portfolio, Contact, Privacyverklaring
|
||||
- *Planned (static design only)*: portfolio with lightbox, shoot types and pricing page, contact page
|
||||
- **Business Dictionary**:
|
||||
- **Shell** — the Header / page content / Footer frame shared by every page (see LAYOUT.md)
|
||||
|
||||
@@ -57,10 +57,15 @@ Candidates for modification are marked with ★ for the over-mij-page feature.
|
||||
- `web/src/routes/__root.tsx` — root layout, site head, 404/error
|
||||
- `web/src/routes/index.tsx` — home (`/`): Hero + six sections, `?pakket=` search param
|
||||
- `web/src/routes/over-mij.tsx` — the about page (indexed; `AboutPage` JSON-LD)
|
||||
- `web/src/components/about/*` — `AboutIntro`, `StorySection`, `RichParagraph`
|
||||
- `web/src/components/about/*` — `AboutIntro`, `StorySection`
|
||||
- `web/src/components/shoots/*` — `ShootList`, `ShootBlock` (soorten-fotoshoots page)
|
||||
- `web/src/components/{CallToAction,RichParagraph}/` — shared closing block; paragraph with inline links
|
||||
- `web/src/content/{shootTypes,shootTypesPageContent}.ts` — shoot types (also used by the portfolio filters) and page texts; `web/src/assets/shoots/` — 4:5 shoot photos
|
||||
- `web/src/lib/shootLinks.ts` — contact and portfolio link targets per shoot type
|
||||
- `web/src/components/PhotoDuo/PhotoDuo.tsx` — two photos side by side
|
||||
- `web/src/content/aboutContent.ts` — about page content; `web/src/assets/about/*` — portrait and duo photos; `web/public/og-over-mij.jpg` — preview image
|
||||
- `web/src/routes/{portfolio,soorten-fotoshoots,contact,privacyverklaring}.tsx` — placeholders with `PageIntro`
|
||||
- `web/src/routes/soorten-fotoshoots.tsx` — the shoot types page
|
||||
- `web/src/routes/{portfolio,contact,privacyverklaring}.tsx` — placeholders with `PageIntro`
|
||||
- `web/src/components/AppShell.tsx` — shell
|
||||
- `web/src/components/NavigationBar/*` — header, NavLink, MobileNav
|
||||
- `web/src/components/Footer/*` — footer, FooterColumn, FooterLink
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- `web/config/` + `web/deploy/` — security headers and generated nginx (test) / IIS (production) configuration
|
||||
|
||||
## Shared Packages
|
||||
- None as separate packages. Inside `web`: `theme.ts`, `recipes/`, `content/`, `lib/`, `seo.ts`, `navigation.ts`, `hooks/`, `components/LinkButton.tsx`, `components/RouterLink.tsx`, `components/PageIntro/`, and the section blocks `PageSection`, `MediaText`, `Eyebrow`, `SectionHeading`, `FramedImage`, `DeferredImage`, `Reveal`
|
||||
- None as separate packages. Inside `web`: `theme.ts`, `recipes/`, `content/`, `lib/`, `seo.ts`, `navigation.ts`, `hooks/`, `components/LinkButton.tsx`, `components/RouterLink.tsx`, `components/PageIntro/`, and the section blocks `PageSection`, `MediaText`, `CallToAction`, `RichParagraph`, `Eyebrow`, `SectionHeading`, `FramedImage`, `DeferredImage`, `Reveal`
|
||||
|
||||
## Test Packages
|
||||
- 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
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
| 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 | ✅ Complete | 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 |
|
||||
| Feature | over-mij-page | ✅ Complete | feature/over-mij-page | web/src/routes/over-mij.tsx, web/src/content, possibly shared components (PageIntro, FramedImage, SectionHeading) and web/src/seo.ts | 2026-10-22 |
|
||||
| Feature | soorten-fotoshoots-page | 🔵 Inception | feature/soorten-fotoshoots-page | web/src/routes/soorten-fotoshoots.tsx, new web/src/content/shootTypes.ts, new web/src/assets/shoots/, new shared CallToAction, MediaText (reverse prop), Pricing (id="prijzen" only), siteContent (service area), own entries in sitePages.ts / lighthouserc.cjs, JSON-LD via the shared webPage() helper in seo.ts | 2026-10-24 |
|
||||
| Feature | soorten-fotoshoots-page | 🟢 Construction | feature/soorten-fotoshoots-page | web/src/routes/soorten-fotoshoots.tsx, new web/src/content/shootTypes.ts, new web/src/assets/shoots/, new shared CallToAction, MediaText (reverse prop), Pricing (id="prijzen" only), siteContent (service area), own entries in sitePages.ts / lighthouserc.cjs, JSON-LD via the shared webPage() helper in seo.ts | 2026-10-24 |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- **Feature Slug**: soorten-fotoshoots-page
|
||||
- **Project Type**: Brownfield
|
||||
- **Start Date**: 2026-10-24T19:30:00Z
|
||||
- **Current Stage**: CONSTRUCTION - Code Generation unit 1 Shared blocks and content (generated, awaiting approval)
|
||||
- **Current Stage**: CONSTRUCTION - Code Generation unit 2 Soorten fotoshoots page (generated and verified; push, deploy to test and PR in progress)
|
||||
- **Branch**: feature/soorten-fotoshoots-page (fast-forwarded to master 11a5224 after over-mij-page merged, PR #7)
|
||||
- **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots
|
||||
|
||||
@@ -46,6 +46,7 @@ Agreed with the parallel sessions (contact-page, portfolio-page, over-mij-page)
|
||||
- If this feature reaches Code Generation before contact-page's `webPage()` commit exists: ask contact-page first whether this feature should add `webPage()` exactly to the agreed signature (then contact-page rebases on it), rather than writing a page-specific function
|
||||
- contact-page also changes `content/types.ts` and `siteContent.ts` (its unit 2): `SocialLink.label?`, `SiteContent.contactForm = { enabled, replyTime }`. Different fields from `serviceArea`; whoever commits second resolves the small textual conflict
|
||||
- Lighthouse (`pnpm check`, preview on port 4173 `--strictPort`): send "claim 4173" to the other sessions before starting and "4173 free" when done; no heavy runs (full vitest with coverage, build) while someone else's Lighthouse runs
|
||||
- Test environment (one, last deploy wins): "claim test" with the reason before a `deploy_test` dispatch, "test free" after the review; a merge to master also deploys to test, so check for an open test claim before merging and announce the merge
|
||||
- Claims of others: contact-page — ContactForm generalisation, contact-details block, `/contact?onderwerp=` (pending its user's decision); portfolio-page — PortfolioGrid, Lightbox, InstagramGrid move to shared
|
||||
- over-mij-page sends the merge commit once merged; all stacked features then rebase onto master
|
||||
|
||||
@@ -71,11 +72,11 @@ Agreed with the parallel sessions (contact-page, portfolio-page, over-mij-page)
|
||||
- [x] Units Generation - SKIP
|
||||
|
||||
### 🟢 CONSTRUCTION PHASE
|
||||
- [ ] Functional Design - EXECUTE (unit 2) / SKIP (unit 1)
|
||||
- [x] Functional Design - EXECUTE (unit 2 ✅) / SKIP (unit 1)
|
||||
- [x] NFR Requirements - SKIP
|
||||
- [x] NFR Design - SKIP
|
||||
- [x] Infrastructure Design - SKIP
|
||||
- [~] Code Generation - EXECUTE (per unit): 1 Shared blocks and content (generated, commits eb23536 / befe97a / 6cf9095, awaiting approval) → 2 Soorten fotoshoots page
|
||||
- [~] Code Generation - EXECUTE (per unit): 1 Shared blocks and content ✅ (eb23536 / befe97a / 6cf9095) → 2 Soorten fotoshoots page (generated, verified, awaiting review on test)
|
||||
- [ ] Build and Test - EXECUTE
|
||||
|
||||
### 🟡 OPERATIONS PHASE
|
||||
|
||||
@@ -179,3 +179,75 @@
|
||||
**Context**: CONSTRUCTION - Code Generation unit 1 (complete, awaiting approval)
|
||||
|
||||
---
|
||||
|
||||
## Code Generation Unit 1 — Approval
|
||||
|
||||
**Timestamp**: 2026-10-25T08:45:00Z
|
||||
|
||||
**User Input**: "Ga verder"
|
||||
|
||||
**AI Response**: "Unit 1 approved. active-features.md status set to 🟢 Construction. Started Functional Design for unit 2: plan and a separate question file with 3 questions (anchor per shoot, publication of the Gezin draft and alt texts, Service description source)."
|
||||
|
||||
**Context**: CONSTRUCTION - Code Generation unit 1 (approved) → Functional Design unit 2 (questions open)
|
||||
|
||||
---
|
||||
|
||||
## Functional Design Unit 2 — Answers and Artifacts
|
||||
|
||||
**Timestamp**: 2026-10-25T09:00:00Z
|
||||
|
||||
**User Input**: "Kan de vragen hierheen sturen" — answered in chat: Q1 "Ja, alleen ankers (Recommended)", Q2 "Merge wacht op Andrea (Recommended)", Q3 "Eerste alinea (Recommended)"; then "Zet de antwoorden ook in het bestand voor naslag"
|
||||
|
||||
**AI Response**: "Asked the three questions in chat at the user's request and recorded the answers (A, A, A) in soorten-fotoshoots-page-fd-questions.md. Generated functional-design/ (domain-entities, business-rules BR-SF-01..18, business-logic-model with PBT properties, frontend-components)."
|
||||
|
||||
**Context**: CONSTRUCTION - Functional Design unit 2 (awaiting approval)
|
||||
|
||||
---
|
||||
|
||||
## Functional Design Unit 2 — Approval
|
||||
|
||||
**Timestamp**: 2026-10-25T09:15:00Z
|
||||
|
||||
**User Input**: "Ga verder"
|
||||
|
||||
**AI Response**: "Functional design approved. Asked contact-page about the status of webPage() and offered to add it to the agreed signature in a separate commit. Wrote construction/plans/soorten-fotoshoots-page-code-generation-plan.md (19 steps) and asked for plan approval."
|
||||
|
||||
**Context**: CONSTRUCTION - Functional Design unit 2 (approved) → Code Generation unit 2, Part 1 (awaiting plan approval)
|
||||
|
||||
---
|
||||
|
||||
## Code Generation Unit 2 — Plan Approval and Generation
|
||||
|
||||
**Timestamp**: 2026-10-25T09:30:00Z
|
||||
|
||||
**User Input**: "Approve plan. Je mag meteen committen en pushen en deployen naar test zodat het daar bekeken kan worden. Alzodra de build slaagt mag je een pr maken zodat er voor deze run geen dubbele workflow draait"
|
||||
|
||||
**AI Response**: "Plan approved, with permission (scoped to this unit) to commit, push, deploy to test and open a PR once the run succeeds. Generated the preview image (sent to the user), cherry-picked contact-page's webPage() (790495d → 3c7d00e), content, shootLinks, shootServices/absoluteUrl, ShootList/ShootBlock, the route, route tests, LAYOUT.md and the RE lines. Contact link name changed to aria-label after a failing test showed the hidden span's leading space was dropped. Agreed a 'claim test / test free' protocol with the peers (merge to master also deploys to test)."
|
||||
|
||||
**Context**: CONSTRUCTION - Code Generation unit 2 (Part 2)
|
||||
|
||||
---
|
||||
|
||||
## Code Generation Unit 2 — Lighthouse Thresholds
|
||||
|
||||
**Timestamp**: 2026-10-25T11:00:00Z
|
||||
|
||||
**User Input**: answered in chat: first "Bundel eerst kleiner maken", then "Drempel gelijk aan homepage-aanpak (Recommended)"
|
||||
|
||||
**AI Response**: "Diagnosed failing Lighthouse runs: one homepage run at 0.69 was taken at half CPU speed (benchmarkIndex 1909); otherwise the homepage sits at 0.77–0.80 against 0.8 and the photo pages at ~0.897 against 0.9 (simulated LCP 3.22 s, same on /over-mij). Tried a no-fade priority photo (no effect, reverted); re-cropped the shoot photos at 848×1060 because the two 1600 px originals had been upscaled (fewer bytes, LCP unchanged). At the user's choice, moved the JSON-LD from head() into the page component (main bundle +0.3 kB gzip instead of +1.3 kB) and added photoPagePaths (/over-mij, /soorten-fotoshoots) with mobile 0.85 to lighthouserc.cjs; the desktop config now raises every entry to 0.9. Rule shared with portfolio-page and contact-page. A leftover vite preview of the measurement script held port 4173 for a while; stopped, script fixed, contact informed."
|
||||
|
||||
**Context**: CONSTRUCTION - Code Generation unit 2 (Part 2)
|
||||
|
||||
---
|
||||
|
||||
## PC Restart and Resume
|
||||
|
||||
**Timestamp**: 2026-10-25T12:58:00Z
|
||||
|
||||
**User Input**: "de pc is tussendoor uit gegaan. kan je de ssh agent weer starten. dan voeg ik mijn key toe dan kunnen alle sessies weer pushen wanneer ik dat vraag. Dan kan je verder waar je gebleven was" and "mijn sessielimiet zit er bijna op, die wordt over een uur gereset. kan je een timer zetten dat je over een uur weer verder gaat waar je mee bezig was?"
|
||||
|
||||
**AI Response**: "Started a new ssh-agent without a lifetime (~/.ssh/agent.env); the user added their key. Reran Lighthouse on the same build (passed). Scheduled a one-shot resume at 12:58. Visual check of /soorten-fotoshoots at three widths against the design (screenshots sent); filled in the verification in the code summary."
|
||||
|
||||
**Context**: CONSTRUCTION - Code Generation unit 2 (verification complete, committing)
|
||||
|
||||
---
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
# Code Generation Plan — Unit 2: Soorten fotoshoots page
|
||||
|
||||
Single source of truth for code generation of this unit. Workspace root: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots` (worktree); code in `web/`. Branch `feature/soorten-fotoshoots-page`.
|
||||
|
||||
## Unit Context
|
||||
- **Requirements**: FR-SF-01..05 (incl. 04b), FR-SF-08, SEO-SF-01..05, NFR-SF-01, 03..05, 07
|
||||
- **Design**: [application-design.md](../../inception/application-design/application-design.md); functional design in [construction/soorten-fotoshoots-page/functional-design/](../soorten-fotoshoots-page/functional-design/) (BR-SF-01..18)
|
||||
- **Depends on**: unit 1 (`shootTypes`, `MediaText` options, `CallToAction`, `RichParagraph`, `#prijzen`, `areaServed`) — done; `webPage()` from contact-page (see Step 6)
|
||||
- **Behavioural contract for other pages**: none change, except that the sitemap and Lighthouse indexed list gain `/soorten-fotoshoots`
|
||||
|
||||
## Steps
|
||||
|
||||
### Preview image
|
||||
- [x] **Step 1** — 1200×630 crop of the Newborn original (focus on the face) with the unit 1 scratchpad script → `web/public/og-soorten-fotoshoots.jpg`; show it to the user with the alt text before it is fixed (checkpoint, like the shoot crops).
|
||||
|
||||
### Content
|
||||
- [x] **Step 2** — `content/types.ts`: `ShootTypesPageContent` (domain-entities.md).
|
||||
- [x] **Step 3** — `content/shootTypesPageContent.ts`: page head, closing title, lead (`RichText` with "de pakketten" → `/#prijzen`) and booking link.
|
||||
|
||||
### Pure functions
|
||||
- [x] **Step 4** — `lib/shootLinks.ts`: `shootContactLink(shoot, packages)`, `shootPortfolioLink(shoot)`, `isPortfolioLive(pages)` (BR-SF-01..05).
|
||||
- [x] **Step 5** — `lib/shootLinks.test.ts`: examples for the real content (newborn with `?pakket`, loveshoot without, portfolio live/not live) and PBT from business-logic-model.md (`to`/`hash` fixed, `pakket` iff visible package id, no foreign values, portfolio search equals id).
|
||||
|
||||
### SEO
|
||||
- [x] **Step 6** — `webPage()`: contact-page has it done and tested, waiting for its user's approval (generic over `extra`: `webPage<Extra extends object>(type, path, extra?)`). Do **not** build it here: write against the signature and cherry-pick contact-page's commit (seo.ts + seo.test.ts) as soon as the hash arrives; the route and its head test can only be committed after that.
|
||||
- [x] **Step 7** — `seo.ts`: `absoluteUrl(src)` and `shootServices(shoots, site)` (BR-SF-10..15).
|
||||
- [x] **Step 8** — `seo.test.ts`: examples for the real shoot list (5 items, `@id`s with anchors, first paragraph, provider, area, no prices) and PBT (count and positions, distinct `@id`s, provider/area invariants, no e-mail, `absoluteUrl` invariant + idempotency).
|
||||
- [x] **Step 9** — `sitePages.ts`: `/soorten-fotoshoots` `indexed: true`, new description, `ogImage`. `lighthouserc.cjs`: move `/soorten-fotoshoots` to `indexedPaths` (only this entry).
|
||||
|
||||
### Components
|
||||
- [x] **Step 10** — `components/shoots/ShootBlock/ShootBlock.tsx` + test: `article` with anchor id and name, h2, paragraphs, `MediaText` (4:5, frame colour, reverse, priority), contact link with hidden completion, portfolio link only when live, axe.
|
||||
- [x] **Step 11** — `components/shoots/ShootList/ShootList.tsx` + test: order, alternation (`reverse` on 2nd/4th), divider on every block after the first, only the first photo with priority, axe.
|
||||
|
||||
### Route
|
||||
- [x] **Step 12** — `routes/soorten-fotoshoots.tsx`: head (`pageHead` + `structuredDataScript(webPage(...))`) and composition (PageIntro with intro → ShootList → CallToAction with RichParagraph lead and `LinkButton accent`).
|
||||
- [x] **Step 13** — Route tests in `app.test.tsx`: `/soorten-fotoshoots` in the shell; heading outline (h1, 5× h2 shoots, h2 closing); five articles with anchors; contact links incl. `?pakket` targets; no portfolio links while `/portfolio` is noindex; `/#prijzen` link; no `noindex`; the `WebPage` script with 5 services; axe on the whole page.
|
||||
|
||||
### Documentation
|
||||
- [x] **Step 14** — `LAYOUT.md`: "Types of shoots" → Intro, Newborn, Pregnancy, Family, Loveshoot, Portraits, Prices & Book, per `.ai/layout-conventions.md`.
|
||||
- [x] **Step 15** — `_shared/reverse-engineering/`: only this feature's lines (route table, new components `CallToAction`, `shoots/*`, `RichParagraph` location, content `shootTypes`/page content, `serviceArea`, `/soorten-fotoshoots` indexed).
|
||||
|
||||
### Verification and summary
|
||||
- [x] **Step 16** — `pnpm check` (lint, format, tests incl. coverage, build, audits, Lighthouse with `/soorten-fotoshoots` as indexed page), after "claim 4173" to the peers and "4173 free" afterwards.
|
||||
- [x] **Step 17** — Visual check of `/soorten-fotoshoots` against `design/andreaslop-static/soorten-fotoshoots.html` at desktop, tablet and phone widths (puppeteer-core screenshots); anchors `#newborn` and `/#prijzen` land below the header; screenshots sent to the user.
|
||||
- [x] **Step 18** — Write `construction/soorten-fotoshoots-page/code/code-summary.md` (files, preview image, verification, open items for Andrea).
|
||||
- [x] **Step 19** — Commit(s) on `feature/soorten-fotoshoots-page`. Push/deploy to test only when asked; the merge to master waits for Andrea's approval of the Gezin text and the alt texts (BR-SF-17).
|
||||
|
||||
## Extension Compliance (unit 2)
|
||||
| Rule | Status | Rationale |
|
||||
|---|---|---|
|
||||
| SECURITY-04 | Compliant | CSP unchanged; only self-hosted images |
|
||||
| SECURITY-05 | Compliant | Query parameters only from our own package and shoot ids (BR-SF-03, PBT) |
|
||||
| SECURITY-10 | Compliant | No new dependencies |
|
||||
| SECURITY-11 | Compliant | JSON-LD through `jsonLdScript`; no e-mail, no prices (PBT) |
|
||||
| SECURITY-13 | Compliant | No external resources at runtime |
|
||||
| Other SECURITY rules | N/A | No data stores, endpoints, auth or infrastructure |
|
||||
| PBT-01 | Compliant | Properties identified in business-logic-model.md |
|
||||
| PBT-02 | Compliant | `jsonLdScript` round-trip already tested |
|
||||
| PBT-03 | Planned | Link and structured data invariants (Steps 5, 8) |
|
||||
| PBT-04 | Planned | `absoluteUrl` idempotency (Step 8) |
|
||||
| PBT-05, PBT-06 | N/A | No oracle, no stateful logic |
|
||||
| PBT-07 | Compliant | `shootType`/`uniqueShootTypes` from unit 1, existing package and site arbitraries |
|
||||
| PBT-08, PBT-09 | Compliant | Existing seed logging and fast-check setup |
|
||||
| PBT-10 | Planned | Example-based component and route tests alongside PBT |
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# Vragen Functional Design — Soorten fotoshoots-pagina (unit 2)
|
||||
|
||||
Al vastgelegd (geen vraag nodig):
|
||||
|
||||
- **Contactlink**: `?pakket=<id>` alleen voor shoots met een bestaand pakket (Newborn, Zwangerschap, Gezin); anders zonder. Voorlopig naar `/#contact` op de homepage, later naar `/contact` (één functie).
|
||||
- **Portfoliolink**: alleen zichtbaar als `/portfolio` geïndexeerd is, en (zodra de helper van portfolio er is) alleen voor shoots met portfoliofoto's.
|
||||
- **Koppen**: elke shoot is een `article` met een h2 (id `shoot-<id>-title`); het afsluitende blok een `section` met een h2.
|
||||
- **Foto's**: alleen de eerste shootfoto laadt meteen (die is op grote schermen direct in beeld); de rest laadt pas als hij in beeld komt.
|
||||
- **Gestructureerde data**: een `Service` per shoot in paginavolgorde, met naam, foto, aanbieder (het bedrijf) en werkgebied; geen prijzen.
|
||||
|
||||
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
|
||||
|
||||
---
|
||||
|
||||
## Vraag 1: Een eigen anker per shoot
|
||||
|
||||
Elke shoot kan een eigen adres krijgen, bijvoorbeeld `/soorten-fotoshoots#newborn`. Dan kun je vanaf elke plek (homepage, Instagram, een mail) direct naar één shoot linken, en zoekmachines kunnen elke `Service` aan zijn eigen plek op de pagina koppelen. Het anker landt net onder de vaste header, zoals `/#contact`.
|
||||
|
||||
- A) Ja: elke shoot krijgt zijn id als anker (`#newborn`, `#zwangerschap`, `#gezin`, `#loveshoot`, `#portret`), en de gestructureerde data verwijst per `Service` naar dat adres. Geen andere pagina's aanpassen in deze feature. (aanbevolen: kost niets, en de ids liggen al vast)
|
||||
- B) Ja, en meteen ook de prijskaarten op de homepage een link "Meer over deze shoot" naar het anker geven
|
||||
- C) Nee, geen ankers per shoot
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A (via de chat beantwoord: "Ja, alleen ankers")
|
||||
|
||||
## Vraag 2: De concepttekst van Gezin en de alt-teksten
|
||||
|
||||
De tekst van Gezin is een concept en de vijf alt-teksten zijn door mij geschreven. De pagina wordt bij de merge geïndexeerd (zichtbaar voor Google).
|
||||
|
||||
- A) De pagina gaat met deze teksten naar de testomgeving; Andrea leest ze daar na. De merge naar master (en dus live) wacht op haar akkoord of haar aanpassingen. (aanbevolen: zo ging het ook bij Over mij)
|
||||
- B) Gewoon mergen; aanpassingen van Andrea komen later als losse wijziging
|
||||
- C) Het blok Gezin voorlopig weglaten tot Andrea de tekst heeft goedgekeurd; de rest gaat wel mee
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A (via de chat beantwoord: "Merge wacht op Andrea")
|
||||
|
||||
## Vraag 3: Omschrijving per shoot in de gestructureerde data
|
||||
|
||||
Newborn heeft twee alinea's; de tweede is een uitnodiging ("Stuur gerust een berichtje…"), geen omschrijving van de shoot. Bij de andere shoots is er één alinea.
|
||||
|
||||
- A) Alleen de eerste alinea als omschrijving (bij Newborn dus zonder de uitnodiging). Eenvoudig en altijd een echte omschrijving. (aanbevolen)
|
||||
- B) Alle alinea's samengevoegd
|
||||
- C) Een aparte, korte omschrijving per shoot in `shootTypes.ts` (een nieuw veld), los van de tekst op de pagina
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A (via de chat beantwoord: "Eerste alinea")
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# Functional Design Plan — Unit 2: Soorten fotoshoots page
|
||||
|
||||
Depth: minimal. Scope from the execution plan: the rules for the contact and portfolio links, the structured data (`WebPage` + `ItemList` of `Service`) and their testable properties (PBT-01), the page content model and the component behaviour. Questions: [soorten-fotoshoots-page-fd-questions.md](soorten-fotoshoots-page-fd-questions.md).
|
||||
|
||||
- [x] Collect and analyse the answers in `soorten-fotoshoots-page-fd-questions.md`
|
||||
- [x] `domain-entities.md`: `ShootType` (from unit 1), `ShootTypesPageContent`, link targets, structured data entities (`WebPage`, `ItemList`, `ListItem`, `Service`, provider `@id`, `areaServed`)
|
||||
- [x] `business-rules.md`: contact link rules (package preselect, fallback, switch to `/contact`), portfolio link rules (live check, types with photos), structured data rules (fields, sources, order, exclusions), content and SEO registry rules (indexed, description, preview image, alt texts)
|
||||
- [x] `business-logic-model.md`: how the route turns content and site data into head tags, JSON-LD and the rendered page; the pure functions and their properties for PBT
|
||||
- [x] `frontend-components.md`: component hierarchy, props, heading ids, alternation and dividers, links with accessible names, priority photo, reveal, test ids
|
||||
- [x] Validate against requirements.md, application-design.md and the extension rules
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# Code Summary — Unit 2: Soorten fotoshoots page
|
||||
|
||||
Plan: [soorten-fotoshoots-page-code-generation-plan.md](../../plans/soorten-fotoshoots-page-code-generation-plan.md). Branch `feature/soorten-fotoshoots-page`, worktree `AndreaSlopFotografie-soorten-fotoshoots`.
|
||||
|
||||
## Files
|
||||
- Cherry-picked: contact-page's `790495d` "Adds a generic WebPage structured data helper" (`seo.ts`, `seo.test.ts`), as `3c7d00e`
|
||||
- Created: `web/public/og-soorten-fotoshoots.jpg` (1200×630 from the Newborn original, focus 0.5/0.42, 54 KB; alt "Een pasgeboren baby slaapt in een gestreept pakje")
|
||||
- Modified: `web/src/content/types.ts` (`ShootTypesPageContent`)
|
||||
- Created: `web/src/content/shootTypesPageContent.ts`
|
||||
- Created: `web/src/lib/shootLinks.ts` (+ test): `shootContactLink`, `shootPortfolioLink`, `isPortfolioLive`
|
||||
- Modified: `web/src/seo.ts` (+ test): `absoluteUrl`, `shootServices`
|
||||
- Modified: `web/src/sitePages.ts` (`/soorten-fotoshoots` indexed, description, `ogImage`), `web/src/sitemap.test.ts` (expected indexed pages)
|
||||
- Modified: `web/lighthouserc.cjs` (`/soorten-fotoshoots` indexed; new `photoPagePaths` exception, see below), `web/lighthouserc.desktop.cjs` (every entry back to 0.9)
|
||||
- Created: `web/src/components/shoots/ShootBlock/` and `ShootList/` (+ tests)
|
||||
- Modified: `web/src/routes/soorten-fotoshoots.tsx` (the page), `web/src/app.test.tsx` (route test)
|
||||
- Modified: `web/src/assets/shoots/*.jpg` and `content/shootTypes.ts`: re-cropped at 848×1060 instead of 960×1200, same crops and focus points as approved; the two landscape 1600 px originals only give an 854 px wide 4:5 crop, so 960×1200 was upscaled (15–20% fewer bytes now)
|
||||
- Modified: `LAYOUT.md` ("Types of shoots" with Family), `aidlc-docs/_shared/reverse-engineering/*` (this feature's lines only)
|
||||
|
||||
## Decisions made during generation
|
||||
- **Contact link name** (BR-SF-06): `aria-label` "Stuur een berichtje over een {shoot}" instead of a `VisuallyHidden` part; the accessible name dropped the hidden span's leading space ("berichtjeover").
|
||||
- **Router links**: the shoot links use TanStack's own `Link` via Chakra `asChild` (as the price cards do), so `search` is type-checked against the target route.
|
||||
- **Structured data in the component, not in `head()`** (user's choice): `head()` is part of the main bundle; with the shoot texts in it the main bundle grew 1.3 kB gzip. Now +0.3 kB gzip versus unit 1; the texts load with the page's own chunk. The `WebPage` JSON-LD is a `<script type="application/ld+json">` in the page, escaped by `jsonLdScript`.
|
||||
- **Lighthouse mobile threshold for photo pages** (user's choice): `/over-mij` and `/soorten-fotoshoots` get mobile performance 0.85 (desktop stays 0.9), documented in `lighthouserc.cjs`. Measured: both pages land on LCP 3.22 s and a score of ~0.897 in Lighthouse's simulated mobile load (FCP 0.72, LCP 0.72, TBT 0.99, CLS 1); fewer image bytes did not change the LCP; the cause is the main bundle plus the page chunk before the image is requested (NFR-P-01). Tried and reverted: no fade-in for the priority photo (no measurable effect).
|
||||
- **Homepage mobile** sits at 0.77–0.80 against its 0.8 threshold (already 0.80 in unit 1); a run at 0.69 was taken while the machine ran at half speed (Lighthouse benchmarkIndex 1909 instead of ~4200).
|
||||
|
||||
## Open for Andrea (merge waits for this, BR-SF-17)
|
||||
- The Gezin text (draft) and the five alt texts (see unit 1's code summary), reviewed on the test environment.
|
||||
|
||||
## Verification
|
||||
- **`pnpm check`**: lint, Prettier, 65 test files / 322 tests (coverage thresholds met), build, `audit:deps` clean (`audit:dev` 17 findings in dev tooling, non-blocking per NFR-SEC-05). Lighthouse (after a PC restart interrupted the first full run, rerun on the same build): all assertions passed. Mobile performance: `/` 0.80, `/over-mij` 0.90, `/soorten-fotoshoots` 0.89, others 0.94; desktop 1.0 everywhere; accessibility and best practices 1.0 on every page; SEO 1.0 on the indexed pages.
|
||||
- **Visual check** (production build via `vite preview` on port 4180, headless Chrome with `puppeteer-core`, reduced motion): `/soorten-fotoshoots` at 1440, 820 and 390 px against `design/andreaslop-static/soorten-fotoshoots.html` at 1440 px. Structure, order, alternation, dividers, closing block and footer match. Known differences, both deliberate: the content column is the site-wide width (same as the homepage and Over mij), and section headings are 30 px instead of the design's 2.5rem (theme `sectionTitle`, owner's earlier request). On phones the photo sits above the text and the coloured block is hidden. `#zwangerschap` lands exactly below the fixed header (article top 68 px = header bottom 68 px). Screenshots sent to the user.
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
# Business Logic Model — Unit 2: Soorten fotoshoots page
|
||||
|
||||
## Flow
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Content["shootTypes + page content + packages + siteContent + sitePages"] --> Route["routes/soorten-fotoshoots.tsx"]
|
||||
Route --> Head["head(): pageHead + structuredDataScript"]
|
||||
Head --> Services["shootServices(shoots, site)"]
|
||||
Services --> WebPage["webPage('WebPage', path, mainEntity)"]
|
||||
Route --> Body["component: PageIntro, ShootList, CallToAction"]
|
||||
Body --> Links["shootContactLink / shootPortfolioLink"]
|
||||
Body --> Live["isPortfolioLive(sitePages)"]
|
||||
classDef data fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef fn fill:#9C27B0,stroke:#4a148c,color:#000;
|
||||
classDef ui fill:#4CAF50,stroke:#2e7d32,color:#000;
|
||||
class Content data;
|
||||
class Services,WebPage,Links,Live,Head fn;
|
||||
class Route,Body ui;
|
||||
```
|
||||
|
||||
Text alternative: static content goes into the route; its head builds the page JSON-LD from the shoot services, its component renders the page and derives the links.
|
||||
|
||||
## Pure functions
|
||||
|
||||
| Function | Location | In → Out |
|
||||
|---|---|---|
|
||||
| `shootContactLink(shoot, packages)` | `lib/shootLinks.ts` | shoot type + package list → router link props (BR-SF-01..03) |
|
||||
| `shootPortfolioLink(shoot)` | `lib/shootLinks.ts` | shoot type → `{ to: '/portfolio', search: { shoot: id } }` |
|
||||
| `isPortfolioLive(pages)` | `lib/shootLinks.ts` | page registry → `pages['/portfolio'].indexed` (BR-SF-04) |
|
||||
| `absoluteUrl(src)` | `seo.ts` | image src → absolute URL (BR-SF-13) |
|
||||
| `shootServices(shoots, site)` | `seo.ts` | shoot types + site content → `ItemList` (BR-SF-10..15) |
|
||||
| `webPage(type, path, extra)` | `seo.ts` (contact-page) | page type + path + extra → `WebPage` |
|
||||
|
||||
## Properties for PBT (PBT-01)
|
||||
|
||||
### `shootContactLink` (arbitraries: `shootType`, `uniquePackages`, `anyPackage`)
|
||||
- **Invariant**: `to` is always `'/'` and `hash` always `'contact'`.
|
||||
- **Invariant**: `search.pakket` is present iff `packageId` is the id of a visible package, and then equals it.
|
||||
- **Invariant**: the result never contains a value that is not one of the given package ids.
|
||||
|
||||
### `shootPortfolioLink`
|
||||
- **Invariant**: `search.shoot` equals the shoot's id, `to` is `/portfolio`.
|
||||
|
||||
### `shootServices` (arbitraries: `uniqueShootTypes`, `anySiteContent`)
|
||||
- **Invariant**: `numberOfItems` and the number of list items equal the number of shoots; positions are 1..n in order; item `name`s follow the shoot order.
|
||||
- **Invariant**: every `@id` is the canonical page URL + `#` + id, and all `@id`s are distinct.
|
||||
- **Invariant**: every `provider` is `{ '@id': businessId }`; every `areaServed` equals `areaServed(site.serviceArea)`.
|
||||
- **Invariant**: `description` is the first paragraph.
|
||||
- **Invariant**: the JSON never contains the site e-mail address and has no `offers`/`price`.
|
||||
- **Round-trip** (existing): `jsonLdScript` output parses back to the same data.
|
||||
|
||||
### `absoluteUrl`
|
||||
- **Invariant**: output starts with `https://`; a path keeps its value after `siteUrl`.
|
||||
- **Idempotency**: `absoluteUrl(absoluteUrl(x)) === absoluteUrl(x)`.
|
||||
|
||||
## Head and structured data
|
||||
`head()` = `pageHead('/soorten-fotoshoots')`: title, description, canonical, `og:*` and, with `indexed: true`, no robots tag.
|
||||
|
||||
The `WebPage` JSON-LD (`webPage('WebPage', '/soorten-fotoshoots', { mainEntity: shootServices(shootTypes, siteContent) })`, escaped by `jsonLdScript`) is rendered as a `<script type="application/ld+json">` **in the page component**, not in `head()`. *Changed during Code Generation at the user's request:* `head()` is part of the main bundle, so the shoot texts it needed added 1.3 kB (gzip) to every page while the homepage's mobile performance sits right at its 0.8 threshold; the component is code-split, so the texts now only load with this page (main bundle +0.3 kB gzip instead of +1.3 kB). Google reads JSON-LD anywhere in the page.
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
# Business Rules — Unit 2: Soorten fotoshoots page
|
||||
|
||||
## Contact link (BR-SF-01..03)
|
||||
- **BR-SF-01** A shoot links to the contact form with `?pakket=<packageId>` only when its `packageId` names a *visible* package (`visiblePackages(packages)`); otherwise without `search`. The homepage would ignore an unknown id anyway (`packageFromSearch`), but no dead parameter is generated.
|
||||
- **BR-SF-02** The target is the homepage contact section (`/`, hash `contact`) until contact-page lands; then only `shootContactLink` changes to `/contact` (same `?pakket=`). The closing button follows the same switch.
|
||||
- **BR-SF-03** Only our own package ids ever go into the query string; nothing from the URL or free text.
|
||||
|
||||
## Portfolio link (BR-SF-04..05)
|
||||
- **BR-SF-04** The "Bekijk meer …foto's" links render only when `/portfolio` is `indexed` in `sitePages.ts`. Until then none render (no link to a placeholder).
|
||||
- **BR-SF-05** Once portfolio-page's helper (working name `shootTypesWithPhotos`) is in master, a link renders only for shoot types with portfolio photos. Until that helper exists, all types get the link when the portfolio is live (the portfolio page falls back to "Alles").
|
||||
|
||||
## Accessible names (BR-SF-06)
|
||||
- **BR-SF-06** Visible link texts stay as designed. The contact link gets the full name as `aria-label`: "Stuur een berichtje over een {shootLabel lowercase}"; it starts with the visible text, so voice control still matches it (WCAG 2.5.3). *Changed during Code Generation from a `VisuallyHidden` part: accessible-name computation drops the leading space of a hidden span, which glued "berichtje" and "over" together.* "Bekijk meer {photosLabel}" needs no addition (already unique).
|
||||
|
||||
## Page structure (BR-SF-07..09)
|
||||
- **BR-SF-07** One h1 (page head). Each shoot is an `article` with `id={shoot.id}` (anchor), `aria-labelledby` its h2 `shoot-{id}-title`. The closing block is a `section` named by its h2 `shoot-types-cta-title`.
|
||||
- **BR-SF-08** The shoots render in list order; the 2nd, 4th, … block is reversed (photo right from `lg`). A hairline (`line` token) separates consecutive blocks.
|
||||
- **BR-SF-09** Anchors land below the fixed header (`scrollMarginTop: header.sticky`, as `PageSection` does for its id).
|
||||
|
||||
## Structured data (BR-SF-10..15)
|
||||
- **BR-SF-10** One `Service` per shoot type, in list order; `ListItem.position` runs 1..n without gaps; `numberOfItems` = n.
|
||||
- **BR-SF-11** `Service['@id']` and `url` = canonical page URL + `#` + id; ids are unique, so the `@id`s are unique.
|
||||
- **BR-SF-12** `description` = the shoot's first paragraph (FD Q3 = A); `name` and `serviceType` = `shootLabel`.
|
||||
- **BR-SF-13** `image` is absolute: `siteUrl` + `image.src` when `src` is a path, unchanged when already absolute.
|
||||
- **BR-SF-14** Every `Service.provider` is `{ '@id': businessId }`; every `areaServed` equals `areaServed(site.serviceArea)`.
|
||||
- **BR-SF-15** No prices, no e-mail address; the script goes through `structuredDataScript`/`jsonLdScript` (escaped).
|
||||
|
||||
## SEO registry and content (BR-SF-16..18)
|
||||
- **BR-SF-16** `/soorten-fotoshoots`: `indexed: true`, title unchanged ("Soorten fotoshoots"), description "Newborn-, zwangerschaps-, gezins-, love- en portretshoots: ontdek welke fotoshoots Andrea Slop Fotografie aanbiedt in Huizen, het Gooi en omgeving." (147 chars), `ogImage` `/og-soorten-fotoshoots.jpg` 1200×630 with alt text. Moved to the indexed paths in `lighthouserc.cjs`.
|
||||
- **BR-SF-17** The Gezin text (draft) and the five alt texts go to the test environment for Andrea's review; the merge to master waits for her approval or changes (FD Q2 = A).
|
||||
- **BR-SF-18** Only the first shoot photo loads with priority; all others are deferred.
|
||||
|
||||
## Decision flow: which links a shoot shows
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Start["Shoot block"] --> Pkg{"packageId names a visible package?"}
|
||||
Pkg -->|"yes"| WithPkg["Contact link with ?pakket"]
|
||||
Pkg -->|"no"| Plain["Contact link without search"]
|
||||
WithPkg --> Live{"/portfolio indexed?"}
|
||||
Plain --> Live
|
||||
Live -->|"no"| Done["Only the contact link"]
|
||||
Live -->|"yes"| Helper{"photos helper available?"}
|
||||
Helper -->|"no"| Both["Contact + portfolio link"]
|
||||
Helper -->|"yes"| Has{"type has portfolio photos?"}
|
||||
Has -->|"yes"| Both
|
||||
Has -->|"no"| Done
|
||||
classDef step fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef decision fill:#FF9800,stroke:#e65100,color:#000;
|
||||
classDef result fill:#4CAF50,stroke:#2e7d32,color:#000;
|
||||
class Start,WithPkg,Plain step;
|
||||
class Pkg,Live,Helper,Has decision;
|
||||
class Done,Both result;
|
||||
```
|
||||
|
||||
Text alternative: every shoot gets a contact link (with ?pakket only for a visible package); a portfolio link is added only when the portfolio page is live and, once the helper exists, only for types with portfolio photos.
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
# Domain Entities — Unit 2: Soorten fotoshoots page
|
||||
|
||||
## Relationships
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Page["ShootTypesPageContent"] -->|"head, closing"| Rich["RichText (closing lead)"]
|
||||
Shoots["ShootType list (shootTypes.ts)"] -->|"packageId"| Pkg["PricingPackage (packages.ts)"]
|
||||
Shoots -->|"image"| Img["ContentImage 4:5"]
|
||||
Site["SiteContent"] -->|"serviceArea"| Area["ServiceArea"]
|
||||
WebPage["WebPage JSON-LD"] -->|"mainEntity"| List["ItemList"]
|
||||
List -->|"itemListElement"| Item["ListItem (position)"]
|
||||
Item -->|"item"| Service["Service"]
|
||||
Service -->|"provider @id"| Business["ProfessionalService (businessId)"]
|
||||
Service -->|"areaServed"| Area
|
||||
Shoots -->|"one per shoot"| Service
|
||||
classDef content fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef ld fill:#9C27B0,stroke:#4a148c,color:#000;
|
||||
classDef existing fill:#e2e8f0,stroke:#4a5568,color:#000;
|
||||
class Page,Shoots,Rich,Img content;
|
||||
class WebPage,List,Item,Service ld;
|
||||
class Pkg,Site,Area,Business existing;
|
||||
```
|
||||
|
||||
Text alternative: the page content and the shoot type list (which refers to packages and photos) feed the page; each shoot becomes a Service in an ItemList, the main entity of the WebPage, provided by the existing business and serving the shared service area.
|
||||
|
||||
## Content
|
||||
|
||||
### `ShootType` (unit 1, unchanged)
|
||||
| Field | Type | Notes |
|
||||
|---|---|---|
|
||||
| `id` | `ShootTypeId` | stable; anchor on the page (`#newborn`) and filter value on `/portfolio` |
|
||||
| `name` | string | h2 |
|
||||
| `shootLabel` | string | full name, `serviceType` and hidden link text |
|
||||
| `photosLabel` | string | "Bekijk meer {photosLabel}" |
|
||||
| `paragraphs` | string[] | ≥ 1; the first is the description in the structured data |
|
||||
| `image` | `ContentImage` | 960×1200 |
|
||||
| `frameColor` | `FrameColor` | block behind the photo |
|
||||
| `packageId?` | string | an id in `packages.ts`, for `?pakket=` |
|
||||
|
||||
### `ShootTypesPageContent` (new, `content/types.ts`)
|
||||
| Field | Type | Value |
|
||||
|---|---|---|
|
||||
| `head.eyebrow` | string | "Mogelijkheden" |
|
||||
| `head.title` | string | "Soorten fotoshoots" |
|
||||
| `head.intro` | string | "Hieronder vind je de verschillende soorten fotoshoots die je bij mij kunt boeken. Ik fotografeer voornamelijk in Huizen, Bussum, Hilversum en omgeving, maar ik kom ook naar andere locaties." |
|
||||
| `closing.title` | string | "Benieuwd naar de prijzen?" |
|
||||
| `closing.lead` | `RichText` | `['Bekijk ', { text: 'de pakketten', to: '/', hash: 'prijzen' }, ' op de homepage of stel je vraag via het contactformulier.']` |
|
||||
| `closing.booking` | `LinkTarget & { label }` | `{ label: 'Boek je shoot', to: '/', hash: 'contact' }` (later `/contact`, together with the shoot links) |
|
||||
|
||||
Stored in `content/shootTypesPageContent.ts`.
|
||||
|
||||
## Link targets (derived, never stored)
|
||||
| Link | Target |
|
||||
|---|---|
|
||||
| Contact, shoot with a visible package | `{ to: '/', search: { pakket: packageId }, hash: 'contact' }` |
|
||||
| Contact, otherwise | `{ to: '/', hash: 'contact' }` |
|
||||
| Portfolio | `{ to: '/portfolio', search: { shoot: id } }` |
|
||||
|
||||
## Structured data
|
||||
| Entity | Fields |
|
||||
|---|---|
|
||||
| `WebPage` | from `webPage('WebPage', '/soorten-fotoshoots', { mainEntity })` (contact-page's helper: `@context`, `@id`, `url`, `name`, `description`, `inLanguage`) |
|
||||
| `ItemList` | `@type`, `itemListElement`, `numberOfItems` |
|
||||
| `ListItem` | `@type`, `position` (1-based, page order), `item` |
|
||||
| `Service` | `@type`, `@id` = `{canonical page url}#{id}`, `url` (same), `name` = `shootLabel`, `serviceType` = `shootLabel`, `description` = first paragraph, `image` = absolute photo URL, `provider` = `{ '@id': businessId }`, `areaServed` = `areaServed(site.serviceArea)` |
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
# Frontend Components — Unit 2: Soorten fotoshoots page
|
||||
|
||||
## Hierarchy
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Route["routes/soorten-fotoshoots.tsx"] --> Intro["PageIntro (h1)"]
|
||||
Route --> List["shoots/ShootList"]
|
||||
Route --> Cta["CallToAction"]
|
||||
List --> Section["PageSection flushTop"]
|
||||
List --> Block["shoots/ShootBlock x5"]
|
||||
Block --> MT["MediaText (reverse, frameColor)"]
|
||||
Block --> Contact["Contact link"]
|
||||
Block --> Folio["Portfolio link (when live)"]
|
||||
Cta --> RP["RichParagraph (lead)"]
|
||||
Cta --> Btn["LinkButton accent"]
|
||||
classDef root fill:#4CAF50,stroke:#2e7d32,color:#000;
|
||||
classDef page fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef shared fill:#9C27B0,stroke:#4a148c,color:#000;
|
||||
class Route root;
|
||||
class List,Block,Contact,Folio page;
|
||||
class Intro,Cta,Section,MT,RP,Btn shared;
|
||||
```
|
||||
|
||||
Text alternative: the route renders PageIntro, ShootList (a PageSection with five ShootBlocks on MediaText, each with a contact link and possibly a portfolio link) and CallToAction (RichParagraph lead and an accent LinkButton).
|
||||
|
||||
## `ShootList`
|
||||
- **Props**: `shoots: ShootType[]`, `packages: PricingPackage[]`, `portfolioLive: boolean`
|
||||
- `PageSection spacing="flushTop"` without a name (the articles carry the names); renders `ShootBlock` per shoot with `reverse = index % 2 === 1`, `priority = index === 0`.
|
||||
- Hairline: every block after the first has a top border `1px solid line` and vertical padding as the design (`.shoot`: `clamp(2.5rem, 6vw, 5rem)`).
|
||||
- `data-testid="shoot-list"`.
|
||||
|
||||
## `ShootBlock`
|
||||
- **Props**: `shoot`, `packages`, `reverse`, `priority`, `portfolioLive`
|
||||
- `article` with `id={shoot.id}`, `aria-labelledby="shoot-{id}-title"`, `scrollMarginTop="header.sticky"`, `data-testid="shoot-{id}"`.
|
||||
- `MediaText` with `aspectRatio="4 / 5"`, `frameColor`, `reverse`, `priority`.
|
||||
- Text column: h2 `textStyle="sectionTitle"` (design `.shoot__title`, margin below 1.25rem), paragraphs in `ink.soft`, then the links in a wrapping row (gap 6), each `Link variant="underline"` via `RouterLink`:
|
||||
- "Stuur een berichtje" + `VisuallyHidden` " over een {shootLabel lowercase}" → `shootContactLink` (`data-testid="shoot-{id}-contact"`)
|
||||
- when `portfolioLive`: "Bekijk meer {photosLabel}" → `shootPortfolioLink` (`data-testid="shoot-{id}-portfolio"`)
|
||||
- Touch targets: links get enough vertical padding for ≥ 44 px height.
|
||||
|
||||
## `CallToAction` use (route)
|
||||
- `title` "Benieuwd naar de prijzen?", `titleId="shoot-types-cta-title"`, `lead=<RichParagraph paragraph={closing.lead} />`, child `LinkButton variant="accent" to="/" hash="contact"` "Boek je shoot", `data-testid="shoot-types-cta"`.
|
||||
|
||||
## Interactions
|
||||
- Links are plain router links; `/?pakket=…#contact` preselects the package on the homepage and lands on the contact section (existing behaviour).
|
||||
- `/soorten-fotoshoots#newborn` etc. land on the shoot below the fixed header.
|
||||
- Reveal on scroll via `MediaText`/`CallToAction` (respects `prefers-reduced-motion`).
|
||||
- No state, no forms, no API calls.
|
||||
Reference in New Issue
Block a user