Plans the Over mij page

Refreshes the reverse engineering docs after the homepage sections and
records the requirements, execution plan and application design for the
Over mij page: live texts in the design's structure, an indexed page with
its own structured data and preview image, and shared building blocks
(PageSection, MediaText, Eyebrow) reused by the homepage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 23:35:21 +02:00
co-authored by Claude Opus 5.5
parent 99d4610928
commit 26106f280f
21 changed files with 1341 additions and 41 deletions
@@ -0,0 +1,68 @@
# Application Design — Over mij Page
Consolidated view of [components.md](components.md), [component-methods.md](component-methods.md), [services.md](services.md) and [component-dependency.md](component-dependency.md). Decisions: [application-design-plan.md](../plans/application-design-plan.md) (Q1–Q4 = A).
## Design Decisions
| # | Decision |
|---|---|
| Q1 | `MediaText` is layout only: photo as data, text column as `children` |
| Q2 | One `Eyebrow` component (`as` prop) for every accent label; with `as="h3"` it is the story headings; `SectionHeading`, `PageIntro`, `ContactFormGate` and `TestimonialSlide` switch to it |
| Q3 | New small `PhotoDuo`; `IntroGallery` stays as it is |
| Q4 | Page-specific components in `components/about/` (`AboutIntro`, `StorySection`, `RichParagraph`); shared blocks each in their own folder under `components/` |
| — | `HomeSection` → `PageSection`, plus spacing `flushTop` |
| — | Structured data builders in `seo.ts`; route head = `pageHead` + `AboutPage` script; business gets a stable `@id` |
| — | Content in `content/aboutContent.ts` typed by `AboutPageContent`; images in `assets/about/`, preview image in `public/` |
## Page Composition
```mermaid
graph TD
Page["/over-mij"] --> Intro["PageIntro: eyebrow + h1 Over mij"]
Page --> A["AboutIntro: PageSection flushTop + MediaText"]
A --> AH["SectionHeading: Lifestyle fotograaf + h2 Hoi! Ik ben Andrea"]
A --> AP["RichParagraph x3 with links /portfolio and /#contact"]
Page --> B["StorySection tone alt: Eyebrow h3 Hoe het begon + text"]
Page --> D["PhotoDuo: two 3:2 photos"]
Page --> E["StorySection: Eyebrow h3 Buiten de camera om + text"]
E --> Btn["LinkButton accent: Boek je shoot to /#contact"]
classDef page fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
classDef block fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
classDef part fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
class Page page;
class Intro,A,B,D,E block;
class AH,AP,Btn part;
```
Text alternative: the page renders the page head with the h1, the intro block (photo next to an h2 and three paragraphs with links), the "Hoe het begon" story block on the alternate background, the photo duo, and the "Buiten de camera om" story block ending in the booking button.
Heading outline: h1 Over mij → h2 Hoi! Ik ben Andrea → h3 Hoe het begon, h3 Buiten de camera om.
## Components
- **New shared**: `MediaText`, `Eyebrow` (unit 1), `PhotoDuo` (unit 2)
- **Changed shared**: `PageSection` (renamed + `flushTop`), `SectionHeading`, `PageIntro`, `ContactFormGate`, `TestimonialSlide` (use `Eyebrow`), `home/AboutBlock` (uses `MediaText`) — all output-preserving
- **New page-specific**: `about/AboutIntro`, `about/StorySection`, `about/RichParagraph`
- **Changed modules**: `routes/over-mij.tsx`, `content/types.ts`, `seo.ts`, `sitePages.ts`, `lighthouserc*.cjs`
- **New modules/assets**: `content/aboutContent.ts`, `assets/about/*`, `public/og-over-mij.jpg`
Interfaces: see [component-methods.md](component-methods.md).
## Composition and Data Flow
Props down only, from the route; no service layer, context or fetching. The route builds the head from `seo.ts` and passes static content to presentational components (see [services.md](services.md)).
## Dependencies and Order
See [component-dependency.md](component-dependency.md). Unit 1 builds `Eyebrow`, `PageSection` and `MediaText` and switches the existing users with unchanged output; unit 2 builds the page on top.
## Left to Functional Design (unit 2)
- `RichText` (paragraph with inline links) and the type of link targets that may include a hash (`/#contact`)
- Fields and rules of the `Person` / `AboutPage` structured data, and the properties to test (PBT-01)
## Extension Compliance — Application Design
| Rule | Status | Rationale |
|---|---|---|
| SECURITY-04 | Compliant | No CSP change; only self-hosted assets |
| SECURITY-10 | Compliant | No new dependencies |
| SECURITY-11 | Compliant | Structured data via the escaping `jsonLdScript`; e-mail kept out |
| SECURITY-13 | Compliant | No external resources |
| Other SECURITY rules | N/A | No data stores, endpoints, auth, infrastructure or server code |
| PBT-01 | Planned | Properties of the SEO builders identified in Functional Design (unit 2) |
| PBT-02..10 | N/A at this stage | Applied in Functional Design and Code Generation |
@@ -0,0 +1,67 @@
# Component Dependencies — Over mij Page
## Dependency Matrix
| Component (uses →) | PageSection | MediaText | Eyebrow | SectionHeading | PhotoDuo | FramedImage | DeferredImage | Reveal | LinkButton | Link + RouterLink |
|---|---|---|---|---|---|---|---|---|---|---|
| routes/over-mij.tsx | | | | | ✓ | | | | ✓ | |
| AboutIntro | ✓ | ✓ | | ✓ | | | | | | ✓ (via RichParagraph) |
| StorySection | ✓ | | ✓ | | | | | ✓ | | |
| RichParagraph | | | | | | | | | | ✓ |
| home/AboutBlock | ✓ | ✓ | | ✓ | | | | | | ✓ |
| MediaText | | | | | | ✓ | | ✓ | | |
| PhotoDuo | | | | | | | ✓ | ✓ | | |
| SectionHeading | | | ✓ | | | | | | | |
| PageIntro | | | ✓ | | | | | | | |
| ContactFormGate, TestimonialSlide | | | ✓ | | | | | | | |
| other home sections | ✓ | | | ✓ | | | ✓ | ✓ | | |
The route also uses `PageIntro`, the components in `components/about/`, `content/aboutContent.ts`, `content/siteContent.ts` and `seo.ts`.
## Diagram
```mermaid
graph TD
Route["routes/over-mij.tsx"] --> PageIntro
Route --> AboutIntro["about/AboutIntro"]
Route --> Story["about/StorySection (x2)"]
Route --> PhotoDuo
Route --> LinkButton
Route --> Content["content/aboutContent.ts"]
Route --> Seo["seo.ts + sitePages.ts"]
AboutIntro --> MediaText
AboutIntro --> SectionHeading
AboutIntro --> Rich["about/RichParagraph"]
Story --> Eyebrow
Story --> PageSection
AboutIntro --> PageSection
HomeAbout["home/AboutBlock"] --> MediaText
HomeAbout --> PageSection
MediaText --> FramedImage
FramedImage --> DeferredImage
PhotoDuo --> DeferredImage
SectionHeading --> Eyebrow
PageIntro --> Eyebrow
classDef route fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
classDef newpart fill:#FFA726,stroke:#E65100,stroke-width:1px,color:#000;
classDef changed fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef existing fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000;
class Route route;
class AboutIntro,Story,Rich,PhotoDuo,MediaText,Eyebrow,Content newpart;
class PageSection,HomeAbout,SectionHeading,PageIntro,Seo changed;
class FramedImage,DeferredImage,LinkButton existing;
```
Text alternative: the route composes PageIntro, AboutIntro, two StorySections, PhotoDuo and LinkButton from aboutContent and the SEO module; AboutIntro and the homepage AboutBlock both use MediaText and PageSection; StorySection, SectionHeading and PageIntro use the new Eyebrow; MediaText and PhotoDuo rely on FramedImage/DeferredImage (new in orange, changed in blue, existing in grey).
## Communication Patterns
- **Props down only**: content flows from the route into components; no context, store or fetching. Components stay presentational and testable in isolation.
- **Heading ids**: each section component owns a constant title id (as on the homepage) or receives one (`StorySection` is used twice, so the route passes `titleId`), and passes it to `PageSection labelledBy`.
- **Theme coupling**: components reference tokens by name (`paper.alt`, `gridGap`, `accent.deep`, text styles); no literal colours.
## Data Flow
`aboutContent.ts` (static data, image imports) → route → page components → shared blocks → Chakra primitives. Head data: `sitePages.ts` + `siteContent.ts` → `seo.ts` builders → route `head()` → `HeadContent` in the root route.
## Change Order (from the dependencies)
1. Unit 1: `Eyebrow` → switch `SectionHeading`/`PageIntro`/`ContactFormGate`/`TestimonialSlide` → rename `HomeSection` → `PageSection` (+ `flushTop`) → `MediaText` → switch `AboutBlock`. Homepage output unchanged after each step.
2. Unit 2: assets → content types and data → `seo.ts`/`sitePages.ts` → `PhotoDuo`, `components/about/*` → route → Lighthouse config → LAYOUT.md.
@@ -0,0 +1,107 @@
# Component Methods — Over mij Page
Props are TypeScript types; components are default-exported function components, as elsewhere in `web/src/components/`. Business rules (structured data contents, inline link model) are detailed in Functional Design for unit 2.
## Shared building blocks
### PageSection (renamed from HomeSection)
```ts
type PageSectionProps = {
labelledBy: string; // id of the heading that names the section
id?: string; // anchor target, gets the header offset
tone?: 'paper' | 'alt';
width?: 'default' | 'narrow' | 'full';
spacing?: 'default' | 'tight' | 'flushTop'; // flushTop: new
'data-testid'?: string;
children: ReactNode;
};
```
### MediaText
```ts
type MediaTextProps = {
image: ContentImage;
aspectRatio: string; // crop of the photo, e.g. '4 / 3'
'data-testid'?: string;
children: ReactNode; // the text column
};
```
- Renders the grid; the photo column is `FramedImage`, each column wrapped in `Reveal`.
- A `reverse` (photo on the right) option is **not** added: no page needs it yet (design `.about--reverse` is unused).
### Eyebrow
```ts
type EyebrowProps = Omit<TextProps, 'as'> & {
as?: 'p' | 'span' | 'h2' | 'h3' | 'h4'; // default 'p'
children: ReactNode;
};
```
- Applies `textStyle="eyebrow"`, `color="accent.deep"`, `mb={4}`; other `TextProps` (e.g. `id`, `mb`) pass through, so a heading can be referenced by `aria-labelledby`.
- Heading levels do not get the heading recipe's font family/size: the label style wins on purpose (FR-OM-03).
### PhotoDuo
```ts
type PhotoDuoProps = {
photos: [ContentImage, ContentImage];
label: string; // accessible name of the list, e.g. "Foto's"
'data-testid'?: string;
};
```
### SectionHeading, PageIntro, ContactFormGate, TestimonialSlide
- Props unchanged; internally `Eyebrow` replaces the inline `Text` label.
## Page-specific components (`components/about/`)
### AboutIntro
```ts
type AboutIntroProps = { content: AboutPageContent['intro'] };
```
### StorySection
```ts
type StorySectionProps = {
content: AboutPageContent['story']; // one story block: title + paragraphs
titleId: string; // id of the h3, for aria-labelledby
tone?: 'paper' | 'alt';
children?: ReactNode; // below the text, e.g. the booking button
'data-testid'?: string;
};
```
### RichParagraph
```ts
type RichParagraphProps = { paragraph: RichText }; // RichText defined in Functional Design
```
## Route
```ts
export const Route = createFileRoute('/over-mij')({
head: () => aboutHead(aboutContent, siteContent), // or inline: pageHead + script
component: About,
});
```
## SEO functions (`seo.ts`, pure, 100% coverage)
```ts
export const businessId: string; // e.g. `${siteUrl}/#business`
export function professionalService(content: SiteContent); // now includes '@id': businessId
export function person(content: SiteContent, image: OgImage): PersonJsonLd;
export function aboutPage(path: RoutePath, content: SiteContent): AboutPageJsonLd;
export function structuredDataScript(data: unknown): { type: 'application/ld+json'; children: string };
```
- `structuredDataScript` wraps the existing `jsonLdScript` so `siteHead` and the about page build the script tag the same way.
- Exact fields and the rules behind them (`sameAs`, image, no e-mail, `@id` links) are specified in Functional Design (unit 2).
## Content types (`content/types.ts`)
```ts
export interface AboutPageContent {
head: { eyebrow: string; title: string };
intro: { eyebrow: string; title: string; paragraphs: RichText[]; image: ContentImage };
background: { title: string; paragraphs: string[] };
photos: [ContentImage, ContentImage];
personal: { title: string; paragraphs: string[] };
booking: { label: string; to: /* route + optional hash, see Functional Design */ };
}
```
- `RichText` and the link target type are defined in Functional Design.
@@ -0,0 +1,64 @@
# Components — Over mij Page
All paths are under `web/src/`. "Unit" refers to the execution plan (1 = Shared blocks, 2 = Over mij page).
## Shared building blocks (`components/<Name>/`)
### PageSection — changed (unit 1)
- **Was**: `HomeSection` (renamed: folder, file, component, test, all imports). *Source: Q9 = A*
- **Purpose**: frame of a content section on any page (design `.section`): `section` element named by its heading, vertical rhythm, background tone, content column, anchor offset under the fixed header.
- **Change besides the rename**: spacing option `flushTop` — no top padding, for the first block directly under a page head (design `.section--flush-top`). Existing options and output stay identical.
### MediaText — new (unit 1)
- **Purpose**: a photo in the sand-coloured frame next to a text column (design `.about`); stacked on phones and tablets, two equal columns from `lg`, vertically centred. Both columns fade in (`Reveal`).
- **Interface**: layout only — the photo comes in as data, the text column as `children`. *Source: Q1 = A*
- **Used by**: homepage `AboutBlock` (unit 1, no visible change) and `AboutIntro` (unit 2).
- **Reuses**: `FramedImage` (→ `DeferredImage`), `Reveal`, Chakra `Grid`.
### Eyebrow — new (unit 1)
- **Purpose**: the small capitals label above a heading (design `.eyebrow`) in one place: text style `eyebrow`, colour `accent.deep` (meets 4.5:1), standard space below. Renders a `p` by default; with `as="h3"` (or another heading level) it is a real heading that looks like the label. *Source: Q2 = A*
- **Replaces** the four identical inline label blocks in `SectionHeading`, `PageIntro`, `ContactFormGate` and `TestimonialSlide` (same output). Labels that look different on purpose (hero on photos, footer column titles, form labels, nav links, testimonial author line) are left alone.
### PhotoDuo — new (unit 2)
- **Purpose**: two landscape photos side by side at 3:2 (design `.intro-gallery--duo`), one below the other on phones; no stagger, no swipe row. *Source: Q3 = A*
- **Semantics**: a labelled list of figures (`ul`/`li`), each image with its own alt text.
- **Hover**: the design's `.intro-gallery figure:hover img` zoom applies to the duo too, so `PhotoDuo` zooms gently on hover like `IntroGallery`, with `_motionReduce` turning the transition off.
- **Reuses**: `DeferredImage`, `Reveal`, token `gridGap`.
### Existing, reused unchanged
- `PageIntro` (page head with the h1) — only switches to `Eyebrow` internally.
- `SectionHeading` (eyebrow + h2 + lead) — only switches to `Eyebrow` internally.
- `FramedImage`, `DeferredImage`, `Reveal`, `LinkButton` (`accent`), `RouterLink`, Chakra `Link` (`underline` variant).
## Page-specific components (`components/about/`, unit 2) — *Source: Q4 = A*
### AboutIntro
- **Purpose**: the "Hoi! Ik ben Andrea" block: `PageSection` (`flushTop`) → `MediaText` with the portrait → `SectionHeading` (eyebrow "Lifestyle fotograaf", h2, `align="start"`, compact) and the paragraphs, one of which contains the links "mijn portfolio" and "neem contact op".
### StorySection
- **Purpose**: one text block of Andrea's story, used twice ("Hoe het begon", "Buiten de camera om"): `PageSection` (narrow column, tone per use) → `Eyebrow as="h3"` → paragraphs → optional `children` below the text (the "Boek je shoot" button).
### RichParagraph (helper inside `components/about/`, or shared if Functional Design shows a second user)
- **Purpose**: renders one paragraph of the content model in which some words are links (shape defined in Functional Design), mapping link segments to `Link variant="underline"` + `RouterLink`.
## Route
### routes/over-mij.tsx — changed (unit 2)
- `head()`: `pageHead('/over-mij')` plus the `AboutPage` JSON-LD script.
- `component`: `PageIntro` → `AboutIntro` → `StorySection` (Hoe het begon, `paper.alt`) → `PhotoDuo` → `StorySection` (Buiten de camera om, with `LinkButton`).
## Content and SEO modules
### content/aboutContent.ts + `AboutPageContent` in content/types.ts — new (unit 2)
- Page head texts, intro block (eyebrow, title, paragraphs, portrait), two story blocks (title, paragraphs), duo photos, booking button (label, target).
### seo.ts — changed (unit 2)
- New pure builders for the `Person` and `AboutPage` structured data; the business (`professionalService`) gets a stable `@id`.
### sitePages.ts — changed (unit 2)
- `/over-mij`: new title and description, `indexed: true`, `ogImage` → `/og-over-mij.jpg` (1200×630).
### Lighthouse config — changed (unit 2)
- `lighthouserc.cjs` / `.desktop.cjs`: `/over-mij` moves from the noindex to the indexed paths.
## Assets (unit 2)
- `assets/about/`: portrait and two duo photos (resized originals).
- `public/og-over-mij.jpg`: 1200×630 crop of the portrait.
@@ -0,0 +1,38 @@
# Services — Over mij Page
This is a static single-page app without a back-end: there is no service layer. "Orchestration" is composition in the route, as on the homepage.
## Route composition (`routes/over-mij.tsx`)
- **Responsibility**: load the static content, build the head, compose the page.
- **Head**: `pageHead('/over-mij')` (title, description, canonical, Open Graph incl. the page's own `ogImage`, no `noindex`) plus one `application/ld+json` script with the `AboutPage` (built by `seo.ts`). The site-wide `ProfessionalService` script still comes from the root route.
- **Body**: content objects are passed as props to presentational components; components never import content themselves. This keeps the API swap a change in the route only.
## Content source (`content/aboutContent.ts`)
- **Responsibility**: the page's static data until the CMS API exists; same role as `homeContent.ts`. Images are imported from `assets/about/` so Vite fingerprints them.
## SEO module (`seo.ts`, `sitePages.ts`)
- **Responsibility**: one registry for titles, descriptions, indexing and preview images (`sitePages.ts`), and pure builders for head tags and structured data (`seo.ts`). The sitemap (`config/sitemapPlugin.ts`) and Lighthouse CI config follow the registry.
## Interaction
```mermaid
sequenceDiagram
box rgba(99,179,237,0.4) Router
participant R as Root route
participant P as over-mij route
end
box rgba(154,230,180,0.4) Modules
participant S as seo.ts and sitePages.ts
participant C as aboutContent.ts
end
box rgba(246,224,94,0.4) Components
participant V as Page components
end
R->>S: siteHead (ProfessionalService with id)
P->>S: pageHead and aboutPage
S-->>P: meta, links, JSON-LD script
P->>C: read static content
P->>V: render PageIntro, AboutIntro, StorySection, PhotoDuo with props
```
Text alternative: the root route adds the site-wide business data; the Over mij route asks the SEO module for its head tags and AboutPage data, reads its static content and passes it as props to the page components.