Adds the Prijzen section to the homepage

Shows the three live packages as cards with their price and what is
included. Each card links to the contact section with ?pakket=<id>, so
the contact form can preselect it. Invalid packages from the CMS are
skipped and the pakket value is only accepted when it names a package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 01:07:36 +02:00
co-authored by Claude Opus 5.5
parent 0b54a67dc4
commit 30dab1af42
32 changed files with 1250 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
import type { PricingPackage } from '../content/types.ts';
// The package id from ?pakket=, if it names one of the given packages.
// Letter case and surrounding spaces do not matter; anything else (unknown
// id, number, array, missing) is ignored. Only our own ids can come out, so
// the value from the URL is never reflected on the page (BR-PARAM-01).
export function packageFromSearch(
value: unknown,
packages: readonly PricingPackage[],
): string | undefined {
if (typeof value !== 'string') return undefined;
const wanted = value.trim().toLowerCase();
return packages.find((pkg) => pkg.id === wanted)?.id;
}