Skip to content

Commit faeeb74

Browse files
committed
feat: add auto scroll to section
1 parent bc38d1e commit faeeb74

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/features/home/pages/home-page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ export function HomePage() {
102102
</div>
103103
</motion.section>
104104

105-
<section className="flex h-screen flex-col items-center justify-center">
106-
<h1 className="mb-10 text-6xl font-semibold">How Knowly Works</h1>
105+
<section
106+
id="how-knowly-works"
107+
className="flex h-screen flex-col items-center justify-center"
108+
>
109+
<h1 className="text-6xl font-semibold">How Knowly Works</h1>
107110
<div className="flex w-full max-w-6xl justify-between gap-8">
108111
{/* Parte da Esquerda */}
109112
<div className="flex flex-col items-center">

src/shared/components/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function Navbar() {
2121
<p className="text-lg">Knowly</p>
2222
</div>
2323
<div className="flex items-center gap-8">
24-
<a href="">Our product</a>
24+
<a href="#how-knowly-works">Our product</a>
2525
<a href="">About us</a>
2626
<a href="">Pricing</a>
2727
<a href="">FAQ</a>

src/shared/styles/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@
2222
--color-blue-80: #8048a4;
2323
--color-blue-100: #5a3374;
2424
}
25+
26+
html {
27+
scroll-behavior: smooth;
28+
}

0 commit comments

Comments
 (0)