Workspace detection, a reverse engineering delta, requirements with the approved layout mockups, the execution plan and the application design for the Contact page, plus the code generation plan and summary of the webPage helper. Corrects the contact payload in the shared API notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.9 KiB
3.9 KiB
Components — Contact Page
Decisions: application-design-plan.md (Q1–Q4 = A). Requirements: requirements.md.
New shared components (web/src/components/)
ContactPanel (unit 2)
- Purpose: the contact form as a ready-to-place block, used by the homepage section and the contact page.
- Responsibilities: the "Binnenkort" gate (
ContactFormGate); loading the form either with the page (eager) or when it comes near the screen (lazy, with the reserved placeholder height); the shoot options from the packages; the preselect from apakketvalue and the mail subject that follows from it. Q1 = A - Not its job: the section heading, removing
?pakket=from the address bar, scrolling and focus — those stay with the page.
ContactDetails (unit 2)
- Purpose: the "Direct contact" card: a small h2 in eyebrow style and a list of channels (icon + link text).
- Responsibilities: show e-mail (assembled in the browser, left out when invalid), then the valid social links (
visibleSocials), each with the platform icon and its label (or the platform name when there is no label, Q3 = A); render nothing when no channel is valid; optional small round portrait next to the heading. - Interface: plain props (data in, no fetching); the heading id comes from the caller so the card can appear twice on one page without duplicate ids. Q2 = A
Changed shared components
ContactForm
- Privacy line under the submit button ("Lees in de privacyverklaring wat ik met je gegevens doe.", link to
/privacyverklaring). - Thank-you message takes the reply time from a prop instead of a hard-coded "1-2 werkdagen".
home/ContactSection
- Keeps the heading, the
?pakket=clean-up, scroll to#contactand focus move; delegates gate, form, options, preselect and mail subject toContactPanelwithload="lazy". Output and behaviour unchanged apart from the privacy line.
New page components (web/src/components/contact/)
ContactAside (unit 3)
- Purpose: the right column on wide screens: the contact photo (4:5) with a card overlapping its bottom edge. Q4 = A
- Responsibilities: photo and overlap layout only; the card is passed in as
children(the page passesContactDetails). Hidden on narrow screens (and the photo not downloaded there — mechanism in Functional Design unit 3).
Route
routes/contact.tsx (unit 3)
- Validates the
pakketsearch parameter (text only), rendersPageIntro, then onePageSection(flushTop) with: the narrow-screenContactDetails(with portrait), the form column (visually hidden h2 +ContactPanel load="eager") andContactAsidewith the wide-screenContactDetails. Removes?pakket=from the address bar after it has been applied, without a focus move. Head:pageHead('/contact')plus theContactPageJSON-LD.
SEO (web/src/seo.ts, unit 1 and 3)
webPage()+WebPageType(unit 1): generic page structured data, shared with portfolio-page and soorten-fotoshoots-page.aboutPage()(unit 1): rebuilt onwebPage(), identical output.contactPage()(unit 3):ContactPageabout the business.
Content (web/src/content/)
types.ts:SocialLink.label?(unit 2),SiteContent.contactForm.replyTime(unit 2),ContactPageContent(unit 3).siteContent.ts: labels for Instagram and Facebook,replyTime: '1-2 werkdagen'(unit 2).contactContent.ts(unit 3): page head, form and card headings, photo and portrait.aboutContent.ts(unit 3): "neem contact op" and "Boek je shoot" →/contact.
Reused unchanged
PageIntro, PageSection, Reveal, DeferredImage, Eyebrow, ContactFormGate, RouterLink, Link (underline), linkButton recipe, socialPlatforms, emailAddress, mailtoLink/mailSubject, visibleSocials, shootOptions, packageFromSearch, visiblePackages, contactFormReducer.