Designs the content model and structured data of the Over mij page
A paragraph with links is stored as text pieces and typed route links, so the API can deliver it without HTML. On the about page, Andrea becomes a Person with her specialisations, linked both ways to the business that every page already describes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+81
@@ -0,0 +1,81 @@
|
||||
# Business Logic Model — Unit 2: Over mij page
|
||||
|
||||
The page has no runtime decisions beyond rendering static content; the logic lives in the head (SEO) and in small pure functions.
|
||||
|
||||
## Request Flow
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
box rgba(33,150,243,0.3) Router
|
||||
participant Root as Root route
|
||||
participant Route as Over mij route
|
||||
end
|
||||
box rgba(255,152,0,0.3) Pure modules
|
||||
participant Seo as seo.ts
|
||||
participant Reg as sitePages.ts
|
||||
end
|
||||
box rgba(76,175,80,0.3) Data
|
||||
participant Site as siteContent
|
||||
participant About as aboutContent
|
||||
end
|
||||
Root->>Seo: siteHead with siteContent
|
||||
Seo-->>Root: meta and ProfessionalService script with ids
|
||||
Route->>Seo: pageHead for over-mij
|
||||
Seo->>Reg: read title, description, indexed, ogImage
|
||||
Seo-->>Route: meta and canonical
|
||||
Route->>Seo: aboutPage with path, person content and siteContent
|
||||
Seo-->>Route: AboutPage with Person
|
||||
Route->>Seo: structuredDataScript
|
||||
Seo-->>Route: escaped ld+json script
|
||||
Route->>About: read static content
|
||||
Route-->>Root: head tags and rendered page
|
||||
```
|
||||
|
||||
Text alternative: the root route adds the site-wide head and business data; the Over mij route gets its meta tags from the registry, builds the AboutPage/Person data from its content and the site data, serialises it safely, and renders the page from static content.
|
||||
|
||||
## Pure Functions and Properties (PBT-01)
|
||||
|
||||
| Function | Category | Property (fast-check) |
|
||||
|---|---|---|
|
||||
| `professionalService(site)` | Invariant | `@id === businessId` and `founder['@id'] === personId` for any `SiteContent` |
|
||||
| `person(content, site, image)` | Invariant | `sameAs` equals `visibleSocials(site.socials).map(href)` (absent when empty) for any socials incl. invalid hrefs |
|
||||
| `person(...)` | Invariant | `worksFor['@id'] === businessId` |
|
||||
| `knowsAboutList(entries)` (helper in `lib/`) | Invariant | output ⊆ trimmed input, no empty strings, no duplicates, keeps first-seen order |
|
||||
| `knowsAboutList` | Idempotency | `f(f(x))` deep-equals `f(x)` |
|
||||
| `aboutPage(path, ...)` | Invariant | serialised output never contains the assembled e-mail address, for any valid `EmailAddress` in `siteContent` |
|
||||
| `aboutPage(path, ...)` | Invariant | `@id`/`url` equal `canonicalUrl(path)`; `name`/`description` equal the registry entry |
|
||||
| `jsonLdScript(x)` | Round-trip | already covered: `JSON.parse(jsonLdScript(x))` deep-equals `x`; no `<`/`>` in output |
|
||||
|
||||
Generators: reuse `socialLink`, `validEmail`/`anyEmail` from `src/test/arbitraries.ts`; add a `siteContent` arbitrary and a `knowsAbout` arbitrary (strings with surrounding spaces, empties and duplicates).
|
||||
|
||||
Example-based tests complement these: the real content produces the expected Person (name, job title, three specialisations, Instagram and Facebook), and the head of `/over-mij` contains no `noindex`, the new title, canonical and `og:image`.
|
||||
|
||||
## Rendering Logic
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Route["Over mij route"] --> Head["PageIntro: eyebrow + h1"]
|
||||
Route --> Intro["AboutIntro: MediaText with portrait"]
|
||||
Intro --> Paras{"Paragraph piece is a link?"}
|
||||
Paras -->|"yes"| Link["underlined RouterLink to route and hash"]
|
||||
Paras -->|"no"| Txt["plain text"]
|
||||
Route --> Bg["StorySection: background, tone alt"]
|
||||
Route --> Duo["PhotoDuo: two photos, not a named region"]
|
||||
Route --> Pers["StorySection: personal, flush top"]
|
||||
Pers --> Btn["LinkButton accent: Boek je shoot"]
|
||||
classDef route fill:#4CAF50,stroke:#2e7d32,color:#000;
|
||||
classDef ui fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef decision fill:#FF9800,stroke:#e65100,color:#000;
|
||||
class Route route;
|
||||
class Head,Intro,Link,Txt,Bg,Duo,Pers,Btn ui;
|
||||
class Paras decision;
|
||||
```
|
||||
|
||||
Text alternative: the route renders the page head, the intro (whose paragraphs render text pieces as text and link pieces as underlined router links), the background story, the photo duo, and the personal story ending in the booking button.
|
||||
|
||||
## Navigation to `/#contact`
|
||||
Uses the existing mechanism of the price cards (`RouterLink` with `to="/"` and `hash="contact"`): the router navigates to the homepage and scrolls to `#contact`; `PageSection` gives that section a scroll margin of the sticky header height. No new logic; covered by a route test that the link targets `/#contact`.
|
||||
|
||||
## Error Handling
|
||||
- Static content only: no loading or error states. Invalid optional data degrades by omission (BR-SD-02, BR-SD-05), never by an error.
|
||||
- A missing image file or a wrong route is a build/type error, not a runtime case.
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
# Business Rules — Unit 2: Over mij page
|
||||
|
||||
## Content
|
||||
|
||||
| ID | Rule |
|
||||
|---|---|
|
||||
| BR-OM-01 | Texts are the live texts in the design's structure (FR-OM-02..05); no "(vaak met een kat naast me)". |
|
||||
| BR-OM-02 | Link targets are a `RoutePath` plus optional hash; "mijn portfolio" → `/portfolio`, "neem contact op" and "Boek je shoot" → `/` + `contact` (the homepage contact section, until `/contact` exists). |
|
||||
| BR-OM-03 | A `RichText` paragraph renders its pieces in order: text as text, an `InlineLink` as an underlined router link with its `text` as the link name. Link names are descriptive on their own ("mijn portfolio", "neem contact op"). |
|
||||
| BR-OM-04 | Every photo is informative and has a Dutch alt text that says what is in it; no "Werk van Andrea Slop"-style alt texts. |
|
||||
| BR-OM-05 | Images carry their intrinsic `width`/`height` (space reserved, no layout shift). |
|
||||
|
||||
## Structure and Accessibility
|
||||
|
||||
| ID | Rule |
|
||||
|---|---|
|
||||
| BR-OM-10 | Heading outline: h1 "Over mij" (PageIntro) → h2 "Hoi! Ik ben Andrea" → h3 "Hoe het begon", h3 "Buiten de camera om". The h3s look like eyebrow labels (`Eyebrow as="h3"`). |
|
||||
| BR-OM-11 | The intro, background and personal blocks are `section`s named by their heading. The photo block has no heading in the design, so it is **not** a named region; its photo list has the accessible name "Foto's". `PageSection.labelledBy` becomes optional for this case. |
|
||||
| BR-OM-12 | Reveal and the photo hover zoom respect `prefers-reduced-motion`. |
|
||||
|
||||
## Structured Data
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Start["Build head for a page"] --> Root["Root route adds ProfessionalService"]
|
||||
Root --> Ids["ProfessionalService gets @id businessId and founder @id personId"]
|
||||
Start --> IsAbout{"Is the path /over-mij?"}
|
||||
IsAbout -->|"no"| Done["Only page meta and site data"]
|
||||
IsAbout -->|"yes"| Person["Build Person from content and site data"]
|
||||
Person --> Socials{"Any valid https social links?"}
|
||||
Socials -->|"yes"| WithSame["sameAs = their hrefs, same order"]
|
||||
Socials -->|"no"| NoSame["leave sameAs out"]
|
||||
WithSame --> Skills{"Any non-empty knowsAbout entries?"}
|
||||
NoSame --> Skills
|
||||
Skills -->|"yes"| WithSkills["knowsAbout = trimmed, non-empty, unique"]
|
||||
Skills -->|"no"| NoSkills["leave knowsAbout out"]
|
||||
WithSkills --> About["AboutPage with mainEntity Person"]
|
||||
NoSkills --> About
|
||||
About --> Script["Serialise with jsonLdScript"]
|
||||
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,Root,Ids,Person,About step;
|
||||
class IsAbout,Socials,Skills decision;
|
||||
class Done,WithSame,NoSame,WithSkills,NoSkills,Script result;
|
||||
```
|
||||
|
||||
Text alternative: every page gets the business with its id and founder reference; only the about page also builds a Person (sameAs only with valid https socials, knowsAbout only with non-empty entries) inside an AboutPage, serialised through jsonLdScript.
|
||||
|
||||
| ID | Rule |
|
||||
|---|---|
|
||||
| BR-SD-01 | **No e-mail address** anywhere in the structured data, on any page. |
|
||||
| BR-SD-02 | `sameAs` contains exactly the hrefs of `visibleSocials(socials)`, in that order; omitted when that list is empty. |
|
||||
| BR-SD-03 | Stable identifiers: `businessId` and `personId` are constants. `ProfessionalService.founder['@id'] === personId` and `Person.worksFor['@id'] === businessId` (two-way link, Q4 B). The business keeps all its current fields. |
|
||||
| BR-SD-04 | `Person.image` is the absolute URL of `/over-mij`'s `ogImage` (stable path in `public/`). |
|
||||
| BR-SD-05 | `knowsAbout`: entries trimmed, empty ones dropped, duplicates removed (first one kept); the field is omitted when nothing is left. |
|
||||
| BR-SD-06 | `AboutPage.name`/`description` equal the page's registry title and description; `@id`/`url` equal its canonical URL. |
|
||||
| BR-SD-07 | All structured data is serialised by `jsonLdScript` (escapes `<`, `>`, `&`), in one `application/ld+json` script per object (site script from the root route, about script from the page). |
|
||||
|
||||
## SEO Registry
|
||||
|
||||
| ID | Rule |
|
||||
|---|---|
|
||||
| BR-SEO-OM-01 | `/over-mij` is `indexed: true`: no `robots noindex`, listed in `sitemap.xml`, checked as an indexed page by Lighthouse CI (`indexedPaths`). |
|
||||
| BR-SEO-OM-02 | Rendered title ≤ 60 characters, description ≤ 155 characters (registry guideline). |
|
||||
| BR-SEO-OM-03 | `ogImage` is a 1200×630 JPEG at `web/public/og-over-mij.jpg` with an alt text that describes the crop. |
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
# Domain Entities — Unit 2: Over mij page
|
||||
|
||||
Decisions: [over-mij-page-fd-questions.md](../../plans/over-mij-page-fd-questions.md) — Q1 A (segments), Q2 A (route + hash), Q3 B (basis + knowsAbout), Q4 B (two-way link).
|
||||
|
||||
## Entity Relationships
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Page["AboutPageContent"] -->|"head"| Head["PageHead: eyebrow, title"]
|
||||
Page -->|"intro"| Intro["Intro: eyebrow, title, paragraphs, image"]
|
||||
Intro -->|"paragraphs: RichText[]"| Rich["RichText = (string or InlineLink)[]"]
|
||||
Rich -->|"contains"| Inline["InlineLink = LinkTarget + text"]
|
||||
Inline -->|"is a"| Target["LinkTarget: to RoutePath, hash?"]
|
||||
Page -->|"background, personal"| Story["Story: title, paragraphs string[]"]
|
||||
Page -->|"photos"| Img["ContentImage x2"]
|
||||
Intro -->|"image"| Img
|
||||
Page -->|"booking"| Booking["Booking: label + LinkTarget"]
|
||||
Booking -->|"is a"| Target
|
||||
Page -->|"person"| PersonC["PersonContent: name, jobTitle, knowsAbout[]"]
|
||||
PersonC -->|"becomes"| PersonLd["Person JSON-LD"]
|
||||
PersonLd -->|"worksFor @id"| Business["ProfessionalService JSON-LD"]
|
||||
Business -->|"founder @id"| PersonLd
|
||||
AboutLd["AboutPage JSON-LD"] -->|"mainEntity"| PersonLd
|
||||
classDef content fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef shared fill:#4CAF50,stroke:#2e7d32,color:#000;
|
||||
classDef ld fill:#FF9800,stroke:#e65100,color:#000;
|
||||
class Page,Head,Intro,Rich,Inline,Story,Booking,PersonC content;
|
||||
class Target,Img shared;
|
||||
class PersonLd,Business,AboutLd ld;
|
||||
```
|
||||
|
||||
Text alternative: the page content holds a head, an intro with rich-text paragraphs (text and inline links) and a photo, two story blocks, two photos, a booking link and person data; link targets are a route plus optional hash; the person data becomes a Person in the structured data, which works for the business, is its founder and is the main entity of the AboutPage.
|
||||
|
||||
## Content Types (`web/src/content/types.ts`)
|
||||
|
||||
### LinkTarget (new, shared)
|
||||
| Field | Type | Notes |
|
||||
|---|---|---|
|
||||
| `to` | `RoutePath` | an existing route; a typo is a type error (same as the menus) |
|
||||
| `hash` | `string?` | anchor without `#`, e.g. `'contact'` |
|
||||
|
||||
### InlineLink (new)
|
||||
`LinkTarget & { text: string }` — e.g. `{ text: 'neem contact op', to: '/', hash: 'contact' }`
|
||||
|
||||
### RichText (new)
|
||||
`(string | InlineLink)[]` — one paragraph as a list of plain text pieces and links, in reading order. Spaces belong to the text pieces.
|
||||
|
||||
### AboutPageContent (new)
|
||||
| Field | Type | Content (from the live site, FR-OM-01..05) |
|
||||
|---|---|---|
|
||||
| `head` | `{ eyebrow: string; title: string }` | "Andrea Slop Fotografie", "Over mij" |
|
||||
| `intro` | `{ eyebrow: string; title: string; paragraphs: RichText[]; image: ContentImage }` | "Lifestyle fotograaf", "Hoi! Ik ben Andrea", 3 paragraphs (third with two links), portrait |
|
||||
| `background` | `{ title: string; paragraphs: string[] }` | "Hoe het begon", 1 paragraph |
|
||||
| `photos` | `[ContentImage, ContentImage]` | the two duo photos |
|
||||
| `personal` | `{ title: string; paragraphs: string[] }` | "Buiten de camera om", 2 paragraphs |
|
||||
| `booking` | `LinkTarget & { label: string }` | "Boek je shoot" → `/` + `contact` |
|
||||
| `person` | `{ name: string; jobTitle: string; knowsAbout: string[] }` | "Andrea Slop", "Lifestyle fotograaf", ["Newbornfotografie", "Zwangerschapsfotografie", "Gezinsfotografie"] |
|
||||
|
||||
`person` is content (not code) because the API/CMS will own it, like the texts it summarises.
|
||||
|
||||
### ContentImage (existing, reused)
|
||||
`src`, `alt`, `width`, `height` — intrinsic size of the resized file.
|
||||
|
||||
## Structured Data (`web/src/seo.ts`)
|
||||
|
||||
### Identifiers (new constants)
|
||||
| Name | Value |
|
||||
|---|---|
|
||||
| `businessId` | `https://andreaslop.nl/#business` |
|
||||
| `personId` | `https://andreaslop.nl/over-mij#andrea` |
|
||||
|
||||
### ProfessionalService (existing, extended)
|
||||
Adds `'@id': businessId` and `founder: { '@id': personId }`; everything else unchanged. Present on every page (root route).
|
||||
|
||||
### Person (new, only on `/over-mij`)
|
||||
| Field | Source |
|
||||
|---|---|
|
||||
| `@type` | `Person` |
|
||||
| `@id` | `personId` |
|
||||
| `name`, `jobTitle` | `AboutPageContent.person` |
|
||||
| `knowsAbout` | `AboutPageContent.person.knowsAbout` (cleaned, BR-SD-05) |
|
||||
| `image` | absolute URL of the page's `ogImage` (`/og-over-mij.jpg`) |
|
||||
| `address` | `PostalAddress`, `addressLocality: 'Huizen'`, `addressCountry: 'NL'` (same as the business) |
|
||||
| `sameAs` | `visibleSocials(siteContent.socials)` hrefs; omitted when empty |
|
||||
| `worksFor` | `{ '@id': businessId }` |
|
||||
| `url` | canonical URL of `/over-mij` |
|
||||
|
||||
### AboutPage (new, only on `/over-mij`)
|
||||
| Field | Source |
|
||||
|---|---|
|
||||
| `@type` | `AboutPage` |
|
||||
| `@id`, `url` | canonical URL of `/over-mij` |
|
||||
| `name` | page title from `sitePages` ("Over mij – fotograaf in Huizen") |
|
||||
| `description` | page description from `sitePages` |
|
||||
| `inLanguage` | `nl-NL` |
|
||||
| `mainEntity` | the `Person` above (embedded) |
|
||||
|
||||
## Registry (`web/src/sitePages.ts`)
|
||||
`/over-mij`: title "Over mij – fotograaf in Huizen", the approved description, `indexed: true`, `ogImage: { path: '/og-over-mij.jpg', width: 1200, height: 630, alt: <describes the crop> }`.
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
# Frontend Components — Unit 2: Over mij page
|
||||
|
||||
## Component Hierarchy
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Shell["AppShell (existing)"] --> Route["routes/over-mij.tsx"]
|
||||
Route --> PageIntro["PageIntro"]
|
||||
Route --> AboutIntro["about/AboutIntro"]
|
||||
AboutIntro --> PS1["PageSection flushTop"]
|
||||
PS1 --> MediaText["MediaText"]
|
||||
MediaText --> SH["SectionHeading h2"]
|
||||
MediaText --> Rich["about/RichParagraph x3"]
|
||||
Rich --> RLink["Link underline + RouterLink"]
|
||||
Route --> Story1["about/StorySection background"]
|
||||
Story1 --> PS2["PageSection alt narrow"]
|
||||
PS2 --> Eb1["Eyebrow as h3"]
|
||||
Route --> Duo["PhotoDuo"]
|
||||
Duo --> DI["DeferredImage x2"]
|
||||
Route --> Story2["about/StorySection personal"]
|
||||
Story2 --> PS3["PageSection narrow flushTop"]
|
||||
PS3 --> Eb2["Eyebrow as h3"]
|
||||
Story2 --> Btn["LinkButton accent"]
|
||||
classDef root fill:#4CAF50,stroke:#2e7d32,color:#000;
|
||||
classDef ui fill:#2196F3,stroke:#0d47a1,color:#000;
|
||||
classDef shared fill:#9C27B0,stroke:#4a148c,color:#000;
|
||||
class Shell,Route root;
|
||||
class AboutIntro,Story1,Story2,Rich ui;
|
||||
class PageIntro,PS1,PS2,PS3,MediaText,SH,RLink,Eb1,Eb2,Duo,DI,Btn shared;
|
||||
```
|
||||
|
||||
Text alternative: inside the shell the route renders PageIntro, AboutIntro (a flush-top PageSection with MediaText holding the h2 and three rich paragraphs with links), the background StorySection (alternate tone, narrow, h3 label), PhotoDuo (two deferred images) and the personal StorySection (narrow, flush top, h3 label) ending in the accent LinkButton.
|
||||
|
||||
## Components
|
||||
|
||||
### routes/over-mij.tsx
|
||||
- `head`: `pageHead('/over-mij')` + `scripts: [structuredDataScript(aboutPage('/over-mij', aboutContent.person, siteContent))]`
|
||||
- Composes the blocks with `aboutContent`; passes `booking` as the personal story's child.
|
||||
|
||||
### about/AboutIntro
|
||||
- Props: `{ content: AboutPageContent['intro'] }`
|
||||
- `PageSection` `labelledBy="about-intro-title"`, `spacing="flushTop"`, `data-testid="about-intro"` → `MediaText image aspectRatio="4 / 3"` (portrait crop as in the design) → `SectionHeading id="about-intro-title" eyebrow title align="start" spacing="compact"` + `Stack gap={4} color="ink.soft"` of `RichParagraph`s.
|
||||
|
||||
### about/RichParagraph
|
||||
- Props: `{ paragraph: RichText }`
|
||||
- Renders a `Text`; strings as-is, `InlineLink`s as `Link variant="underline" asChild` → `RouterLink to hash`. Keys from index (static content, order never changes).
|
||||
- Test id on links: `about-link-{to}` is not unique enough (two links may share a route later); use `data-testid` only where tests need it: none — tests find links by accessible name.
|
||||
|
||||
### about/StorySection
|
||||
- Props: `{ content: { title; paragraphs }, titleId, tone?, spacing?, children?, 'data-testid'? }`
|
||||
- `PageSection labelledBy={titleId} width="narrow" tone spacing` → `Reveal` → `Eyebrow as="h3" id={titleId}` + `Stack` of `Text` paragraphs (`ink.soft`) → `children` below with design spacing `mt="clamp(2rem, 4vw, 2.5rem)"` (design `.mt-lg`).
|
||||
- Uses: background `titleId="about-background-title"`, `tone="alt"`, `data-testid="about-background"`; personal `titleId="about-personal-title"`, `spacing="flushTop"`, `data-testid="about-personal"`.
|
||||
|
||||
### PhotoDuo (shared)
|
||||
- Props: `{ photos: [ContentImage, ContentImage]; label: string; 'data-testid'? }`
|
||||
- Wrapped by the route in `PageSection` **without** `labelledBy` (BR-OM-11; prop becomes optional, then the section has no accessible name and is no region).
|
||||
- `ul` (`aria-label={label}`, grid `1fr` → `repeat(2, 1fr)` from `sm`, gap `gridGap`) → `li` → `figure` (`overflow hidden`, `bg="paper.deep"`, hover zoom 1.05 with `fade` duration, off under reduced motion) → `DeferredImage aspectRatio="3 / 2"`; whole list in `Reveal`.
|
||||
- `data-testid="about-photos"`.
|
||||
|
||||
### Booking button
|
||||
- `LinkButton variant="accent" to={booking.to} hash={booking.hash} data-testid="about-booking-link"`.
|
||||
|
||||
## Interactions
|
||||
| Interaction | Result |
|
||||
|---|---|
|
||||
| "mijn portfolio" | navigates to `/portfolio` (placeholder for now) |
|
||||
| "neem contact op", "Boek je shoot" | navigates to `/` and scrolls to `#contact`, which lands below the sticky header |
|
||||
| Scroll | blocks fade in once (instant with reduced motion) |
|
||||
| Hover on a duo photo | gentle zoom (none with reduced motion) |
|
||||
| Keyboard | all links reachable in reading order with the theme focus ring |
|
||||
|
||||
## State
|
||||
None. Pure presentation from props.
|
||||
|
||||
## Responsive
|
||||
- Intro: photo above text below `lg`, side by side from `lg` (MediaText); frame block hidden on phones (FramedImage).
|
||||
- Duo: one column on phones, two from `sm` (design switches at 680px; Chakra `sm` = 480px, same as `IntroGallery`'s choice for its grid).
|
||||
- Story blocks: `contentNarrow` column at all widths.
|
||||
@@ -0,0 +1,55 @@
|
||||
# Functional Design-vragen — Unit 2: Over mij-pagina
|
||||
|
||||
Al vastgelegd (geen vraag nodig):
|
||||
|
||||
- **`sameAs`** in de JSON-LD komt uit dezelfde social-links als in de footer, met dezelfde filter (`visibleSocials`: alleen geldige https-links). Zijn er geen geldige links, dan valt `sameAs` weg.
|
||||
- **Geen e-mailadres** in de JSON-LD, net als nu.
|
||||
- **Afbeelding van `Person`**: de nieuwe preview-afbeelding uit `public/` (`/og-over-mij.jpg`). Die heeft een vaste URL; de foto's in de bundel krijgen bij elke build een andere naam.
|
||||
- **"Boek je shoot" en "neem contact op"** gaan naar `/#contact`, zonder een vooraf gekozen pakket. Dat werkt op dezelfde manier als de knoppen op de prijskaarten (`RouterLink` met `hash="contact"`).
|
||||
- **Alt-teksten** schrijf ik nadat ik de foto's heb bekeken; Andrea leest ze later na.
|
||||
|
||||
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
|
||||
|
||||
---
|
||||
|
||||
## Vraag 1: Hoe leggen we een alinea met links vast?
|
||||
|
||||
De alinea "Nieuwsgierig naar mijn werk? Bekijk **mijn portfolio** of **neem contact op** voor een fotoshoot!" bevat twee links. De content moet platte data blijven die de API straks 1-op-1 kan leveren, en Andrea moet zulke tekst later in een CMS kunnen bewerken.
|
||||
|
||||
- A) **Stukjes**: een alinea is een lijst van tekst en links, bijvoorbeeld `['Nieuwsgierig naar mijn werk? Bekijk ', { text: 'mijn portfolio', to: '/portfolio' }, ' of ', …]`. Geen parser nodig, de link-doelen zijn getypeerd, en het lijkt op wat rich-text-editors in een CMS opslaan. (aanbevolen)
|
||||
- B) **Markdown-achtige tekst**: `'Bekijk [mijn portfolio](/portfolio) of …'`, met een kleine parser in `lib/`. Leesbaar voor mensen, maar de parser en de controle van de link-doelen moeten zelf gebouwd en getest worden, en een tikfout in een link valt pas bij het draaien op.
|
||||
- C) **Sjabloon met plaatshouders**: `'Bekijk {portfolio} of {contact} voor een fotoshoot!'` plus een lijst links. Kort, maar twee plekken die bij elkaar moeten blijven passen.
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 2: Hoe ziet een link-doel eruit?
|
||||
|
||||
Links gaan naar een pagina, soms met een anker: `/portfolio`, `/#contact` en later `/contact`.
|
||||
|
||||
- A) **Route plus optioneel anker**: `{ to: '/', hash: 'contact' }`, waarbij `to` een bestaande route moet zijn (een tikfout is een typefout, net als in de menu's). Past direct op `RouterLink`. (aanbevolen)
|
||||
- B) **Vrije tekst**: `'/#contact'`. Simpeler, maar zonder controle of de pagina bestaat.
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 3: Wat staat er over Andrea in de gestructureerde data (`Person`)?
|
||||
|
||||
Zoekmachines verwachten dat gestructureerde data overeenkomt met wat er zichtbaar op de pagina staat.
|
||||
|
||||
- A) **Basis**: naam (Andrea Slop), functie (lifestyle fotograaf), plaats (Huizen, NL), afbeelding, social-links en de koppeling aan het bedrijf
|
||||
- B) **Basis + specialisaties**: als A, plus `knowsAbout` met de drie specialisaties die in de tekst staan (newbornfotografie, zwangerschapsfotografie, gezinsfotografie) (aanbevolen)
|
||||
- C) **B + opleiding**: ook de studie Communicatie & Media Design. De naam van de hogeschool staat niet op de pagina, dus dat wordt een opleiding zonder instelling.
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: B
|
||||
|
||||
## Vraag 4: Koppeling tussen Andrea en het bedrijf
|
||||
|
||||
Het bedrijf (`ProfessionalService`) staat op elke pagina; Andrea (`Person`) alleen op deze pagina.
|
||||
|
||||
- A) **Alleen vanaf deze pagina**: `Person.worksFor` verwijst naar het bedrijf via zijn `@id`. De gegevens van het bedrijf op de andere pagina's veranderen niet, behalve dat ze dat vaste `@id` krijgen. (aanbevolen)
|
||||
- B) **Twee kanten op**: ook het bedrijf op elke pagina verwijst naar Andrea (`founder`), via een `@id` dat naar deze pagina wijst
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: B
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# Functional Design Plan — Unit 2: Over mij page
|
||||
|
||||
Depth: minimal. Scope from the execution plan: the content model with inline links, and the rules and testable properties of the structured data (PBT-01). Questions: [over-mij-page-fd-questions.md](over-mij-page-fd-questions.md).
|
||||
|
||||
- [x] Collect and analyse the answers in `over-mij-page-fd-questions.md`
|
||||
- [x] `domain-entities.md` — `AboutPageContent`, `RichText` and its segments, link target, `ContentImage` reuse; structured data entities (`AboutPage`, `Person`, `ProfessionalService` `@id`)
|
||||
- [x] `business-rules.md` — content rules (texts, link targets, alt texts), structured data rules (fields, sources, exclusions, linking), SEO registry rules (indexed, title/description limits, preview image)
|
||||
- [x] `business-logic-model.md` — how the route turns content and site data into head tags, JSON-LD and the rendered page; pure functions and their properties for PBT (PBT-01)
|
||||
- [x] `frontend-components.md` — component hierarchy, props, heading ids, interactions (links, hash navigation to `/#contact`, reveal), test ids
|
||||
- [x] Validate against requirements.md, application-design.md and the extension rules
|
||||
Reference in New Issue
Block a user