Adds the Over mij section to the homepage

Adds the introduction block with a framed photo of Andrea and a link to
the about page. Brings in FramedImage and an underline link variant for
the later blocks, and narrows the load margin of deferred photos so
nothing below the hero starts loading before the hero has painted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 00:31:10 +02:00
co-authored by Claude Opus 5.5
parent 3e530df0af
commit 0b54a67dc4
20 changed files with 403 additions and 14 deletions
+1 -1
View File
@@ -4,4 +4,4 @@
|------|------|--------|--------|---------------------|---------------|
| Bug | [hero-carousel-announce-and-pause](bugs/hero-carousel-announce-and-pause/bug-fix.md) | ✅ Complete | fix/hero-carousel-announce-and-pause | web/src/components/Hero (Hero, HeroArrows, useHeroSlider) | 2026-10-19 |
| Feature | frontend-shell | ✅ Complete | feature/frontend-shell | web/src (AppShell, NavigationBar, Footer, Hero socials, new BackToTop/SkipLink/404/error pages, routes, theme.ts, main.tsx), web/vite.config.js, web/package.json | 2026-10-14 |
| Feature | homepage-sections | 🔵 Inception | feature/homepage-sections | web/src/routes/index.tsx, new homepage section components, web/src/content (types + static content), possibly web/config/securityHeaders.ts (contact form) | 2026-10-19 |
| Feature | homepage-sections | 🟢 Construction | feature/homepage-sections | web/src/routes/index.tsx, new homepage section components, web/src/content (types + static content), possibly web/config/securityHeaders.ts (contact form) | 2026-10-19 |
@@ -5,8 +5,8 @@
- **Feature Slug**: homepage-sections
- **Project Type**: Brownfield
- **Start Date**: 2026-10-19T19:19:38Z
- **Current Stage**: CONSTRUCTION - Unit 1 Lifestyle fotografie - Code Generation (awaiting approval)
- **Branch**: feature/homepage-sections (to be created before Code Generation)
- **Current Stage**: CONSTRUCTION - Unit 2 Over mij - Code Generation (awaiting approval)
- **Branch**: feature/homepage-sections
## Workspace State
- **Existing Code**: Yes
@@ -66,7 +66,7 @@
- [ ] NFR Requirements - SKIP
- [ ] NFR Design - SKIP
- [ ] Infrastructure Design - SKIP
- [ ] Code Generation - EXECUTE (per unit)
- [ ] Code Generation - EXECUTE (per unit) — Unit 1 Lifestyle fotografie ✅ (approved)
- [ ] Build and Test - EXECUTE
### 🟡 OPERATIONS PHASE
@@ -74,8 +74,8 @@
## Current Status
- **Lifecycle Phase**: CONSTRUCTION
- **Current Stage**: Unit 1 Lifestyle fotografie — Code Generation complete, awaiting approval
- **Next Stage**: CONSTRUCTION - Unit 1 Code Generation
- **Current Stage**: Unit 2 Over mij — Code Generation complete, awaiting approval
- **Next Stage**: Unit 3 Prijzen — Functional Design
## Reverse Engineering Status
- [x] Reverse Engineering - Artifacts refreshed on 2026-10-19T19:19:38Z at commit 38c5c3e (approved 2026-10-19T19:31:00Z)
@@ -257,3 +257,51 @@ Nou is het nog een statische site zonder back-end dus het contactformulier kan n
**Context**: CONSTRUCTION - Unit 1 Code Generation (change applied, awaiting approval)
---
## Unit 1 Lifestyle fotografie — Approval
**Timestamp**: 2026-10-20T00:35:00Z
**User Input**: "ziet er goed uit, ga verder"
**AI Response**: "Unit 1 approved. active-features.md updated to 🟢 Construction. Proceeding to Unit 2 Over mij (Functional Design skipped per plan) → Code Generation Part 1 Planning."
**Context**: CONSTRUCTION - Unit 1 complete; Unit 2 start
---
## Unit 2 Over mij — Code Generation Plan
**Timestamp**: 2026-10-20T00:45:00Z
**User Input**: (none — AI-initiated)
**AI Response**: "Created construction/plans/over-mij-code-generation-plan.md (14 steps): original 1600px photo resized to 1200x800, HomeContent.about with RoutePath-typed link, link recipe 'underline' variant, SectionHeading compact spacing, FramedImage, AboutBlock, route + app test, pnpm check with visual check, summary, commit. PBT-01 N/A. Prompt: approve plan or request changes."
**Context**: CONSTRUCTION - Unit 2 Code Generation Part 1 (awaiting plan approval)
---
## Unit 2 Over mij — Plan Approval
**Timestamp**: 2026-10-20T00:50:00Z
**User Input**: "approve plan"
**AI Response**: "Plan approved. Starting Code Generation Part 2."
**Context**: CONSTRUCTION - Unit 2 Code Generation Part 2 (start)
---
## Unit 2 Over mij — Code Generation Complete
**Timestamp**: 2026-10-20T01:20:00Z
**User Input**: (none — generation)
**AI Response**: "Executed all 14 steps. Step 13.5: Lighthouse home mobile failed (0.77). Root cause found by comparing observed LCP with deferred image request start across all runs: a race, photos starting before the observed LCP inflate Lighthouse's simulated LCP (5.3s vs 3.8s); the 600px load margin reached the gallery right after the load event. Lowered to a shared 200px DEFERRED_LOAD_MARGIN; latest runs request no below-hero photos on open. Final pnpm check green: 142 tests, mobile 0.84, desktop 1.0, a11y/BP/SEO 1.0. Visual check desktop + 390px phone. Committed locally (not pushed)."
**Context**: CONSTRUCTION - Unit 2 Code Generation (complete, awaiting approval)
---
@@ -0,0 +1,37 @@
# Code Summary — Unit 2: Over mij
Plan: [over-mij-code-generation-plan.md](../../plans/over-mij-code-generation-plan.md). Branch: `feature/homepage-sections`.
## Files
### Created
| File | Purpose |
|---|---|
| `web/src/assets/home/andrea.jpg` | Photo of Andrea, 1200×800, 75 KB (from the 1600×1067 original; the live site shows a 1024 px version) |
| `web/src/components/FramedImage/FramedImage.tsx` + test | Photo with the sand offset block behind it (CSS `::before`, hidden below `sm`); uses `DeferredImage` |
| `web/src/components/home/AboutBlock/AboutBlock.tsx` + test | The "Over mij" section |
### Modified
| File | Change |
|---|---|
| `web/src/content/types.ts` | `HomeContent.about`; the link target is a `RoutePath` |
| `web/src/content/homeContent.ts` | About content (live texts, photo, link to `/over-mij`) |
| `web/src/recipes/link.ts` | New `underline` variant (design `.link-underline`), reused by later units |
| `web/src/components/SectionHeading/*` | `spacing="compact"` for a heading above running text |
| `web/src/components/DeferredImage/*`, `IntroGallery.tsx` | Load margin 600 px → **200 px**, shared constant `DEFERRED_LOAD_MARGIN` (see below) |
| `web/src/routes/index.tsx` | Renders `AboutBlock` after `IntroGallery` |
| `web/src/app.test.tsx` | Page-order check includes the "Over mij" section |
## Fix during verification: deferred images raced the hero
The first `pnpm check` failed again on Lighthouse home mobile (0.77, LCP 5.3 s). Comparing all runs showed a race: when the gallery photos *started* before the observed LCP (164 ms vs 190 ms; 196 ms vs 219 ms) the simulated LCP was 5.3 s; when they started at or after it (221 ms vs 220 ms) it was 3.8 s. With a 600 px margin the gallery, ±240 px below the full-height hero, was "near" right after the load event. With 200 px nothing below the hero is in range when the page opens; the latest runs request none of those photos (mobile 0.84, LCP 3.9 s; desktop 1.0), so the result no longer depends on timing. Photos load as the visitor scrolls towards them; the placeholder and the reveal fade cover the short wait.
## Verification (`pnpm check`)
- Lint ✅, Prettier ✅, build ✅
- Tests: 32 files, **142 passed**
- `audit:deps` ✅; `audit:dev` report-only (unchanged)
- Lighthouse home: mobile **0.84**, desktop **1.0**; accessibility, best practices, SEO **1.0** on all URLs
- Visual check (CDP): desktop 1440 — photo with sand block left, text right; phone 390 — stacked, no block
## Extension compliance
- **Security Baseline**: no new dependencies or external resources (SECURITY-10/13); internal link only; other rules N/A.
- **PBT**: PBT-01 N/A (no logic); PBT-10 example-based tests for FramedImage, AboutBlock and the SectionHeading variant.
@@ -0,0 +1,56 @@
# Code Generation Plan — Unit 2: Over mij
**This plan is the single source of truth for Code Generation of unit 2.**
## Unit context
- **Requirements**: FR-HP-03, FR-HP-11 (reveal, reused), FR-HP-12, NFR-HP-01/02/03/05/06
- **Design**: [unit-of-work.md](../../inception/application-design/unit-of-work.md) unit 2; design reference `design/andreaslop-static/index.html` (`.about`, `.about__media`, `.about__body`, `.link-underline`) and `style.css` §5, §12
- **Depends on**: unit 1 (`HomeSection`, `SectionHeading`, `Reveal`, `DeferredImage`, `ContentImage`, `homeContent.ts`)
- **Introduces**: `FramedImage` (reused by unit 4), the `underline` link variant (reused by units 5 and 6)
- **Functional Design**: skipped (presentational). **PBT-01**: N/A — no business logic in this unit; example-based tests (PBT-10).
- Conventions as in unit 1 (English comments and test names, Dutch visitor text, `data-testid`, theme tokens, deferred images).
## Steps
### Image
- [x] **Step 1** — Resize the original live photo of Andrea (`WhatsApp-Image-2024-10-27-at-14.31.42.jpeg`, 1600×1067; the live site shows the 1024 px version) to **1200×800**, quality 80, into `web/src/assets/home/andrea.jpg`, with the resize script from unit 1.
### Content
- [x] **Step 2** — `content/types.ts`: extend `HomeContent` with `about: { eyebrow; title; paragraphs: string[]; image: ContentImage; link: { label; to: RoutePath } }` (`RoutePath` from `navigation.ts`, so a wrong route is a type error).
- [x] **Step 3** — `content/homeContent.ts`: eyebrow "Over mij", title "Lifestyle fotograaf met een passie voor storytelling", the three live paragraphs, the photo (alt "Andrea Slop met haar camera, glimlachend over haar schouder"), link "Lees mijn verhaal" → `/over-mij`.
### Shared pieces
- [x] **Step 4** — `recipes/link.ts`: add variant `underline` (design `.link-underline`): ink text, 1px underline in `currentColor` that slides in from the left on hover and focus, `interaction` duration, `smooth` easing, no motion under reduced motion. Used with `asChild` around `RouterLink`, like the footer menu.
- [x] **Step 5** — `SectionHeading`: optional `spacing: 'default' | 'compact'` (compact = `1.5rem` below, design `.about__body h2`), so the about text can use the same heading block left-aligned. Test for the compact variant.
- [x] **Step 6** — `components/FramedImage/FramedImage.tsx`: `DeferredImage` with a fixed `aspectRatio` on a `paper.deep` placeholder, plus the decorative sand block behind it (bottom-left, offset 1.5rem, 55% × 55%, `sand`), hidden below `sm`; the block is CSS only (`::before`), so it is never announced.
- [x] **Step 7** — `components/FramedImage/FramedImage.test.tsx`: image with alt and dimensions, lazy, axe clean.
### The section
- [x] **Step 8** — `components/home/AboutBlock/AboutBlock.tsx`: `HomeSection` with `tone="alt"`; grid 1 column, 2 equal columns from `lg`, gap `clamp(2rem, 6vw, 5.5rem)`, vertically centred; left `FramedImage` (aspect 4/3) in a `Reveal`; right in a `Reveal`: `SectionHeading` (eyebrow, h2, start-aligned, compact), the paragraphs (`ink.soft`), and the link with the `underline` variant.
- [x] **Step 9** — `components/home/AboutBlock/AboutBlock.test.tsx`: region named by the h2, eyebrow, three paragraphs, photo alt, link to `/over-mij`, axe clean.
- [x] **Step 10** — `routes/index.tsx`: render `AboutBlock` after `IntroGallery`.
- [x] **Step 11** — `app.test.tsx`: add the "Over mij" section (named by its h2) to the page-order check.
### Verification and wrap-up
- [x] **Step 12** — `pnpm check` (incl. Lighthouse); fix and rerun until green. Visual check at desktop width and at an emulated 390 px phone.
- [x] **Step 13** — `construction/over-mij/code/code-summary.md`.
- [x] **Step 14** — Commit on `feature/homepage-sections` ("Adds the Over mij section to the homepage" + attribution). Not pushed.
### Fix during Step 12
- [x] **Step 12a** — Lighthouse home mobile 0.77: deferred photos started before the observed LCP whenever they won a race (600 px margin reached the gallery right after the load event). Load margin lowered to 200 px and shared as `DEFERRED_LOAD_MARGIN` (DeferredImage + IntroGallery); no photo below the hero is requested on page open any more.
## Requirement traceability
| Requirement | Steps |
|---|---|
| FR-HP-03 | 2, 3, 6, 8–11 |
| FR-HP-11 | 8 |
| FR-HP-12 | 1–3 |
| NFR-HP-01 | 4, 6–9, 11, 12 |
| NFR-HP-02 | 4–8 |
| NFR-HP-03 | 5, 7, 9, 11, 12 |
| NFR-HP-05 | 1, 6, 12 |
| NFR-HP-06 | 2, 3 |
## Extension compliance (planned)
- **Security**: no new dependencies or external resources; internal link only; other rules N/A.
- **PBT**: PBT-01 N/A (no logic); PBT-10 example-based tests present.
+3
View File
@@ -129,6 +129,9 @@ describe('homepage', () => {
});
const sections = [
screen.getByRole('region', { name: 'Lifestyle fotografie' }),
screen.getByRole('region', {
name: 'Lifestyle fotograaf met een passie voor storytelling',
}),
];
let previous: Element = hero;
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

@@ -2,7 +2,7 @@ import { act, screen } from '@testing-library/react';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { FakeIntersectionObserver } from '@/test/fakeIntersectionObserver';
import { renderWithProviders } from '@/test/renderWithProviders';
import DeferredImage from './DeferredImage';
import DeferredImage, { DEFERRED_LOAD_MARGIN } from './DeferredImage';
const image = {
src: '/foto.jpg',
@@ -33,7 +33,7 @@ describe('DeferredImage', () => {
const [observer] = FakeIntersectionObserver.instances;
expect(img).not.toHaveAttribute('src');
expect(observer.options?.rootMargin).toBe('600px 0px');
expect(observer.options?.rootMargin).toBe(DEFERRED_LOAD_MARGIN);
act(() => observer.trigger(true));
expect(img).toHaveAttribute('src', '/foto.jpg');
@@ -3,8 +3,12 @@ import usePageLoaded from '@/hooks/usePageLoaded';
import useInView from '@/hooks/useInView';
import type { ContentImage } from '@/content/types';
// How far below the viewport an image starts loading
const LOAD_MARGIN = '600px 0px';
// How far outside the viewport an image starts loading. Kept small on
// purpose: everything below the full-height hero must be out of range when
// the page opens, or its photos start before the hero has painted. In
// Lighthouse's throttled simulation that pushed the largest contentful
// paint from 3.8 s to 5.3 s whenever the request won the race.
export const DEFERRED_LOAD_MARGIN = '200px 0px';
type DeferredImageProps = Omit<ImageProps, 'src' | 'alt'> & {
image: ContentImage;
@@ -26,7 +30,7 @@ export default function DeferredImage({
}: DeferredImageProps) {
const pageLoaded = usePageLoaded();
const { ref, inView } = useInView<HTMLImageElement>({
rootMargin: LOAD_MARGIN,
rootMargin: DEFERRED_LOAD_MARGIN,
skip: near !== undefined,
});
const load = pageLoaded && (near ?? inView);
@@ -0,0 +1,27 @@
import { screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { axeResults } from '@/test/axe';
import { renderWithProviders } from '@/test/renderWithProviders';
import FramedImage from './FramedImage';
const image = {
src: '/andrea.jpg',
alt: 'Andrea met haar camera',
width: 1200,
height: 800,
};
describe('FramedImage', () => {
it('renders only the photo for assistive technology, with its size', async () => {
const { container } = await renderWithProviders(
<FramedImage image={image} aspectRatio="4 / 3" />,
);
const img = screen.getByRole('img');
expect(img).toHaveAccessibleName('Andrea met haar camera');
expect(img).toHaveAttribute('src', '/andrea.jpg');
expect(img).toHaveAttribute('width', '1200');
expect(img).toHaveAttribute('height', '800');
expect(img).toHaveAttribute('loading', 'lazy');
expect(await axeResults(container)).toHaveNoViolations();
});
});
@@ -0,0 +1,45 @@
import { Box } from '@chakra-ui/react';
import DeferredImage from '@/components/DeferredImage/DeferredImage';
import type { ContentImage } from '@/content/types';
type FramedImageProps = {
image: ContentImage;
// CSS aspect ratio of the visible crop, e.g. '4 / 3'
aspectRatio: string;
};
// A photo with a soft sand-coloured block offset behind its lower left
// corner (design .about__media). The block is pure decoration (a CSS
// pseudo-element), so assistive technology never announces it. On phones it
// is left out, since it would stick out past the page edge.
export default function FramedImage({ image, aspectRatio }: FramedImageProps) {
return (
<Box
position="relative"
// Own stacking context, so the block can sit behind the photo
isolation="isolate"
_before={{
content: '""',
display: { base: 'none', sm: 'block' },
position: 'absolute',
left: '-1.5rem',
bottom: '-1.5rem',
width: '55%',
height: '55%',
bg: 'sand',
zIndex: -1,
}}
>
<DeferredImage
image={image}
display="block"
w="100%"
h="auto"
aspectRatio={aspectRatio}
objectFit="cover"
// Shown until the deferred photo arrives
bg="paper.deep"
/>
</Box>
);
}
@@ -31,4 +31,23 @@ describe('SectionHeading', () => {
).toBeInTheDocument();
expect(container.querySelectorAll('p')).toHaveLength(0);
});
it('supports a compact, start-aligned variant above running text', async () => {
await renderWithProviders(
<SectionHeading
id="about-title"
eyebrow="Over mij"
title="Lifestyle fotograaf"
align="start"
spacing="compact"
/>,
);
expect(
screen.getByRole('heading', {
level: 2,
name: 'Lifestyle fotograaf',
}),
).toHaveAttribute('id', 'about-title');
expect(screen.getByText('Over mij')).toBeInTheDocument();
});
});
@@ -7,6 +7,8 @@ type SectionHeadingProps = {
eyebrow?: string;
lead?: string;
align?: 'center' | 'start';
// compact: little space below, for a heading above running text
spacing?: 'default' | 'compact';
};
// Heading block of a homepage section (design .section__head): optional
@@ -17,6 +19,7 @@ export default function SectionHeading({
eyebrow,
lead,
align = 'center',
spacing = 'default',
}: SectionHeadingProps) {
const centered = align === 'center';
@@ -24,7 +27,7 @@ export default function SectionHeading({
<Box
maxW="620px"
mx={centered ? 'auto' : undefined}
mb="sectionHeadGap"
mb={spacing === 'compact' ? 6 : 'sectionHeadGap'}
textAlign={centered ? 'center' : 'start'}
>
{eyebrow && (
@@ -0,0 +1,31 @@
import { screen, within } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import homeContent from '@/content/homeContent';
import { axeResults } from '@/test/axe';
import { renderWithProviders } from '@/test/renderWithProviders';
import AboutBlock from './AboutBlock';
const about = homeContent.about;
describe('AboutBlock', () => {
it('shows the label, heading, text, photo and link', async () => {
const { container } = await renderWithProviders(
<AboutBlock content={about} />,
);
const section = screen.getByRole('region', { name: about.title });
expect(
within(section).getByRole('heading', { level: 2 }),
).toHaveTextContent(about.title);
expect(within(section).getByText(about.eyebrow)).toBeInTheDocument();
about.paragraphs.forEach((paragraph) =>
expect(within(section).getByText(paragraph)).toBeInTheDocument(),
);
expect(within(section).getByRole('img')).toHaveAccessibleName(
about.image.alt,
);
expect(
within(section).getByRole('link', { name: about.link.label }),
).toHaveAttribute('href', '/over-mij');
expect(await axeResults(container)).toHaveNoViolations();
});
});
@@ -0,0 +1,55 @@
import { Grid, Link, Stack, Text } from '@chakra-ui/react';
import FramedImage from '@/components/FramedImage/FramedImage';
import HomeSection from '@/components/HomeSection/HomeSection';
import Reveal from '@/components/Reveal/Reveal';
import RouterLink from '@/components/RouterLink';
import SectionHeading from '@/components/SectionHeading/SectionHeading';
import type { HomeContent } from '@/content/types';
const TITLE_ID = 'about-title';
type AboutBlockProps = {
content: HomeContent['about'];
};
// "Over mij": a framed photo of Andrea next to a short introduction with a
// link to the about page (design .about). Stacked on phones and tablets.
export default function AboutBlock({ content }: AboutBlockProps) {
return (
<HomeSection labelledBy={TITLE_ID} tone="alt" data-testid="about-block">
<Grid
templateColumns={{ base: '1fr', lg: '1fr 1fr' }}
gap="clamp(2rem, 6vw, 5.5rem)"
alignItems="center"
>
<Reveal>
<FramedImage image={content.image} aspectRatio="4 / 3" />
</Reveal>
<Reveal>
<SectionHeading
id={TITLE_ID}
eyebrow={content.eyebrow}
title={content.title}
align="start"
spacing="compact"
/>
<Stack gap={4} color="ink.soft">
{content.paragraphs.map((paragraph) => (
<Text key={paragraph}>{paragraph}</Text>
))}
<Text>
<Link variant="underline" asChild>
<RouterLink
to={content.link.to}
data-testid="about-block-link"
>
{content.link.label}
</RouterLink>
</Link>
</Text>
</Stack>
</Reveal>
</Grid>
</HomeSection>
);
}
@@ -1,5 +1,7 @@
import { chakra, useBreakpointValue } from '@chakra-ui/react';
import DeferredImage from '@/components/DeferredImage/DeferredImage';
import DeferredImage, {
DEFERRED_LOAD_MARGIN,
} from '@/components/DeferredImage/DeferredImage';
import HomeSection from '@/components/HomeSection/HomeSection';
import Reveal from '@/components/Reveal/Reveal';
import SectionHeading from '@/components/SectionHeading/SectionHeading';
@@ -24,7 +26,7 @@ export default function IntroGallery({ content }: IntroGalleryProps) {
// Photos outside the row are clipped by the scroller and never intersect
// on their own, so the whole gallery decides when they load.
const { ref, inView } = useInView<HTMLUListElement>({
rootMargin: '600px 0px',
rootMargin: DEFERRED_LOAD_MARGIN,
});
// Only the swipeable row scrolls, so only then is it a focus stop for
// keyboard scrolling
+17
View File
@@ -5,6 +5,7 @@ import intro1 from '../assets/home/intro-1.jpg';
import intro2 from '../assets/home/intro-2.jpg';
import intro3 from '../assets/home/intro-3.jpg';
import intro4 from '../assets/home/intro-4.jpg';
import andrea from '../assets/home/andrea.jpg';
// Static content of the homepage sections until the CMS API exists; the API
// will then deliver this object.
@@ -39,6 +40,22 @@ const homeContent: HomeContent = {
},
],
},
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.',
],
image: {
src: andrea,
alt: 'Andrea Slop met haar camera, glimlachend over haar schouder',
width: 1200,
height: 800,
},
link: { label: 'Lees mijn verhaal', to: '/over-mij' },
},
};
export default homeContent;
+9
View File
@@ -1,3 +1,4 @@
import type { RoutePath } from '../navigation.ts';
import type { SocialPlatform } from './socialPlatforms.ts';
// Vorm van de content die straks uit de CMS-API komt. Bewust platte data
@@ -37,6 +38,14 @@ export interface HomeContent {
lead: string;
photos: ContentImage[];
};
about: {
eyebrow: string;
title: string;
paragraphs: string[];
image: ContentImage;
// A route, so a wrong link is a type error
link: { label: string; to: RoutePath };
};
}
export interface HeroSlide {
+31
View File
@@ -17,6 +17,37 @@ const linkRecipe = defineRecipe({
_hover: { color: 'accent.deep' },
_focusVisible: { color: 'accent.deep' },
},
// Ink text with an underline that slides in from the left on
// hover and focus (design .link-underline)
underline: {
position: 'relative',
display: 'inline-block',
color: 'ink',
textDecoration: 'none',
rounded: 'none',
_after: {
content: '""',
position: 'absolute',
left: 0,
bottom: '-2px',
width: '100%',
height: '1px',
bg: 'currentColor',
transform: 'scaleX(0)',
transformOrigin: 'right',
transitionProperty: 'transform',
transitionDuration: 'interaction',
transitionTimingFunction: 'smooth',
_motionReduce: { transition: 'none' },
},
_hover: {
textDecoration: 'none',
_after: { transform: 'scaleX(1)', transformOrigin: 'left' },
},
_focusVisible: {
_after: { transform: 'scaleX(1)', transformOrigin: 'left' },
},
},
},
},
});
+2
View File
@@ -1,5 +1,6 @@
import { createFileRoute } from '@tanstack/react-router';
import Hero from '../components/Hero/Hero';
import AboutBlock from '../components/home/AboutBlock/AboutBlock';
import IntroGallery from '../components/home/IntroGallery/IntroGallery';
import heroContent from '../content/heroContent';
import homeContent from '../content/homeContent';
@@ -17,6 +18,7 @@ function Index() {
<>
<Hero content={heroContent} socials={siteContent.socials} />
<IntroGallery content={homeContent.intro} />
<AboutBlock content={homeContent.about} />
</>
);
}