Skip to content

Commit

Permalink
Revert " Added a parallax feature , Added the about and services sect…
Browse files Browse the repository at this point in the history
…ion comp…"

This reverts commit 25c9f23.
  • Loading branch information
g4ze authored Nov 1, 2024
1 parent 25c9f23 commit eb0c1ae
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 298 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
"prettier": "^3.3.3",
"tailwindcss": "^3.4.1"
}
}
}
2 changes: 1 addition & 1 deletion src/app/Loading.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ export default function LoadingScreen() {
</div>
</div>
);
}
}
2 changes: 1 addition & 1 deletion src/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ const styles = {
textDecoration: "none",
fontSize: "1.8rem",
},
};
};
89 changes: 11 additions & 78 deletions src/app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { useEffect, useState } from "react";
import Navbar from "@/components/Navbar";
import EventsSection from "@/components/EventsSection";
import Links from "@/components/Links";
import About from "@/components/About";
import Services from "@/components/Services";

export default function Home() {
const publicPath = process.env.NEXT_PUBLIC_PUBLIC_PATH ;
Expand All @@ -29,88 +27,33 @@ export default function Home() {
top: -1,
behavior: "smooth",
});
}, 800);
}, 600);
}
};

const scrollToHome = () => {
const section = document.getElementById("homesection");
if (section) {
section.scrollIntoView({ behavior: "smooth" });
setTimeout(() => {
window.scrollBy({
top: -1,
behavior: "smooth",
});
}, 800);
}
};


//scroll for about
const scrollToABout = () => {
const section = document.getElementById("aboutsection");
if (section) {
section.scrollIntoView({ behavior: "smooth" });
setTimeout(() => {
window.scrollBy({
top: -1,
behavior: "smooth",
});
}, 800);
}
}
//scroll for services
const scrollToServices = () => {
const section = document.getElementById("servicessection");
if (section) {
section.scrollIntoView({ behavior: "smooth" });
setTimeout(() => {
window.scrollBy({
top: -1,
behavior: "smooth",
});
}, 800);
}
}

return (
<>
<Navbar scrollToABout={scrollToABout} scrollToServices={scrollToServices} scrollToHome={scrollToHome}/>
<div
id="fixed-image"
className="fixed top-[-10] left-0 w-full h-full z-[-1] bg-cover bg-center opacity-40"
style={{
backgroundImage: "url('https://gdg-oncampus-bu.github.io/landing-page/assets/image1.png')",
backgroundRepeat:"none",
backgroundSize:"cover",
}}
></div>
<Navbar />

<div
id="homesection"
className="flex flex-col items-center justify-center min-h-screen p-8 pb-20 gap-8 sm:p-20 text-center"
style={{
// we are hardcoding the image url here due to gh pages and next contraints
backgroundImage: `url('https://gdg-oncampus-bu.github.io/landing-page/assets/image1.png')`,
backgroundSize: "contain",
backgroundRepeat: "no-repeat",
backgroundPosition: "bottom",
}}
>
<h1 className="text-4xl sm:text-5xl font-bold text-white tracking-wide shadow-lg bg-gradient-to-r bg-white bg-clip-text text-transparent">
<h1 className="text-4xl sm:text-5xl font-bold text-white">
We are GDG-BU
</h1>


<button
onClick={scrollToSection}
className="flex items-center justify-center rounded-full border border-transparent bg-gradient-to-r bg-white text-black text-lg sm:text-xl h-10 sm:h-12 px-4 sm:px-6 transition-all duration-300 ease-in-out transform hover:scale-105 hover:shadow-xl hover:rotate-1 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
className="rounded-full border border-solid border-transparent bg-foreground text-background hover:bg-[#383838] dark:hover:bg-[#ccc] text-lg sm:text-xl h-12 sm:h-14 px-6 sm:px-8 transition-colors"
>
<svg
className="w-5 h-5 mr-2 animate-bounce"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
>
<path d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H8a1 1 0 110-2h3V6a1 1 0 011-1z" />
</svg>
Discover More
</button>

</div>

{/* Second Section */}
Expand All @@ -121,16 +64,6 @@ export default function Home() {
<EventsSection events={eventsData} />
</div>

{/* About Section */}
<div id="aboutsection" className="flex flex-col items-center justify-center min-h-screen p-4 pb-10 gap-8 sm:p-100 text-center">
<About/>
</div>

{/* Services Section */}
<div id="servicessection" className="flex flex-col items-center justify-center p-4 pb-10 gap-8 sm:p-100 text-center">
<Services/>
</div>

{/* Links Section */}
<div className="bg-gray-900 py-12">
<Links />
Expand Down
102 changes: 0 additions & 102 deletions src/components/About.jsx

This file was deleted.

43 changes: 0 additions & 43 deletions src/components/Contact.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export default function Loader() {
</div>
</div>
);
}
}
Loading

0 comments on commit eb0c1ae

Please sign in to comment.