Adds the Lieve woorden section to the homepage
Shows client reviews one at a time with the framed photo, a large quotation mark, the shoot type and the names. Uses Chakra's carousel for paging, looping and swiping with our own controls, so visitors who prefer reduced motion get instant changes, and loads the carousel only when the section comes near the screen so the hero does not wait for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import { Blockquote, Box, 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`.
|
||||
export default function TestimonialSlide({
|
||||
testimonial,
|
||||
}: TestimonialSlideProps) {
|
||||
return (
|
||||
<Grid
|
||||
data-testid={`testimonial-${testimonial.id}`}
|
||||
templateColumns={{ base: '1fr', lg: '5fr 7fr' }}
|
||||
gap="clamp(2rem, 6vw, 5.5rem)"
|
||||
alignItems="center"
|
||||
h="100%"
|
||||
>
|
||||
<Box maxW={{ base: '420px', lg: 'none' }} w="100%">
|
||||
<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>
|
||||
<Blockquote.Root variant="plain" px={0} gap={7}>
|
||||
<Blockquote.Content
|
||||
fontFamily="heading"
|
||||
fontSize="clamp(1.35rem, 2.2vw, 1.75rem)"
|
||||
lineHeight="1.5"
|
||||
color="ink"
|
||||
>
|
||||
{testimonial.quote}
|
||||
</Blockquote.Content>
|
||||
<Blockquote.Caption
|
||||
textStyle="eyebrow"
|
||||
color="ink.soft"
|
||||
_before={{ content: '"— "' }}
|
||||
>
|
||||
{testimonial.author}
|
||||
</Blockquote.Caption>
|
||||
</Blockquote.Root>
|
||||
</Box>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user