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:
@@ -0,0 +1,80 @@
|
||||
import { Fragment } from 'react';
|
||||
import { Box, Flex, Text } from '@chakra-ui/react';
|
||||
import RouterLink from '@/components/RouterLink';
|
||||
import type { BreadcrumbItem } from '@/lib/shootPageView';
|
||||
|
||||
type BreadcrumbProps = {
|
||||
// The name of the navigation landmark, e.g. "Kruimelpad"
|
||||
label: string;
|
||||
// The last item is the page itself
|
||||
items: readonly BreadcrumbItem[];
|
||||
'data-testid'?: string;
|
||||
};
|
||||
|
||||
// The path to the current page (BR-SP-01..04): links for every item but the
|
||||
// last, which is plain text marked as the current page. The links match
|
||||
// exactly, so only the page itself can ever be "current".
|
||||
export default function Breadcrumb({
|
||||
label,
|
||||
items,
|
||||
'data-testid': testId,
|
||||
}: BreadcrumbProps) {
|
||||
if (items.length === 0) return null;
|
||||
|
||||
return (
|
||||
<Box as="nav" aria-label={label} data-testid={testId}>
|
||||
<Flex
|
||||
as="ol"
|
||||
wrap="wrap"
|
||||
justify="center"
|
||||
align="center"
|
||||
gap={2}
|
||||
fontSize="0.875rem"
|
||||
color="ink.soft"
|
||||
listStyle="none"
|
||||
m={0}
|
||||
p={0}
|
||||
>
|
||||
{items.map((item, index) => {
|
||||
const last = index === items.length - 1;
|
||||
// The list is static, so the index is a stable key
|
||||
return (
|
||||
<Fragment key={index}>
|
||||
<Box as="li">
|
||||
{last ? (
|
||||
<Text
|
||||
as="span"
|
||||
aria-current="page"
|
||||
color="ink"
|
||||
minH="2.75rem"
|
||||
display="inline-flex"
|
||||
alignItems="center"
|
||||
>
|
||||
{item.label}
|
||||
</Text>
|
||||
) : (
|
||||
<RouterLink
|
||||
to={item.to}
|
||||
activeOptions={{ exact: true }}
|
||||
color="accent.deep"
|
||||
textDecoration="underline"
|
||||
minH="2.75rem"
|
||||
display="inline-flex"
|
||||
alignItems="center"
|
||||
>
|
||||
{item.label}
|
||||
</RouterLink>
|
||||
)}
|
||||
</Box>
|
||||
{!last && (
|
||||
<Box as="li" aria-hidden="true">
|
||||
/
|
||||
</Box>
|
||||
)}
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
</Flex>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user