Functional design, code generation plan and summary of the contact page, the updated LAYOUT.md diagram and the extended link requirement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.8 KiB
3.8 KiB
Code Summary — Unit 3: Contact page
Created
web/src/routes/contact.tsx— replaces the placeholder: page head, the narrow card, the form column (visually hidden h2 +ContactPanel load="eager"),ContactAsidewith the wide card;?pakket=validation and clean-up; head withContactPageJSON-LDweb/src/components/contact/ContactAside/ContactAside.tsx(+ test) —picturewith a(min-width: 64em)source and a transparentdata:fallback, priority, intrinsic size; card slot over the bottom of the photoweb/src/content/contactContent.ts— head texts (intro with{reactietermijn}), headings, photo and portraitweb/src/lib/withReplyTime.ts(+ test) — fills in the reply timeweb/src/assets/contact/contact.jpg(840×1050, 80 KB),contact-portret.jpg(144×144, 5 KB),web/public/og-contact.jpg(1200×630, 60 KB) — crops of the original live photo (1600×1067), approved by the owner (portrait zoomed out, variant B)
Modified
web/src/content/types.ts—ContactPageContentweb/src/seo.ts(+ test) —contactPage()web/src/sitePages.ts—/contact: title, description,indexed: true,ogImageweb/lighthouserc.cjs—/contactindexed (standard 0.9 mobile budget, owner's choice)web/src/sitemap.test.ts— expects/contactweb/src/content/aboutContent.ts,web/src/app.test.tsx,web/src/components/about/AboutIntro/AboutIntro.test.tsx— Over mij links to/contact; contact route testsweb/src/components/ContactDetails/ContactDetails.tsx— filled mail icon, matching the filled platform iconsweb/src/theme.ts,web/src/recipes/linkButton.ts— accent button onaccent.deep(white ≈ 5.7:1), hover on newaccent.deeper(#475042)LAYOUT.md— Contact: Intro; Contact form beside Photo + contact detailsweb/src/lib/shootLinks.ts(+ test),web/src/content/shootTypesPageContent.ts,web/src/components/shoots/ShootBlock/ShootBlock.test.tsx— Soorten fotoshoots: "Stuur een berichtje" →/contact?pakket=<id>(or/contact), "Boek je shoot" →/contact(FR-CP-09 extension, owner's request)
Findings fixed during verification
chakra.imgtreatedwidth/heightas CSS props, so the intrinsic size was missing; now ChakraImagewithhtmlWidth/htmlHeight.- A property test of
withReplyTimepassed by chance: half placeholders around a real one could form a new one; generator restricted to brace-free text. - Accent button contrast (site-wide, pre-existing): white on
#7f8b76= 3.58:1. Lighthouse only caught it here because the button is in the first screen; elsewhereRevealkeeps it at opacity 0 during the measurement, and jsdom computes no colours. Fixed in the recipe (owner's choice: darker green).
Verification
pnpm test: 71 files, 367 tests passed (seed 1926155072; after the Soorten link change again 367/367, seed 1607463937); lint, format, build clean. Lighthouse not re-run for the link change (href-only change, no effect on performance or accessibility).- Production build in Chrome: no request for
contact.jpgup to 1023 px (LCP = intro text); one request with priority High from 1024 px (LCP = the photo). Screenshots at 390 and 1280 px match mockup 1a. - Lighthouse desktop: all pass;
/contact0.99 / 1 / 1 / 1. - Lighthouse mobile: accessibility, best practices and SEO pass everywhere. Performance fails on two pages:
/0.78–0.80 vs 0.8 — pre-existing: identical on the unit 2 build (3 runs each); owner chose to handle it separately (recorded as an open follow-up)./contact0.88 / 0.90 / 0.88 vs 0.9 — same client-rendering cause as the photo pages (text appears after the JavaScript); owner chose to keep 0.9.- In CI, performance is report-only (D6), so these do not block a merge; locally
pnpm checkfails on them.