Workspace detection, a reverse engineering delta, requirements with the approved layout mockups, the execution plan and the application design for the Contact page, plus the code generation plan and summary of the webPage helper. Corrects the contact payload in the shared API notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.8 KiB
Markdown
39 lines
1.8 KiB
Markdown
# Services — Contact Page
|
|
|
|
There is no service layer in this SPA: routes compose components from static content, and pure helpers in `lib/` and `seo.ts` hold the logic. The only "service" is the existing `submitContactForm` (always fails until the API exists), reached through `ContactForm`; it is unchanged.
|
|
|
|
## Composition per route
|
|
|
|
### `/contact` (unit 3)
|
|
|
|
```mermaid
|
|
sequenceDiagram
|
|
box rgba(99,179,237,0.4) Routing
|
|
participant R as Router
|
|
participant P as contact route
|
|
end
|
|
box rgba(255,167,38,0.4) Shared components
|
|
participant Pn as ContactPanel
|
|
participant D as ContactDetails
|
|
end
|
|
R->>P: render with search pakket
|
|
P->>D: narrow card (portrait, titleId A)
|
|
P->>Pn: load eager, pakket
|
|
Pn->>Pn: validate pakket, preselect, mail subject
|
|
P->>D: wide card in ContactAside (titleId B)
|
|
P->>R: replace URL without pakket, no focus move
|
|
```
|
|
|
|
Text alternative: the router renders the contact route with the search parameter; the route renders the narrow-screen card, the panel (which validates the package and preselects it) and the wide-screen card inside ContactAside, then removes the parameter from the URL without moving focus.
|
|
|
|
### `/` (unit 2, behaviour unchanged)
|
|
`ContactSection` renders its heading, `ContactPanel` with `load="lazy"`, and keeps its own effect that removes `?pakket=`, scrolls to `#contact` and focuses the heading.
|
|
|
|
### `/over-mij` (unit 3)
|
|
Content change only: two link targets become `/contact`.
|
|
|
|
## Head (SEO)
|
|
- Every route: `pageHead(path)` from the page registry.
|
|
- `/over-mij`: `aboutPage()` (now on `webPage()`); `/contact`: `contactPage()`; both through `structuredDataScript` (escaped by `jsonLdScript`).
|
|
- Portfolio-page and soorten-fotoshoots-page add their own page types on `webPage()` in their branches.
|