The content column now uses the design's gutter as side padding instead of Chakra's 16/24/32px. The Lifestyle fotografie row on phones bled out by the gutter, so the page was 4px too wide and Chrome zoomed out slightly. The header drops its extra padding and the to-top button follows the gutter, so logo, hero controls and content share one edge. Anchored sections now scroll to the height of the shrunken header, so Contact lands right below it instead of 24px lower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
233 lines
9.2 KiB
TypeScript
233 lines
9.2 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
|
|
deep: { value: '#5f6a58' }, // accent hover
|
|
},
|
|
sand: { value: '#d9cdbc' }, // zachte vlakken en decoratie
|
|
// 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);
|