Adds the Contact section to the homepage

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>
This commit is contained in:
2026-10-21 00:36:43 +02:00
co-authored by Claude Opus 5.5
parent 0b8e8d5f8b
commit 0fce403ebc
46 changed files with 2505 additions and 16 deletions
+32
View File
@@ -0,0 +1,32 @@
import fc from 'fast-check';
import { describe, expect, it } from 'vitest';
import packages from '../content/packages';
import { anyPackage } from '../test/arbitraries';
import { OTHER_SHOOT, shootOptions } from './shootOptions';
import { visiblePackages } from './visiblePackages';
describe('shootOptions', () => {
it('lists the live packages, then Overig', () => {
expect(shootOptions(packages)).toEqual([
{ value: 'zwangerschap', label: 'Zwangerschap' },
{ value: 'newborn', label: 'Newborn' },
{ value: 'gezin', label: 'Gezin' },
{ value: 'overig', label: 'Overig' },
]);
});
it('is the shown packages in order followed by Overig (invariant)', () => {
fc.assert(
fc.property(fc.array(anyPackage), (input) => {
const options = shootOptions(input);
expect(options.at(-1)).toEqual(OTHER_SHOOT);
expect(options.slice(0, -1)).toEqual(
visiblePackages(input).map((pkg) => ({
value: pkg.id,
label: pkg.name,
})),
);
}),
);
});
});