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:
2026-10-20 01:52:41 +02:00
co-authored by Claude Opus 5.5
parent 30dab1af42
commit cb6a9b07f9
30 changed files with 1307 additions and 6 deletions
+43
View File
@@ -3,6 +3,7 @@ import type {
EmailAddress,
PricingPackage,
SocialLink,
Testimonial,
} from '../content/types';
// Gedeelde generators voor de property-based tests (fast-check)
@@ -95,3 +96,45 @@ export const anyPackage: fc.Arbitrary<PricingPackage> = fc.oneof(
),
}),
);
const image = fc.record({
src: fc.webPath().map((path) => `/assets${path}.jpg`),
alt: fc.string({ maxLength: 40 }),
width: fc.integer({ min: 1, max: 4000 }),
height: fc.integer({ min: 1, max: 4000 }),
});
// A review that meets every invariant
export const testimonial: fc.Arbitrary<Testimonial> = fc.record({
id: fc.oneof(
fc.constantFrom('majella-mark', 'demi-kevin'),
fc.stringMatching(/^[a-z0-9-]{1,16}$/),
),
shoot: nonBlank,
quote: nonBlank,
author: nonBlank,
image,
});
// Valid reviews with unique ids
export const uniqueTestimonials = fc.uniqueArray(testimonial, {
selector: (item) => item.id,
maxLength: 6,
});
// Valid and broken reviews mixed, as a CMS might deliver them
export const anyTestimonial: fc.Arbitrary<Testimonial> = fc.oneof(
testimonial,
fc.record({
id: fc.oneof(fc.constantFrom('majella-mark', '', ' '), fc.string()),
shoot: fc.oneof(nonBlank, fc.constantFrom('', ' ')),
quote: fc.oneof(nonBlank, fc.constantFrom('', ' ')),
author: fc.oneof(nonBlank, fc.constantFrom('', ' ')),
image: fc.record({
src: fc.oneof(fc.constant(''), fc.constant('/a.jpg')),
alt: fc.string({ maxLength: 10 }),
width: fc.integer({ min: -1, max: 10 }),
height: fc.integer({ min: -1, max: 10 }),
}),
}),
);