Skip to content

Commit 5f30476

Browse files
committed
Enhance scrolling experience by adding snap behavior to sections in App component
1 parent 85064e3 commit 5f30476

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/App.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ function ProjectCard({ title, description, tech, link }: { title: string; descri
4848

4949
function App() {
5050
return (
51-
<div className="min-h-screen text-white">
51+
<div className="min-h-screen text-white snap-y snap-mandatory overflow-y-scroll h-screen">
5252
<WebGLBackground />
5353

5454
{/* Hero Section */}
55-
<header className="min-h-screen flex items-center justify-center relative overflow-hidden">
55+
<header className="min-h-screen flex items-center justify-center relative overflow-hidden snap-start">
5656
<div className="container mx-auto px-4 py-16 relative z-10">
5757
<div className="max-w-3xl mx-auto text-center">
5858
<h1 className="text-5xl md:text-7xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-teal-400 animate-fade-in">
@@ -77,7 +77,7 @@ function App() {
7777
</header>
7878

7979
{/* Skills Section */}
80-
<section className="min-h-screen py-20">
80+
<section className="min-h-screen py-20 snap-start">
8181
<div className="container mx-auto px-4">
8282
<h2 className="text-3xl md:text-4xl font-bold text-center mb-16">Technical Skills</h2>
8383
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
@@ -90,7 +90,7 @@ function App() {
9090
</section>
9191

9292
{/* Projects Section */}
93-
<section className="min-h-screen py-20">
93+
<section className="min-h-screen py-20 snap-start">
9494
<div className="container mx-auto px-4">
9595
<h2 className="text-3xl md:text-4xl font-bold text-center mb-16">Featured Projects</h2>
9696
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
@@ -105,10 +105,12 @@ function App() {
105105
</section>
106106

107107
{/* Blog Section */}
108-
<BlogSection />
108+
<div className="snap-start">
109+
<BlogSection />
110+
</div>
109111

110112
{/* Contact Section */}
111-
<section className="min-h-screen py-20">
113+
<section className="min-h-screen py-20 snap-start">
112114
<div className="container mx-auto px-4 text-center">
113115
<h2 className="text-3xl md:text-4xl font-bold mb-8">Get In Touch</h2>
114116
<p className="text-xl text-gray-300 mb-8">

0 commit comments

Comments
 (0)