fix/scrollspy-offset #36

Merged
palid merged 1 commit from fix/scrollspy-offset into main 2025-04-13 20:02:30 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit c1ead36042 - Show all commits

View file

@ -16,7 +16,7 @@ function NavContent({
}) { }) {
return ( return (
<nav className="flex flex-col gap-4 mt-8"> <nav className="flex flex-col gap-4 mt-8">
<ScrollSpy activeClass="nav-active"> <ScrollSpy activeClass="nav-active" offsetTop={80}>
{linksOrder.map((value) => ( {linksOrder.map((value) => (
<a key={value} href={`#${value}`} className="text-lg hover:text-primary transition-colors"> <a key={value} href={`#${value}`} className="text-lg hover:text-primary transition-colors">

View file

@ -24,7 +24,7 @@ export function MainpageNav({
<NavContainer title={t.nav.title}> <NavContainer title={t.nav.title}>
<> <>
<div className="hidden md:flex md:items-center md:gap-4 lg:gap-8"> <div className="hidden md:flex md:items-center md:gap-4 lg:gap-8">
<ScrollSpy activeClass="nav-active"> <ScrollSpy activeClass="nav-active" offsetTop={80}>
{linksOrder.map((value) => ( {linksOrder.map((value) => (
<a <a