Compare commits

..

2 commits

Author SHA1 Message Date
q3k 06ff6d32e8 look: fix scrolling to sections
Some checks failed
/ deploy (push) Failing after 2s
This fixes:

1. The inability to scroll down to 'contacts' and other lower sections.
   We just expand the second-to-last section to allow the browser to
   scroll.
2. Updating the currently active section - this now uses a global view
   of all visible sections that is updated by the observer diff, thereby
   fixing the logic.
2025-04-13 19:06:26 +02:00
Dariusz Niemczyk 6da5da5bee
fox: add header margin to scroll
Some checks failed
/ deploy (push) Failing after 53s
2025-04-13 19:01:03 +02:00
2 changed files with 6 additions and 1 deletions

View file

@ -51,7 +51,7 @@ function NewSection({
after?: ReactElement;
}) {
return (<section id={id} className="bg-background">
<div className="container mx-auto px-4 gap-6 flex flex-col mt-20">
<div className="container mx-auto px-4 gap-6 flex flex-col">
{children}
{after}
</div>

View file

@ -160,3 +160,8 @@
section#contact {
min-height: 100vh;
}
/* Fix scrolling to section by fragment, making sure it shows in the right spot and not behind the navbar. */
section {
scroll-margin-top: calc(var(--spacing) * 16 + var(--spacing) * 4);
}