Variant E (tijdreis): vijf tijdperken, 2006-pakketten, 1989-terminalformulier en tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 18:56:38 +01:00
co-authored by Claude Sonnet 5.5
parent 00f6f0653b
commit 4d9abd695d
25 changed files with 2032 additions and 45 deletions
@@ -0,0 +1,18 @@
# NFR Requirements — e-timetravel (U5)
Source design: canvas `Tijdreis2.dc.html` (light/dark via `Tijdreis2Dark`) and `PakkettenTijd.dc.html`. Functional Design is skipped (the canvas is the design); this stage fixes the non-functional rules.
| Id | Category | Requirement |
|---|---|---|
| NFR-U5-1 | Performance | Variant E is a separate lazy chunk. Its fonts (Open Sans 300/400/600/700, VT323) are self-hosted via `@fontsource` and imported **only inside the E chunk**; Trebuchet MS, Verdana, Times New Roman and Arial are system fonts (no download). Budget: E chunk JS ≤ 60 kB gzip excluding fonts; fonts use `font-display: swap`. B's main bundle must not grow because of E. |
| NFR-U5-2 | Accessibility | WCAG 2.1 AA in all five eras and both modes: text contrast ≥ 4.5:1 (large text ≥ 3:1) verified by a token test; all decorative elements (marquee, year badges, dither strips, scanline overlay, glyph tiles, numbers in boxes, arrows, "800×600" joke is real text and stays readable) are `aria-hidden` or non-interactive; one `h1`, logical heading order across eras; each era section has an accessible name; keyboard operable, visible focus in every era style (focus ring never removed by an era style). |
| NFR-U5-3 | Reduced motion | Under `prefers-reduced-motion: reduce`: marquee, blinking caret and any dither/CRT animation are static or hidden; no auto-moving content remains (WCAG 2.2.2). |
| NFR-U5-4 | Theme | Both modes use the era tokens of the canvas (light and dark sets per era). The 1989 terminal looks the same in both modes (amber on black). The mode toggle and the way back to B stay in the E nav. |
| NFR-U5-5 | Content fidelity | Texts come from `content.ts` (live copy) and the shared logic (packages query/filter/swipe, preselect, `cms-client` form). Only era-specific strings (marquee, "Klaar!", terminal prompts) live in `src/variants/e`. Years are badges, not menu items. |
| NFR-U5-6 | Responsiveness | 360 px to 1440 px+: no horizontal page scroll; the 1998 step cards stack with rotated arrows below 960 px; package cards use the swipe row on mobile like B; terminal form fields wrap. |
| NFR-U5-7 | Security / privacy | No new external requests or third-party scripts; no inline scripts; the terminal form reuses `useContactForm` (no values logged, same honeypot/token/idempotency rules); fonts local. Security Baseline: same compliance as U4 for the form, N/A elsewhere. |
| NFR-U5-8 | Testability | Per-era render tests (structure, text, landmarks), token contrast test for the E sets, reduced-motion tests (no animation classes/elements), variant switch round trip B → E → B, terminal form flows reusing the U4 contract tests, package block in 2006 style reusing the U3 logic tests. |
| NFR-U5-9 | Maintainability | E code is isolated in `src/variants/e/**`; shared logic is imported, not copied; era styles are Tailwind utilities plus a small scoped CSS file for effects (marquee, scanlines, dither, bevels) loaded with the chunk. |
## Security Baseline compliance (U5 scope)
SECURITY-03/05/09/10/13/15 compliant or N/A as in U4 (form reuse, no new dependency except `@fontsource` font packages: official registry, lock file committed). SECURITY-04 stays open at infrastructure level (see U4 infrastructure design). Others N/A.
@@ -0,0 +1,8 @@
# Tech Stack Decisions — e-timetravel (U5)
- **Fonts**: add `@fontsource/open-sans` (300, 400, 600, 700) and `@fontsource/vt323` (400); import them from `src/variants/e/fonts.ts`, which is imported only by the E chunk. Archivo and JetBrains Mono (already loaded by B) are reused for the 2026 section. Verdana/Trebuchet/Times/Arial/Courier are system stacks with the fallbacks of the canvas. If a package is blocked by the repo's release-age policy, stop and report.
- **Styling**: Tailwind utilities plus `src/variants/e/era.css` (imported by the E chunk) for what utilities cannot express cleanly: bevel borders (`outset/inset/groove`), glossy gradients, repeating dither backgrounds, marquee and scanline overlays, scoped under `[data-variant='e']`.
- **Tokens**: era tokens as CSS variables per era and mode (`--e-flat-bg`, `--e-w2-card`, `--e-w98-bevel`, ...) in `era.css`, selected by `html[data-variant='e'][data-mode]` (extends the base tokens from U1).
- **Packages**: reuse `packageLogic`, `usePackageFilter`, `useSwipeRow`, `useContactPreselect`; new presentation components only (2006 style).
- **Form**: reuse `src/cms-client/contact` (`useContactForm`, client, messages) and the availability hook; new terminal skin.
- **No new runtime logic libraries.**