Tidies the Lieve woorden layout after review
On phones the review photo is smaller and centred, the content sits at the top of each slide so a short review no longer floats in the middle, and the gap between photo and text is tighter. On desktop the photo column is about three quarters of its earlier width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,19 +7,30 @@ type TestimonialSlideProps = {
|
||||
};
|
||||
|
||||
// One review (design .testimonial): framed photo next to a large quotation
|
||||
// mark, the shoot type, the quote and the names. Stacked below `lg`.
|
||||
// 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}`}
|
||||
templateColumns={{ base: '1fr', lg: '5fr 7fr' }}
|
||||
gap="clamp(2rem, 6vw, 5.5rem)"
|
||||
alignItems="center"
|
||||
// 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%"
|
||||
>
|
||||
<Box maxW={{ base: '420px', lg: 'none' }} w="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>
|
||||
|
||||
@@ -18,9 +18,14 @@ const TestimonialCarousel = lazy(() => import('./TestimonialCarousel'));
|
||||
const TITLE_ID = 'testimonials-title';
|
||||
|
||||
// Keeps about the space of the carousel while it loads, so the page below
|
||||
// does not jump when it arrives (measured: ±920px on phones and tablets,
|
||||
// ±570px at 1024px, ±790px at 1440px)
|
||||
const PLACEHOLDER_HEIGHT = { base: '920px', lg: '570px', xl: '790px' };
|
||||
// does not jump when it arrives (measured: ±685px on phones, ±790px on
|
||||
// tablets, ±460px at 1024px, ±625px at 1440px)
|
||||
const PLACEHOLDER_HEIGHT = {
|
||||
base: '685px',
|
||||
md: '790px',
|
||||
lg: '460px',
|
||||
xl: '625px',
|
||||
};
|
||||
|
||||
type TestimonialsProps = {
|
||||
content: HomeContent['testimonials'];
|
||||
|
||||
Reference in New Issue
Block a user