Adds the shoot page layout and the shoot-type submenu

Shoot pages follow design E: breadcrumb, story blocks, process
timeline with icons, photo mosaic, FAQ, package block and booking
call to action, with per-shoot OG images. The navigation gets a
"Soorten fotoshoots" submenu (desktop panel, mobile group) built from
shootTypes, with exact current-page matching in menu, footer and
breadcrumb. A 404 under /soorten-fotoshoots/ also offers a link back
to the overview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 14:43:43 +01:00
co-authored by Claude Opus 5.5
parent e5f4348178
commit 7af2069959
84 changed files with 6090 additions and 128 deletions
+72 -1
View File
@@ -1,5 +1,13 @@
import { describe, expect, it } from 'vitest';
import { footerNav, mainNav } from './navigation';
import shootTypes from './content/shootTypes';
import {
SHOOT_TYPE_IDS,
SHOOT_TYPES_PATH,
shootIdFromPath,
shootPagePath,
} from './lib/shootPages';
import { footerNav, hasChildren, mainNav } from './navigation';
import sitePages from './sitePages';
describe('menu', () => {
it('hoofdmenu heeft de vaste volgorde', () => {
@@ -35,3 +43,66 @@ describe('menu', () => {
}
});
});
describe('submenu Soorten fotoshoots', () => {
const parent = mainNav.find((item) => item.to === SHOOT_TYPES_PATH);
it('heeft de vijf shoots als kinderen, in de volgorde van de shoottypes', () => {
expect(parent?.children).toEqual(
shootTypes.map((shoot) => ({
to: shootPagePath(shoot.id),
label: shoot.name,
})),
);
expect(parent?.children?.map((child) => child.label)).toEqual([
'Newborn',
'Zwangerschap',
'Gezin',
'Loveshoot',
'Portretten',
]);
});
it('heeft een menu-item voor elk shoottype en niets extra', () => {
expect(
parent?.children
?.map((child) => shootIdFromPath(child.to))
.toSorted(),
).toEqual([...SHOOT_TYPE_IDS].toSorted());
});
it('geeft alleen het hoofditem kinderen, op één niveau', () => {
const others = [
...mainNav.filter((item) => item !== parent),
...footerNav,
];
for (const item of others) {
expect(item.children).toBeUndefined();
}
for (const child of parent?.children ?? []) {
expect(child.children).toBeUndefined();
}
});
it('hasChildren is alleen waar voor het hoofditem', () => {
expect(mainNav.filter(hasChildren)).toEqual([parent]);
expect(hasChildren({ to: '/', label: 'Home', children: [] })).toBe(
false,
);
expect(hasChildren({ to: '/', label: 'Home' })).toBe(false);
});
it('heeft geen dubbele routes in het hoofditem en zijn kinderen', () => {
const paths = [
parent?.to,
...(parent?.children ?? []).map((c) => c.to),
];
expect(new Set(paths).size).toBe(paths.length);
});
it('linkt alleen naar geregistreerde, geïndexeerde pagina’s', () => {
for (const child of parent?.children ?? []) {
expect(sitePages[child.to]?.indexed).toBe(true);
}
});
});