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
View File
@@ -2,6 +2,7 @@ import fc from 'fast-check';
import type { ContactField, ContactValues } from '../contact/types';
import type { ContactFormEvent } from '../lib/contactFormReducer';
import type { LightboxEvent } from '../lib/lightboxReducer';
import { shootPageView, type ShootPageView } from '../lib/shootPageView';
import type { Point } from '../lib/swipeDirection';
import type {
ContentImage,
@@ -673,3 +674,74 @@ export const slugInput: fc.Arbitrary<unknown> = fc.oneof(
fc.object(),
),
);
// --- Shoot page UI (unit 2) ---
// A photo whose proportions sit around the landscape threshold of 1.2:
// exactly on it, just below and just above, and anywhere else
export const imageWithOrientation: fc.Arbitrary<ContentImage> = fc
.tuple(
contentImage,
fc.integer({ min: 20, max: 1500 }),
fc.constantFrom('exact', 'below', 'above', 'any'),
fc.integer({ min: 20, max: 4000 }),
)
.map(([base, step, kind, anyWidth]) => {
// A height divisible by 5, so that 1.2 x height is a whole number
const height = step * 5;
const edge = step * 6;
const width =
kind === 'exact'
? edge
: kind === 'below'
? edge - 1
: kind === 'above'
? edge + 1
: anyWidth;
return { ...base, width, height };
});
// Counts around the mosaic sizes, below zero included
export const mosaicCount = fc.integer({ min: -3, max: 12 });
// One step of a timeline with hostile strings
const hostileText = fc.oneof(
fc.string({ minLength: 1, maxLength: 30 }),
fc.constantFrom(
'</script>',
'<',
'>',
'&',
'x'.repeat(120),
' ',
' ',
'a<b>c&d',
),
);
// 1 to 8 timeline steps with unique ids
export const timelineSteps = fc.uniqueArray(
fc.record({ id: slug, title: hostileText, text: hostileText }),
{ selector: (step) => step.id, minLength: 1, maxLength: 8 },
);
// A shoot page view built the way the route builds it: stories 0 to 6, the
// photos present or not, the FAQ present or not, a package or none
export const shootPageViewArb: fc.Arbitrary<ShootPageView> = fc
.tuple(shootType, uniquePackages, shootPageShared, anySiteContent)
.chain(([shoot, packages, shared, site]) =>
shootPageContent(shoot.id, [
shoot.image,
...(shoot.detailImage ? [shoot.detailImage] : []),
]).map((page) => {
const view = shootPageView(shoot.id, page, {
shootTypes: [shoot],
packages,
shared,
site,
portfolioShoots: [shoot.id],
});
if (view === undefined) throw new Error('no view for a valid case');
return view;
}),
);