Files
AndreaSlopFotografie/web/src/theme.ts
T
SluijsensandClaude Opus 5.5 e92b652061 Adds the Contact page
The contact page in the approved layout: the form next to a photo with
the contact card on wide screens, and the card with a small portrait
above the form on phones, where the large photo is never downloaded.
/contact?pakket= preselects a package. The page is indexed, with its
own title, description, preview image and ContactPage structured data.
Over mij and Soorten fotoshoots now link to /contact. The green button
gets a darker background, so its white text meets the contrast minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 19:27:18 +01:00

244 lines
9.8 KiB
TypeScript

import { createSystem, defaultConfig, defineConfig } from '@chakra-ui/react';
import carouselControlRecipe from './recipes/carouselControl';
import containerRecipe from './recipes/container';
import formControlRecipe from './recipes/formControl';
import iconControlRecipe from './recipes/iconControl';
import linkRecipe from './recipes/link';
import linkButtonRecipe from './recipes/linkButton';
import skipNavLinkRecipe from './recipes/skipNavLink';
const config = defineConfig({
cssVarsRoot: ':where(:root, :host)',
cssVarsPrefix: 'slp',
preflight: true,
globalCss: {
html: {
// Chakra-componenten met een eigen focusring lezen deze variabele
'--focus-ring-color': '{colors.focusRing}',
},
// Eén focusstijl voor de hele site (BR-THEME-02)
'*:focus-visible': {
outlineWidth: '2px',
outlineStyle: 'solid',
outlineColor: 'var(--focus-ring-color)',
outlineOffset: '2px',
},
// Programmatische focusdoelen (main na een paginawissel) krijgen geen ring
'[tabindex="-1"]:focus': {
outline: 'none',
},
},
theme: {
// Use default breakpoints from Chakra UI when breakpoints are commented out. Uncomment the breakpoints below for custom breakpoints.
// breakpoints: {
// sm: '480px',
// md: '768px',
// lg: '1024px',
// xl: '1280px',
// '2xl': '1536px',
// },
tokens: {
// Palet uit design/andreaslop-static (:root in style.css)
colors: {
paper: {
DEFAULT: { value: '#faf7f2' }, // hoofdachtergrond, warm papier
alt: { value: '#f1ebe2' }, // secundaire secties
deep: { value: '#e8e0d5' }, // randen van blokken, hover-vlakken
},
ink: {
DEFAULT: { value: '#232120' }, // koppen en hoofdtekst
soft: { value: '#55504b' }, // lopende tekst
muted: { value: '#8a827a' }, // bijschriften, meta
},
line: { value: '#e2dad0' }, // hairlines
accent: {
DEFAULT: { value: '#7f8b76' }, // heidegroen
// Text and buttons in heidegroen: white on it meets 4.5:1
deep: { value: '#5f6a58' },
// Hover on a deep-green button (deep at 75%)
deeper: { value: '#475042' },
},
sand: { value: '#d9cdbc' }, // zachte vlakken en decoratie
// Blocks behind the shoot photos, one per shoot type, taken
// from the live page. Decoration only, never behind text.
frame: {
stone: { value: '#aba699' },
rust: { value: '#975030' },
taupe: { value: '#a18679' },
olive: { value: '#84847c' },
},
// Form errors: the design's #a4443a, 5.7:1 on paper, 6.1:1 on white
error: { value: '#a4443a' },
},
fonts: {
heading: {
value: "'Marcellus', 'Iowan Old Style', Georgia, 'Times New Roman', serif",
},
body: {
value: "'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif",
},
},
fontSizes: {
eyebrow: { value: '0.72rem' },
},
letterSpacings: {
caps: { value: '0.22em' }, // hoofdletterlabels: eyebrows, knoppen, nav
},
spacing: {
gutter: { value: 'clamp(1.25rem, 4vw, 3rem)' }, // zijmarge van de pagina
// Vertical rhythm of homepage sections (design --section-y)
sectionY: { value: 'clamp(4.5rem, 9vw, 8.5rem)' },
sectionYTight: { value: 'clamp(2.7rem, 5.4vw, 5.1rem)' },
// Space below a section heading (design .section__head)
sectionHeadGap: { value: 'clamp(2.5rem, 5vw, 4.5rem)' },
// Gap between grid items such as photos and cards (design --gap)
gridGap: { value: 'clamp(1rem, 2.2vw, 2rem)' },
},
easings: {
smooth: { value: 'cubic-bezier(.22, .61, .36, 1)' },
},
durations: {
interaction: { value: '0.45s' }, // hover, focus
fade: { value: '1.2s' }, // overvloeien van foto's
reveal: { value: '0.8s' }, // fade-in of sections on scroll
},
// Stapelvolgorde van de vaste shell-onderdelen, van laag naar hoog
zIndex: {
backToTop: { value: 8 },
mobileNav: { value: 9 },
header: { value: 10 },
// Binnen de header: de hamburger boven het logo en menu
menuToggle: { value: 1 },
},
shadows: {
// Soft shadow under a floating panel (design --shadow-md)
panel: {
value: '0 12px 40px color-mix(in srgb, {colors.ink} 12%, transparent)',
},
},
gradients: {
// Donker verloop over hero-foto's, zodat witte tekst leesbaar blijft
scrim: {
value:
'linear-gradient(to bottom, ' +
'color-mix(in srgb, {colors.ink} 45%, transparent) 0%, ' +
'color-mix(in srgb, {colors.ink} 18%, transparent) 35%, ' +
'color-mix(in srgb, {colors.ink} 45%, transparent) 100%)',
},
},
},
semanticTokens: {
colors: {
bg: {
DEFAULT: {
value: {
_light: '{colors.paper}',
_dark: '{colors.gray.800}',
},
},
},
fg: {
DEFAULT: {
value: {
_light: '{colors.ink}',
_dark: '{colors.gray.50}',
},
},
},
// Kleur van de focusring; op foto's zet iconControl hem op wit
focusRing: {
value: {
_light: '{colors.accent.deep}',
_dark: '{colors.white}',
},
},
},
sizes: {
header: {
// Hoogte van de navigatiebalk (h="header")
DEFAULT: { value: { base: '66px', lg: '92px' } },
// Na scrollen; op mobiel krimpt de balk niet
sticky: { value: { base: '66px', lg: '68px' } },
},
// Maximale breedte van de content (Container en de to-top-knop)
content: { value: '{sizes.8xl}' },
// Narrow content column, e.g. the contact form (design --container-narrow)
contentNarrow: { value: '820px' },
},
spacing: {
// Zelfde waarde voor content die onder de balk begint (pt="header")
header: {
DEFAULT: { value: '{sizes.header}' },
// Waar een anker onder de (dan al gekrompen) balk landt
sticky: { value: '{sizes.header.sticky}' },
},
// Begin van de inhoud op een gewone pagina: onder de balk, met lucht
pageTop: {
value: 'calc({sizes.header} + clamp(3rem, 7vw, 6rem))',
},
},
},
textStyles: {
// Klein label in hoofdletters boven een kop
eyebrow: {
value: {
fontSize: 'eyebrow',
letterSpacing: 'caps',
textTransform: 'uppercase',
},
},
// Grote titel in de hero
display: {
value: {
fontFamily: 'heading',
fontSize: { base: '2.75rem', md: '3.75rem', xl: '5rem' },
lineHeight: '1',
},
},
// The h2 of a homepage section (SectionHeading); smaller than the
// design's 2.5rem at the owner's request, 30px at every width
sectionTitle: {
value: {
fontFamily: 'heading',
fontSize: '1.875rem',
lineHeight: '1.15',
},
},
// Intro sentence below a section heading
lead: {
value: {
fontSize: '1.25rem',
fontWeight: '300',
lineHeight: '1.6',
},
},
// De h1 van een gewone pagina (PageIntro, StatusPage)
pageTitle: {
value: {
fontFamily: 'heading',
fontSize: { base: '2.25rem', md: '2.75rem', lg: '3.25rem' },
lineHeight: '1.15',
},
},
},
recipes: {
// Koppen zijn in het design niet vet en iets gespatieerd
heading: {
base: {
fontWeight: '400',
letterSpacing: '0.01em',
},
},
container: containerRecipe,
link: linkRecipe,
skipNavLink: skipNavLinkRecipe,
linkButton: linkButtonRecipe,
iconControl: iconControlRecipe,
carouselControl: carouselControlRecipe,
formControl: formControlRecipe,
},
},
});
export default createSystem(defaultConfig, config);