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
@@ -1,4 +1,5 @@
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. */
export function AboutSection() {
@@ -21,7 +22,7 @@ export function AboutSection() {
src="/bryan-slop-800.jpg"
srcSet="/bryan-slop-400.jpg 400w, /bryan-slop-800.jpg 800w"
sizes="(min-width: 768px) 480px, 90vw"
alt="Bryan Slop, oprichter van SLP Software"
alt={t('landing.about.photoAlt')}
width={480}
height={640}
loading="lazy"
@@ -35,7 +36,7 @@ export function AboutSection() {
id="over-heading"
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>
{aboutContent.paragraphs.map((paragraph) => (
<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 { contactForm, contactInfo } from '../data/content';
import { usePackagesQuery } from '../hooks/usePackagesQuery';
import { t } from '../../../i18n';
const CaptchaWidget = lazy(() => import('../../../shared/contact/CaptchaWidget'));
@@ -89,7 +90,7 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
data-testid="contact-success"
>
<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 className="mb-7 text-body">{contactForm.successText}</p>
<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"
data-testid="contact-reset"
>
Nog een bericht sturen
{t('landing.contact.form.reset')}
</button>
</div>
);
@@ -113,17 +114,21 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
return (
<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">
<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} />
</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} />
</Field>
</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}>
<option value="" disabled>
Kies een onderwerp
{t('landing.contact.form.subjectPlaceholder')}
</option>
{subjectOptions.map((option) => (
<option key={option.value} value={option.value}>
@@ -132,13 +137,17 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
))}
</select>
</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} />
</Field>
{/* 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">
<label htmlFor={hpId}>Laat dit veld leeg</label>
<label htmlFor={hpId}>{t('landing.contact.form.honeypot')}</label>
<input type="text" id={hpId} {...hpProps} />
</div>
@@ -179,8 +188,8 @@ export function ContactFormView({ client, token, refreshToken }: ContactFormView
{form.status === 'sending'
? form.messages.sendingLabel
: form.status === 'failed'
? 'Opnieuw proberen'
: 'Verstuur'}
? t('landing.contact.form.retry')
: t('landing.contact.form.submit')}
</button>
<p className="-mt-2 text-[13px] text-muted">{contactForm.privacyNote}</p>
</form>
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react';
import { contactInfo } from '../data/content';
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
@@ -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="flex-[1_1_320px] self-start">
<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
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%]"
@@ -1,4 +1,5 @@
import type { Chip } from '../../../shared/packages/packageLogic';
import { t } from '../../../i18n';
interface FilterChipsProps {
chips: Chip[];
@@ -9,7 +10,11 @@ interface FilterChipsProps {
/** Square filter chips of design B (BR-U3-3, BR-U3-11). */
export function FilterChips({ chips, activeId, onSelect }: FilterChipsProps) {
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) => {
const active = chip.id === activeId;
return (
@@ -1,4 +1,5 @@
import { contactInfo } from '../data/content';
import { t } from '../../../i18n';
/** Default state of the contact panel (and fallback): the mailto call-to-action. */
export function MailtoPanel() {
@@ -7,17 +8,15 @@ export function MailtoPanel() {
return (
<div data-testid="mailto-panel">
<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
</p>
<p className="mb-7 max-w-[44ch] text-body">
Stuur een bericht met je idee of vraag. Je krijgt binnen één werkdag reactie.
{t('landing.contact.mailto.title')}
</p>
<p className="mb-7 max-w-[44ch] text-body">{t('landing.contact.mailto.text')}</p>
<a
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"
data-testid="contact-mailto-button"
>
Stuur een bericht
{t('landing.contact.mailto.button')}
</a>
</div>
);
@@ -1,6 +1,7 @@
import type { PackageCardData } from '../data/content';
import { handleAnchorClick } from '../../../utils/scrollToHash';
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. */
export function PackageCard({ pkg }: { pkg: PackageCardData }) {
@@ -16,7 +17,7 @@ export function PackageCard({ pkg }: { pkg: PackageCardData }) {
>
{featured && (
<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>
)}
<h3
@@ -5,6 +5,7 @@ import { useSwipeRow } from '../../../shared/packages/useSwipeRow';
import { PackageCard } from './PackageCard';
import { PackageCardSkeleton } from './PackageCardSkeleton';
import { SwipeDots } from './SwipeDots';
import { t } from '../../../i18n';
const SKELETON_COUNT = 3;
@@ -34,7 +35,7 @@ export function PackageList({ packages, loading = false, resetKey }: PackageList
<div
ref={ref}
role="group"
aria-label="Pakketten"
aria-label={t('landing.packages.listLabel')}
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 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 { PackageBanner } from './PackageBanner';
import { PackageList } from './PackageList';
import { t } from '../../../i18n';
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)}.
</h2>
<p className="max-w-[40ch] text-body">
Van één sterke pagina tot volledig maatwerk met eigen back-end. Elk pakket heeft een
vaste scope en een vaste prijs.
</p>
<p className="max-w-[40ch] text-body">{t('landing.packages.intro')}</p>
</div>
{topBanner ? <OfferingTopBanner banner={topBanner} /> : null}
{isError ? (
<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
type="button"
onClick={() => void refetch()}
data-testid="packages-retry"
className="min-h-[44px] border-2 border-text px-5 text-[15px] font-bold"
>
Opnieuw proberen
{t('landing.packages.retry')}
</button>
</div>
) : loaded && data.length === 0 ? (
<div data-testid="packages-empty">
<p className="mb-4 text-muted">
Binnenkort meer informatie. Neem contact op voor een voorstel.
</p>
<p className="mb-4 text-muted">{t('landing.packages.empty')}</p>
{banner}
</div>
) : (
@@ -1,5 +1,6 @@
import { processSteps } from '../data/content';
import { ProcessStep } from './ProcessStep';
import { t } from '../../../i18n';
/** "Werkwijze" of design B: black section with three steps, progress bars and outlined numbers. */
export function ProcessSection() {
@@ -10,7 +11,7 @@ export function ProcessSection() {
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]"
>
Van idee naar live in drie stappen
{t('landing.process.heading')}
</h2>
<ol className="grid grid-cols-1 gap-x-10 gap-y-16 md:grid-cols-3">
{processSteps.map((step, index) => (
@@ -1,3 +1,5 @@
import { t } from '../../../i18n';
interface SwipeDotsProps {
titles: string[];
activeIndex: number;
@@ -17,7 +19,11 @@ export function SwipeDots({ titles, activeIndex, onSelect }: SwipeDotsProps) {
<button
key={`${title}-${index}`}
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}
onClick={() => onSelect(index)}
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.
*/
import { t, tList } from '../../../i18n';
export interface NavLink {
label: string;
href: string;
@@ -81,10 +83,10 @@ export interface ContactInfo {
}
export const navLinks: NavLink[] = [
{ label: 'Over', href: '#over' },
{ label: 'Pakketten', href: '#pakketten' },
{ label: 'Werkwijze', href: '#werkwijze' },
{ label: 'Start project', href: '#contact', isCta: true },
{ label: t('landing.nav.about'), href: '#over' },
{ label: t('landing.nav.packages'), href: '#pakketten' },
{ label: t('landing.nav.process'), href: '#werkwijze' },
{ label: t('landing.nav.cta'), href: '#contact', isCta: true },
];
export const heroContent: HeroContent = {
@@ -157,58 +159,34 @@ export const packagesSettings: PackagesSettings = {
},
};
export const processSteps: ProcessStepData[] = [
{
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.',
},
{
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 processSteps: ProcessStepData[] = (['intake', 'build', 'live'] as const).map((id) => ({
label: t(`landing.process.steps.${id}.label`),
phase: t(`landing.process.steps.${id}.phase`),
title: t(`landing.process.steps.${id}.title`),
description: t(`landing.process.steps.${id}.description`),
}));
export const aboutContent: AboutContent = {
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.',
],
paragraphs: [...tList('landing.about.paragraphs')],
};
export const aboutFacts: AboutFact[] = [
{ title: 'Direct contact', text: 'met de ontwikkelaar zelf' },
{ title: 'Eén werkdag', text: 'tot je een reactie hebt' },
{ title: 'Vaste prijs', text: 'per pakket, vooraf bekend' },
];
export const aboutFacts: AboutFact[] = (['contact', 'response', 'price'] as const).map((id) => ({
title: t(`landing.about.facts.${id}.title`),
text: t(`landing.about.facts.${id}.text`),
}));
/** Texts of the contact form (design B). */
export const contactForm = {
otherSubjectLabel: 'Overig',
successText: 'Je bericht is verstuurd. Je hoort binnen één werkdag van me.',
captchaProblem:
'De controle tegen spam kan niet worden geladen. Probeer het later opnieuw of mail me direct:',
privacyNote:
'Je gegevens gebruik ik alleen om op je bericht te reageren; ik bewaar ze maximaal 1 jaar.',
otherSubjectLabel: t('landing.contact.form.otherSubject'),
successText: t('landing.contact.form.successText'),
captchaProblem: t('landing.contact.form.captchaProblem'),
privacyNote: t('landing.contact.form.privacyNote'),
};
export const contactInfo: ContactInfo = {
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.',
heading: t('landing.contact.heading'),
displayHeading: [...tList('landing.contact.displayHeading')],
description: t('landing.contact.description'),
email: 'info@slpsoftware.nl',
mailSubject: 'Projectaanvraag',
mailSubject: t('landing.contact.mailSubject'),
};