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:
@@ -1,8 +1,10 @@
|
||||
import { t } from '../../i18n';
|
||||
|
||||
export function Footer() {
|
||||
return (
|
||||
<footer className="bg-inv text-[#b9b3ae]">
|
||||
<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>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { navLinks } from '../../features/landing/data/content';
|
||||
import { ModeToggle } from '../ui/ModeToggle';
|
||||
import { VariantToggle } from '../ui/VariantToggle';
|
||||
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
|
||||
@@ -12,6 +13,7 @@ import { handleAnchorClick } from '../../utils/scrollToHash';
|
||||
export function Nav() {
|
||||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||
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).
|
||||
useEffect(() => {
|
||||
@@ -29,7 +31,10 @@ export function Nav() {
|
||||
}
|
||||
|
||||
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">
|
||||
<a
|
||||
href="#top"
|
||||
@@ -74,13 +79,13 @@ export function Nav() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsMenuOpen((open) => !open)}
|
||||
aria-label={isMenuOpen ? 'Sluit menu' : 'Open menu'}
|
||||
aria-label={menuLabel}
|
||||
aria-expanded={isMenuOpen}
|
||||
aria-controls="mobile-nav-menu"
|
||||
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"
|
||||
>
|
||||
<span className="sr-only">{isMenuOpen ? 'Sluit menu' : 'Open menu'}</span>
|
||||
<span className="sr-only">{menuLabel}</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
viewBox="0 0 24 24"
|
||||
|
||||
@@ -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.
|
||||
* 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"
|
||||
data-testid="skip-link"
|
||||
>
|
||||
Naar de inhoud
|
||||
{t('shared.skipLink')}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
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). */
|
||||
export function VariantAlert() {
|
||||
@@ -14,23 +15,23 @@ export function VariantAlert() {
|
||||
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"
|
||||
>
|
||||
<span className="flex-1">De tijdreis kon niet worden geladen.</span>
|
||||
<span className="flex-1">{t('shared.variantAlert.message')}</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={retryVariant}
|
||||
data-testid="variant-alert-retry"
|
||||
className="rounded border border-line px-3 py-1.5 font-medium hover:border-accent-line"
|
||||
>
|
||||
Opnieuw proberen
|
||||
{t('shared.variantAlert.retry')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={dismissVariantError}
|
||||
aria-label="Melding sluiten"
|
||||
aria-label={t('shared.variantAlert.dismissLabel')}
|
||||
data-testid="variant-alert-dismiss"
|
||||
className="rounded px-2 py-1.5 text-muted hover:text-text"
|
||||
>
|
||||
Sluiten
|
||||
{t('shared.variantAlert.dismiss')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user