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>
13 lines
505 B
TypeScript
13 lines
505 B
TypeScript
import type { EmailAddress } from '../content/types';
|
|
|
|
const invalidPart = (part: string) => part === '' || /[\s@]/.test(part);
|
|
|
|
// Voegt het e-mailadres pas in de browser samen (BR-EMAIL-01). Geeft null bij
|
|
// ongeldige delen, zodat de footer de Contact-kolom kan weglaten (BR-EMAIL-02).
|
|
export function emailAddress({ user, domain }: EmailAddress): string | null {
|
|
if (invalidPart(user) || invalidPart(domain) || !domain.includes('.')) {
|
|
return null;
|
|
}
|
|
return `${user}@${domain}`;
|
|
}
|