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:
@@ -1,18 +1,36 @@
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { createRootRoute, HeadContent } from '@tanstack/react-router';
|
||||
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools';
|
||||
import AppShell from '../components/AppShell';
|
||||
import ErrorPage from '../components/StatusPage/ErrorPage';
|
||||
import NotFound from '../components/StatusPage/NotFound';
|
||||
import siteContent from '../content/siteContent';
|
||||
import { siteHead } from '../seo';
|
||||
|
||||
// Devtools alleen tijdens het ontwikkelen; ze komen niet in de productiebuild
|
||||
const RouterDevtools = import.meta.env.DEV
|
||||
? lazy(() =>
|
||||
import('@tanstack/react-router-devtools').then((module) => ({
|
||||
default: module.TanStackRouterDevtools,
|
||||
})),
|
||||
)
|
||||
: () => null;
|
||||
|
||||
const RootLayout = () => (
|
||||
<>
|
||||
{/* Titel en meta-tags van de actieve route; React zet ze in <head> */}
|
||||
<HeadContent />
|
||||
<AppShell />
|
||||
<TanStackRouterDevtools />
|
||||
<Suspense>
|
||||
<RouterDevtools />
|
||||
</Suspense>
|
||||
</>
|
||||
);
|
||||
|
||||
export const Route = createRootRoute({
|
||||
head: () => siteHead,
|
||||
head: () => siteHead(siteContent),
|
||||
component: RootLayout,
|
||||
// Onbekende URL: 404 binnen de shell (FR-09)
|
||||
notFoundComponent: NotFound,
|
||||
// Fout in de shell zelf: foutpagina zonder shell, als vangnet (FR-10)
|
||||
errorComponent: ErrorPage,
|
||||
});
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import PageIntro from '../components/PageIntro/PageIntro';
|
||||
import { pageHead } from '../seo';
|
||||
|
||||
export const Route = createFileRoute('/contact')({
|
||||
head: () => pageHead('/contact'),
|
||||
component: Contact,
|
||||
});
|
||||
|
||||
// Placeholder tot de echte pagina er is (noindex via sitePages)
|
||||
function Contact() {
|
||||
return (
|
||||
<PageIntro eyebrow="Neem contact op" title="Contact">
|
||||
Deze pagina is nog in de maak. Kom snel terug!
|
||||
</PageIntro>
|
||||
);
|
||||
}
|
||||
@@ -1,18 +1,14 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import Hero from '../components/Hero/Hero';
|
||||
import heroContent from '../components/Hero/heroContent';
|
||||
import heroContent from '../content/heroContent';
|
||||
import siteContent from '../content/siteContent';
|
||||
import { pageHead } from '../seo';
|
||||
|
||||
export const Route = createFileRoute('/')({
|
||||
head: () =>
|
||||
pageHead({
|
||||
title: 'Lifestyle fotograaf in Huizen | Andrea Slop Fotografie',
|
||||
description:
|
||||
"Lifestyle fotograaf in Huizen en omgeving. Ik leg je mooiste momenten vast in spontane, kleurrijke foto's. Voor loveshoots, gezins- en zwangerschapsshoots.",
|
||||
}),
|
||||
head: () => pageHead('/'),
|
||||
component: Index,
|
||||
});
|
||||
|
||||
function Index() {
|
||||
return <Hero content={heroContent} />;
|
||||
return <Hero content={heroContent} socials={siteContent.socials} />;
|
||||
}
|
||||
|
||||
+12
-11
@@ -1,16 +1,17 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { pageHead } from "../seo";
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import PageIntro from '../components/PageIntro/PageIntro';
|
||||
import { pageHead } from '../seo';
|
||||
|
||||
export const Route = createFileRoute("/over-mij")({
|
||||
head: () =>
|
||||
pageHead({
|
||||
title: "Over mij | Andrea Slop Fotografie",
|
||||
description:
|
||||
"Hi! Ik ben Andrea, lifestyle fotograaf uit Huizen. Ik leg jullie vast zoals jullie zijn: spontaan en natuurlijk, zonder ongemakkelijke poses.",
|
||||
}),
|
||||
component: About,
|
||||
export const Route = createFileRoute('/over-mij')({
|
||||
head: () => pageHead('/over-mij'),
|
||||
component: About,
|
||||
});
|
||||
|
||||
// Placeholder tot de echte pagina er is (noindex via sitePages)
|
||||
function About() {
|
||||
return <div className="p-2">Hello from About!</div>;
|
||||
return (
|
||||
<PageIntro eyebrow="Andrea Slop Fotografie" title="Over mij">
|
||||
Deze pagina is nog in de maak. Kom snel terug!
|
||||
</PageIntro>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import PageIntro from '../components/PageIntro/PageIntro';
|
||||
import { pageHead } from '../seo';
|
||||
|
||||
export const Route = createFileRoute('/portfolio')({
|
||||
head: () => pageHead('/portfolio'),
|
||||
component: Portfolio,
|
||||
});
|
||||
|
||||
// Placeholder tot de echte pagina er is (noindex via sitePages)
|
||||
function Portfolio() {
|
||||
return (
|
||||
<PageIntro eyebrow="Werk" title="Portfolio">
|
||||
Deze pagina is nog in de maak. Kom snel terug!
|
||||
</PageIntro>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import PageIntro from '../components/PageIntro/PageIntro';
|
||||
import { pageHead } from '../seo';
|
||||
|
||||
export const Route = createFileRoute('/privacyverklaring')({
|
||||
head: () => pageHead('/privacyverklaring'),
|
||||
component: PrivacyStatement,
|
||||
});
|
||||
|
||||
// Placeholder tot de echte pagina er is (noindex via sitePages)
|
||||
function PrivacyStatement() {
|
||||
return (
|
||||
<PageIntro eyebrow="Privacy" title="Privacyverklaring">
|
||||
Deze pagina is nog in de maak. Kom snel terug!
|
||||
</PageIntro>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import PageIntro from '../components/PageIntro/PageIntro';
|
||||
import { pageHead } from '../seo';
|
||||
|
||||
export const Route = createFileRoute('/soorten-fotoshoots')({
|
||||
head: () => pageHead('/soorten-fotoshoots'),
|
||||
component: PhotoshootTypes,
|
||||
});
|
||||
|
||||
// Placeholder tot de echte pagina er is (noindex via sitePages)
|
||||
function PhotoshootTypes() {
|
||||
return (
|
||||
<PageIntro eyebrow="Mogelijkheden" title="Soorten fotoshoots">
|
||||
Deze pagina is nog in de maak. Kom snel terug!
|
||||
</PageIntro>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user