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>
161 lines
6.5 KiB
TypeScript
161 lines
6.5 KiB
TypeScript
import {
|
|
Box,
|
|
chakra,
|
|
Container,
|
|
Flex,
|
|
Grid,
|
|
Image,
|
|
Text,
|
|
VisuallyHidden,
|
|
} from '@chakra-ui/react';
|
|
import socialPlatforms from '@/content/socialPlatforms';
|
|
import type { SiteContent } from '@/content/types';
|
|
import { copyrightLine } from '@/lib/copyrightLine';
|
|
import { emailAddress } from '@/lib/emailAddress';
|
|
import { visibleSocials } from '@/lib/visibleSocials';
|
|
import { footerNav } from '@/navigation';
|
|
import RouterLink from '../RouterLink';
|
|
import FooterColumn from './FooterColumn';
|
|
import FooterLink from './FooterLink';
|
|
|
|
// Images
|
|
import logoDark from '../../assets/logo-dark.png';
|
|
|
|
type FooterProps = {
|
|
content: SiteContent;
|
|
};
|
|
|
|
// Footer uit het design (FR-05): merk, socials en contact, met daaronder de
|
|
// copyright en het footermenu. Een lege kolom valt weg (BR-FOOT-01).
|
|
export default function Footer({ content }: FooterProps) {
|
|
const socials = visibleSocials(content.socials);
|
|
// Pas hier samengevoegd, zodat het adres nergens letterlijk staat
|
|
const email = emailAddress(content.email);
|
|
const year = new Date().getFullYear();
|
|
|
|
return (
|
|
<Box
|
|
as="footer"
|
|
bg="paper.alt"
|
|
borderTopWidth="1px"
|
|
borderTopColor="line"
|
|
pt="clamp(3.5rem, 7vw, 6rem)"
|
|
>
|
|
<Container>
|
|
<Grid
|
|
templateColumns={{
|
|
base: '1fr',
|
|
md: 'repeat(2, 1fr)',
|
|
lg: '1.2fr 1fr 1fr',
|
|
}}
|
|
gap="clamp(2rem, 5vw, 4rem)"
|
|
pb="clamp(2.5rem, 5vw, 4rem)"
|
|
>
|
|
{/* Merk: op mobiel gecentreerd onder elkaar, vanaf tablet
|
|
het logo met de tekst ernaast */}
|
|
<Flex
|
|
direction={{ base: 'column', md: 'row' }}
|
|
alignItems="center"
|
|
alignSelf="start"
|
|
gap={5}
|
|
textAlign={{ base: 'center', md: 'start' }}
|
|
>
|
|
<Image
|
|
src={logoDark}
|
|
alt="Andrea Slop Fotografie"
|
|
htmlWidth={500}
|
|
htmlHeight={500}
|
|
w={{ base: '150px', md: '110px' }}
|
|
h="auto"
|
|
flexShrink={0}
|
|
loading="lazy"
|
|
/>
|
|
{/* Regelafbrekingen uit de content blijven staan */}
|
|
<Text color="ink.soft" whiteSpace="pre-line">
|
|
{content.footerIntro}
|
|
</Text>
|
|
</Flex>
|
|
|
|
{socials.length > 0 && (
|
|
<FooterColumn title="Socials">
|
|
{socials.map((social) => (
|
|
<chakra.li key={social.platform}>
|
|
<FooterLink
|
|
href={social.href}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
data-testid={`footer-social-${social.platform}`}
|
|
>
|
|
{/* Spatie buiten de verborgen tekst, anders
|
|
valt hij weg uit de voorgelezen naam */}
|
|
{socialPlatforms[social.platform].name}{' '}
|
|
<VisuallyHidden>
|
|
(opent in nieuw tabblad)
|
|
</VisuallyHidden>
|
|
</FooterLink>
|
|
</chakra.li>
|
|
))}
|
|
</FooterColumn>
|
|
)}
|
|
|
|
{email && (
|
|
<FooterColumn title="Contact">
|
|
<chakra.li>
|
|
<FooterLink
|
|
href={`mailto:${email}`}
|
|
data-testid="footer-email-link"
|
|
>
|
|
{email}
|
|
</FooterLink>
|
|
</chakra.li>
|
|
</FooterColumn>
|
|
)}
|
|
</Grid>
|
|
|
|
<Flex
|
|
direction={{ base: 'column', md: 'row' }}
|
|
alignItems="center"
|
|
justifyContent="space-between"
|
|
gap={{ base: 2, md: 6 }}
|
|
py={6}
|
|
borderTopWidth="1px"
|
|
borderTopColor="line"
|
|
textAlign={{ base: 'center', md: 'start' }}
|
|
>
|
|
<Text fontSize="sm" color="ink.soft">
|
|
{copyrightLine(year)}
|
|
</Text>
|
|
<chakra.nav aria-label="Footermenu">
|
|
<Flex
|
|
as="ul"
|
|
listStyleType="none"
|
|
wrap="wrap"
|
|
justifyContent="center"
|
|
columnGap={6}
|
|
>
|
|
{footerNav.map((item) => (
|
|
<chakra.li key={item.to}>
|
|
<FooterLink asChild>
|
|
<RouterLink
|
|
to={item.to}
|
|
// Exact, also with a query: on a shoot page the
|
|
// overview link is not the current page
|
|
activeOptions={{
|
|
exact: true,
|
|
includeSearch: false,
|
|
}}
|
|
data-testid={`footer-nav-${item.to.slice(1)}`}
|
|
>
|
|
{item.label}
|
|
</RouterLink>
|
|
</FooterLink>
|
|
</chakra.li>
|
|
))}
|
|
</Flex>
|
|
</chakra.nav>
|
|
</Flex>
|
|
</Container>
|
|
</Box>
|
|
);
|
|
}
|