Packages and banners from the CMS, host injection, translation files and the contact form #19

Merged
Sluijsens merged 44 commits from feature/asf-packages-cms into master 2026-11-16 14:17:14 +01:00
6 changed files with 85 additions and 26 deletions
Showing only changes of commit 8df4e5d2f2 - Show all commits
@@ -7,6 +7,7 @@ import Reveal from '@/components/Reveal/Reveal';
import SectionHeading from '@/components/SectionHeading/SectionHeading';
import type { HomeContent } from '@/content/types';
import useInView from '@/hooks/useInView';
import { t } from '@/i18n';
const TITLE_ID = 'intro-title';
@@ -45,7 +46,7 @@ export default function IntroGallery({ content }: IntroGalleryProps) {
<chakra.ul
ref={ref}
listStyleType="none"
aria-label="Foto's"
aria-label={t('home.intro.photosLabel')}
tabIndex={scrollable ? 0 : undefined}
data-testid="intro-gallery-photos"
display={{ base: 'flex', sm: 'grid' }}
+17 -20
View File
@@ -1,3 +1,4 @@
import { messages, t, tList } from '../i18n/index.ts';
import type { ContentImage, HomeContent } from './types';
// Images
@@ -12,25 +13,25 @@ import andrea from '../assets/home/andrea.jpg';
export const introPhotos: ContentImage[] = [
{
src: intro1,
alt: 'Babyhandje in de hand van de moeder, op een gebreid dekentje',
alt: messages.home.intro.photos[0].alt,
width: 800,
height: 1200,
},
{
src: intro2,
alt: 'Moeder drukt haar pasgeboren baby in een gebreid truitje tegen zich aan',
alt: messages.home.intro.photos[1].alt,
width: 800,
height: 1200,
},
{
src: intro3,
alt: 'Zwangere vrouw op blote voeten in het zand bij zonsondergang',
alt: messages.home.intro.photos[2].alt,
width: 800,
height: 1200,
},
{
src: intro4,
alt: 'Aanstaande vader omarmt zijn zwangere partner in de duinen',
alt: messages.home.intro.photos[3].alt,
width: 800,
height: 1200,
},
@@ -40,36 +41,32 @@ export const introPhotos: ContentImage[] = [
// will then deliver this object.
const homeContent: HomeContent = {
intro: {
title: 'Lifestyle fotografie',
lead: 'Jouw favoriete momenten, vastgelegd op een natuurlijke en ongedwongen manier.',
title: t('home.intro.title'),
lead: t('home.intro.lead'),
photos: introPhotos,
},
about: {
eyebrow: 'Over mij',
title: 'Lifestyle fotograaf met een passie voor storytelling',
paragraphs: [
'Hi! Ik ben Andrea, lifestyle fotograaf uit Huizen. Leuk dat je een kijkje neemt op mijn website!',
"Foto's vertellen verhalen. Ze brengen je terug naar je favoriete momenten. Met mijn camera leg ik momenten vast die je voor altijd bij je houdt.",
'Mijn stijl is natuurlijk en ongedwongen. Ik leg jullie vast zoals jullie zijn. Geen ongemakkelijke poses maar spontane momenten.',
],
eyebrow: t('home.about.eyebrow'),
title: t('home.about.title'),
paragraphs: [...tList('home.about.paragraphs')],
image: {
src: andrea,
alt: 'Andrea Slop met haar camera, glimlachend over haar schouder',
alt: t('home.about.imageAlt'),
width: 1200,
height: 800,
},
link: { label: 'Lees mijn verhaal', to: '/over-mij' },
link: { label: t('home.about.linkLabel'), to: '/over-mij' },
},
pricing: {
title: 'Prijzen',
lead: 'Pakketten',
title: t('home.pricing.title'),
lead: t('home.pricing.lead'),
},
testimonials: {
title: 'Lieve woorden',
title: t('home.testimonials.title'),
},
contact: {
title: 'Contact',
lead: 'Wil je meer informatie ontvangen? Neem gerust contact met mij op.',
title: t('home.contact.title'),
lead: t('home.contact.lead'),
},
};
+50 -1
View File
@@ -1 +1,50 @@
{}
{
"intro": {
"title": "Lifestyle fotografie",
"lead": "Jouw favoriete momenten, vastgelegd op een natuurlijke en ongedwongen manier.",
"photosLabel": "Foto's",
"photos": [
{
"alt": "Babyhandje in de hand van de moeder, op een gebreid dekentje"
},
{
"alt": "Moeder drukt haar pasgeboren baby in een gebreid truitje tegen zich aan"
},
{
"alt": "Zwangere vrouw op blote voeten in het zand bij zonsondergang"
},
{
"alt": "Aanstaande vader omarmt zijn zwangere partner in de duinen"
}
]
},
"about": {
"eyebrow": "Over mij",
"title": "Lifestyle fotograaf met een passie voor storytelling",
"paragraphs": [
"Hi! Ik ben Andrea, lifestyle fotograaf uit Huizen. Leuk dat je een kijkje neemt op mijn website!",
"Foto's vertellen verhalen. Ze brengen je terug naar je favoriete momenten. Met mijn camera leg ik momenten vast die je voor altijd bij je houdt.",
"Mijn stijl is natuurlijk en ongedwongen. Ik leg jullie vast zoals jullie zijn. Geen ongemakkelijke poses maar spontane momenten."
],
"imageAlt": "Andrea Slop met haar camera, glimlachend over haar schouder",
"linkLabel": "Lees mijn verhaal"
},
"pricing": {
"title": "Prijzen",
"lead": "Pakketten"
},
"testimonials": {
"title": "Lieve woorden"
},
"contact": {
"title": "Contact",
"lead": "Wil je meer informatie ontvangen? Neem gerust contact met mij op."
},
"booking": {
"book": "Boek {name}",
"bookShoot": "Boek je shoot",
"hiddenName": ": {name}",
"readMore": "Lees meer over de {shootLabel}",
"otherShoot": "Overig"
}
}
+7 -2
View File
@@ -1,3 +1,5 @@
import { t } from '../i18n/index.ts';
// Longest package name that still fits as "Boek <name>" on one line in the
// card's button down to a 320px phone (BR-BOOK-02, BR-BOOK-03)
export const BOOK_LABEL_MAX_NAME = 14;
@@ -13,7 +15,10 @@ export interface BookLabel {
// screen readers, so every link still names its package.
export function bookLabel(name: string): BookLabel {
if (name.length <= BOOK_LABEL_MAX_NAME) {
return { visible: `Boek ${name}` };
return { visible: t('home.booking.book', { name }) };
}
return { visible: 'Boek je shoot', hidden: `: ${name}` };
return {
visible: t('home.booking.bookShoot'),
hidden: t('home.booking.hiddenName', { name }),
};
}
+4 -1
View File
@@ -1,7 +1,10 @@
import { t } from '../i18n/index.ts';
import type { ShootType } from '../content/types.ts';
// The text of the link from the overview to a shoot page (FR-ST-09). It
// differs per shoot, so no aria-label is needed to tell the links apart.
export function readMoreLabel(shoot: ShootType): string {
return `Lees meer over de ${shoot.shootLabel.toLowerCase()}`;
return t('home.booking.readMore', {
shootLabel: shoot.shootLabel.toLowerCase(),
});
}
+5 -1
View File
@@ -1,3 +1,4 @@
import { t } from '../i18n/index.ts';
import type { SubjectOption } from '../cms-client/contact/index.ts';
import type { PricingPackage } from '../content/types.ts';
import { visiblePackages } from './visiblePackages.ts';
@@ -5,7 +6,10 @@ import { visiblePackages } from './visiblePackages.ts';
// What is sent as the message subject is the readable label, so mails and
// the CMS message list are readable (decision Bryan, 2026-11-10). The label
// of "other" is fixed per site.
export const OTHER_SHOOT: SubjectOption = { value: 'Overig', label: 'Overig' };
export const OTHER_SHOOT: SubjectOption = {
value: t('home.booking.otherShoot'),
label: t('home.booking.otherShoot'),
};
// The choices of "In welke shoot heb je interesse?": the shown packages in
// their order, then Overig. Same source as the price cards, so the two never