Voeg scroll-margin toe aan secties zodat de sticky nav niet overlapt
De nav is sticky en 64px (h-16) hoog, maar de secties hadden geen scroll-margin. scrollIntoView(block:'start') lijnde de sectietop dus exact uit met de viewport-top, waardoor de sticky nav er precies overheen schoof en de sectiekop (met name bij Over, nu direct na de Hero) onder de nav verdween - het voelde alsof er te ver werd doorgescrold. scroll-mt-16 op elke sectie houdt nu ruimte vrij voor de nav. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { aboutContent } from '../data/content';
|
|||||||
|
|
||||||
export function AboutSection() {
|
export function AboutSection() {
|
||||||
return (
|
return (
|
||||||
<section id="over" className="py-[88px]">
|
<section id="over" className="scroll-mt-16 py-[88px]">
|
||||||
<div className="mx-auto max-w-[1080px] px-6">
|
<div className="mx-auto max-w-[1080px] px-6">
|
||||||
<div className="grid grid-cols-1 items-start gap-6 sm:grid-cols-[1.2fr_0.8fr] sm:grid-rows-[auto_1fr] sm:gap-12">
|
<div className="grid grid-cols-1 items-start gap-6 sm:grid-cols-[1.2fr_0.8fr] sm:grid-rows-[auto_1fr] sm:gap-12">
|
||||||
<div className="order-1 mb-2 sm:col-start-1 sm:row-start-1 sm:mb-0">
|
<div className="order-1 mb-2 sm:col-start-1 sm:row-start-1 sm:mb-0">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export function ContactSection() {
|
|||||||
const mailtoHref = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`;
|
const mailtoHref = `mailto:${contactInfo.email}?subject=${encodeURIComponent(contactInfo.mailSubject)}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id="contact" className="pb-[110px]">
|
<section id="contact" className="scroll-mt-16 pb-[110px]">
|
||||||
<div className="mx-auto max-w-[1080px] px-6">
|
<div className="mx-auto max-w-[1080px] px-6">
|
||||||
<div className="rounded-[20px] border border-accent-line bg-gradient-to-br from-surface-2 to-surface px-10 py-14 text-center">
|
<div className="rounded-[20px] border border-accent-line bg-gradient-to-br from-surface-2 to-surface px-10 py-14 text-center">
|
||||||
<span className="font-mono block text-sm uppercase tracking-wider text-accent">
|
<span className="font-mono block text-sm uppercase tracking-wider text-accent">
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export function PackagesSection() {
|
|||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
id="pakketten"
|
id="pakketten"
|
||||||
className="bg-gradient-to-b from-transparent via-surface/50 to-transparent py-[88px]"
|
className="scroll-mt-16 bg-gradient-to-b from-transparent via-surface/50 to-transparent py-[88px]"
|
||||||
>
|
>
|
||||||
<div className="mx-auto max-w-[1080px] px-6">
|
<div className="mx-auto max-w-[1080px] px-6">
|
||||||
<div className="mb-[52px]">
|
<div className="mb-[52px]">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { ProcessStep } from './ProcessStep';
|
|||||||
|
|
||||||
export function ProcessSection() {
|
export function ProcessSection() {
|
||||||
return (
|
return (
|
||||||
<section id="werkwijze" className="py-[88px]">
|
<section id="werkwijze" className="scroll-mt-16 py-[88px]">
|
||||||
<div className="mx-auto max-w-[1080px] px-6">
|
<div className="mx-auto max-w-[1080px] px-6">
|
||||||
<div className="mb-[52px]">
|
<div className="mb-[52px]">
|
||||||
<span className="font-mono block text-sm uppercase tracking-wider text-accent">
|
<span className="font-mono block text-sm uppercase tracking-wider text-accent">
|
||||||
|
|||||||
Reference in New Issue
Block a user