Refreshes the reverse engineering docs after the homepage sections and records the requirements, execution plan and application design for the Over mij page: live texts in the design's structure, an indexed page with its own structured data and preview image, and shared building blocks (PageSection, MediaText, Eyebrow) reused by the homepage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.0 KiB
4.0 KiB
Component Methods — Over mij Page
Props are TypeScript types; components are default-exported function components, as elsewhere in web/src/components/. Business rules (structured data contents, inline link model) are detailed in Functional Design for unit 2.
Shared building blocks
PageSection (renamed from HomeSection)
type PageSectionProps = {
labelledBy: string; // id of the heading that names the section
id?: string; // anchor target, gets the header offset
tone?: 'paper' | 'alt';
width?: 'default' | 'narrow' | 'full';
spacing?: 'default' | 'tight' | 'flushTop'; // flushTop: new
'data-testid'?: string;
children: ReactNode;
};
MediaText
type MediaTextProps = {
image: ContentImage;
aspectRatio: string; // crop of the photo, e.g. '4 / 3'
'data-testid'?: string;
children: ReactNode; // the text column
};
- Renders the grid; the photo column is
FramedImage, each column wrapped inReveal. - A
reverse(photo on the right) option is not added: no page needs it yet (design.about--reverseis unused).
Eyebrow
type EyebrowProps = Omit<TextProps, 'as'> & {
as?: 'p' | 'span' | 'h2' | 'h3' | 'h4'; // default 'p'
children: ReactNode;
};
- Applies
textStyle="eyebrow",color="accent.deep",mb={4}; otherTextProps(e.g.id,mb) pass through, so a heading can be referenced byaria-labelledby. - Heading levels do not get the heading recipe's font family/size: the label style wins on purpose (FR-OM-03).
PhotoDuo
type PhotoDuoProps = {
photos: [ContentImage, ContentImage];
label: string; // accessible name of the list, e.g. "Foto's"
'data-testid'?: string;
};
SectionHeading, PageIntro, ContactFormGate, TestimonialSlide
- Props unchanged; internally
Eyebrowreplaces the inlineTextlabel.
Page-specific components (components/about/)
AboutIntro
type AboutIntroProps = { content: AboutPageContent['intro'] };
StorySection
type StorySectionProps = {
content: AboutPageContent['story']; // one story block: title + paragraphs
titleId: string; // id of the h3, for aria-labelledby
tone?: 'paper' | 'alt';
children?: ReactNode; // below the text, e.g. the booking button
'data-testid'?: string;
};
RichParagraph
type RichParagraphProps = { paragraph: RichText }; // RichText defined in Functional Design
Route
export const Route = createFileRoute('/over-mij')({
head: () => aboutHead(aboutContent, siteContent), // or inline: pageHead + script
component: About,
});
SEO functions (seo.ts, pure, 100% coverage)
export const businessId: string; // e.g. `${siteUrl}/#business`
export function professionalService(content: SiteContent); // now includes '@id': businessId
export function person(content: SiteContent, image: OgImage): PersonJsonLd;
export function aboutPage(path: RoutePath, content: SiteContent): AboutPageJsonLd;
export function structuredDataScript(data: unknown): { type: 'application/ld+json'; children: string };
structuredDataScriptwraps the existingjsonLdScriptsositeHeadand the about page build the script tag the same way.- Exact fields and the rules behind them (
sameAs, image, no e-mail,@idlinks) are specified in Functional Design (unit 2).
Content types (content/types.ts)
export interface AboutPageContent {
head: { eyebrow: string; title: string };
intro: { eyebrow: string; title: string; paragraphs: RichText[]; image: ContentImage };
background: { title: string; paragraphs: string[] };
photos: [ContentImage, ContentImage];
personal: { title: string; paragraphs: string[] };
booking: { label: string; to: /* route + optional hash, see Functional Design */ };
}
RichTextand the link target type are defined in Functional Design.