Adds AI-DLC construction docs for the front-end shell feature
Functional design, NFR requirements, code generation plan and summary, and build-and-test instructions with results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
- Introduce one API-shaped, typed content module for site-wide data (working name `siteContent`). It holds:
|
||||
- the footer intro text
|
||||
- social links (`platform` + `href`, reusing `SocialPlatform`)
|
||||
- the contact e-mail address
|
||||
- the contact e-mail address, stored as separate `user` and `domain` parts and joined only in the browser (anti-spam; revised in Functional Design, BR-EMAIL-01)
|
||||
- The Hero's social links come from this module instead of `heroContent.ts`, so both Hero and Footer read one source.
|
||||
- Plain data (strings and arrays), so it can later be replaced 1-on-1 by a CMS API response.
|
||||
- **Menu items are not content.** The main menu and footer menu items are routes, which are code (the CMS cannot add pages). They live together in a typed navigation module (`mainNav`, `footerNav`), not in `siteContent`.
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
### FR-05 Footer
|
||||
The top section has three columns:
|
||||
1. **Brand**: the monogram, reusing `web/src/assets/logo-dark.png` (~150px wide), with the intro text "Lifestyle fotograaf uit Huizen. Ik leg jouw mooiste momenten vast met mijn camera." below it.
|
||||
1. **Brand**: the monogram, reusing `web/src/assets/logo-dark.png` (~150px wide), with the intro text "Lifestyle fotograaf uit Huizen. Ik leg jouw mooiste momenten vast." below it.
|
||||
2. **Socials**: an eyebrow heading "Socials", then **text links** "Facebook" and "Instagram". They open in a new tab with `rel="noopener noreferrer"`.
|
||||
3. **Contact**: an eyebrow heading "Contact", then a `mailto:` link to the e-mail address.
|
||||
|
||||
@@ -68,7 +68,7 @@ Layout and styling:
|
||||
- *Source: Q3 = A, Q5 = C, Clarification 1 = A, Clarification 2 = A, design*
|
||||
|
||||
### FR-06 Back-to-top button
|
||||
- A fixed square button at the bottom right, styled like the design (`.to-top`), with an Ant Design `up-outlined` icon instead of the ↑ character.
|
||||
- A fixed square button at the bottom right, with an Ant Design `up-outlined` icon instead of the ↑ character. It deviates from the design (`.to-top`): dark `ink` background with a white icon so it stands out, and on very wide screens it aligns with the content edge (revised in Functional Design, BR-TOP-07/08).
|
||||
- It becomes visible when the page is scrolled more than 60% of the viewport height, and is hidden again otherwise.
|
||||
- **Click**: scrolls to the top, smoothly, or instantly when `prefers-reduced-motion: reduce` is set.
|
||||
- **Accessibility**:
|
||||
@@ -107,6 +107,18 @@ Layout and styling:
|
||||
- Move `@vitejs/plugin-react` from `dependencies` to `devDependencies`. It is a build tool (SECURITY-10 hygiene).
|
||||
- *Source: Q10 = A*
|
||||
|
||||
### FR-12 SEO foundation (added at Functional Design)
|
||||
- One page registry (`sitePages`) is the single source for per-page title, description, `indexed` flag and preview image.
|
||||
- Every page has a canonical URL and `og:url` on `https://andreaslop.nl`, plus `og:image` and `twitter:card`. Placeholder, 404 and error pages are `noindex`.
|
||||
- Site-wide `ProfessionalService` JSON-LD, without the e-mail address.
|
||||
- `sitemap.xml` is generated at build time from the registry; `robots.txt` is static. A test keeps the registry and the routes in sync.
|
||||
- The code stays prerender-ready (no browser APIs during render); prerendering itself is a follow-up.
|
||||
- *Source: functional design change request, [frontend-shell-fd-change-questions.md](../../construction/plans/frontend-shell-fd-change-questions.md); rules BR-SEO-01…11*
|
||||
|
||||
### FR-13 Page change for screen readers (added at Functional Design)
|
||||
- After every client-side page change, focus moves to `main#main`, so screen readers announce the new content.
|
||||
- *Source: change request Q6 = A; rule BR-A11Y-01*
|
||||
|
||||
---
|
||||
|
||||
## Non-Functional Requirements
|
||||
@@ -188,6 +200,12 @@ Principle: **reuse as much as possible and make good use of Chakra UI v3, where
|
||||
- The shell adds no network requests beyond its bundled assets. The footer logo reuses the already-bundled `logo-dark.png`.
|
||||
- Scroll listeners are passive. The to-top button and the header share the existing scroll-hook approach; no layout thrashing.
|
||||
|
||||
### NFR-06 Responsive design (added at Functional Design)
|
||||
- Mobile-first with Chakra's default breakpoints; works from 320px wide up to 32:9 without horizontal scrolling.
|
||||
- Works at 200% zoom; touch targets at least 44×44px below `lg`.
|
||||
- Content is limited to one shared content width; fixed elements align with it on ultrawide screens.
|
||||
- *Source: functional design change request; rules BR-RWD-01…05*
|
||||
|
||||
---
|
||||
|
||||
## Security Baseline — Applicability at Requirements Level
|
||||
|
||||
Reference in New Issue
Block a user