Component boundaries, interfaces, services and dependencies for the shell: footer, back-to-top, skip link, status pages, page intro, shared RouterLink, content folder and navigation module. Includes the answered design questions and the revised site content requirement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7.1 KiB
7.1 KiB
Components — frontend-shell
Paths are relative to web/src/. Status: new, changed, moved, unchanged.
Shell
AppShell — components/AppShell.tsx (changed)
- Purpose: The frame around every page (LAYOUT.md "Shell": Header / Page content / Footer)
- Responsibilities: Renders, in order:
SkipNavLink"Direct naar de inhoud"NavigationBarSkipNavContent as="main" id="main"wrapping<Outlet />Footer(receivessiteContent)BackToTop
- It is the single place where site-wide content enters the component tree (application design Q3 = A); later this becomes a loader or API call.
- Interface: no props
NavigationBar — components/NavigationBar/ (changed)
- Purpose: Fixed header with logo, desktop menu, hamburger and mobile menu
- Changes:
- The logo becomes a link home (
RouterLink to="/", accessible name "Andrea Slop Fotografie, naar de homepage"). - The menu reads
mainNavfromnavigation.ts;navItems.tsis removed. let→const.
- The logo becomes a link home (
- Unchanged: overlay/solid behaviour, shrink on scroll,
MobileNav(Escape, scroll lock),NavLinkunderline animation NavLinkandMobileNavswitch from their ownchakra(Link)to the sharedRouterLink.
Footer — components/Footer/Footer.tsx (new, replaces components/Footer.tsx)
- Purpose: Site footer per design (FR-05)
- Responsibilities:
- Top section, as a
SimpleGrid(1, 2 or 3 columns) with three columns:- brand:
Imageoflogo-dark.pngplus the intro text - "Socials": text links, names from
socialPlatforms - "Contact": a
mailto:link
- brand:
- Bottom bar: © current year plus the
nav aria-label="Footermenu"withfooterNav - Links:
- all links are Chakra
Link variant="subtle"; internal ones useasChildaroundRouterLink - column headings use
eyebrow - external links open in a new tab with
rel="noopener noreferrer"
- all links are Chakra
- Top section, as a
- Interface:
content: SiteContent - Sub-component:
FooterColumn(heading + list), local to the Footer folder
BackToTop — components/BackToTop/BackToTop.tsx (new)
- Purpose: Fixed button bottom-right to scroll back up (FR-06)
- Responsibilities:
- Visibility: shown when scrolled past 60% of the viewport height (reuses
useScrolledPastwith a module-level threshold function). - Scrolling: smooth, or instant under reduced motion.
- Icon: Ant Design
up-outlined(offline). - While hidden: not focusable, not announced, not clickable.
- Visibility: shown when scrolled past 60% of the viewport height (reuses
- Interface: no props
Skip link and main landmark — Chakra SkipNavLink / SkipNavContent (built-in, restyled)
- Purpose: FR-07
- Responsibilities: Chakra provides the behaviour. The theme overrides the
skipNavLinkrecipe to the design (ink background, white text, square corners). - No own component.
Pages and page building blocks
PageIntro — components/PageIntro/PageIntro.tsx (new)
- Purpose: The top "Intro" block of a content page; placeholders use it now, real pages later (application design Q5 = A)
- Responsibilities: Offset below the fixed header (
pt="header"plus spacing),Container, optional eyebrow, oneh1(Heading), optional children (intro text) - Interface:
title,eyebrow?,children?
StatusPage — components/StatusPage/StatusPage.tsx (new)
- Purpose: Shared layout for 404 and error pages (application design Q6 = A)
- Responsibilities: Header offset, centred
Container,h1, short text,LinkButtonto home - Interface:
title,children(message),action?(defaults to home)
NotFound — components/StatusPage/NotFound.tsx (new)
- Purpose: FR-09. A thin wrapper around
StatusPagewith the Dutch 404 copy. - Head handling: sets its own title and
robots: noindex(mechanism detailed in Functional Design). - Wiring: registered as the root route's
notFoundComponent.
ErrorPage — components/StatusPage/ErrorPage.tsx (new)
- Purpose: FR-10. A thin wrapper around
StatusPagewith a generic Dutch message. - Behaviour: never renders error details. Logs the error with
console.error; there is no central logging (SECURITY-03 N/A). - Wiring: registered as the router's
defaultErrorComponentand the root route'serrorComponent.
Routes — routes/ (new and changed)
- New:
portfolio.tsx,soorten-fotoshoots.tsx,contact.tsx,privacyverklaring.tsx. Each hashead: pageHead(...)and aPageIntroplaceholder. - Changed:
over-mij.tsx:PageIntroplaceholder, Prettier style.index.tsx: passesheroContentandsiteContent.socialstoHero.__root.tsx: registersnotFoundComponentanderrorComponent.
Shared building blocks
RouterLink — components/RouterLink.tsx (new)
- Purpose: The single router-aware Chakra link primitive (application design Q8 = A):
chakra(Link)from TanStack Router - Used by:
NavLink,MobileNav,LinkButton,NavigationBar(logo),Footer(viaLink asChild)
LinkButton — components/LinkButton.tsx (changed)
- Uses
RouterLinkinstead of its ownchakra(Link). Otherwise unchanged.
Hero — components/Hero/ (changed)
- Changes:
Herogets a separatesocialsprop;HeroContentno longer contains socials.HeroArrowsandHeroSocialsuse the newiconControlrecipe instead of repeating the opacity/hover styles (application design Q9 = A).heroContent.ts,types.tsandsocialPlatforms.tsmove tocontent/.
Content and configuration modules
content/ — content/ (new folder; application design Q2 = A)
types.ts:SiteContent,SocialLink,HeroContent,HeroSlide,HeroCta(moved fromHero/types.ts, withoutsocialsinHeroContent)siteContent.ts: staticSiteContent(footer intro, socials, e-mail). Replaced by API data later.heroContent.ts: moved fromHero/socialPlatforms.ts: moved fromHero/. The platform registry (name + icon) is shared by Hero (icons) and Footer (names).
navigation.ts — navigation.ts (new; replaces NavigationBar/navItems.ts; application design Q4 = A)
- Purpose: Menu structures that point at routes. They are code, not content.
- Exports:
mainNav: Home, Over mij, Portfolio, Soorten fotoshoots, ContactfooterNav: Portfolio, Soorten fotoshoots, Contact, Privacyverklaring
theme.ts and recipes/ (changed)
- Remove:
globalCss.body.height: '250vh' - Recipe overrides, extending Chakra built-ins:
linkgets a new variantsubtle:ink.soft, hoveraccent.deep, no underline, focus ring.skipNavLinkis restyled to the design.
- New recipe
recipes/iconControl.ts: icon-only controls over photos. Opacity 0.6 → 1 on hover/focus-visible, with theinteraction/smoothtokens.
main.tsx (changed)
createRouter({ routeTree, scrollRestoration: true, defaultErrorComponent: ErrorPage })
Build and config (changed; detailed in NFR Requirements)
vite.config.js: security headers forserverandpreview, plus the Vitest configpackage.json:testscript, new dev dependencies;@vitejs/plugin-reactmoves to dev dependencies- Assets: delete
hero.png,typescript.svg,vite.svg