Completes the front-end shell with footer, status pages and SEO

Adds the footer, back-to-top button, skip link, placeholder routes,
404 and error pages inside the shell, plus per-page SEO from a single
page registry (canonical URLs, Open Graph image, JSON-LD, generated
sitemap.xml and robots.txt).

Theme tokens and recipes replace repeated styling, the hero loads only
the active and neighbouring slides, and the e-mail address is joined
in the browser to keep it out of the HTML and bundle.

Adds Vitest with property-based (fast-check) and axe tests, ESLint,
security headers for dev and preview, Lighthouse CI and a `pnpm check`
script that runs all quality gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 17:05:02 +02:00
co-authored by Claude Opus 5.5
parent b5b7f3b3db
commit 4d6408b607
99 changed files with 7883 additions and 414 deletions
+154
View File
@@ -0,0 +1,154 @@
import {
Box,
chakra,
Container,
Flex,
Grid,
Image,
Text,
VisuallyHidden,
} from '@chakra-ui/react';
import socialPlatforms from '@/content/socialPlatforms';
import type { SiteContent } from '@/content/types';
import { copyrightLine } from '@/lib/copyrightLine';
import { emailAddress } from '@/lib/emailAddress';
import { visibleSocials } from '@/lib/visibleSocials';
import { footerNav } from '@/navigation';
import RouterLink from '../RouterLink';
import FooterColumn from './FooterColumn';
import FooterLink from './FooterLink';
// Images
import logoDark from '../../assets/logo-dark.png';
type FooterProps = {
content: SiteContent;
};
// Footer uit het design (FR-05): merk, socials en contact, met daaronder de
// copyright en het footermenu. Een lege kolom valt weg (BR-FOOT-01).
export default function Footer({ content }: FooterProps) {
const socials = visibleSocials(content.socials);
// Pas hier samengevoegd, zodat het adres nergens letterlijk staat
const email = emailAddress(content.email);
const year = new Date().getFullYear();
return (
<Box
as="footer"
bg="paper.alt"
borderTopWidth="1px"
borderTopColor="line"
pt="clamp(3.5rem, 7vw, 6rem)"
>
<Container>
<Grid
templateColumns={{
base: '1fr',
md: 'repeat(2, 1fr)',
lg: '1.2fr 1fr 1fr',
}}
gap="clamp(2rem, 5vw, 4rem)"
pb="clamp(2.5rem, 5vw, 4rem)"
>
{/* Merk: op mobiel gecentreerd onder elkaar, vanaf tablet
het logo met de tekst ernaast */}
<Flex
direction={{ base: 'column', md: 'row' }}
alignItems="center"
alignSelf="start"
gap={5}
textAlign={{ base: 'center', md: 'start' }}
>
<Image
src={logoDark}
alt="Andrea Slop Fotografie"
htmlWidth={500}
htmlHeight={500}
w={{ base: '150px', md: '110px' }}
h="auto"
flexShrink={0}
loading="lazy"
/>
{/* Regelafbrekingen uit de content blijven staan */}
<Text color="ink.soft" whiteSpace="pre-line">
{content.footerIntro}
</Text>
</Flex>
{socials.length > 0 && (
<FooterColumn title="Socials">
{socials.map((social) => (
<chakra.li key={social.platform}>
<FooterLink
href={social.href}
target="_blank"
rel="noopener noreferrer"
data-testid={`footer-social-${social.platform}`}
>
{/* Spatie buiten de verborgen tekst, anders
valt hij weg uit de voorgelezen naam */}
{socialPlatforms[social.platform].name}{' '}
<VisuallyHidden>
(opent in nieuw tabblad)
</VisuallyHidden>
</FooterLink>
</chakra.li>
))}
</FooterColumn>
)}
{email && (
<FooterColumn title="Contact">
<chakra.li>
<FooterLink
href={`mailto:${email}`}
data-testid="footer-email-link"
>
{email}
</FooterLink>
</chakra.li>
</FooterColumn>
)}
</Grid>
<Flex
direction={{ base: 'column', md: 'row' }}
alignItems="center"
justifyContent="space-between"
gap={{ base: 2, md: 6 }}
py={6}
borderTopWidth="1px"
borderTopColor="line"
textAlign={{ base: 'center', md: 'start' }}
>
<Text fontSize="sm" color="ink.soft">
{copyrightLine(year)}
</Text>
<chakra.nav aria-label="Footermenu">
<Flex
as="ul"
listStyleType="none"
wrap="wrap"
justifyContent="center"
columnGap={6}
>
{footerNav.map((item) => (
<chakra.li key={item.to}>
<FooterLink asChild>
<RouterLink
to={item.to}
data-testid={`footer-nav-${item.to.slice(1)}`}
>
{item.label}
</RouterLink>
</FooterLink>
</chakra.li>
))}
</Flex>
</chakra.nav>
</Flex>
</Container>
</Box>
);
}