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
@@ -5,7 +5,7 @@
- **Feature Slug**: redesign-modern-timetravel - **Feature Slug**: redesign-modern-timetravel
- **Project Type**: Brownfield - **Project Type**: Brownfield
- **Start Date**: 2026-11-09T13:00:00Z - **Start Date**: 2026-11-09T13:00:00Z
- **Current Stage**: CONSTRUCTION - U4 contact-form Code Generation (awaiting approval) - **Current Stage**: CONSTRUCTION - U5 e-timetravel code complete (awaiting user review on test)
- **Branch**: feature/redesign-modern-timetravel - **Branch**: feature/redesign-modern-timetravel
## Workspace State ## Workspace State
@@ -778,3 +778,63 @@
**Context**: Interim test feedback. **Context**: Interim test feedback.
--- ---
## U4 Approved; U5 Started
**Timestamp**: 2026-11-11T15:00:00Z
**User Input**: "Dat is goed. Akkoord en ga verder" (after the card-title fix on mobile, run 651 deployed to test)
**AI Response**: "U4 (contact-form) code approved. Starting U5 e-timetravel: Functional Design is skipped per the execution plan (design exists); NFR Requirements and NFR Design written from the canvas files Tijdreis2.dc.html and PakkettenTijd.dc.html; Infrastructure Design skipped (no infra impact)."
**Context**: Construction U5.
---
## U5 NFR Requirements and NFR Design Written
**Timestamp**: 2026-11-11T15:30:00Z
**User Input**: "(none)"
**AI Response**: "Wrote construction/e-timetravel/nfr-requirements/{nfr-requirements.md (NFR-U5-1..9), tech-stack-decisions.md} and nfr-design/{nfr-design-patterns.md, logical-components.md}. No questions were needed: all decisions follow the canvas and earlier approved rules (lazy chunk, fonts only in the E chunk, reduced motion, contrast tests, reuse of shared logic). Combined completion message presented."
**Context**: U5 NFR stages; next the Code Generation plan.
---
## U5 Code Generation Plan Presented
**Timestamp**: 2026-11-11T15:45:00Z
**User Input**: "(none)"
**AI Response**: "Wrote construction/plans/e-timetravel-code-generation-plan.md (14 steps). Awaiting explicit approval."
**Context**: U5 Code Generation, Part 1 Planning.
---
## U5 Plan Approved; PR #12 Merge Approved
**Timestamp**: 2026-11-11T16:10:00Z
**User Input**: "Ja, mergen" (PR #12, after measurement run 642) and "Akkoord, bouwen" (U5 code generation plan)
**AI Response**: "Asked CMS & API to merge PR #12 only. Starting U5 code generation."
**Context**: U5 Code Generation Part 2.
---
## U5 Code Generation Complete
**Timestamp**: 2026-11-11T17:30:00Z
**User Input**: "(none)"
**AI Response**: "Built variant E (five eras, terminal form, 2006 packages), 304 tests green, lint and build OK. Committing, pushing and test-deploying (deploy_test only)."
**Context**: U5 Code Generation Part 2 finished.
---
@@ -0,0 +1,13 @@
# Code Summary — e-timetravel (U5)
All new code in `src/variants/e/`:
- `LandingE.tsx` (own skip link, header, `main#main`, footer), `ENav.tsx`
- `Era2026.tsx` hero, `Era2013.tsx` about, `Era2006.tsx` packages (shared `usePackagesQuery`, `usePackageFilter`, `useSwipeRow`, `useContactPreselect`, B's `SwipeDots`), `Era1998.tsx` process, `Era1989.tsx` contact + `TerminalForm.tsx` (shared `useContactForm`, `useContactAvailability`)
- `eraTokens.ts` (light/dark CSS variables + contrast pairs), `era.css` (effects, bevels, gloss, dither, scanlines; motion off under reduced motion), `fonts.ts` (Open Sans, VT323 — E chunk only), `eraContent.ts` (E-only strings)
- Tests: `__tests__/eraTokens.test.ts` (WCAG contrast, both modes), `__tests__/LandingE.test.tsx` (landmarks, headings, packages, filter, preselect, steps, mailto fallback, terminal form send/errors, decorative aria-hidden). `VariantRenderer.test.tsx` updated for the real E landing.
Results: lint 0 errors (2 pre-existing warnings); 21 files / 304 tests pass; build OK. E chunk JS 24.9 kB (7.8 kB gzip), E CSS 56 kB (24.5 kB gzip, mostly @font-face rules); main JS 468.5 kB (152.1 kB gzip), unchanged.
Deviations from the canvas (accessibility): glossy red tops and the green "Klaar!" header are slightly darker for contrast; the form has the fixed contract fields (name, e-mail, subject, message) instead of the canvas fields (soort/telefoon); star badge text is real text.
Observation (B and E, not changed): `useContactForm` applies a package preselect only while the form is mounted. A card click before the form has mounted (it mounts when the contact section nears the viewport) is not applied.
@@ -0,0 +1,24 @@
# Logical Components — e-timetravel (U5)
```mermaid
graph TD
le[LandingE] --> nav[ENav with toggles]
le --> s26[Era 2026 hero]
le --> s13[Era 2013 about]
le --> s06[Era 2006 packages]
le --> s98[Era 1998 process]
le --> dith[Dither strips]
le --> s89[Era 1989 terminal contact]
s06 --> shared[usePackagesQuery usePackageFilter useSwipeRow]
s89 --> form[useContactForm and availability]
s98 --> marq[Marquee static under reduced motion]
le -.styles.-> css[era.css and e fonts]
classDef ui fill:#2196F3,stroke:#0d47a1,color:#000;
classDef hook fill:#9C27B0,stroke:#4a148c,color:#000;
classDef style fill:#FF9800,stroke:#e65100,color:#000;
class le,nav,s26,s13,s06,s98,dith,s89,marq ui;
class shared,form hook;
class css style;
```
Text alternative: the lazy E landing contains a nav and five era sections plus dither strips; the 2006 and 1989 sections reuse the shared packages and form logic, and the E chunk brings its own CSS and fonts.
@@ -0,0 +1,18 @@
# NFR Design Patterns — e-timetravel (U5)
| Pattern | Where | Purpose |
|---|---|---|
| Chunk isolation | `src/variants/e` + `loadVariant` | E code, fonts and CSS load only when the visitor chooses E |
| Era tokens | `era.css` | one set of variables per era and mode; components use `var(--e-...)` so light/dark needs no component logic |
| Decorative vs content | era badges, marquee, dither, scanlines, bevel numbers | `aria-hidden` and `pointer-events: none`; real content never depends on them |
| Reduced-motion switch | `usePrefersReducedMotion` + CSS media query | marquee renders as a static line, caret and scanlines static; no `animation` property remains |
| Shared logic, separate skin | packages and form | the same hooks as B with era-specific markup and styles |
| Focus integrity | every era | era styles never set `outline: none` without a replacement; `:focus-visible` ring uses the era text colour |
| Fallback fonts | font stacks | text stays readable before fonts load (swap), widths comparable to avoid layout shift |
| Contrast by construction | token test | all text/background pairs of the E token sets are asserted ≥ 4.5:1 (≥ 3:1 for large display text) |
## Misuse / robustness scenarios
1. Visitor with reduced motion switches to E: no moving content (marquee, caret, scanlines) and no dither transition (U1 rule).
2. Screen-reader user switches to E: the live region announces the new variant; era badges and glyphs are ignored; headings keep a logical order.
3. Slow network: the E chunk or its fonts fail to load: U1 falls back to B with an alert; if only a font fails, system fallbacks keep the text readable.
4. Dark mode in the 1998 section: bevel and paper colours come from the dark token set (no light-only hard-coded colours).
@@ -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.**
@@ -0,0 +1,25 @@
# Code Generation Plan — e-timetravel (U5)
Brownfield, same repo. All new code in `src/variants/e/**` unless stated. Design source: canvas `Tijdreis2.dc.html` + `PakkettenTijd.dc.html`. NFRs: `construction/e-timetravel/nfr-*`.
## Steps
- [x] 1. **Fonts + era CSS**: add `@fontsource/open-sans` (300/400/600/700) and `@fontsource/vt323`; `fonts.ts` and `era.css` (era tokens per mode: flat, w2, w98, term; bevel, gloss, dither, marquee, scanline classes; reduced-motion rules; focus ring per era).
- [x] 2. **Token contrast test** (`__tests__/eraTokens.test.ts`): parse token pairs, assert ≥ 4.5:1 (large ≥ 3:1) for both modes and all eras.
- [x] 3. **Era content module** (`eraContent.ts`): era-only strings (marquee, "Klaar!", terminal prompts, year badges, "Meest gekozen!"); everything else from `content.ts`.
- [x] 4. **ENav**: brand, anchor links, mode toggle + way back to B (reuses `ModeToggle`/`VariantToggle`), mobile behaviour as B (always-mounted animated menu), year badge not a menu item.
- [x] 5. **Era 2026 (hero)** and **Era 2013 (about)**: flat style, photo circle + 3 tiles, decorative glyphs `aria-hidden`; one `h1`.
- [x] 6. **Era 2006 (packages)**: glossy tabs from `usePackageFilter`, panel, glossy cards, star badge, optional banner per `bannerSlugs`, swipe row on mobile via `useSwipeRow`, preselect to the form via `useContactPreselect`; skeleton/error states like B.
- [x] 7. **Era 1998 (process)**: Win98 style, marquee (static under reduced motion), step cards with progress blocks, rotated arrows below 960 px, "Klaar!" card.
- [x] 8. **Dither strips** between eras (decorative, `aria-hidden`).
- [x] 9. **Era 1989 (contact)**: `ContactFormTerminal` on `useContactForm` + `useContactAvailability` (mailto fallback in terminal style, honeypot, field errors via `aria-describedby`, status messages in a live region, retry/reset), scanlines overlay (`aria-hidden`, off under reduced motion).
- [x] 10. **LandingE** composition replacing the placeholder; section order, ids and accessible names; skip link target stays `#main`.
- [x] 11. **Tests**: per-era render tests; reduced-motion test; terminal form flows (reuse U4 contract mocks); 2006 packages (filter, preselect, swipe); variant round trip B → E → B including mode persistence.
- [x] 12. **Quality gates**: `pnpm lint`, `pnpm test`, `pnpm build` (check E chunk size ≤ 60 kB gz excluding fonts; main bundle not larger than before); fix findings; no unrelated reformatting (prettier only on touched files).
- [x] 13. **Docs**: `construction/e-timetravel/code/code-summary.md`, update aidlc-state/audit, mark checkboxes.
- [x] 14. **Commit** (Dutch message, Co-Authored-By line) on `feature/redesign-modern-timetravel`; push; trigger test deploy only (`deploy_test`, never production); report the run result.
## Not in this unit
SEO/prerender decisions (U6), any production deploy, enabling the contact form in production.
## Story coverage
Variant E (all five eras, light/dark), form in E, packages in E style, easter-egg toggle already delivered in U1.
+2
View File
@@ -15,6 +15,8 @@
"dependencies": { "dependencies": {
"@fontsource-variable/archivo": "^5.3.0", "@fontsource-variable/archivo": "^5.3.0",
"@fontsource/jetbrains-mono": "^5.1.1", "@fontsource/jetbrains-mono": "^5.1.1",
"@fontsource/open-sans": "^5.3.0",
"@fontsource/vt323": "^5.3.0",
"@sentry/react": "^10.68.0", "@sentry/react": "^10.68.0",
"@tanstack/react-query": "^5.59.0", "@tanstack/react-query": "^5.59.0",
"@tanstack/react-router": "^1.79.0", "@tanstack/react-router": "^1.79.0",
+16
View File
@@ -14,6 +14,12 @@ importers:
'@fontsource/jetbrains-mono': '@fontsource/jetbrains-mono':
specifier: ^5.1.1 specifier: ^5.1.1
version: 5.2.8 version: 5.2.8
'@fontsource/open-sans':
specifier: ^5.3.0
version: 5.3.0
'@fontsource/vt323':
specifier: ^5.3.0
version: 5.3.0
'@sentry/react': '@sentry/react':
specifier: ^10.68.0 specifier: ^10.68.0
version: 10.68.0(react@18.3.1) version: 10.68.0(react@18.3.1)
@@ -403,6 +409,12 @@ packages:
'@fontsource/jetbrains-mono@5.2.8': '@fontsource/jetbrains-mono@5.2.8':
resolution: {integrity: sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ==} resolution: {integrity: sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ==}
'@fontsource/open-sans@5.3.0':
resolution: {integrity: sha512-V1bdMlGNyZrJwzrdusshMOw2YR0aqYDL7kOo9dkxUEKl8dFv66A9HLckOOXl572sG/7ohhDQrCrTFGSn9LZcSw==}
'@fontsource/vt323@5.3.0':
resolution: {integrity: sha512-3w33Rg/0+R1587HQfz4t7Q7e0GGeCqr3wmzIwqdGInUnrGEwMA5eX39GP4Z9wpTQnwfhVOhYuxuRwRUeIcicbw==}
'@humanfs/core@0.19.2': '@humanfs/core@0.19.2':
resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==}
engines: {node: '>=18.18.0'} engines: {node: '>=18.18.0'}
@@ -2196,6 +2208,10 @@ snapshots:
'@fontsource/jetbrains-mono@5.2.8': {} '@fontsource/jetbrains-mono@5.2.8': {}
'@fontsource/open-sans@5.3.0': {}
'@fontsource/vt323@5.3.0': {}
'@humanfs/core@0.19.2': '@humanfs/core@0.19.2':
dependencies: dependencies:
'@humanfs/types': 0.15.0 '@humanfs/types': 0.15.0
@@ -5,34 +5,45 @@ import { TransitionOverlay } from '../TransitionOverlay';
import { LiveRegion } from '../LiveRegion'; import { LiveRegion } from '../LiveRegion';
import { VariantAlert } from '../VariantAlert'; import { VariantAlert } from '../VariantAlert';
import { EBoundary } from '../EBoundary'; import { EBoundary } from '../EBoundary';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ThemeProvider } from '../../../theme/ThemeProvider'; import { ThemeProvider } from '../../../theme/ThemeProvider';
import { ContactPreselectProvider } from '../../../shared/contact/ContactPreselectProvider';
import { VariantToggle } from '../../ui/VariantToggle'; import { VariantToggle } from '../../ui/VariantToggle';
import { clearMatchMedia, mockMatchMedia } from '../../../test/matchMedia'; import { clearMatchMedia, mockMatchMedia } from '../../../test/matchMedia';
import { REDUCED_MOTION_QUERY } from '../../../shared/hooks/usePrefersReducedMotion'; import { REDUCED_MOTION_QUERY } from '../../../shared/hooks/usePrefersReducedMotion';
function renderApp(loadVariant: (v: 'b' | 'e') => Promise<unknown> = () => Promise.resolve()) { function renderApp(loadVariant: (v: 'b' | 'e') => Promise<unknown> = () => Promise.resolve()) {
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
return render( return render(
<ThemeProvider loadVariant={loadVariant}> <QueryClientProvider client={queryClient}>
<VariantRenderer <ContactPreselectProvider>
b={ <ThemeProvider loadVariant={loadVariant}>
<> <VariantRenderer
<VariantToggle /> b={
<main id="main" tabIndex={-1}> <>
Moderne weergave <VariantToggle />
</main> <main id="main" tabIndex={-1}>
</> Moderne weergave
} </main>
/> </>
<TransitionOverlay /> }
<LiveRegion /> />
<VariantAlert /> <TransitionOverlay />
</ThemeProvider>, <LiveRegion />
<VariantAlert />
</ThemeProvider>
</ContactPreselectProvider>
</QueryClientProvider>,
); );
} }
describe('VariantRenderer and transition UI', () => { describe('VariantRenderer and transition UI', () => {
beforeEach(() => window.localStorage.clear()); beforeEach(() => {
window.localStorage.clear();
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(new Response('[]', { status: 200 })));
});
afterEach(() => { afterEach(() => {
vi.unstubAllGlobals();
clearMatchMedia(); clearMatchMedia();
vi.restoreAllMocks(); vi.restoreAllMocks();
}); });
@@ -40,14 +51,18 @@ describe('VariantRenderer and transition UI', () => {
it('renders B first', () => { it('renders B first', () => {
renderApp(); renderApp();
expect(screen.getByText('Moderne weergave')).toBeInTheDocument(); expect(screen.getByText('Moderne weergave')).toBeInTheDocument();
expect(screen.queryByRole('heading', { name: 'Tijdreis' })).not.toBeInTheDocument(); expect(
screen.queryByRole('heading', { level: 1, name: 'Websites, apps & meer.' }),
).not.toBeInTheDocument();
}); });
it('shows the lazy E landing after the switch and announces it (FR-6, BR-U1-7)', async () => { it('shows the lazy E landing after the switch and announces it (FR-6, BR-U1-7)', async () => {
mockMatchMedia({ [REDUCED_MOTION_QUERY]: true }); mockMatchMedia({ [REDUCED_MOTION_QUERY]: true });
renderApp(); renderApp();
fireEvent.click(screen.getByTestId('variant-toggle-button')); fireEvent.click(screen.getByTestId('variant-toggle-button'));
expect(await screen.findByRole('heading', { name: 'Tijdreis' })).toBeInTheDocument(); expect(
await screen.findByRole('heading', { level: 1, name: 'Websites, apps & meer.' }),
).toBeInTheDocument();
expect(screen.queryByText('Moderne weergave')).not.toBeInTheDocument(); expect(screen.queryByText('Moderne weergave')).not.toBeInTheDocument();
await waitFor(() => await waitFor(() =>
expect(screen.getByTestId('live-region')).toHaveTextContent('Tijdreis-weergave geladen.'), expect(screen.getByTestId('live-region')).toHaveTextContent('Tijdreis-weergave geladen.'),
@@ -78,7 +93,7 @@ describe('VariantRenderer and transition UI', () => {
renderApp(); renderApp();
fireEvent.click(screen.getByTestId('variant-toggle-button')); fireEvent.click(screen.getByTestId('variant-toggle-button'));
expect(screen.queryByTestId('transition-overlay')).not.toBeInTheDocument(); expect(screen.queryByTestId('transition-overlay')).not.toBeInTheDocument();
await screen.findByRole('heading', { name: 'Tijdreis' }); await screen.findByRole('heading', { level: 1, name: 'Websites, apps & meer.' });
expect(screen.queryByTestId('transition-overlay')).not.toBeInTheDocument(); expect(screen.queryByTestId('transition-overlay')).not.toBeInTheDocument();
}); });
@@ -97,7 +112,9 @@ describe('VariantRenderer and transition UI', () => {
expect(screen.getByText('Moderne weergave')).toBeInTheDocument(); expect(screen.getByText('Moderne weergave')).toBeInTheDocument();
fireEvent.click(screen.getByTestId('variant-alert-retry')); fireEvent.click(screen.getByTestId('variant-alert-retry'));
expect(await screen.findByRole('heading', { name: 'Tijdreis' })).toBeInTheDocument(); expect(
await screen.findByRole('heading', { level: 1, name: 'Websites, apps & meer.' }),
).toBeInTheDocument();
expect(screen.queryByRole('alert')).not.toBeInTheDocument(); expect(screen.queryByRole('alert')).not.toBeInTheDocument();
}); });
+46
View File
@@ -0,0 +1,46 @@
import { ModeToggle } from '../../components/ui/ModeToggle';
import { VariantToggle } from '../../components/ui/VariantToggle';
import { navLinks } from '../../features/landing/data/content';
import { handleAnchorClick } from '../../utils/scrollToHash';
/** Navigation of the 2026 era: links, the Start project button and both toggles (way back to B). */
export function ENav() {
return (
<nav
aria-label="Hoofdnavigatie"
className="mx-auto flex min-h-[76px] max-w-[1160px] flex-wrap items-center justify-between gap-x-8 gap-y-3 px-6"
>
<a
href="#top"
onClick={(event) => handleAnchorClick(event, '#top')}
className="flex items-baseline gap-[7px] py-2.5 no-underline"
>
<span className="text-[21px] font-black [font-stretch:125%]">SLP</span>
<span className="text-[15px] text-[color:var(--e-muted)]">Software</span>
</a>
<ul className="m-0 flex list-none flex-wrap items-center gap-x-7 gap-y-1 p-0 text-[15px] font-medium">
{navLinks.map((link) => (
<li key={link.href}>
<a
href={link.href}
onClick={(event) => handleAnchorClick(event, link.href)}
className={
link.isCta
? 'e-btn e-btn-solid no-underline'
: 'inline-flex min-h-[44px] items-center no-underline hover:underline'
}
>
{link.label}
</a>
</li>
))}
<li>
<ModeToggle />
</li>
<li>
<VariantToggle />
</li>
</ul>
</nav>
);
}
+89
View File
@@ -0,0 +1,89 @@
import { useMemo, useRef } from 'react';
import { createContactClient } from '../../cms-client/contact';
import { contactInfo } from '../../features/landing/data/content';
import { useContactAvailability } from '../../features/landing/hooks/useContactAvailability';
import { TerminalForm } from './TerminalForm';
import { terminalText } from './eraContent';
function TerminalMailto() {
const href = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`;
return (
<div data-testid="mailto-panel">
<p className="m-0 mb-5 max-w-[44ch]">
Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.
</p>
<a
href={href}
className="e-term-btn inline-block uppercase no-underline"
data-testid="contact-mailto-button"
>
[ Stuur een bericht ]
</a>
</div>
);
}
/**
* 1989: terminal contact block. Same progressive enhancement as design B: the mailto prompt by
* default and whenever the API is closed, the terminal form once the API says yes.
*/
export function Era1989() {
const ref = useRef<HTMLDivElement>(null);
const client = useMemo(() => createContactClient(), []);
const { availability, refreshToken } = useContactAvailability(ref, client);
return (
<section id="contact" aria-labelledby="contact-heading" className="e-sec-1989">
<div className="e-scanlines" aria-hidden="true" data-testid="e-scanlines" />
<span aria-hidden="true" className="absolute right-6 top-7 text-[22px]">
[1989]
</span>
<div className="relative mx-auto max-w-[1000px] px-6 pb-24 pt-[88px]">
<p className="m-0" aria-hidden="true">
{terminalText.header[0]}
<br />
{terminalText.header[1]}
</p>
<p className="m-0 mt-8" aria-hidden="true">
{terminalText.prompt1}
</p>
<h2
id="contact-heading"
className="mb-4 mt-7 text-[clamp(52px,7.5vw,104px)] font-normal uppercase leading-[0.95]"
>
{contactInfo.heading}
</h2>
<p className="m-0 max-w-[52ch]">{contactInfo.description}</p>
<p className="mb-5 mt-10" aria-hidden="true">
{terminalText.prompt2}
</p>
<div
ref={ref}
className="max-w-[780px]"
data-testid="contact-panel"
data-availability={availability.status}
>
{availability.status === 'open' ? (
<TerminalForm client={client} token={availability.token} refreshToken={refreshToken} />
) : (
<TerminalMailto />
)}
<p className="mb-0 mt-7 uppercase [overflow-wrap:anywhere]">
{terminalText.mailDirect}{' '}
<a
href={`mailto:${contactInfo.email}`}
className="normal-case underline underline-offset-4"
data-testid="contact-email-link"
>
{contactInfo.email}
</a>
</p>
</div>
<p className="m-0 mt-12" aria-hidden="true">
{terminalText.prompt3}
<span className="e-caret ml-1 inline-block h-[22px] w-[13px] bg-[#ffb000] align-[-3px]" />
</p>
</div>
</section>
);
}
+168
View File
@@ -0,0 +1,168 @@
import { Fragment } from 'react';
import { processSteps } from '../../features/landing/data/content';
import { handleAnchorClick } from '../../utils/scrollToHash';
import { marqueeText, processEra } from './eraContent';
const SANS = 'Arial, Helvetica, sans-serif';
const BEVEL_BOX = { border: '2px inset var(--e-w98-inset)' } as const;
/** 1998: early web, step cards with progress blocks and a "Klaar!" card. */
export function Era1998() {
const total = processSteps.length;
return (
<section id="werkwijze" aria-labelledby="werkwijze-heading" className="e-sec-1998 relative">
<div
aria-hidden="true"
className="overflow-hidden whitespace-nowrap border-t-2 border-[#a0a0a0] bg-[#800000] py-[7px] text-[15px] font-bold text-[#ffff00]"
style={{ fontFamily: SANS }}
data-testid="e-marquee"
>
<div className="e-marquee-track">{marqueeText.repeat(2)}&nbsp;</div>
</div>
<span
aria-hidden="true"
className="absolute right-6 top-[52px] px-2.5 py-[3px] text-[13px] font-bold"
style={{
fontFamily: SANS,
background: 'var(--e-w98-bg)',
border: '2px outset var(--e-w98-bevel)',
}}
>
1998
</span>
<div className="mx-auto max-w-[1080px] px-6 pb-24 pt-[88px]">
<h2
id="werkwijze-heading"
className="m-0 text-center text-[clamp(30px,3.6vw,40px)] font-bold"
style={{ color: 'var(--e-w98-head)' }}
>
{processEra.heading}
</h2>
<p className="mb-0 mt-2.5 text-center text-[19px]">{processEra.sub}</p>
<hr
className="mb-10 mt-[22px] border-0"
style={{ borderTop: '2px groove var(--e-w98-groove)' }}
/>
<ol className="m-0 flex list-none flex-wrap items-stretch p-0">
{processSteps.map((step, index) => (
<Fragment key={step.label}>
<li className="e-w98-card" data-testid={`e-step-${index + 1}`}>
<div
className="px-2 py-1 text-sm font-bold text-white"
style={{
fontFamily: SANS,
background: 'linear-gradient(90deg, #800000 0%, #b03030 100%)',
}}
>
Stap {index + 1} van {total}
</div>
<div
className="mt-[3px] flex flex-1 flex-col px-4 pb-4 pt-[18px]"
style={{
...BEVEL_BOX,
background: 'var(--e-w98-paper)',
color: 'var(--e-w98-paper-ink)',
}}
>
<div
aria-hidden="true"
className="flex h-16 w-16 items-center justify-center text-[38px] font-bold"
style={{
fontFamily: SANS,
background: 'var(--e-w98-face)',
border: '3px outset var(--e-w98-bevel)',
color: 'var(--e-w98-num)',
}}
>
{index + 1}
</div>
<h3 className="mb-0.5 mt-3.5 text-2xl leading-[1.15]">{step.title}</h3>
<p className="m-0 mb-3 text-base italic" style={{ color: 'var(--e-w98-sub)' }}>
{step.phase}
</p>
<p className="m-0 mb-[18px] flex-1 text-[17px]">{step.description}</p>
<div
aria-hidden="true"
className="flex gap-0.5 p-[3px]"
style={{ ...BEVEL_BOX, background: 'var(--e-w98-track)' }}
>
{processSteps.map((_, block) => (
<span
key={block}
className="h-4 flex-1"
style={{ background: block <= index ? 'var(--e-w98-bar)' : 'transparent' }}
/>
))}
</div>
<p
className="m-0 mt-1 text-xs"
style={{ fontFamily: SANS, color: 'var(--e-w98-sub)' }}
>
{Math.round(((index + 1) / total) * 100)}% van je project
</p>
</div>
</li>
<li className="e-w98-arrow" aria-hidden="true">
<svg width="28" height="28" viewBox="0 0 28 28">
<path
d="M3 10h12V4l10 10-10 10v-6H3z"
fill="var(--e-w98-arrow)"
stroke="var(--e-w98-arrow-line)"
strokeWidth="1.5"
strokeLinejoin="miter"
/>
</svg>
</li>
</Fragment>
))}
<li className="e-w98-card" data-testid="e-step-done">
<div
className="px-2 py-1 text-sm font-bold text-white"
style={{
fontFamily: SANS,
background: 'linear-gradient(90deg, #006600 0%, #1f7a1f 100%)',
}}
>
{processEra.doneTitle}
</div>
<div
className="mt-[3px] flex flex-1 flex-col justify-center px-4 py-[18px] text-center"
style={{
...BEVEL_BOX,
background: 'var(--e-w98-done)',
color: 'var(--e-w98-paper-ink)',
}}
>
<p
aria-hidden="true"
className="m-0 text-[44px] font-bold leading-none"
style={{ fontFamily: SANS, color: 'var(--e-w98-green)' }}
>
100%
</p>
<h3 className="my-2.5 text-[26px] leading-[1.1]">{processEra.doneHeading}</h3>
<p className="m-0 mb-4 text-[17px]">{processEra.doneText}</p>
<a
href="#contact"
onClick={(event) => handleAnchorClick(event, '#contact')}
className="underline"
style={{ color: 'var(--e-w98-link)' }}
>
{processEra.doneLink}
</a>
</div>
</li>
</ol>
<p
className="m-0 mt-10 text-center text-[13px]"
style={{ fontFamily: SANS, color: 'var(--e-w98-sub)' }}
>
{processEra.joke}
</p>
</div>
</section>
);
}
+250
View File
@@ -0,0 +1,250 @@
import type { ReactNode } from 'react';
import { packagesSettings, type PackageCardData } from '../../features/landing/data/content';
import { usePackagesQuery } from '../../features/landing/hooks/usePackagesQuery';
import { SwipeDots } from '../../features/landing/components/SwipeDots';
import { useContactPreselect } from '../../shared/contact/useContactPreselect';
import { initialIndex } from '../../shared/packages/packageLogic';
import { usePackageFilter } from '../../shared/packages/usePackageFilter';
import { useSwipeRow } from '../../shared/packages/useSwipeRow';
import { handleAnchorClick } from '../../utils/scrollToHash';
import { packagesHeading } from './eraContent';
const SKELETON_COUNT = 3;
function PackageCard2006({ pkg }: { pkg: PackageCardData }) {
const { select } = useContactPreselect();
const featured = Boolean(pkg.featured);
const tone = featured ? 'e-glossy-red' : 'e-glossy-silver';
return (
<article className="e-w2-card" data-featured={featured} data-testid={`package-card-${pkg.id}`}>
{featured && <div className="e-star">Meest gekozen!</div>}
<div
className={`${tone} rounded-t-[9px] border-b px-[22px] py-4`}
style={{ borderColor: featured ? '#8a0000' : 'var(--e-w2-silver-card-border)' }}
>
<h3 className="e-w2-display m-0 hyphens-auto text-[22px] [overflow-wrap:anywhere]">
{pkg.title}
</h3>
</div>
<div className="flex flex-1 flex-col p-[22px]">
<p className="mb-[18px] mt-0 text-[color:var(--e-w2-body)]">{pkg.description}</p>
<div className="e-w2-display text-[38px] font-bold leading-[1.1] text-[color:var(--e-w2-price)]">
{pkg.price}
</div>
<div className="text-xs text-[color:var(--e-w2-note)]">{pkg.priceNote}</div>
<ul className="mx-0 mb-[26px] mt-5 flex-1 list-none p-0">
{pkg.features.map((feature) => (
<li
key={feature}
className="flex gap-2.5 border-b border-dotted py-[5px]"
style={{ borderColor: 'var(--e-w2-dots)' }}
>
<svg
aria-hidden="true"
width="16"
height="16"
viewBox="0 0 16 16"
className="mt-[3px] flex-none"
>
<circle cx="8" cy="8" r="8" fill="#3f7d1a" />
<path
d="M4.5 8.2l2.3 2.3 4.7-4.9"
fill="none"
stroke="#ffffff"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span>{feature}</span>
</li>
))}
</ul>
<a
href="#contact"
onClick={(event) => {
select(pkg.slug);
handleAnchorClick(event, '#contact');
}}
className={`e-w2-btn ${tone}`}
data-testid={`package-cta-${pkg.id}`}
>
{pkg.ctaLabel}
</a>
</div>
</article>
);
}
function Skeleton() {
return (
<div
className="e-w2-card min-h-[420px] animate-pulse motion-reduce:animate-none"
data-testid="package-card-skeleton"
aria-hidden="true"
/>
);
}
function List2006({
packages,
loading,
resetKey,
}: {
packages: PackageCardData[];
loading: boolean;
resetKey: string;
}) {
const items: ReactNode[] = loading
? Array.from({ length: SKELETON_COUNT }, (_, i) => <Skeleton key={i} />)
: packages.map((pkg) => <PackageCard2006 key={pkg.id} pkg={pkg} />);
const { ref, activeIndex, scrollToIndex } = useSwipeRow(
items.length,
loading ? 0 : initialIndex(packages),
resetKey,
);
return (
<>
<div
ref={ref}
role="group"
aria-label="Pakketten"
tabIndex={0}
data-testid="packages-grid"
className="-mx-6 flex snap-x snap-mandatory items-stretch gap-4 overflow-x-auto px-6 pb-2 pt-12 sm:mx-0 sm:grid sm:snap-none sm:grid-cols-2 sm:gap-x-6 sm:gap-y-10 sm:overflow-visible sm:px-0 sm:pb-0 sm:pt-10 min-[1001px]:grid-cols-3"
>
{items.map((item, index) => (
<div key={index} className="w-[85%] flex-none snap-center sm:w-auto">
{item}
</div>
))}
</div>
{!loading && (
<SwipeDots
titles={packages.map((pkg) => pkg.title)}
activeIndex={activeIndex}
onSelect={scrollToIndex}
/>
)}
</>
);
}
function Banner2006({ pkg }: { pkg?: PackageCardData }) {
const { select } = useContactPreselect();
const fallback = packagesSettings.bannerFallback;
const cta = pkg?.ctaLabel ?? fallback.ctaLabel;
return (
<div
className="e-glossy-red mt-10 flex flex-wrap items-center justify-between gap-x-10 gap-y-5 rounded-[10px] border px-7 py-6"
style={{ borderColor: '#7a0000' }}
data-testid="package-banner"
>
<div className="flex-[1_1_320px]">
<h3 className="e-w2-display m-0 text-[26px]">{packagesSettings.bannerTitle}</h3>
<p className="m-0 mt-1 max-w-[52ch]">{pkg?.description ?? fallback.text}</p>
</div>
<a
href="#contact"
onClick={(event) => {
if (pkg) {
select(pkg.slug);
}
handleAnchorClick(event, '#contact');
}}
className="e-w2-btn e-glossy-silver"
data-testid="package-banner-cta"
>
{cta}
</a>
</div>
);
}
/** 2006: web 2.0 packages block (glossy tabs, cards, star badge) on the shared packages logic. */
export function Era2006() {
const { data, isLoading, isError, refetch } = usePackagesQuery();
const filter = usePackageFilter(data ?? [], packagesSettings);
const loaded = !isLoading && !isError && data !== undefined;
const banner = filter.hasBanner ? <Banner2006 pkg={filter.banners[0]} /> : null;
return (
<section id="pakketten" aria-labelledby="pakketten-heading" className="e-sec-2006 relative">
<span
aria-hidden="true"
className="e-glossy-red e-w2-display absolute right-6 top-6 rounded-[14px] border px-3.5 py-[5px] text-[13px] font-bold"
style={{ borderColor: '#7a0000' }}
>
2006
</span>
<div className="mx-auto max-w-[1020px] px-6 pb-24 pt-24 md:pb-28">
<div className="mb-10 text-center">
<h2
id="pakketten-heading"
className="e-w2-display m-0 mb-3.5 text-[clamp(30px,3.6vw,40px)] leading-[1.2] tracking-[-0.5px] text-[color:var(--e-w2-head)]"
style={{ textShadow: 'var(--e-w2-head-shadow)' }}
>
{packagesHeading(loaded ? filter.cards.length : 3)}
</h2>
<p className="mx-auto my-0 max-w-[52ch] text-[color:var(--e-w2-body)]">
Van één sterke pagina tot volledig maatwerk met eigen back-end. Elk pakket heeft een
vaste scope en een vaste prijs.
</p>
</div>
{isError ? (
<div className="text-center" data-testid="packages-error" role="alert">
<p className="mb-4">Pakketten konden niet worden geladen.</p>
<button
type="button"
onClick={() => void refetch()}
data-testid="packages-retry"
className="e-w2-btn e-glossy-silver mx-auto inline-block"
>
Opnieuw proberen
</button>
</div>
) : loaded && data.length === 0 ? (
<div data-testid="packages-empty">
<p className="mb-4 text-center">
Binnenkort meer informatie. Neem contact op voor een voorstel.
</p>
{banner}
</div>
) : (
<>
{loaded && filter.chips ? (
<div role="group" aria-label="Filter pakketten" className="flex flex-wrap gap-1">
{filter.chips.map((chip) => {
const active = chip.id === filter.activeId;
return (
<button
key={chip.id}
type="button"
aria-pressed={active}
onClick={() => filter.setActive(chip.id)}
data-testid={`package-chip-${chip.id}`}
className={`e-w2-tab ${active ? 'e-glossy-red' : 'e-glossy-silver'}`}
>
{chip.label}
<span className="ml-2 font-normal">{chip.count}</span>
</button>
);
})}
</div>
) : null}
{loaded ? (
<p className="sr-only" aria-live="polite" data-testid="packages-status">
{filter.label}
</p>
) : null}
<List2006 packages={filter.visible} loading={!loaded} resetKey={filter.activeId} />
{loaded && banner}
</>
)}
</div>
</section>
);
}
+97
View File
@@ -0,0 +1,97 @@
import { aboutContent } from '../../features/landing/data/content';
import { aboutTiles } from './eraContent';
const TILE_BG: Record<(typeof aboutTiles)[number]['tone'], string> = {
accent: '#ac0000',
dark: '#2e3a44',
slate: '#566573',
};
function longShadow(steps: number): string {
return Array.from({ length: steps }, (_, i) => `${i + 1}px ${i + 1}px 0 rgba(0,0,0,0.22)`).join(
', ',
);
}
const GLYPH_SHADOW = longShadow(60);
/** 2013: flat design, photo circle with text and three tiles. */
export function Era2013() {
return (
<section id="over" aria-labelledby="over-heading" className="e-sec-2013 relative">
<span
aria-hidden="true"
className="absolute right-6 top-0 bg-[#ac0000] px-3 pb-2.5 pt-2 text-[13px] font-semibold text-white"
>
2013
</span>
<div className="mx-auto max-w-[1060px] px-6 py-20 md:py-28">
<div className="mb-16 text-center">
<h2
id="over-heading"
className="m-0 text-[clamp(32px,4vw,46px)] font-light leading-[1.2] text-[color:var(--e-flat-ink)]"
>
Eén ontwikkelaar, korte lijnen
</h2>
<div
aria-hidden="true"
className="mx-auto mt-[22px] h-[3px] w-16"
style={{ background: 'var(--e-flat-rule)' }}
/>
</div>
<div className="flex flex-wrap items-center justify-center gap-x-16 gap-y-10">
<picture className="flex-none">
<source
type="image/webp"
srcSet="/bryan-slop-400.webp 400w, /bryan-slop-800.webp 800w"
sizes="240px"
/>
<img
src="/bryan-slop-400.jpg"
srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w"
sizes="240px"
alt="Bryan Slop, oprichter van SLP Software"
width={240}
height={240}
loading="lazy"
decoding="async"
className="block h-60 w-60 rounded-full border-8 object-cover object-[50%_30%]"
style={{ borderColor: 'var(--e-flat-ring)' }}
/>
</picture>
<div className="max-w-[600px] flex-[1_1_420px]">
{aboutContent.paragraphs.map((paragraph, index) => (
<p
key={paragraph}
className={
index === 0
? 'mb-4 mt-0 text-xl font-light text-[color:var(--e-flat-ink)]'
: 'mb-4 mt-0 text-[color:var(--e-flat-body)]'
}
>
{paragraph}
</p>
))}
</div>
</div>
<ul className="m-0 mt-16 grid list-none grid-cols-[repeat(auto-fit,minmax(220px,1fr))] gap-5 p-0 md:mt-20">
{aboutTiles.map((tile) => (
<li
key={tile.label}
className="relative flex h-[190px] flex-col justify-between overflow-hidden px-7 py-[26px] text-white"
style={{ background: TILE_BG[tile.tone] }}
>
<span
aria-hidden="true"
className="text-[54px] font-bold leading-none"
style={{ textShadow: GLYPH_SHADOW }}
>
{tile.glyph}
</span>
<span className="relative text-lg font-semibold">{tile.label}</span>
</li>
))}
</ul>
</div>
</section>
);
}
+74
View File
@@ -0,0 +1,74 @@
import { heroContent } from '../../features/landing/data/content';
import { handleAnchorClick } from '../../utils/scrollToHash';
import { heroEra } from './eraContent';
/** 2026: modern hero with the live headline and the blinking code line. */
export function Era2026() {
return (
<section
aria-labelledby="hero-heading"
className="e-sec-2026 relative mx-auto max-w-[1160px] px-6 pb-[72px] pt-20 md:pt-[120px]"
>
<span
aria-hidden="true"
className="absolute right-6 top-10 font-mono text-[13px] text-[color:var(--e-muted)]"
>
2026
</span>
<h1
id="hero-heading"
className="m-0 max-w-[11ch] text-[clamp(44px,8vw,116px)] font-extrabold leading-[0.92] tracking-[-0.035em] [font-stretch:118%]"
>
{heroContent.displayHeading.join(' ')}
</h1>
<div className="mt-12 grid items-end gap-x-20 gap-y-10 md:mt-16 md:grid-cols-2">
<div>
<p className="mb-8 mt-0 max-w-[46ch] text-[color:var(--e-body)]">{heroContent.lead}</p>
<div className="flex flex-wrap gap-3">
<a
href="#pakketten"
onClick={(event) => handleAnchorClick(event, '#pakketten')}
className="e-btn e-btn-solid"
>
Bekijk pakketten
</a>
<a
href="#contact"
onClick={(event) => handleAnchorClick(event, '#contact')}
className="e-btn e-btn-outline"
>
Plan een gesprek
</a>
</div>
</div>
<p
className="m-0 overflow-x-auto whitespace-nowrap rounded-md border border-[color:var(--e-line-strong)] px-5 py-[18px] font-mono text-[15px] text-[color:var(--e-body)]"
data-testid="e-codeline"
>
{heroContent.codeLine}
<span
aria-hidden="true"
className="e-caret ml-1 inline-block h-[18px] w-[9px] align-[-3px]"
style={{ background: 'var(--e-caret)' }}
/>
</p>
</div>
<p className="mt-16 flex items-center gap-2.5 border-t border-[color:var(--e-line)] pt-[22px] text-[15px] text-[color:var(--e-body)] md:mt-28">
{heroEra.scrollHint}
<svg
aria-hidden="true"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
stroke="currentColor"
strokeWidth="1.6"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M8 2v12M3 9l5 5 5-5" />
</svg>
</p>
</section>
);
}
+46 -24
View File
@@ -1,32 +1,54 @@
import { ModeToggle } from '../../components/ui/ModeToggle'; import './fonts';
import { VariantToggle } from '../../components/ui/VariantToggle'; import './era.css';
import { SkipLink } from '../../components/layout/SkipLink';
import { useTheme } from '../../theme/ThemeProvider';
import { handleAnchorClick } from '../../utils/scrollToHash';
import { ENav } from './ENav';
import { Era1989 } from './Era1989';
import { Era1998 } from './Era1998';
import { Era2006 } from './Era2006';
import { Era2013 } from './Era2013';
import { Era2026 } from './Era2026';
import { terminalText } from './eraContent';
import { tokenStyle } from './eraTokens';
/** /**
* Placeholder shell for variant E (time-travel). The real content (eras 2026 / 2013 / 2006 / * Variant E (time travel): five eras from 2026 back to 1989 in one page. Rendered instead of the
* 1998 / 1989) is built in unit U5; U1 only provides the lazy chunk and the way back to B. * B shell, so it brings its own skip link, header, main landmark and footer.
*/ */
export default function LandingE() { export default function LandingE() {
const { mode } = useTheme();
return ( return (
<> <div id="top" className="e-root font-sans" style={tokenStyle(mode)} data-testid="landing-e">
<nav className="sticky top-0 z-50 border-b border-line bg-bg/80 backdrop-blur-md"> <SkipLink />
<div className="mx-auto flex h-16 max-w-[1080px] items-center justify-between px-6"> <header className="e-sec-2026 border-b border-[color:var(--e-line)]">
<span className="font-mono text-base font-bold tracking-wide text-text"> <ENav />
SLP<span className="text-accent">.</span>Software </header>
</span> <main id="main" tabIndex={-1} className="outline-none">
<ul className="flex items-center gap-4"> <Era2026 />
<li> <Era2013 />
<ModeToggle /> <Era2006 />
</li> <Era1998 />
<li> <div aria-hidden="true" className="e-dither-1" />
<VariantToggle /> <div aria-hidden="true" className="e-dither-2" />
</li> <Era1989 />
</ul>
</div>
</nav>
<main id="main" tabIndex={-1} className="mx-auto max-w-[1080px] px-6 py-24 outline-none">
<h1 className="font-display text-4xl font-extrabold">Tijdreis</h1>
<p className="mt-4 text-muted">Deze weergave is in aanbouw.</p>
</main> </main>
</> <footer className="e-sec-1989 border-t border-dashed border-[#7a5500]">
<div className="mx-auto flex max-w-[1000px] flex-wrap justify-between gap-x-6 gap-y-2 px-6 py-[22px] text-xl text-[#d99600]">
<span>{terminalText.footerLeft}</span>
<span>
{terminalText.footerRight}{' '}
<a
href="#top"
onClick={(event) => handleAnchorClick(event, '#top')}
className="uppercase"
>
{terminalText.backTo2026}
</a>
</span>
</div>
</footer>
</div>
); );
} }
+185
View File
@@ -0,0 +1,185 @@
import { useEffect, useMemo, useRef } from 'react';
import type { ReactNode } from 'react';
import {
useContactForm,
type ContactClient,
type ContactToken,
type SubjectOption,
type TokenResult,
} from '../../cms-client/contact';
import { contactForm, contactInfo } from '../../features/landing/data/content';
import { usePackagesQuery } from '../../features/landing/hooks/usePackagesQuery';
import { trackEvent } from '../../shared/analytics/trackEvent';
import { useContactPreselect } from '../../shared/contact/useContactPreselect';
import { terminalText } from './eraContent';
interface TerminalFormProps {
client: ContactClient;
token: ContactToken;
refreshToken: () => Promise<TokenResult>;
}
function Row({
label,
dots,
error,
errorId,
children,
}: {
label: string;
dots: string;
error: string | null;
errorId: string;
children: ReactNode;
}) {
return (
<div>
<label className="flex flex-wrap items-baseline gap-x-3.5 gap-y-1 uppercase">
<span className="min-w-[11ch]">
{label}
<span aria-hidden="true">{dots}</span>
</span>
{children}
</label>
{error ? (
<span id={errorId} className="e-term-error mt-1 block uppercase" data-testid="field-error">
{error}
</span>
) : null}
</div>
);
}
/** The 1989 terminal skin of the contact form, on the same logic as design B (useContactForm). */
export function TerminalForm({ client, token, refreshToken }: TerminalFormProps) {
const { data: packages } = usePackagesQuery();
const preselect = useContactPreselect();
const subjectOptions = useMemo<SubjectOption[]>(
() => [
...(packages ?? []).map((pkg) => ({ value: pkg.slug, label: pkg.title })),
{ value: 'other', label: contactForm.otherSubjectLabel },
],
[packages],
);
const form = useContactForm({
idPrefix: 'contact',
subjectOptions,
preselect: { subject: preselect.subject, key: preselect.key },
client,
token,
refreshToken,
fallbackAddress: contactInfo.email,
onEvent: (event) => trackEvent(event === 'sent' ? 'contact-sent' : 'contact-failed'),
});
const successRef = useRef<HTMLDivElement>(null);
useEffect(() => {
if (form.status === 'sent') {
successRef.current?.focus();
}
}, [form.status]);
if (form.status === 'sent') {
return (
<div
ref={successRef}
tabIndex={-1}
role="status"
className="outline-none"
data-testid="contact-success"
>
<p className="m-0">{terminalText.sentLine1}</p>
<p className="m-0 mb-5">{terminalText.sentLine2}</p>
<button
type="button"
onClick={form.reset}
className="e-term-btn e-term-btn-ghost uppercase"
data-testid="contact-reset"
>
[ {terminalText.newMessage} ]
</button>
</div>
);
}
const name = form.getFieldProps('name');
const email = form.getFieldProps('email');
const subject = form.getFieldProps('subject');
const message = form.getFieldProps('message');
const { id: hpId, ...hpProps } = form.honeypotProps;
return (
<form
{...form.formProps}
className="flex flex-col gap-[18px] border-4 border-double border-[#ffb000] p-[clamp(18px,3vw,32px)]"
data-testid="contact-form"
>
<Row label="Naam" dots="....:" error={name.error} errorId={name.errorId}>
<input type="text" autoComplete="name" className="e-term-input" {...name.inputProps} />
</Row>
<Row label="E-mail" dots="..:" error={email.error} errorId={email.errorId}>
<input type="email" autoComplete="email" className="e-term-input" {...email.inputProps} />
</Row>
<Row label="Onderwerp" dots=":" error={subject.error} errorId={subject.errorId}>
<select className="e-term-box flex-[1_1_240px] min-w-0" {...subject.inputProps}>
<option value="" disabled>
-- KIES --
</option>
{subjectOptions.map((option) => (
<option key={option.value} value={option.value}>
{option.label.toUpperCase()}
</option>
))}
</select>
</Row>
<div>
<label className="flex flex-col gap-1.5 uppercase">
<span>
Bericht<span aria-hidden="true">:</span>
</span>
<textarea rows={5} className="e-term-box resize-y" {...message.inputProps} />
</label>
{message.error ? (
<span
id={message.errorId}
className="e-term-error mt-1 block uppercase"
data-testid="field-error"
>
{message.error}
</span>
) : null}
</div>
{/* Honeypot: invisible to people and assistive technology; bots fill it. */}
<div aria-hidden="true" className="absolute -left-[9999px] h-0 w-0 overflow-hidden">
<label htmlFor={hpId}>Laat dit veld leeg</label>
<input type="text" id={hpId} {...hpProps} />
</div>
{form.failureMessage ? (
<p role="alert" className="e-term-error m-0" data-testid="contact-failure">
{form.failureMessage}
</p>
) : null}
<div className="mt-1 flex flex-wrap items-center gap-x-6 gap-y-2.5">
<button
type="submit"
disabled={form.status === 'sending'}
className="e-term-btn uppercase"
data-testid="contact-submit"
>
[{' '}
{form.status === 'sending'
? form.messages.sendingLabel
: form.status === 'failed'
? terminalText.retry
: terminalText.send}{' '}
]
</button>
<span className="text-xl text-[#d99600]">{contactForm.privacyNote.toUpperCase()}</span>
</div>
</form>
);
}
+267
View File
@@ -0,0 +1,267 @@
import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import LandingE from '../LandingE';
import { ThemeProvider } from '../../../theme/ThemeProvider';
import { ContactPreselectProvider } from '../../../shared/contact/ContactPreselectProvider';
import { clearMatchMedia, mockMatchMedia } from '../../../test/matchMedia';
import { REDUCED_MOTION_QUERY } from '../../../shared/hooks/usePrefersReducedMotion';
import {
aboutContent,
contactInfo,
packages,
processSteps,
} from '../../../features/landing/data/content';
class FakeIntersectionObserver {
static instances: FakeIntersectionObserver[] = [];
constructor(private readonly callback: IntersectionObserverCallback) {
FakeIntersectionObserver.instances.push(this);
}
observe() {}
unobserve() {}
disconnect() {}
takeRecords() {
return [];
}
trigger() {
this.callback(
[{ isIntersecting: true } as IntersectionObserverEntry],
this as unknown as IntersectionObserver,
);
}
}
const jsonResponse = (body: unknown, status = 200) =>
new Response(JSON.stringify(body), {
status,
headers: { 'Content-Type': 'application/json' },
});
interface SetupOptions {
tokenStatus?: number;
offerings?: unknown;
}
function setup({ tokenStatus = 404, offerings = packages }: SetupOptions = {}) {
const submits: RequestInit[] = [];
vi.stubGlobal(
'fetch',
vi.fn(async (url: string, init?: RequestInit) => {
if (url.endsWith('/api/v1/offerings')) return jsonResponse(offerings);
if (url.endsWith('/contact-messages/token')) {
return tokenStatus === 200
? jsonResponse({ token: 'tok-1', minSeconds: 3, captcha: null })
: new Response(null, { status: tokenStatus });
}
if (url.endsWith('/contact-messages') && init?.method === 'POST') {
submits.push(init);
return jsonResponse({ status: 'received' }, 202);
}
return new Response(null, { status: 404 });
}),
);
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
render(
<QueryClientProvider client={queryClient}>
<ContactPreselectProvider>
<ThemeProvider loadVariant={() => Promise.resolve()}>
<LandingE />
</ThemeProvider>
</ContactPreselectProvider>
</QueryClientProvider>,
);
return { submits };
}
async function loaded() {
await waitFor(() =>
expect(screen.queryByTestId('package-card-skeleton')).not.toBeInTheDocument(),
);
}
describe('LandingE (variant E, five eras)', () => {
beforeEach(() => {
FakeIntersectionObserver.instances = [];
vi.stubGlobal('IntersectionObserver', FakeIntersectionObserver);
vi.stubEnv('VITE_API_BASE_URL', '');
window.localStorage.clear();
Element.prototype.scrollIntoView = vi.fn();
});
afterEach(() => {
vi.unstubAllGlobals();
vi.unstubAllEnvs();
clearMatchMedia();
});
it('has the landmarks, one h1, a skip link and a way back to B', async () => {
setup();
expect(screen.getAllByRole('heading', { level: 1 })).toHaveLength(1);
expect(screen.getByRole('heading', { level: 1, name: 'Websites, apps & meer.' })).toBeVisible();
expect(screen.getByRole('banner')).toBeInTheDocument();
expect(screen.getByRole('main')).toHaveAttribute('id', 'main');
expect(screen.getByRole('contentinfo')).toBeInTheDocument();
expect(screen.getByTestId('skip-link')).toBeInTheDocument();
expect(screen.getByTestId('variant-toggle-button')).toBeInTheDocument();
expect(screen.getByTestId('mode-toggle-button')).toBeInTheDocument();
expect(screen.getByRole('navigation', { name: 'Hoofdnavigatie' })).toBeInTheDocument();
await loaded();
});
it('names every era section and orders headings logically', async () => {
setup();
await loaded();
for (const name of [
'Eén ontwikkelaar, korte lijnen',
'Drie manieren om te starten',
'Van idee naar live in drie stappen',
contactInfo.heading,
]) {
expect(screen.getByRole('heading', { level: 2, name })).toBeInTheDocument();
}
expect(screen.getAllByRole('region')).toHaveLength(5);
});
it('shows the about text from the content with the photo', () => {
setup();
aboutContent.paragraphs.forEach((paragraph) =>
expect(screen.getByText(paragraph)).toBeInTheDocument(),
);
expect(
screen.getByRole('img', { name: 'Bryan Slop, oprichter van SLP Software' }),
).toBeInTheDocument();
});
it('shows the 2006 package cards from the shared logic with a star on the featured one', async () => {
setup();
await loaded();
packages.forEach((pkg) => {
const card = screen.getByTestId(`package-card-${pkg.id}`);
expect(within(card).getByRole('heading', { level: 3, name: pkg.title })).toBeInTheDocument();
expect(within(card).getByText(pkg.price)).toBeInTheDocument();
});
const featured = packages.find((pkg) => pkg.featured)!;
expect(
within(screen.getByTestId(`package-card-${featured.id}`)).getByText('Meest gekozen!'),
).toBeInTheDocument();
});
it('preselects the package for the contact form when a card button is used', async () => {
setup({ tokenStatus: 200 });
await loaded();
await act(async () => {
FakeIntersectionObserver.instances.forEach((o) => o.trigger());
});
await screen.findByTestId('contact-form');
fireEvent.click(screen.getByTestId('package-cta-pakket_02'));
const select = (await screen.findByLabelText(/^Onderwerp/)) as HTMLSelectElement;
await waitFor(() => expect(select.value).toBe('website'));
});
it('shows filter tabs for 4+ card packages and filters', async () => {
const category = (slug: string, c: string | null) => ({
id: `id_${slug}`,
slug,
title: `Titel ${slug}`,
description: `Omschrijving ${slug}`,
price: '€ 100',
priceNote: 'eenmalig',
features: ['een'],
ctaLabel: `Kies ${slug}`,
category: c,
});
setup({
offerings: [
category('a', 'Websites'),
category('b', 'Websites'),
category('c', 'Onderhoud'),
category('d', 'Onderhoud'),
],
});
await loaded();
const group = screen.getByRole('group', { name: 'Filter pakketten' });
fireEvent.click(within(group).getByTestId('package-chip-cat:Onderhoud'));
expect(screen.queryByTestId('package-card-id_a')).not.toBeInTheDocument();
expect(screen.getByTestId('package-card-id_c')).toBeInTheDocument();
expect(screen.getByTestId('packages-status')).toHaveTextContent('2');
});
it('shows the 1998 steps with progress and the done card; decorations are aria-hidden', async () => {
setup();
await loaded();
processSteps.forEach((step, index) => {
const card = screen.getByTestId(`e-step-${index + 1}`);
expect(
within(card).getByText(`Stap ${index + 1} van ${processSteps.length}`),
).toBeInTheDocument();
expect(within(card).getByRole('heading', { level: 3, name: step.title })).toBeInTheDocument();
expect(within(card).getByText(step.description)).toBeInTheDocument();
});
expect(
within(screen.getByTestId('e-step-done')).getByRole('heading', { name: 'Je site is live!' }),
).toBeInTheDocument();
expect(screen.getByTestId('e-marquee')).toHaveAttribute('aria-hidden', 'true');
expect(screen.getByTestId('e-scanlines')).toHaveAttribute('aria-hidden', 'true');
});
it('keeps the mailto prompt in the terminal while the API is closed', async () => {
setup({ tokenStatus: 404 });
await act(async () => {
FakeIntersectionObserver.instances.forEach((o) => o.trigger());
});
await waitFor(() =>
expect(screen.getByTestId('contact-panel')).toHaveAttribute('data-availability', 'closed'),
);
expect(screen.getByTestId('mailto-panel')).toBeInTheDocument();
expect(screen.getByTestId('contact-email-link')).toHaveAttribute(
'href',
`mailto:${contactInfo.email}`,
);
expect(screen.queryByTestId('contact-form')).not.toBeInTheDocument();
await loaded();
});
it('sends a message through the terminal form and shows the confirmation', async () => {
const { submits } = setup({ tokenStatus: 200 });
await act(async () => {
FakeIntersectionObserver.instances.forEach((o) => o.trigger());
});
await screen.findByTestId('contact-form');
await waitFor(() =>
expect(screen.getByRole('option', { name: 'WEBSITE' })).toBeInTheDocument(),
);
fireEvent.change(screen.getByLabelText(/^Naam/), { target: { value: 'Jan Jansen' } });
fireEvent.change(screen.getByLabelText(/^E-mail/), { target: { value: 'jan@example.nl' } });
fireEvent.change(screen.getByLabelText(/^Onderwerp/), { target: { value: 'website' } });
fireEvent.change(screen.getByLabelText(/^Bericht/), {
target: { value: 'Ik wil graag een offerte.' },
});
fireEvent.submit(screen.getByTestId('contact-form'));
const success = await screen.findByTestId('contact-success');
expect(success).toHaveAttribute('role', 'status');
expect(submits).toHaveLength(1);
fireEvent.click(screen.getByTestId('contact-reset'));
expect(await screen.findByTestId('contact-form')).toBeInTheDocument();
});
it('shows field errors in the terminal form and does not send an invalid form', async () => {
const { submits } = setup({ tokenStatus: 200 });
await act(async () => {
FakeIntersectionObserver.instances.forEach((o) => o.trigger());
});
await screen.findByTestId('contact-form');
fireEvent.submit(screen.getByTestId('contact-form'));
expect((await screen.findAllByTestId('field-error')).length).toBeGreaterThan(0);
expect(submits).toHaveLength(0);
});
it('stops the decorative motion under prefers-reduced-motion via CSS only (nothing auto-moves)', async () => {
mockMatchMedia({ [REDUCED_MOTION_QUERY]: true });
setup();
await loaded();
// Motion lives in era.css behind the reduced-motion media query; the markup stays the same and
// all moving parts are decorative.
expect(screen.getByTestId('e-marquee')).toHaveAttribute('aria-hidden', 'true');
expect(screen.getByTestId('e-codeline').querySelector('[aria-hidden="true"]')).not.toBeNull();
});
});
@@ -0,0 +1,45 @@
import { describe, expect, it } from 'vitest';
import { CONTRAST_PAIRS, DARK, LIGHT } from '../eraTokens';
function luminance(hex: string): number {
const channels = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
const [r, g, b] = channels.map((c) => (c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}
function contrast(a: string, b: string): number {
const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x);
return (hi + 0.05) / (lo + 0.05);
}
describe('era tokens (NFR-U5-2, WCAG AA)', () => {
it('defines the same variables in light and dark', () => {
expect(Object.keys(DARK).sort()).toEqual(Object.keys(LIGHT).sort());
});
describe.each([
['light', LIGHT],
['dark', DARK],
] as const)('%s mode', (_mode, set) => {
it.each(CONTRAST_PAIRS)('%s on %s has at least %s:1', (fg, bg, min) => {
expect(set[fg], fg).toMatch(/^#[0-9a-f]{6}$/);
expect(set[bg], bg).toMatch(/^#[0-9a-f]{6}$/);
expect(
contrast(set[fg], set[bg]),
`${fg} ${set[fg]} on ${bg} ${set[bg]}`,
).toBeGreaterThanOrEqual(min);
});
});
it('keeps the fixed terminal and button colours readable', () => {
expect(contrast('#ffb000', '#0b0a07')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#d99600', '#0b0a07')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#ff9d8a', '#0b0a07')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#0b0a07', '#ffb000')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#ffffff', '#b01010')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#ffffff', '#ac0000')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#ffff00', '#800000')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#ffffff', '#1f7a1f')).toBeGreaterThanOrEqual(4.5);
expect(contrast('#ffffff', '#b03030')).toBeGreaterThanOrEqual(4.5);
});
});
+345
View File
@@ -0,0 +1,345 @@
/*
* Styles of the time-travel variant (E). Loaded only with the E chunk. Colours come from the
* `--e-*` variables set on `.e-root` (see eraTokens.ts); the 1989 terminal uses fixed amber colours.
* Decorative motion (marquee, blinking caret) stops under prefers-reduced-motion (NFR-U5-3).
*/
@keyframes e-blink {
0%,
49% {
opacity: 1;
}
50%,
100% {
opacity: 0;
}
}
@keyframes e-marquee {
from {
transform: translateX(0);
}
to {
transform: translateX(-50%);
}
}
.e-root {
background: var(--e-page);
color: var(--e-ink);
min-height: 100vh;
--e-focus: var(--e-ink);
}
.e-root :focus-visible {
outline: 3px solid var(--e-focus);
outline-offset: 2px;
}
.e-root a {
color: inherit;
}
.e-caret {
display: inline-block;
animation: e-blink 1.1s steps(1) infinite;
}
.e-marquee-track {
display: inline-block;
animation: e-marquee 26s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.e-caret,
.e-marquee-track {
animation: none;
}
.e-marquee-track {
transform: none;
}
}
/* ---------- 2026: modern ---------- */
.e-sec-2026 {
font-family: 'Archivo Variable', system-ui, sans-serif;
font-size: 17px;
line-height: 1.55;
}
.e-btn {
display: inline-flex;
align-items: center;
min-height: 44px;
border-radius: 6px;
font-weight: 600;
text-decoration: none;
transition: opacity 0.15s;
}
.e-btn:hover {
opacity: 0.85;
}
.e-btn-solid {
background: var(--e-cta);
color: #ffffff;
padding: 11px 20px;
}
.e-btn-outline {
border: 1.5px solid var(--e-ink);
padding: 10px 20px;
}
/* ---------- 2013: flat ---------- */
.e-sec-2013 {
background: var(--e-flat-bg);
color: var(--e-flat-ink);
font-family: 'Open Sans', Arial, sans-serif;
font-size: 16px;
line-height: 1.7;
--e-focus: var(--e-flat-ink);
}
/* ---------- 2006: web 2.0 ---------- */
.e-sec-2006 {
background: var(--e-w2-bg);
color: var(--e-w2-ink);
font-family: Verdana, Tahoma, 'DejaVu Sans', sans-serif;
font-size: 14px;
line-height: 1.6;
border-top: 1px solid var(--e-w2-border);
--e-focus: var(--e-w2-ink);
}
.e-w2-display {
font-family: 'Trebuchet MS', Verdana, sans-serif;
}
.e-glossy-red {
background: linear-gradient(180deg, #d03030 0%, #b01010 50%, #a30000 51%, #b50a0a 100%);
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35);
}
.e-glossy-silver {
background: var(--e-w2-silver);
color: var(--e-w2-silver-fg);
text-shadow: var(--e-w2-silver-shadow);
}
.e-w2-card {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
background: var(--e-w2-card);
border: 1px solid var(--e-w2-silver-card-border);
border-radius: 10px;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}
.e-w2-card[data-featured='true'] {
border-color: #8a0000;
}
.e-w2-btn {
display: block;
text-align: center;
text-decoration: none;
padding: 12px 16px;
border-radius: 6px;
font-family: 'Trebuchet MS', Verdana, sans-serif;
font-weight: 700;
font-size: 16px;
border: 1px solid var(--e-w2-silver-border);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.3),
0 1px 2px rgba(0, 0, 0, 0.3);
}
.e-w2-btn.e-glossy-red {
border-color: #7a0000;
}
.e-w2-btn:hover {
filter: brightness(1.08);
}
.e-w2-tab {
min-height: 44px;
padding: 0 18px;
border-radius: 6px 6px 0 0;
border: 1px solid var(--e-w2-silver-border);
font-family: 'Trebuchet MS', Verdana, sans-serif;
font-weight: 700;
cursor: pointer;
}
.e-w2-tab[aria-pressed='false']:hover {
filter: brightness(1.08);
}
.e-star {
position: absolute;
top: -40px;
right: -22px;
width: 112px;
height: 112px;
transform: rotate(-12deg);
clip-path: polygon(
100% 50%,
88.6% 60.4%,
93.3% 75%,
78.3% 78.3%,
75% 93.3%,
60.4% 88.6%,
50% 100%,
39.6% 88.6%,
25% 93.3%,
21.7% 78.3%,
6.7% 75%,
11.4% 60.4%,
0% 50%,
11.4% 39.6%,
6.7% 25%,
21.7% 21.7%,
25% 6.7%,
39.6% 11.4%,
50% 0%,
60.4% 11.4%,
75% 6.7%,
78.3% 21.7%,
93.3% 25%,
88.6% 39.6%
);
background: radial-gradient(circle at 40% 35%, #fff07a 0%, #ffd21a 45%, #f5a800 100%);
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-family: 'Trebuchet MS', Verdana, sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 1.1;
color: #4a2200;
}
/* ---------- 1998: early web ---------- */
.e-sec-1998 {
background: var(--e-w98-bg);
color: var(--e-w98-ink);
font-family: 'Times New Roman', Times, serif;
font-size: 18px;
line-height: 1.45;
--e-focus: var(--e-w98-ink);
}
.e-w98-card {
flex: 1 1 200px;
min-width: 0;
display: flex;
flex-direction: column;
background: var(--e-w98-bg);
border: 2px outset var(--e-w98-bevel);
padding: 3px;
box-sizing: border-box;
}
.e-w98-arrow {
flex: 0 0 40px;
display: flex;
align-items: center;
justify-content: center;
}
@media (max-width: 960px) {
.e-w98-card {
flex: 1 1 100%;
}
.e-w98-arrow {
flex: 0 0 100%;
height: 44px;
}
.e-w98-arrow svg {
transform: rotate(90deg);
}
}
/* ---------- dither strips between the eras ---------- */
.e-dither-1 {
height: 12px;
background: repeating-conic-gradient(var(--e-dither-a) 0% 25%, #0b0a07 0% 50%) 0 0 / 4px 4px;
}
.e-dither-2 {
height: 8px;
background: repeating-conic-gradient(#3a3a3a 0% 25%, #0b0a07 0% 50%) 0 0 / 4px 4px;
}
/* ---------- 1989: terminal (same in both modes) ---------- */
.e-sec-1989 {
position: relative;
background: #0b0a07;
color: #ffb000;
font-family: 'VT323', 'Courier New', monospace;
font-size: 24px;
line-height: 1.35;
text-shadow: 0 0 7px rgba(255, 176, 0, 0.45);
--e-focus: #ffb000;
}
.e-scanlines {
position: absolute;
inset: 0;
pointer-events: none;
background: repeating-linear-gradient(
0deg,
rgba(0, 0, 0, 0.28) 0px,
rgba(0, 0, 0, 0.28) 1px,
transparent 1px,
transparent 3px
);
}
@media (prefers-reduced-motion: reduce) {
.e-scanlines {
display: none;
}
}
.e-term-input {
flex: 1 1 240px;
min-width: 0;
font: inherit;
color: #ffb000;
text-shadow: inherit;
background: transparent;
border: 0;
border-bottom: 2px dashed #a87400;
border-radius: 0;
padding: 2px 4px;
}
.e-term-box {
font: inherit;
color: #ffb000;
text-shadow: inherit;
background: #0b0a07;
border: 1px solid #a87400;
border-radius: 0;
padding: 8px 10px;
}
.e-term-btn {
font: inherit;
font-size: 26px;
background: #ffb000;
color: #0b0a07;
text-shadow: none;
border: 0;
border-radius: 0;
padding: 6px 18px;
min-height: 44px;
cursor: pointer;
}
.e-term-btn:hover:not(:disabled) {
background: #ffd266;
}
.e-term-btn:disabled {
opacity: 0.7;
cursor: default;
}
.e-term-btn-ghost {
background: transparent;
color: #ffb000;
text-shadow: inherit;
border: 1px solid #ffb000;
font-size: 24px;
}
.e-term-btn-ghost:hover:not(:disabled) {
background: #ffb000;
color: #0b0a07;
text-shadow: none;
}
.e-term-error {
color: #ff9d8a;
}
+44
View File
@@ -0,0 +1,44 @@
/** Strings that only exist in variant E (the live copy comes from features/landing/data/content). */
export const marqueeText =
'+++ Welkom bij SLP Software +++ Van idee naar live in drie stappen +++ Websites, apps & meer +++ ';
export const aboutTiles = [
{ glyph: '</>', label: 'Websites', tone: 'accent' },
{ glyph: 'C#', label: '.NET-software', tone: 'dark' },
{ glyph: '{ }', label: 'CMS & apps', tone: 'slate' },
] as const;
export const processEra = {
heading: 'Van idee naar live in drie stappen',
sub: 'Zo loopt een project van het eerste gesprek tot de live-gang.',
doneTitle: 'Klaar!',
doneHeading: 'Je site is live!',
doneText: 'Online, met uitleg erbij. Uitbreiden kan altijd.',
doneLink: '» Begin met stap 1',
joke: 'Deze pagina is het best te bekijken met een resolutie van 800 × 600.',
};
export const heroEra = {
scrollHint: 'Scroll verder — en zie waar het allemaal begon.',
};
export const terminalText = {
header: ['SLP SOFTWARE — CONTACT.EXE', '640K OK'],
prompt1: 'C:\\SLP> type contact.txt',
prompt2: 'C:\\SLP> contact /nieuw',
prompt3: 'C:\\SLP> slp.Bouw(uwIdee);',
sentLine1: 'BERICHT VERSTUURD........ OK',
sentLine2: 'ANTWOORD BINNEN 1 WERKDAG. BEDANKT!',
newMessage: 'Nieuw bericht',
send: 'Verstuur',
retry: 'Opnieuw proberen',
mailDirect: 'Of mail direct:',
footerLeft: '(C) 2026 SLP SOFTWARE',
footerRight: 'EINDE VAN DE REIS —',
backTo2026: 'Terug naar 2026',
};
export function packagesHeading(count: number): string {
return count === 3 ? 'Drie manieren om te starten' : 'Manieren om te starten';
}
+145
View File
@@ -0,0 +1,145 @@
import type { CSSProperties } from 'react';
/**
* Colour tokens of the time-travel variant (E) per mode, taken from the design canvas. They are
* applied as CSS variables on the E root (see `tokenStyle`), so components and `era.css` only use
* `var(--e-...)`. The 1989 terminal is the same in both modes and therefore has fixed colours in
* `era.css`.
*/
export type EraTokenSet = Record<string, string>;
export const LIGHT: EraTokenSet = {
'--e-page': '#ffffff',
'--e-ink': '#111111',
'--e-body': '#46413d',
'--e-muted': '#57524e',
'--e-line': '#e8e5e2',
'--e-line-strong': '#8a8480',
'--e-cta': '#ac0000',
'--e-caret': '#ac0000',
'--e-flat-bg': '#f2f2f2',
'--e-flat-ink': '#333333',
'--e-flat-body': '#555555',
'--e-flat-rule': '#ac0000',
'--e-flat-ring': '#ffffff',
'--e-w2-bg':
'repeating-linear-gradient(90deg, #ffffff 0px, #ffffff 3px, #f3f3f3 3px, #f3f3f3 6px)',
'--e-w2-bg-solid': '#f3f3f3',
'--e-w2-border': '#dddddd',
'--e-w2-ink': '#333333',
'--e-w2-head': '#2b2b2b',
'--e-w2-head-shadow': '0 1px 0 #ffffff',
'--e-w2-body': '#555555',
'--e-w2-card': '#ffffff',
'--e-w2-price': '#222222',
'--e-w2-note': '#666666',
'--e-w2-dots': '#cccccc',
'--e-w2-silver': 'linear-gradient(180deg, #fdfdfd 0%, #eaeaea 50%, #dcdcdc 51%, #e6e6e6 100%)',
'--e-w2-silver-solid': '#dcdcdc',
'--e-w2-silver-fg': '#333333',
'--e-w2-silver-border': '#a5a5a5',
'--e-w2-silver-card-border': '#bbbbbb',
'--e-w2-silver-shadow': '0 1px 0 #ffffff',
'--e-w98-bg': '#c0c0c0',
'--e-w98-ink': '#000000',
'--e-w98-head': '#800000',
'--e-w98-groove': '#f0f0f0',
'--e-w98-bevel': '#ffffff',
'--e-w98-paper': '#ffffff',
'--e-w98-paper-ink': '#000000',
'--e-w98-inset': '#808080',
'--e-w98-face': '#c0c0c0',
'--e-w98-num': '#800000',
'--e-w98-sub': '#404040',
'--e-w98-track': '#ffffff',
'--e-w98-arrow': '#800000',
'--e-w98-arrow-line': '#000000',
'--e-w98-done': '#ffffcc',
'--e-w98-green': '#006600',
'--e-w98-link': '#0000ee',
'--e-w98-bar': '#000080',
'--e-dither-a': '#c0c0c0',
};
export const DARK: EraTokenSet = {
'--e-page': '#0f0e0e',
'--e-ink': '#f3f0ec',
'--e-body': '#d2cdc8',
'--e-muted': '#b3ada7',
'--e-line': '#34302e',
'--e-line-strong': '#5a544f',
'--e-cta': '#ac0000',
'--e-caret': '#e5524a',
'--e-flat-bg': '#1e2124',
'--e-flat-ink': '#eceff1',
'--e-flat-body': '#b9bfc4',
'--e-flat-rule': '#e5524a',
'--e-flat-ring': '#2c3136',
'--e-w2-bg':
'repeating-linear-gradient(90deg, #1b1b1d 0px, #1b1b1d 3px, #212124 3px, #212124 6px)',
'--e-w2-bg-solid': '#212124',
'--e-w2-border': '#34343a',
'--e-w2-ink': '#e4e4e8',
'--e-w2-head': '#f2f2f4',
'--e-w2-head-shadow': '0 -1px 0 #000000',
'--e-w2-body': '#c4c4ca',
'--e-w2-card': '#2a2a2f',
'--e-w2-price': '#ffffff',
'--e-w2-note': '#a9a9b0',
'--e-w2-dots': '#4a4a52',
'--e-w2-silver': 'linear-gradient(180deg, #5a5a62 0%, #46464e 50%, #3a3a42 51%, #44444c 100%)',
'--e-w2-silver-solid': '#5a5a62',
'--e-w2-silver-fg': '#f2f2f4',
'--e-w2-silver-border': '#70707a',
'--e-w2-silver-card-border': '#55555c',
'--e-w2-silver-shadow': '0 -1px 0 #000000',
'--e-w98-bg': '#3a3a3a',
'--e-w98-ink': '#f0f0f0',
'--e-w98-head': '#ff8a8a',
'--e-w98-groove': '#6a6a6a',
'--e-w98-bevel': '#8a8a8a',
'--e-w98-paper': '#1a1a1a',
'--e-w98-paper-ink': '#f0f0f0',
'--e-w98-inset': '#6a6a6a',
'--e-w98-face': '#4c4c4c',
'--e-w98-num': '#ff9a9a',
'--e-w98-sub': '#c8c8c8',
'--e-w98-track': '#0a0a0a',
'--e-w98-arrow': '#e04848',
'--e-w98-arrow-line': '#ffffff',
'--e-w98-done': '#17301a',
'--e-w98-green': '#6fd16f',
'--e-w98-link': '#8ab4ff',
'--e-w98-bar': '#4d7cff',
'--e-dither-a': '#4a4a4a',
};
export function tokenStyle(mode: 'light' | 'dark'): CSSProperties {
return (mode === 'dark' ? DARK : LIGHT) as CSSProperties;
}
/** Text/background pairs that must meet WCAG AA, with the minimum ratio (3 = large text). */
export const CONTRAST_PAIRS: ReadonlyArray<readonly [fg: string, bg: string, min: number]> = [
['--e-ink', '--e-page', 4.5],
['--e-body', '--e-page', 4.5],
['--e-muted', '--e-page', 4.5],
['--e-flat-ink', '--e-flat-bg', 4.5],
['--e-flat-body', '--e-flat-bg', 4.5],
['--e-w2-ink', '--e-w2-bg-solid', 4.5],
['--e-w2-head', '--e-w2-bg-solid', 3],
['--e-w2-body', '--e-w2-bg-solid', 4.5],
['--e-w2-body', '--e-w2-card', 4.5],
['--e-w2-price', '--e-w2-card', 3],
['--e-w2-note', '--e-w2-card', 4.5],
['--e-w2-silver-fg', '--e-w2-silver-solid', 4.5],
['--e-w98-ink', '--e-w98-bg', 4.5],
['--e-w98-head', '--e-w98-bg', 3],
['--e-w98-sub', '--e-w98-bg', 4.5],
['--e-w98-paper-ink', '--e-w98-paper', 4.5],
['--e-w98-sub', '--e-w98-paper', 4.5],
['--e-w98-num', '--e-w98-face', 3],
['--e-w98-paper-ink', '--e-w98-done', 4.5],
['--e-w98-green', '--e-w98-done', 3],
['--e-w98-link', '--e-w98-done', 4.5],
['--e-w98-link', '--e-w98-bg', 4.5],
];
+9
View File
@@ -0,0 +1,9 @@
/**
* Fonts that only variant E needs (NFR-U5-1): imported from the lazy E chunk, so visitors who never
* travel back in time do not download them. Verdana, Trebuchet, Times and Arial are system fonts.
*/
import '@fontsource/open-sans/300.css';
import '@fontsource/open-sans/400.css';
import '@fontsource/open-sans/600.css';
import '@fontsource/open-sans/700.css';
import '@fontsource/vt323/400.css';