Adds the contact form with the live fields, validation and browser-side anti-spam, behind a coming-soon notice with a mail button until the API exists. A "Boek" link on a price card selects its package, tidies the URL and moves focus to the form. The form loads only when it comes near the screen, so the hero does not wait for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74 lines
2.9 KiB
TypeScript
74 lines
2.9 KiB
TypeScript
import { Box, chakra, Grid, Text } from '@chakra-ui/react';
|
|
import FramedImage from '@/components/FramedImage/FramedImage';
|
|
import type { Testimonial } from '@/content/types';
|
|
|
|
type TestimonialSlideProps = {
|
|
testimonial: Testimonial;
|
|
};
|
|
|
|
// One review (design .testimonial): framed photo next to a large quotation
|
|
// mark, the shoot type, the quote and the names. Stacked below `lg`, with
|
|
// the photo centred.
|
|
export default function TestimonialSlide({
|
|
testimonial,
|
|
}: TestimonialSlideProps) {
|
|
return (
|
|
<Grid
|
|
data-testid={`testimonial-${testimonial.id}`}
|
|
// 5:11 makes the photo column about 75% of the design's 5:7
|
|
templateColumns={{ base: '1fr', lg: '5fr 11fr' }}
|
|
gap={{ base: 5, lg: 'clamp(2rem, 6vw, 5.5rem)' }}
|
|
// Stacked, all slides share the tallest one's height: keep the
|
|
// content at the top, or a short review floats in the middle
|
|
alignContent={{ base: 'start', lg: 'center' }}
|
|
alignItems={{ base: 'start', lg: 'center' }}
|
|
h="100%"
|
|
>
|
|
{/* Kept small and centred on phones and tablets, so the photo
|
|
does not fill the screen above the quote */}
|
|
<Box
|
|
maxW={{ base: '180px', md: '320px', lg: 'none' }}
|
|
w="100%"
|
|
mx={{ base: 'auto', lg: 0 }}
|
|
>
|
|
<FramedImage image={testimonial.image} aspectRatio="4 / 5" />
|
|
</Box>
|
|
<Box>
|
|
<Text
|
|
aria-hidden="true"
|
|
fontFamily="heading"
|
|
fontSize="clamp(5rem, 9vw, 7.5rem)"
|
|
lineHeight="1"
|
|
h="0.55em"
|
|
color="accent"
|
|
>
|
|
“
|
|
</Text>
|
|
{/* accent.deep instead of the design's accent: meets 4.5:1 (NFR-HP-01) */}
|
|
<Text textStyle="eyebrow" color="accent.deep" mb={4}>
|
|
{testimonial.shoot}
|
|
</Text>
|
|
{/* Plain elements, not Chakra's Blockquote: its slot recipe
|
|
would pull shared code into the chunk the hero waits for */}
|
|
<chakra.figure display="flex" flexDirection="column" gap={7}>
|
|
<chakra.blockquote
|
|
fontFamily="heading"
|
|
fontSize="clamp(1.35rem, 2.2vw, 1.75rem)"
|
|
lineHeight="1.5"
|
|
color="ink"
|
|
>
|
|
{testimonial.quote}
|
|
</chakra.blockquote>
|
|
<chakra.figcaption
|
|
textStyle="eyebrow"
|
|
color="ink.soft"
|
|
_before={{ content: '"— "' }}
|
|
>
|
|
{testimonial.author}
|
|
</chakra.figcaption>
|
|
</chakra.figure>
|
|
</Box>
|
|
</Grid>
|
|
);
|
|
}
|