Taalbestanden: statische teksten van de site naar src/i18n/nl (landing, shared, era), getypte t()-helper; prerender-uitvoer byte-identiek

Hero en CMS-data blijven buiten scope.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 17:28:58 +01:00
co-authored by Claude Sonnet 5.5
parent 425c59c445
commit 6c6fd771dd
34 changed files with 470 additions and 151 deletions
+3 -1
View File
@@ -1,8 +1,10 @@
import { t } from '../../i18n';
export function Footer() { export function Footer() {
return ( return (
<footer className="bg-inv text-[#b9b3ae]"> <footer className="bg-inv text-[#b9b3ae]">
<div className="mx-auto flex max-w-[1280px] flex-wrap justify-between gap-3 p-8 text-sm"> <div className="mx-auto flex max-w-[1280px] flex-wrap justify-between gap-3 p-8 text-sm">
<span>© 2026 SLP Software</span> <span>{t('landing.footer.copyright')}</span>
<span className="font-mono">slp.Bouw(uwIdee);</span> <span className="font-mono">slp.Bouw(uwIdee);</span>
</div> </div>
</footer> </footer>
+8 -3
View File
@@ -3,6 +3,7 @@ import { navLinks } from '../../features/landing/data/content';
import { ModeToggle } from '../ui/ModeToggle'; import { ModeToggle } from '../ui/ModeToggle';
import { VariantToggle } from '../ui/VariantToggle'; import { VariantToggle } from '../ui/VariantToggle';
import { handleAnchorClick } from '../../utils/scrollToHash'; import { handleAnchorClick } from '../../utils/scrollToHash';
import { t } from '../../i18n';
/** /**
* Navigation of design B: part of the brand-red header, white text, the CTA as a white block * Navigation of design B: part of the brand-red header, white text, the CTA as a white block
@@ -12,6 +13,7 @@ import { handleAnchorClick } from '../../utils/scrollToHash';
export function Nav() { export function Nav() {
const [isMenuOpen, setIsMenuOpen] = useState(false); const [isMenuOpen, setIsMenuOpen] = useState(false);
const sectionLinks = navLinks.filter((link) => !link.isCta); const sectionLinks = navLinks.filter((link) => !link.isCta);
const menuLabel = isMenuOpen ? t('landing.nav.menuClose') : t('landing.nav.menuOpen');
// Escape closes the mobile menu (keyboard users). // Escape closes the mobile menu (keyboard users).
useEffect(() => { useEffect(() => {
@@ -29,7 +31,10 @@ export function Nav() {
} }
return ( return (
<nav aria-label="Hoofdnavigatie" className="sticky top-0 z-40 bg-brand text-on-brand md:static"> <nav
aria-label={t('landing.nav.label')}
className="sticky top-0 z-40 bg-brand text-on-brand md:static"
>
<div className="mx-auto flex min-h-[84px] max-w-[1280px] items-center justify-between gap-4 px-6 sm:px-8"> <div className="mx-auto flex min-h-[84px] max-w-[1280px] items-center justify-between gap-4 px-6 sm:px-8">
<a <a
href="#top" href="#top"
@@ -74,13 +79,13 @@ export function Nav() {
<button <button
type="button" type="button"
onClick={() => setIsMenuOpen((open) => !open)} onClick={() => setIsMenuOpen((open) => !open)}
aria-label={isMenuOpen ? 'Sluit menu' : 'Open menu'} aria-label={menuLabel}
aria-expanded={isMenuOpen} aria-expanded={isMenuOpen}
aria-controls="mobile-nav-menu" aria-controls="mobile-nav-menu"
data-testid="nav-mobile-toggle" data-testid="nav-mobile-toggle"
className="flex h-11 w-11 items-center justify-center rounded-full border border-white/70 text-on-brand transition-colors hover:border-white hover:bg-white/15 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white" className="flex h-11 w-11 items-center justify-center rounded-full border border-white/70 text-on-brand transition-colors hover:border-white hover:bg-white/15 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
> >
<span className="sr-only">{isMenuOpen ? 'Sluit menu' : 'Open menu'}</span> <span className="sr-only">{menuLabel}</span>
<svg <svg
aria-hidden="true" aria-hidden="true"
viewBox="0 0 24 24" viewBox="0 0 24 24"
+3 -1
View File
@@ -1,3 +1,5 @@
import { t } from '../../i18n';
/** /**
* "Naar de inhoud" link for keyboard and screen-reader users (WCAG 2.4.1). Hidden until focused. * "Naar de inhoud" link for keyboard and screen-reader users (WCAG 2.4.1). Hidden until focused.
* Handled in script because the app uses hash routing (a plain #main anchor would be taken by the * Handled in script because the app uses hash routing (a plain #main anchor would be taken by the
@@ -16,7 +18,7 @@ export function SkipLink() {
className="sr-only z-50 bg-white px-4 py-3 text-base font-bold text-[#0e0d0d] focus:not-sr-only focus:fixed focus:left-4 focus:top-4" className="sr-only z-50 bg-white px-4 py-3 text-base font-bold text-[#0e0d0d] focus:not-sr-only focus:fixed focus:left-4 focus:top-4"
data-testid="skip-link" data-testid="skip-link"
> >
Naar de inhoud {t('shared.skipLink')}
</a> </a>
); );
} }
+5 -4
View File
@@ -1,4 +1,5 @@
import { useTheme } from '../../theme/ThemeProvider'; import { useTheme } from '../../theme/ThemeProvider';
import { t } from '../../i18n';
/** Alert shown when the time-travel variant could not be loaded or crashed (BR-U1-8). */ /** Alert shown when the time-travel variant could not be loaded or crashed (BR-U1-8). */
export function VariantAlert() { export function VariantAlert() {
@@ -14,23 +15,23 @@ export function VariantAlert() {
data-testid="variant-alert" data-testid="variant-alert"
className="fixed bottom-4 left-1/2 z-[110] flex w-[min(92vw,28rem)] -translate-x-1/2 flex-wrap items-center gap-3 rounded border border-accent-line bg-surface px-4 py-3 text-sm text-text shadow-lg" className="fixed bottom-4 left-1/2 z-[110] flex w-[min(92vw,28rem)] -translate-x-1/2 flex-wrap items-center gap-3 rounded border border-accent-line bg-surface px-4 py-3 text-sm text-text shadow-lg"
> >
<span className="flex-1">De tijdreis kon niet worden geladen.</span> <span className="flex-1">{t('shared.variantAlert.message')}</span>
<button <button
type="button" type="button"
onClick={retryVariant} onClick={retryVariant}
data-testid="variant-alert-retry" data-testid="variant-alert-retry"
className="rounded border border-line px-3 py-1.5 font-medium hover:border-accent-line" className="rounded border border-line px-3 py-1.5 font-medium hover:border-accent-line"
> >
Opnieuw proberen {t('shared.variantAlert.retry')}
</button> </button>
<button <button
type="button" type="button"
onClick={dismissVariantError} onClick={dismissVariantError}
aria-label="Melding sluiten" aria-label={t('shared.variantAlert.dismissLabel')}
data-testid="variant-alert-dismiss" data-testid="variant-alert-dismiss"
className="rounded px-2 py-1.5 text-muted hover:text-text" className="rounded px-2 py-1.5 text-muted hover:text-text"
> >
Sluiten {t('shared.variantAlert.dismiss')}
</button> </button>
</div> </div>
); );
+2 -1
View File
@@ -1,6 +1,7 @@
import { Component } from 'react'; import { Component } from 'react';
import type { ErrorInfo, ReactNode } from 'react'; import type { ErrorInfo, ReactNode } from 'react';
import * as Sentry from '@sentry/react'; import * as Sentry from '@sentry/react';
import { t } from '../../i18n';
interface ErrorBoundaryProps { interface ErrorBoundaryProps {
children: ReactNode; children: ReactNode;
@@ -34,7 +35,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
role="alert" role="alert"
data-testid="error-boundary-fallback" data-testid="error-boundary-fallback"
> >
<p className="font-display text-lg">Er ging iets mis. Probeer de pagina te vernieuwen.</p> <p className="font-display text-lg">{t('shared.errorBoundary')}</p>
</div> </div>
); );
} }
+3 -2
View File
@@ -1,5 +1,6 @@
import { useTheme } from '../../theme/ThemeProvider'; import { useTheme } from '../../theme/ThemeProvider';
import { TONE_CLASSES, type ToggleTone } from './toggleTone'; import { TONE_CLASSES, type ToggleTone } from './toggleTone';
import { t } from '../../i18n';
/** /**
* Light/dark switch (requirements FR-4, BR-U1-4, BR-U1-12). Two states; starts from the system * Light/dark switch (requirements FR-4, BR-U1-4, BR-U1-12). Two states; starts from the system
@@ -13,9 +14,9 @@ export function ModeToggle({ tone = 'default' }: { tone?: ToggleTone }) {
<button <button
type="button" type="button"
onClick={toggleMode} onClick={toggleMode}
aria-label="Donkere weergave" aria-label={t('shared.toggles.darkMode')}
aria-pressed={isDark} aria-pressed={isDark}
title="Donkere weergave" title={t('shared.toggles.darkMode')}
data-testid="mode-toggle-button" data-testid="mode-toggle-button"
className={`flex h-11 w-11 items-center justify-center rounded-full border transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 sm:h-8 sm:w-8 ${TONE_CLASSES[tone]}`} className={`flex h-11 w-11 items-center justify-center rounded-full border transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 sm:h-8 sm:w-8 ${TONE_CLASSES[tone]}`}
> >
+2 -1
View File
@@ -1,5 +1,6 @@
import { useTheme } from '../../theme/ThemeProvider'; import { useTheme } from '../../theme/ThemeProvider';
import { TONE_CLASSES, type ToggleTone } from './toggleTone'; import { TONE_CLASSES, type ToggleTone } from './toggleTone';
import { t } from '../../i18n';
/** /**
* Icon-only button next to the mode toggle that switches between B and E (FR-4, BR-U1-6, * Icon-only button next to the mode toggle that switches between B and E (FR-4, BR-U1-6,
@@ -8,7 +9,7 @@ import { TONE_CLASSES, type ToggleTone } from './toggleTone';
export function VariantToggle({ tone = 'default' }: { tone?: ToggleTone }) { export function VariantToggle({ tone = 'default' }: { tone?: ToggleTone }) {
const { variant, toggleVariant, transition } = useTheme(); const { variant, toggleVariant, transition } = useTheme();
const inE = variant === 'e'; const inE = variant === 'e';
const label = inE ? 'Terug naar nu' : 'Tijdreis: bekijk de site zoals vroeger'; const label = inE ? t('shared.toggles.variantBack') : t('shared.toggles.variantToTimeTravel');
return ( return (
<button <button
@@ -1,4 +1,5 @@
import { aboutContent, aboutFacts } from '../data/content'; import { aboutContent, aboutFacts } from '../data/content';
import { t } from '../../../i18n';
/** "Over" of design B: offset-block photo on the left, text and three facts on the right. */ /** "Over" of design B: offset-block photo on the left, text and three facts on the right. */
export function AboutSection() { export function AboutSection() {
@@ -21,7 +22,7 @@ export function AboutSection() {
src="/bryan-slop-800.jpg" src="/bryan-slop-800.jpg"
srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w" srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w"
sizes="(min-width: 768px) 480px, 90vw" sizes="(min-width: 768px) 480px, 90vw"
alt="Bryan Slop, oprichter van SLP Software" alt={t('landing.about.photoAlt')}
width={480} width={480}
height={640} height={640}
loading="lazy" loading="lazy"
@@ -35,7 +36,7 @@ export function AboutSection() {
id="over-heading" id="over-heading"
className="mb-9 text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%]" className="mb-9 text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%]"
> >
Eén ontwikkelaar, korte lijnen {t('landing.about.heading')}
</h2> </h2>
{aboutContent.paragraphs.map((paragraph) => ( {aboutContent.paragraphs.map((paragraph) => (
<p key={paragraph} className="mb-[18px] max-w-[52ch] text-body"> <p key={paragraph} className="mb-[18px] max-w-[52ch] text-body">
@@ -12,6 +12,7 @@ import { useContactPreselect } from '../../../shared/contact/useContactPreselect
import { buildSubjectOptions, subjectForSlug } from '../../../shared/contact/subjects'; import { buildSubjectOptions, subjectForSlug } from '../../../shared/contact/subjects';
import { contactForm, contactInfo } from '../data/content'; import { contactForm, contactInfo } from '../data/content';
import { usePackagesQuery } from '../hooks/usePackagesQuery'; import { usePackagesQuery } from '../hooks/usePackagesQuery';
import { t } from '../../../i18n';
const CaptchaWidget = lazy(() => import('../../../shared/contact/CaptchaWidget')); const CaptchaWidget = lazy(() => import('../../../shared/contact/CaptchaWidget'));
@@ -89,7 +90,7 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
data-testid="contact-success" data-testid="contact-success"
> >
<p className="mb-3 text-[clamp(30px,3.4vw,44px)] font-extrabold leading-none tracking-[-0.02em] [font-stretch:112%]"> <p className="mb-3 text-[clamp(30px,3.4vw,44px)] font-extrabold leading-none tracking-[-0.02em] [font-stretch:112%]">
Bedankt! {t('landing.contact.form.successTitle')}
</p> </p>
<p className="mb-7 text-body">{contactForm.successText}</p> <p className="mb-7 text-body">{contactForm.successText}</p>
<button <button
@@ -98,7 +99,7 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
className="min-h-[44px] bg-text px-[22px] py-[15px] text-[15px] font-bold text-panel transition-colors hover:bg-brand hover:text-on-brand" className="min-h-[44px] bg-text px-[22px] py-[15px] text-[15px] font-bold text-panel transition-colors hover:bg-brand hover:text-on-brand"
data-testid="contact-reset" data-testid="contact-reset"
> >
Nog een bericht sturen {t('landing.contact.form.reset')}
</button> </button>
</div> </div>
); );
@@ -113,17 +114,21 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
return ( return (
<form {...form.formProps} className="flex flex-col gap-6" data-testid="contact-form"> <form {...form.formProps} className="flex flex-col gap-6" data-testid="contact-form">
<div className="grid grid-cols-1 gap-5 sm:grid-cols-2"> <div className="grid grid-cols-1 gap-5 sm:grid-cols-2">
<Field label="Naam" error={name.error} errorId={name.errorId}> <Field label={t('landing.contact.form.name')} error={name.error} errorId={name.errorId}>
<input type="text" autoComplete="name" className={INPUT} {...name.inputProps} /> <input type="text" autoComplete="name" className={INPUT} {...name.inputProps} />
</Field> </Field>
<Field label="E-mail" error={email.error} errorId={email.errorId}> <Field label={t('landing.contact.form.email')} error={email.error} errorId={email.errorId}>
<input type="email" autoComplete="email" className={INPUT} {...email.inputProps} /> <input type="email" autoComplete="email" className={INPUT} {...email.inputProps} />
</Field> </Field>
</div> </div>
<Field label="Onderwerp" error={subject.error} errorId={subject.errorId}> <Field
label={t('landing.contact.form.subject')}
error={subject.error}
errorId={subject.errorId}
>
<select className={INPUT} {...subject.inputProps}> <select className={INPUT} {...subject.inputProps}>
<option value="" disabled> <option value="" disabled>
Kies een onderwerp {t('landing.contact.form.subjectPlaceholder')}
</option> </option>
{subjectOptions.map((option) => ( {subjectOptions.map((option) => (
<option key={option.value} value={option.value}> <option key={option.value} value={option.value}>
@@ -132,13 +137,17 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
))} ))}
</select> </select>
</Field> </Field>
<Field label="Bericht" error={message.error} errorId={message.errorId}> <Field
label={t('landing.contact.form.message')}
error={message.error}
errorId={message.errorId}
>
<textarea rows={5} className={`${INPUT} resize-y`} {...message.inputProps} /> <textarea rows={5} className={`${INPUT} resize-y`} {...message.inputProps} />
</Field> </Field>
{/* Honeypot: invisible to people and assistive technology; bots fill it (BR-U4-7). */} {/* Honeypot: invisible to people and assistive technology; bots fill it (BR-U4-7). */}
<div aria-hidden="true" className="absolute -left-[9999px] h-0 w-0 overflow-hidden"> <div aria-hidden="true" className="absolute -left-[9999px] h-0 w-0 overflow-hidden">
<label htmlFor={hpId}>Laat dit veld leeg</label> <label htmlFor={hpId}>{t('landing.contact.form.honeypot')}</label>
<input type="text" id={hpId} {...hpProps} /> <input type="text" id={hpId} {...hpProps} />
</div> </div>
@@ -179,8 +188,8 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
{form.status === 'sending' {form.status === 'sending'
? form.messages.sendingLabel ? form.messages.sendingLabel
: form.status === 'failed' : form.status === 'failed'
? 'Opnieuw proberen' ? t('landing.contact.form.retry')
: 'Verstuur'} : t('landing.contact.form.submit')}
</button> </button>
<p className="-mt-2 text-[13px] text-muted">{contactForm.privacyNote}</p> <p className="-mt-2 text-[13px] text-muted">{contactForm.privacyNote}</p>
</form> </form>
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react'; import type { ReactNode } from 'react';
import { contactInfo } from '../data/content'; import { contactInfo } from '../data/content';
import { ContactPanel } from './ContactPanel'; import { ContactPanel } from './ContactPanel';
import { t } from '../../../i18n';
/** /**
* Contact block of design B: brand-red section with the display heading, intro, mail link and a * Contact block of design B: brand-red section with the display heading, intro, mail link and a
@@ -24,7 +25,7 @@ export function ContactSection({ panel = <ContactPanel /> }: { panel?: ReactNode
<div className="mt-12 flex flex-wrap items-end justify-between gap-x-16 gap-y-10 md:mt-[72px]"> <div className="mt-12 flex flex-wrap items-end justify-between gap-x-16 gap-y-10 md:mt-[72px]">
<div className="flex-[1_1_320px] self-start"> <div className="flex-[1_1_320px] self-start">
<p className="mb-10 max-w-[40ch] text-[19px]">{contactInfo.description}</p> <p className="mb-10 max-w-[40ch] text-[19px]">{contactInfo.description}</p>
<p className="mb-2 text-[15px] font-semibold">Liever direct mailen?</p> <p className="mb-2 text-[15px] font-semibold">{t('landing.contact.directMail')}</p>
<a <a
href={`mailto:${contactInfo.email}`} href={`mailto:${contactInfo.email}`}
className="break-words text-[clamp(24px,2.6vw,36px)] font-bold tracking-[-0.02em] underline decoration-[3px] underline-offset-8 [font-stretch:112%]" className="break-words text-[clamp(24px,2.6vw,36px)] font-bold tracking-[-0.02em] underline decoration-[3px] underline-offset-8 [font-stretch:112%]"
@@ -1,4 +1,5 @@
import type { Chip } from '../../../shared/packages/packageLogic'; import type { Chip } from '../../../shared/packages/packageLogic';
import { t } from '../../../i18n';
interface FilterChipsProps { interface FilterChipsProps {
chips: Chip[]; chips: Chip[];
@@ -9,7 +10,11 @@ interface FilterChipsProps {
/** Square filter chips of design B (BR-U3-3, BR-U3-11). */ /** Square filter chips of design B (BR-U3-3, BR-U3-11). */
export function FilterChips({ chips, activeId, onSelect }: FilterChipsProps) { export function FilterChips({ chips, activeId, onSelect }: FilterChipsProps) {
return ( return (
<div role="group" aria-label="Filter pakketten" className="flex flex-wrap gap-2"> <div
role="group"
aria-label={t('landing.packages.filterLabel')}
className="flex flex-wrap gap-2"
>
{chips.map((chip) => { {chips.map((chip) => {
const active = chip.id === activeId; const active = chip.id === activeId;
return ( return (
@@ -1,4 +1,5 @@
import { contactInfo } from '../data/content'; import { contactInfo } from '../data/content';
import { t } from '../../../i18n';
/** Default state of the contact panel (and fallback): the mailto call-to-action. */ /** Default state of the contact panel (and fallback): the mailto call-to-action. */
export function MailtoPanel() { export function MailtoPanel() {
@@ -7,17 +8,15 @@ export function MailtoPanel() {
return ( return (
<div data-testid="mailto-panel"> <div data-testid="mailto-panel">
<p className="mb-3 text-[clamp(28px,3vw,40px)] font-extrabold leading-none tracking-[-0.02em] [font-stretch:112%]"> <p className="mb-3 text-[clamp(28px,3vw,40px)] font-extrabold leading-none tracking-[-0.02em] [font-stretch:112%]">
Vertel wat je voor ogen hebt {t('landing.contact.mailto.title')}
</p>
<p className="mb-7 max-w-[44ch] text-body">
Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.
</p> </p>
<p className="mb-7 max-w-[44ch] text-body">{t('landing.contact.mailto.text')}</p>
<a <a
href={mailtoHref} href={mailtoHref}
className="inline-block bg-brand px-6 py-[18px] text-[17px] font-bold text-on-brand no-underline transition-colors hover:bg-text hover:text-bg" className="inline-block bg-brand px-6 py-[18px] text-[17px] font-bold text-on-brand no-underline transition-colors hover:bg-text hover:text-bg"
data-testid="contact-mailto-button" data-testid="contact-mailto-button"
> >
Stuur een bericht {t('landing.contact.mailto.button')}
</a> </a>
</div> </div>
); );
@@ -1,6 +1,7 @@
import type { PackageCardData } from '../data/content'; import type { PackageCardData } from '../data/content';
import { handleAnchorClick } from '../../../utils/scrollToHash'; import { handleAnchorClick } from '../../../utils/scrollToHash';
import { useContactPreselect } from '../../../shared/contact/useContactPreselect'; import { useContactPreselect } from '../../../shared/contact/useContactPreselect';
import { t } from '../../../i18n';
/** Package card of design B: flat block, featured package in the brand colour with a badge. */ /** Package card of design B: flat block, featured package in the brand colour with a badge. */
export function PackageCard({ pkg }: { pkg: PackageCardData }) { export function PackageCard({ pkg }: { pkg: PackageCardData }) {
@@ -16,7 +17,7 @@ export function PackageCard({ pkg }: { pkg: PackageCardData }) {
> >
{featured && ( {featured && (
<span className="absolute right-0 top-0 bg-[#0e0d0d] px-3.5 py-2 text-[13px] font-bold text-white"> <span className="absolute right-0 top-0 bg-[#0e0d0d] px-3.5 py-2 text-[13px] font-bold text-white">
Meest gekozen {t('landing.packages.featuredBadge')}
</span> </span>
)} )}
<h3 <h3
@@ -5,6 +5,7 @@ import { useSwipeRow } from '../../../shared/packages/useSwipeRow';
import { PackageCard } from './PackageCard'; import { PackageCard } from './PackageCard';
import { PackageCardSkeleton } from './PackageCardSkeleton'; import { PackageCardSkeleton } from './PackageCardSkeleton';
import { SwipeDots } from './SwipeDots'; import { SwipeDots } from './SwipeDots';
import { t } from '../../../i18n';
const SKELETON_COUNT = 3; const SKELETON_COUNT = 3;
@@ -34,7 +35,7 @@ export function PackageList({ packages, loading = false, resetKey }: PackageList
<div <div
ref={ref} ref={ref}
role="group" role="group"
aria-label="Pakketten" aria-label={t('landing.packages.listLabel')}
tabIndex={0} tabIndex={0}
data-testid="packages-grid" data-testid="packages-grid"
className="-mx-6 flex snap-x snap-mandatory items-stretch gap-4 overflow-x-auto px-6 pb-2 sm:mx-0 sm:flex-wrap sm:justify-center sm:snap-none sm:overflow-visible sm:px-0 sm:pb-0" className="-mx-6 flex snap-x snap-mandatory items-stretch gap-4 overflow-x-auto px-6 pb-2 sm:mx-0 sm:flex-wrap sm:justify-center sm:snap-none sm:overflow-visible sm:px-0 sm:pb-0"
@@ -7,9 +7,10 @@ import { OfferingBanner } from './OfferingBanner';
import { OfferingTopBanner } from './OfferingTopBanner'; import { OfferingTopBanner } from './OfferingTopBanner';
import { PackageBanner } from './PackageBanner'; import { PackageBanner } from './PackageBanner';
import { PackageList } from './PackageList'; import { PackageList } from './PackageList';
import { t } from '../../../i18n';
function headingFor(count: number): string { function headingFor(count: number): string {
return count === 3 ? 'Drie manieren om te starten' : 'Manieren om te starten'; return count === 3 ? t('landing.packages.headingThree') : t('landing.packages.headingOther');
} }
/** /**
@@ -39,31 +40,26 @@ export function PackagesSection() {
> >
{headingFor(loaded ? filter.cards.length : 3)}. {headingFor(loaded ? filter.cards.length : 3)}.
</h2> </h2>
<p className="max-w-[40ch] text-body"> <p className="max-w-[40ch] text-body">{t('landing.packages.intro')}</p>
Van één sterke pagina tot volledig maatwerk met eigen back-end. Elk pakket heeft een
vaste scope en een vaste prijs.
</p>
</div> </div>
{topBanner ? <OfferingTopBanner banner={topBanner} /> : null} {topBanner ? <OfferingTopBanner banner={topBanner} /> : null}
{isError ? ( {isError ? (
<div className="text-center" data-testid="packages-error" role="alert"> <div className="text-center" data-testid="packages-error" role="alert">
<p className="mb-4 text-muted">Pakketten konden niet worden geladen.</p> <p className="mb-4 text-muted">{t('landing.packages.error')}</p>
<button <button
type="button" type="button"
onClick={() => void refetch()} onClick={() => void refetch()}
data-testid="packages-retry" data-testid="packages-retry"
className="min-h-[44px] border-2 border-text px-5 text-[15px] font-bold" className="min-h-[44px] border-2 border-text px-5 text-[15px] font-bold"
> >
Opnieuw proberen {t('landing.packages.retry')}
</button> </button>
</div> </div>
) : loaded && data.length === 0 ? ( ) : loaded && data.length === 0 ? (
<div data-testid="packages-empty"> <div data-testid="packages-empty">
<p className="mb-4 text-muted"> <p className="mb-4 text-muted">{t('landing.packages.empty')}</p>
Binnenkort meer informatie. Neem contact op voor een voorstel.
</p>
{banner} {banner}
</div> </div>
) : ( ) : (
@@ -1,5 +1,6 @@
import { processSteps } from '../data/content'; import { processSteps } from '../data/content';
import { ProcessStep } from './ProcessStep'; import { ProcessStep } from './ProcessStep';
import { t } from '../../../i18n';
/** "Werkwijze" of design B: black section with three steps, progress bars and outlined numbers. */ /** "Werkwijze" of design B: black section with three steps, progress bars and outlined numbers. */
export function ProcessSection() { export function ProcessSection() {
@@ -10,7 +11,7 @@ export function ProcessSection() {
id="werkwijze-heading" id="werkwijze-heading"
className="mb-16 max-w-[14ch] text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%] md:mb-[88px]" className="mb-16 max-w-[14ch] text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%] md:mb-[88px]"
> >
Van idee naar live in drie stappen {t('landing.process.heading')}
</h2> </h2>
<ol className="grid grid-cols-1 gap-x-10 gap-y-16 md:grid-cols-3"> <ol className="grid grid-cols-1 gap-x-10 gap-y-16 md:grid-cols-3">
{processSteps.map((step, index) => ( {processSteps.map((step, index) => (
@@ -1,3 +1,5 @@
import { t } from '../../../i18n';
interface SwipeDotsProps { interface SwipeDotsProps {
titles: string[]; titles: string[];
activeIndex: number; activeIndex: number;
@@ -17,7 +19,11 @@ export function SwipeDots({ titles, activeIndex, onSelect }: SwipeDotsProps) {
<button <button
key={`${title}-${index}`} key={`${title}-${index}`}
type="button" type="button"
aria-label={`Pakket ${index + 1} van ${titles.length}: ${title}`} aria-label={t('landing.packages.swipeDot', {
index: index + 1,
total: titles.length,
title,
})}
aria-current={active ? 'true' : undefined} aria-current={active ? 'true' : undefined}
onClick={() => onSelect(index)} onClick={() => onSelect(index)}
className="flex h-11 w-8 items-center justify-center" className="flex h-11 w-8 items-center justify-center"
+25 -47
View File
@@ -12,6 +12,8 @@
* aidlc-docs/features/react-frontend/construction/react-frontend-app/functional-design/packages-api-handoff.md. * aidlc-docs/features/react-frontend/construction/react-frontend-app/functional-design/packages-api-handoff.md.
*/ */
import { t, tList } from '../../../i18n';
export interface NavLink { export interface NavLink {
label: string; label: string;
href: string; href: string;
@@ -81,10 +83,10 @@ export interface ContactInfo {
} }
export const navLinks: NavLink[] = [ export const navLinks: NavLink[] = [
{ label: 'Over', href: '#over' }, { label: t('landing.nav.about'), href: '#over' },
{ label: 'Pakketten', href: '#pakketten' }, { label: t('landing.nav.packages'), href: '#pakketten' },
{ label: 'Werkwijze', href: '#werkwijze' }, { label: t('landing.nav.process'), href: '#werkwijze' },
{ label: 'Start project', href: '#contact', isCta: true }, { label: t('landing.nav.cta'), href: '#contact', isCta: true },
]; ];
export const heroContent: HeroContent = { export const heroContent: HeroContent = {
@@ -157,58 +159,34 @@ export const packagesSettings: PackagesSettings = {
}, },
}; };
export const processSteps: ProcessStepData[] = [ export const processSteps: ProcessStepData[] = (['intake', 'build', 'live'] as const).map((id) => ({
{ label: t(`landing.process.steps.${id}.label`),
label: 'stap 01 — intake', phase: t(`landing.process.steps.${id}.phase`),
phase: 'Intake', title: t(`landing.process.steps.${id}.title`),
title: 'Kennismaken', description: t(`landing.process.steps.${id}.description`),
description: }));
'We bespreken je idee, doelgroep en wensen. Je krijgt direct een eerlijk advies over welk pakket past bij jouw doel.',
},
{
label: 'stap 02 — bouwen',
phase: 'Bouwen',
title: 'Ontwerpen & ontwikkelen',
description:
'Ik bouw je site of applicatie en houd je onderweg op de hoogte, zodat er geen verrassingen zijn bij de oplevering.',
},
{
label: 'stap 03 — live',
phase: 'Live',
title: 'Opleveren',
description:
'Je site gaat live en je krijgt uitleg over hoe alles werkt. Later uitbreiden? Dat kan altijd.',
},
];
export const aboutContent: AboutContent = { export const aboutContent: AboutContent = {
paragraphs: [ paragraphs: [...tList('landing.about.paragraphs')],
'Hi, ik ben Bryan Slop van SLP Software! Ik ben een ervaren web- en .NET-ontwikkelaar. Ik geloof dat goede software niet ingewikkeld hoeft te voelen. Software zonder lange trajecten: je schakelt direct met mij, de ontwikkelaar van jouw website of applicatie.',
'Van een strakke landingspagina tot een applicatie met eigen contentmanagementsysteem — de aanpak is hetzelfde: heldere afspraken, nette code en een resultaat waar je jaren mee vooruit kunt.',
],
}; };
export const aboutFacts: AboutFact[] = [ export const aboutFacts: AboutFact[] = (['contact', 'response', 'price'] as const).map((id) => ({
{ title: 'Direct contact', text: 'met de ontwikkelaar zelf' }, title: t(`landing.about.facts.${id}.title`),
{ title: 'Eén werkdag', text: 'tot je een reactie hebt' }, text: t(`landing.about.facts.${id}.text`),
{ title: 'Vaste prijs', text: 'per pakket, vooraf bekend' }, }));
];
/** Texts of the contact form (design B). */ /** Texts of the contact form (design B). */
export const contactForm = { export const contactForm = {
otherSubjectLabel: 'Overig', otherSubjectLabel: t('landing.contact.form.otherSubject'),
successText: 'Je bericht is verstuurd. Je hoort binnen één werkdag van me.', successText: t('landing.contact.form.successText'),
captchaProblem: captchaProblem: t('landing.contact.form.captchaProblem'),
'De controle tegen spam kan niet worden geladen. Probeer het later opnieuw of mail me direct:', privacyNote: t('landing.contact.form.privacyNote'),
privacyNote:
'Je gegevens gebruik ik alleen om op je bericht te reageren; ik bewaar ze maximaal 1 jaar.',
}; };
export const contactInfo: ContactInfo = { export const contactInfo: ContactInfo = {
heading: 'Klaar om te bouwen?', heading: t('landing.contact.heading'),
displayHeading: ['Klaar om', 'te bouwen?'], displayHeading: [...tList('landing.contact.displayHeading')],
description: description: t('landing.contact.description'),
'Vertel kort wat je voor ogen hebt. Je krijgt binnen één werkdag reactie met een eerlijk advies — vrijblijvend.',
email: 'info@slpsoftware.nl', email: 'info@slpsoftware.nl',
mailSubject: 'Projectaanvraag', mailSubject: t('landing.contact.mailSubject'),
}; };
+39
View File
@@ -0,0 +1,39 @@
import { describe, expect, it } from 'vitest';
import { nl, t, tList } from './index';
function leaves(node: unknown, path = ''): { path: string; value: unknown }[] {
if (typeof node === 'string' || Array.isArray(node)) {
return [{ path, value: node }];
}
if (node && typeof node === 'object') {
return Object.entries(node).flatMap(([key, child]) =>
leaves(child, path ? `${path}.${key}` : key),
);
}
return [];
}
describe('i18n texts', () => {
const all = leaves(nl);
it('has no empty texts', () => {
const empty = all.filter(({ value }) =>
Array.isArray(value)
? value.some((v) => typeof v !== 'string' || v.trim() === '')
: typeof value !== 'string' || value.trim() === '',
);
expect(empty.map((e) => e.path)).toEqual([]);
});
it('has only plain `{name}` placeholders', () => {
const odd = all.filter(
({ value }) => typeof value === 'string' && /\{[^}\w]|\{\}|\{\w*$/.test(value),
);
expect(odd.map((e) => e.path)).toEqual([]);
});
it('falls back to the key for unknown keys', () => {
expect(t('unknown.key' as never)).toBe('unknown.key');
expect(tList('unknown.list' as never)).toEqual([]);
});
});
+54
View File
@@ -0,0 +1,54 @@
import landing from './nl/landing.json';
import era from './nl/era.json';
import shared from './nl/shared.json';
/**
* Static website texts (Dutch). One JSON file per area; keys are typed so a missing or misspelled key
* fails the type check. Not included on purpose: the Hero (becomes a CMS module) and everything that
* already comes from the CMS (packages, banners). A second language later = a second folder with the
* same keys plus a language switch here; no component needs to change.
*/
export const nl = { landing, era, shared } as const;
type Leaves<T, P extends string = ''> = {
[K in keyof T & string]: T[K] extends string
? `${P}${K}`
: T[K] extends readonly string[]
? `${P}${K}`
: Leaves<T[K], `${P}${K}.`>;
}[keyof T & string];
export type TextKey = Leaves<typeof nl>;
type Params = Record<string, string | number>;
function lookup(key: string): unknown {
let node: unknown = nl;
for (const part of key.split('.')) {
if (node === null || typeof node !== 'object') {
return undefined;
}
node = (node as Record<string, unknown>)[part];
}
return node;
}
function interpolate(text: string, params?: Params): string {
if (!params) {
return text;
}
return text.replace(/\{(\w+)\}/g, (match, name: string) =>
name in params ? String(params[name]) : match,
);
}
/** Returns the text for a key; `{name}` placeholders are filled from `params`. */
export function t(key: TextKey, params?: Params): string {
const value = lookup(key);
return typeof value === 'string' ? interpolate(value, params) : key;
}
/** Returns a list of texts (JSON arrays of strings), e.g. bullet lists. */
export function tList(key: TextKey): readonly string[] {
const value = lookup(key);
return Array.isArray(value) ? (value as string[]) : [];
}
+68
View File
@@ -0,0 +1,68 @@
{
"nav": {
"label": "Hoofdnavigatie",
"brandSuffix": "Software"
},
"e2026": {
"ctaPackages": "Bekijk pakketten",
"ctaContact": "Plan een gesprek"
},
"e2013": {
"heading": "Eén ontwikkelaar, korte lijnen",
"photoAlt": "Bryan Slop, oprichter van SLP Software",
"tiles": {
"websites": "Websites",
"dotnet": ".NET-software",
"cms": "CMS & apps"
}
},
"e2006": {
"headingThree": "Drie manieren om te starten",
"headingOther": "Manieren om te starten",
"intro": "Van één sterke pagina tot volledig maatwerk met eigen back-end. Elk pakket heeft een vaste scope en een vaste prijs.",
"featuredBadge": "Meest gekozen!",
"groupLabel": "Pakketten",
"filterLabel": "Filter pakketten",
"error": "Pakketten konden niet worden geladen.",
"retry": "Opnieuw proberen",
"empty": "Binnenkort meer informatie. Neem contact op voor een voorstel."
},
"e1998": {
"marquee": "+++ Welkom bij SLP Software +++ Van idee naar live in drie stappen +++ Websites, apps & meer +++ ",
"heading": "Van idee naar live in drie stappen",
"sub": "Zo loopt een project van het eerste gesprek tot de live-gang.",
"step": "Stap {index} van {total}",
"doneTitle": "Klaar!",
"doneHeading": "Je site is live!",
"doneText": "Online, met uitleg erbij. Uitbreiden kan altijd.",
"doneLink": "» Begin met stap 1"
},
"e1989": {
"header1": "SLP SOFTWARE — CONTACT.EXE",
"header2": "640K OK",
"prompt1": "C:\\SLP> type contact.txt",
"prompt2": "C:\\SLP> contact /nieuw",
"prompt3": "C:\\SLP> slp.Bouw(uwIdee);",
"mailto": {
"text": "Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.",
"button": "Stuur een bericht"
},
"mailDirect": "Of mail direct:",
"footerLeft": "(C) 2026 SLP SOFTWARE"
},
"terminalForm": {
"sentLine1": "BERICHT VERSTUURD........ OK",
"sentLine2": "ANTWOORD BINNEN 1 WERKDAG. BEDANKT!",
"newMessage": "Nieuw bericht",
"send": "Verstuur",
"retry": "Opnieuw proberen",
"labels": {
"name": "Naam",
"email": "E-mail",
"subject": "Onderwerp",
"message": "Bericht"
},
"subjectPlaceholder": "-- KIES --",
"honeypot": "Laat dit veld leeg"
}
}
+97
View File
@@ -0,0 +1,97 @@
{
"nav": {
"label": "Hoofdnavigatie",
"about": "Over",
"packages": "Pakketten",
"process": "Werkwijze",
"cta": "Start project",
"menuClose": "Sluit menu",
"menuOpen": "Open menu"
},
"about": {
"photoAlt": "Bryan Slop, oprichter van SLP Software",
"heading": "Eén ontwikkelaar, korte lijnen",
"paragraphs": [
"Hi, ik ben Bryan Slop van SLP Software! Ik ben een ervaren web- en .NET-ontwikkelaar. Ik geloof dat goede software niet ingewikkeld hoeft te voelen. Software zonder lange trajecten: je schakelt direct met mij, de ontwikkelaar van jouw website of applicatie.",
"Van een strakke landingspagina tot een applicatie met eigen contentmanagementsysteem — de aanpak is hetzelfde: heldere afspraken, nette code en een resultaat waar je jaren mee vooruit kunt."
],
"facts": {
"contact": { "title": "Direct contact", "text": "met de ontwikkelaar zelf" },
"response": { "title": "Eén werkdag", "text": "tot je een reactie hebt" },
"price": { "title": "Vaste prijs", "text": "per pakket, vooraf bekend" }
}
},
"process": {
"heading": "Van idee naar live in drie stappen",
"steps": {
"intake": {
"label": "stap 01 — intake",
"phase": "Intake",
"title": "Kennismaken",
"description": "We bespreken je idee, doelgroep en wensen. Je krijgt direct een eerlijk advies over welk pakket past bij jouw doel."
},
"build": {
"label": "stap 02 — bouwen",
"phase": "Bouwen",
"title": "Ontwerpen & ontwikkelen",
"description": "Ik bouw je site of applicatie en houd je onderweg op de hoogte, zodat er geen verrassingen zijn bij de oplevering."
},
"live": {
"label": "stap 03 — live",
"phase": "Live",
"title": "Opleveren",
"description": "Je site gaat live en je krijgt uitleg over hoe alles werkt. Later uitbreiden? Dat kan altijd."
}
}
},
"packages": {
"headingThree": "Drie manieren om te starten",
"headingOther": "Manieren om te starten",
"intro": "Van één sterke pagina tot volledig maatwerk met eigen back-end. Elk pakket heeft een vaste scope en een vaste prijs.",
"error": "Pakketten konden niet worden geladen.",
"retry": "Opnieuw proberen",
"empty": "Binnenkort meer informatie. Neem contact op voor een voorstel.",
"filterLabel": "Filter pakketten",
"filterAll": "Alles",
"listLabel": "Pakketten",
"featuredBadge": "Meest gekozen",
"resultOne": "{count} pakket met vaste prijs",
"resultMany": "{count} pakketten met vaste prijs",
"resultWithBanner": "{result}, plus maatwerk",
"swipeDot": "Pakket {index} van {total}: {title}"
},
"contact": {
"heading": "Klaar om te bouwen?",
"displayHeading": ["Klaar om", "te bouwen?"],
"description": "Vertel kort wat je voor ogen hebt. Je krijgt binnen één werkdag reactie met een eerlijk advies — vrijblijvend.",
"mailSubject": "Projectaanvraag",
"directMail": "Liever direct mailen?",
"mailto": {
"title": "Vertel wat je voor ogen hebt",
"text": "Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.",
"button": "Stuur een bericht"
},
"form": {
"otherSubject": "Overig",
"successTitle": "Bedankt!",
"successText": "Je bericht is verstuurd. Je hoort binnen één werkdag van me.",
"reset": "Nog een bericht sturen",
"name": "Naam",
"email": "E-mail",
"subject": "Onderwerp",
"subjectPlaceholder": "Kies een onderwerp",
"message": "Bericht",
"honeypot": "Laat dit veld leeg",
"captchaProblem": "De controle tegen spam kan niet worden geladen. Probeer het later opnieuw of mail me direct:",
"retry": "Opnieuw proberen",
"submit": "Verstuur",
"privacyNote": "Je gegevens gebruik ik alleen om op je bericht te reageren; ik bewaar ze maximaal 1 jaar."
}
},
"footer": {
"copyright": "© 2026 SLP Software"
},
"static": {
"packagesHeading": "Manieren om te starten."
}
}
+20
View File
@@ -0,0 +1,20 @@
{
"skipLink": "Naar de inhoud",
"errorBoundary": "Er ging iets mis. Probeer de pagina te vernieuwen.",
"toggles": {
"darkMode": "Donkere weergave",
"variantToTimeTravel": "Tijdreis: bekijk de site zoals vroeger",
"variantBack": "Terug naar nu"
},
"variantAlert": {
"message": "De tijdreis kon niet worden geladen.",
"retry": "Opnieuw proberen",
"dismissLabel": "Melding sluiten",
"dismiss": "Sluiten"
},
"announce": {
"toE": "Tijdreis-weergave geladen.",
"toB": "Terug naar de moderne weergave.",
"failed": "De tijdreis kon niet worden geladen."
}
}
+2 -1
View File
@@ -3,6 +3,7 @@ import { AboutSection } from '../features/landing/components/AboutSection';
import { ProcessSection } from '../features/landing/components/ProcessSection'; import { ProcessSection } from '../features/landing/components/ProcessSection';
import { ContactSection } from '../features/landing/components/ContactSection'; import { ContactSection } from '../features/landing/components/ContactSection';
import { Footer } from '../components/layout/Footer'; import { Footer } from '../components/layout/Footer';
import { t } from '../i18n';
/** /**
* Static, crawler-readable text of the landing page (NFR-9), rendered to HTML at build time by * Static, crawler-readable text of the landing page (NFR-9), rendered to HTML at build time by
@@ -26,7 +27,7 @@ export function StaticLanding() {
id="pakketten-heading" id="pakketten-heading"
className="max-w-[12ch] text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%]" className="max-w-[12ch] text-[clamp(40px,5.4vw,80px)] font-extrabold leading-[0.95] tracking-[-0.03em] [font-stretch:112%]"
> >
Manieren om te starten. {t('landing.static.packagesHeading')}
</h2> </h2>
</div> </div>
</section> </section>
+6 -3
View File
@@ -1,4 +1,5 @@
import type { PackageCardData } from '../../features/landing/data/content'; import type { PackageCardData } from '../../features/landing/data/content';
import { t } from '../../i18n';
export const ALL_CHIP = 'all'; export const ALL_CHIP = 'all';
@@ -45,7 +46,7 @@ export function deriveChips(cards: PackageCardData[], threshold: number): Chip[]
return null; return null;
} }
return [ return [
{ id: ALL_CHIP, label: 'Alles', count: cards.length }, { id: ALL_CHIP, label: t('landing.packages.filterAll'), count: cards.length },
...[...counts].map(([name, count]) => ({ id: `cat:${name}`, label: name, count })), ...[...counts].map(([name, count]) => ({ id: `cat:${name}`, label: name, count })),
]; ];
} }
@@ -59,8 +60,10 @@ export function filterCards(cards: PackageCardData[], activeId: string): Package
/** BR-U3-4 */ /** BR-U3-4 */
export function resultLabel(count: number, hasBanner: boolean): string { export function resultLabel(count: number, hasBanner: boolean): string {
const noun = count === 1 ? 'pakket' : 'pakketten'; const result = t(count === 1 ? 'landing.packages.resultOne' : 'landing.packages.resultMany', {
return `${count} ${noun} met vaste prijs${hasBanner ? ', plus maatwerk' : ''}`; count,
});
return hasBanner ? t('landing.packages.resultWithBanner', { result }) : result;
} }
/** BR-U3-7: index of the featured card, else the first one. */ /** BR-U3-7: index of the featured card, else the first one. */
+5 -4
View File
@@ -22,6 +22,7 @@ import {
type ModeSource, type ModeSource,
type Variant, type Variant,
} from './tokens'; } from './tokens';
import { t } from '../i18n';
/** Phases of the time-travel transition (BR-U1-6). `idle` = nothing running. */ /** Phases of the time-travel transition (BR-U1-6). `idle` = nothing running. */
export type TransitionPhase = 'idle' | 'cover' | 'swap' | 'reveal'; export type TransitionPhase = 'idle' | 'cover' | 'swap' | 'reveal';
@@ -78,8 +79,8 @@ function removeLegacyThemeKey(): void {
} }
} }
const ANNOUNCE_TO_E = 'Tijdreis-weergave geladen.'; const ANNOUNCE_TO_E = t('shared.announce.toE');
const ANNOUNCE_TO_B = 'Terug naar de moderne weergave.'; const ANNOUNCE_TO_B = t('shared.announce.toB');
function wait(ms: number): Promise<void> { function wait(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms)); return new Promise((resolve) => setTimeout(resolve, ms));
@@ -173,7 +174,7 @@ export function ThemeProvider({ children, loadVariant }: ThemeProviderProps) {
// BR-U1-8: stay in the current variant and tell the visitor. // BR-U1-8: stay in the current variant and tell the visitor.
if (mountedRef.current) { if (mountedRef.current) {
setVariantError(true); setVariantError(true);
setAnnouncement('De tijdreis kon niet worden geladen.'); setAnnouncement(t('shared.announce.failed'));
} }
} finally { } finally {
busyRef.current = false; busyRef.current = false;
@@ -198,7 +199,7 @@ export function ThemeProvider({ children, loadVariant }: ThemeProviderProps) {
const reportVariantError = useCallback(() => { const reportVariantError = useCallback(() => {
setVariant(DEFAULT_VARIANT); setVariant(DEFAULT_VARIANT);
setVariantError(true); setVariantError(true);
setAnnouncement('De tijdreis kon niet worden geladen.'); setAnnouncement(t('shared.announce.failed'));
setTransition({ phase: 'idle', target: null }); setTransition({ phase: 'idle', target: null });
}, []); }, []);
+3 -2
View File
@@ -1,13 +1,14 @@
import { ModeToggle } from '../../components/ui/ModeToggle'; import { ModeToggle } from '../../components/ui/ModeToggle';
import { VariantToggle } from '../../components/ui/VariantToggle'; import { VariantToggle } from '../../components/ui/VariantToggle';
import { navLinks } from '../../features/landing/data/content'; import { navLinks } from '../../features/landing/data/content';
import { t } from '../../i18n';
import { handleAnchorClick } from '../../utils/scrollToHash'; import { handleAnchorClick } from '../../utils/scrollToHash';
/** Navigation of the 2026 era: links, the Start project button and both toggles (way back to B). */ /** Navigation of the 2026 era: links, the Start project button and both toggles (way back to B). */
export function ENav() { export function ENav() {
return ( return (
<nav <nav
aria-label="Hoofdnavigatie" aria-label={t('era.nav.label')}
className="mx-auto flex min-h-[76px] max-w-[1160px] flex-wrap items-center justify-between gap-x-8 gap-y-3 px-6" 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 <a
@@ -16,7 +17,7 @@ export function ENav() {
className="flex items-baseline gap-[7px] py-2.5 no-underline" 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-[21px] font-black [font-stretch:125%]">SLP</span>
<span className="text-[15px] text-[color:var(--e-muted)]">Software</span> <span className="text-[15px] text-[color:var(--e-muted)]">{t('era.nav.brandSuffix')}</span>
</a> </a>
<ul className="m-0 flex list-none flex-wrap items-center gap-x-7 gap-y-1 p-0 text-[15px] font-medium"> <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) => ( {navLinks.map((link) => (
+3 -4
View File
@@ -2,6 +2,7 @@ import { useMemo, useRef } from 'react';
import { createContactClient } from '../../cms-client/contact'; import { createContactClient } from '../../cms-client/contact';
import { contactInfo } from '../../features/landing/data/content'; import { contactInfo } from '../../features/landing/data/content';
import { useContactAvailability } from '../../features/landing/hooks/useContactAvailability'; import { useContactAvailability } from '../../features/landing/hooks/useContactAvailability';
import { t } from '../../i18n';
import { TerminalForm } from './TerminalForm'; import { TerminalForm } from './TerminalForm';
import { terminalText } from './eraContent'; import { terminalText } from './eraContent';
@@ -9,15 +10,13 @@ function TerminalMailto() {
const href = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`; const href = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`;
return ( return (
<div data-testid="mailto-panel"> <div data-testid="mailto-panel">
<p className="m-0 mb-5 max-w-[44ch]"> <p className="m-0 mb-5 max-w-[44ch]">{t('era.e1989.mailto.text')}</p>
Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.
</p>
<a <a
href={href} href={href}
className="e-term-btn inline-block uppercase no-underline" className="e-term-btn inline-block uppercase no-underline"
data-testid="contact-mailto-button" data-testid="contact-mailto-button"
> >
[ Stuur een bericht ] [ {t('era.e1989.mailto.button')} ]
</a> </a>
</div> </div>
); );
+2 -1
View File
@@ -1,5 +1,6 @@
import { Fragment } from 'react'; import { Fragment } from 'react';
import { processSteps } from '../../features/landing/data/content'; import { processSteps } from '../../features/landing/data/content';
import { t } from '../../i18n';
import { handleAnchorClick } from '../../utils/scrollToHash'; import { handleAnchorClick } from '../../utils/scrollToHash';
import { marqueeText, processEra } from './eraContent'; import { marqueeText, processEra } from './eraContent';
@@ -56,7 +57,7 @@ export function Era1998() {
background: 'linear-gradient(90deg, #800000 0%, #b03030 100%)', background: 'linear-gradient(90deg, #800000 0%, #b03030 100%)',
}} }}
> >
Stap {index + 1} van {total} {t('era.e1998.step', { index: index + 1, total })}
</div> </div>
<div <div
className="mt-[3px] flex flex-1 flex-col px-4 pb-4 pt-[18px]" className="mt-[3px] flex flex-1 flex-col px-4 pb-4 pt-[18px]"
+12 -10
View File
@@ -6,6 +6,7 @@ import { useContactPreselect } from '../../shared/contact/useContactPreselect';
import { initialIndex } from '../../shared/packages/packageLogic'; import { initialIndex } from '../../shared/packages/packageLogic';
import { usePackageFilter } from '../../shared/packages/usePackageFilter'; import { usePackageFilter } from '../../shared/packages/usePackageFilter';
import { useSwipeRow } from '../../shared/packages/useSwipeRow'; import { useSwipeRow } from '../../shared/packages/useSwipeRow';
import { t } from '../../i18n';
import { handleAnchorClick } from '../../utils/scrollToHash'; import { handleAnchorClick } from '../../utils/scrollToHash';
import { packagesHeading } from './eraContent'; import { packagesHeading } from './eraContent';
@@ -18,7 +19,7 @@ function PackageCard2006({ pkg }: { pkg: PackageCardData }) {
return ( return (
<article className="e-w2-card" data-featured={featured} data-testid={`package-card-${pkg.id}`}> <article className="e-w2-card" data-featured={featured} data-testid={`package-card-${pkg.id}`}>
{featured && <div className="e-star">Meest gekozen!</div>} {featured && <div className="e-star">{t('era.e2006.featuredBadge')}</div>}
<div <div
className={`${tone} rounded-t-[9px] border-b px-[22px] py-4`} className={`${tone} rounded-t-[9px] border-b px-[22px] py-4`}
style={{ borderColor: featured ? '#8a0000' : 'var(--e-w2-silver-card-border)' }} style={{ borderColor: featured ? '#8a0000' : 'var(--e-w2-silver-card-border)' }}
@@ -114,7 +115,7 @@ function List2006({
<div <div
ref={ref} ref={ref}
role="group" role="group"
aria-label="Pakketten" aria-label={t('era.e2006.groupLabel')}
tabIndex={0} tabIndex={0}
data-testid="packages-grid" 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:flex-wrap sm:justify-center sm:snap-none sm:gap-x-6 sm:gap-y-10 sm:overflow-visible sm:px-0 sm:pb-0 sm:pt-10" 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:flex-wrap sm:justify-center sm:snap-none sm:gap-x-6 sm:gap-y-10 sm:overflow-visible sm:px-0 sm:pb-0 sm:pt-10"
@@ -196,34 +197,35 @@ export function Era2006() {
{packagesHeading(loaded ? filter.cards.length : 3)} {packagesHeading(loaded ? filter.cards.length : 3)}
</h2> </h2>
<p className="mx-auto my-0 max-w-[52ch] text-[color:var(--e-w2-body)]"> <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 {t('era.e2006.intro')}
vaste scope en een vaste prijs.
</p> </p>
</div> </div>
{isError ? ( {isError ? (
<div className="text-center" data-testid="packages-error" role="alert"> <div className="text-center" data-testid="packages-error" role="alert">
<p className="mb-4">Pakketten konden niet worden geladen.</p> <p className="mb-4">{t('era.e2006.error')}</p>
<button <button
type="button" type="button"
onClick={() => void refetch()} onClick={() => void refetch()}
data-testid="packages-retry" data-testid="packages-retry"
className="e-w2-btn e-glossy-silver mx-auto inline-block" className="e-w2-btn e-glossy-silver mx-auto inline-block"
> >
Opnieuw proberen {t('era.e2006.retry')}
</button> </button>
</div> </div>
) : loaded && data.length === 0 ? ( ) : loaded && data.length === 0 ? (
<div data-testid="packages-empty"> <div data-testid="packages-empty">
<p className="mb-4 text-center"> <p className="mb-4 text-center">{t('era.e2006.empty')}</p>
Binnenkort meer informatie. Neem contact op voor een voorstel.
</p>
{banner} {banner}
</div> </div>
) : ( ) : (
<> <>
{loaded && filter.chips ? ( {loaded && filter.chips ? (
<div role="group" aria-label="Filter pakketten" className="flex flex-wrap gap-1"> <div
role="group"
aria-label={t('era.e2006.filterLabel')}
className="flex flex-wrap gap-1"
>
{filter.chips.map((chip) => { {filter.chips.map((chip) => {
const active = chip.id === filter.activeId; const active = chip.id === filter.activeId;
return ( return (
+3 -2
View File
@@ -1,4 +1,5 @@
import { aboutContent } from '../../features/landing/data/content'; import { aboutContent } from '../../features/landing/data/content';
import { t } from '../../i18n';
import { aboutTiles } from './eraContent'; import { aboutTiles } from './eraContent';
const TILE_BG: Record<(typeof aboutTiles)[number]['tone'], string> = { const TILE_BG: Record<(typeof aboutTiles)[number]['tone'], string> = {
@@ -30,7 +31,7 @@ export function Era2013() {
id="over-heading" id="over-heading"
className="m-0 text-[clamp(32px,4vw,46px)] font-light leading-[1.2] text-[color:var(--e-flat-ink)]" className="m-0 text-[clamp(32px,4vw,46px)] font-light leading-[1.2] text-[color:var(--e-flat-ink)]"
> >
Eén ontwikkelaar, korte lijnen {t('era.e2013.heading')}
</h2> </h2>
<div <div
aria-hidden="true" aria-hidden="true"
@@ -49,7 +50,7 @@ export function Era2013() {
src="/bryan-slop-400.jpg" src="/bryan-slop-400.jpg"
srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w" srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w"
sizes="240px" sizes="240px"
alt="Bryan Slop, oprichter van SLP Software" alt={t('era.e2013.photoAlt')}
width={240} width={240}
height={240} height={240}
loading="lazy" loading="lazy"
+3 -2
View File
@@ -1,4 +1,5 @@
import { heroContent } from '../../features/landing/data/content'; import { heroContent } from '../../features/landing/data/content';
import { t } from '../../i18n';
import { handleAnchorClick } from '../../utils/scrollToHash'; import { handleAnchorClick } from '../../utils/scrollToHash';
/** 2026: modern hero with the live headline and the blinking code line. */ /** 2026: modern hero with the live headline and the blinking code line. */
@@ -29,14 +30,14 @@ export function Era2026() {
onClick={(event) => handleAnchorClick(event, '#pakketten')} onClick={(event) => handleAnchorClick(event, '#pakketten')}
className="e-btn e-btn-solid" className="e-btn e-btn-solid"
> >
Bekijk pakketten {t('era.e2026.ctaPackages')}
</a> </a>
<a <a
href="#contact" href="#contact"
onClick={(event) => handleAnchorClick(event, '#contact')} onClick={(event) => handleAnchorClick(event, '#contact')}
className="e-btn e-btn-outline" className="e-btn e-btn-outline"
> >
Plan een gesprek {t('era.e2026.ctaContact')}
</a> </a>
</div> </div>
</div> </div>
+23 -6
View File
@@ -9,6 +9,7 @@ import {
} from '../../cms-client/contact'; } from '../../cms-client/contact';
import { contactForm, contactInfo } from '../../features/landing/data/content'; import { contactForm, contactInfo } from '../../features/landing/data/content';
import { usePackagesQuery } from '../../features/landing/hooks/usePackagesQuery'; import { usePackagesQuery } from '../../features/landing/hooks/usePackagesQuery';
import { t } from '../../i18n';
import { trackEvent } from '../../shared/analytics/trackEvent'; import { trackEvent } from '../../shared/analytics/trackEvent';
import { useContactPreselect } from '../../shared/contact/useContactPreselect'; import { useContactPreselect } from '../../shared/contact/useContactPreselect';
import { buildSubjectOptions, subjectForSlug } from '../../shared/contact/subjects'; import { buildSubjectOptions, subjectForSlug } from '../../shared/contact/subjects';
@@ -117,16 +118,31 @@ export function TerminalForm({ client, token, refreshToken }: TerminalFormProps)
className="flex flex-col gap-[18px] border-4 border-double border-[#ffb000] p-[clamp(18px,3vw,32px)]" className="flex flex-col gap-[18px] border-4 border-double border-[#ffb000] p-[clamp(18px,3vw,32px)]"
data-testid="contact-form" data-testid="contact-form"
> >
<Row label="Naam" dots="....:" error={name.error} errorId={name.errorId}> <Row
label={t('era.terminalForm.labels.name')}
dots="....:"
error={name.error}
errorId={name.errorId}
>
<input type="text" autoComplete="name" className="e-term-input" {...name.inputProps} /> <input type="text" autoComplete="name" className="e-term-input" {...name.inputProps} />
</Row> </Row>
<Row label="E-mail" dots="..:" error={email.error} errorId={email.errorId}> <Row
label={t('era.terminalForm.labels.email')}
dots="..:"
error={email.error}
errorId={email.errorId}
>
<input type="email" autoComplete="email" className="e-term-input" {...email.inputProps} /> <input type="email" autoComplete="email" className="e-term-input" {...email.inputProps} />
</Row> </Row>
<Row label="Onderwerp" dots=":" error={subject.error} errorId={subject.errorId}> <Row
label={t('era.terminalForm.labels.subject')}
dots=":"
error={subject.error}
errorId={subject.errorId}
>
<select className="e-term-box flex-[1_1_240px] min-w-0" {...subject.inputProps}> <select className="e-term-box flex-[1_1_240px] min-w-0" {...subject.inputProps}>
<option value="" disabled> <option value="" disabled>
-- KIES -- {t('era.terminalForm.subjectPlaceholder')}
</option> </option>
{subjectOptions.map((option) => ( {subjectOptions.map((option) => (
<option key={option.value} value={option.value}> <option key={option.value} value={option.value}>
@@ -138,7 +154,8 @@ export function TerminalForm({ client, token, refreshToken }: TerminalFormProps)
<div> <div>
<label className="flex flex-col gap-1.5 uppercase"> <label className="flex flex-col gap-1.5 uppercase">
<span> <span>
Bericht<span aria-hidden="true">:</span> {t('era.terminalForm.labels.message')}
<span aria-hidden="true">:</span>
</span> </span>
<textarea rows={5} className="e-term-box resize-y" {...message.inputProps} /> <textarea rows={5} className="e-term-box resize-y" {...message.inputProps} />
</label> </label>
@@ -155,7 +172,7 @@ export function TerminalForm({ client, token, refreshToken }: TerminalFormProps)
{/* Honeypot: invisible to people and assistive technology; bots fill it. */} {/* Honeypot: invisible to people and assistive technology; bots fill it. */}
<div aria-hidden="true" className="absolute -left-[9999px] h-0 w-0 overflow-hidden"> <div aria-hidden="true" className="absolute -left-[9999px] h-0 w-0 overflow-hidden">
<label htmlFor={hpId}>Laat dit veld leeg</label> <label htmlFor={hpId}>{t('era.terminalForm.honeypot')}</label>
<input type="text" id={hpId} {...hpProps} /> <input type="text" id={hpId} {...hpProps} />
</div> </div>
+26 -23
View File
@@ -1,37 +1,40 @@
import { t, type TextKey } from '../../i18n';
/** Strings that only exist in variant E (the live copy comes from features/landing/data/content). */ /** Strings that only exist in variant E (the live copy comes from features/landing/data/content). */
export const marqueeText = export const marqueeText = t('era.e1998.marquee');
'+++ Welkom bij SLP Software +++ Van idee naar live in drie stappen +++ Websites, apps & meer +++ ';
export const aboutTiles = [ export const aboutTiles = [
{ glyph: '</>', label: 'Websites', tone: 'accent' }, { glyph: '</>', label: t('era.e2013.tiles.websites'), tone: 'accent' },
{ glyph: 'C#', label: '.NET-software', tone: 'dark' }, { glyph: 'C#', label: t('era.e2013.tiles.dotnet'), tone: 'dark' },
{ glyph: '{ }', label: 'CMS & apps', tone: 'slate' }, { glyph: '{ }', label: t('era.e2013.tiles.cms'), tone: 'slate' },
] as const; ] as const;
export const processEra = { export const processEra = {
heading: 'Van idee naar live in drie stappen', heading: t('era.e1998.heading'),
sub: 'Zo loopt een project van het eerste gesprek tot de live-gang.', sub: t('era.e1998.sub'),
doneTitle: 'Klaar!', doneTitle: t('era.e1998.doneTitle'),
doneHeading: 'Je site is live!', doneHeading: t('era.e1998.doneHeading'),
doneText: 'Online, met uitleg erbij. Uitbreiden kan altijd.', doneText: t('era.e1998.doneText'),
doneLink: '» Begin met stap 1', doneLink: t('era.e1998.doneLink'),
}; };
const text = (key: TextKey) => t(key);
export const terminalText = { export const terminalText = {
header: ['SLP SOFTWARE — CONTACT.EXE', '640K OK'], header: [text('era.e1989.header1'), text('era.e1989.header2')],
prompt1: 'C:\\SLP> type contact.txt', prompt1: text('era.e1989.prompt1'),
prompt2: 'C:\\SLP> contact /nieuw', prompt2: text('era.e1989.prompt2'),
prompt3: 'C:\\SLP> slp.Bouw(uwIdee);', prompt3: text('era.e1989.prompt3'),
sentLine1: 'BERICHT VERSTUURD........ OK', sentLine1: text('era.terminalForm.sentLine1'),
sentLine2: 'ANTWOORD BINNEN 1 WERKDAG. BEDANKT!', sentLine2: text('era.terminalForm.sentLine2'),
newMessage: 'Nieuw bericht', newMessage: text('era.terminalForm.newMessage'),
send: 'Verstuur', send: text('era.terminalForm.send'),
retry: 'Opnieuw proberen', retry: text('era.terminalForm.retry'),
mailDirect: 'Of mail direct:', mailDirect: text('era.e1989.mailDirect'),
footerLeft: '(C) 2026 SLP SOFTWARE', footerLeft: text('era.e1989.footerLeft'),
}; };
export function packagesHeading(count: number): string { export function packagesHeading(count: number): string {
return count === 3 ? 'Drie manieren om te starten' : 'Manieren om te starten'; return count === 3 ? t('era.e2006.headingThree') : t('era.e2006.headingOther');
} }