diff --git a/package.json b/package.json index b60061b..eed8ed7 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@vitejs/plugin-react": "^4.2.1", "baffle": "^0.3.6", "framer-motion": "^11.5.4", + "gsap": "^3.12.5", "lodash": "^4.17.21", "prop-types": "^15.8.1", "react": "^18.2.0", diff --git a/src/App.jsx b/src/App.jsx index 3a8ad35..0d7a104 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -7,6 +7,7 @@ import Navbar from "@/components/Navbar/index"; import Cursor from "./components/Cursor"; import CursorVariantProvider from "@/context/CursorVariantProvider"; import Loader from "@/components/Loader"; +import ScrollToTop from "@/components/ScrollToTop"; const navLinks = [ { name: "About Us", path: "/about-us" }, @@ -34,6 +35,7 @@ function App() { + {routes.map((route) => ( + + + + + + \ No newline at end of file diff --git a/src/components/AboutUs/index.jsx b/src/components/AboutUs/index.jsx index 8875979..a0c36ba 100644 --- a/src/components/AboutUs/index.jsx +++ b/src/components/AboutUs/index.jsx @@ -84,7 +84,7 @@ export default function AboutSection() {
-
+

{ + gsap.registerPlugin(ScrollTrigger); + + // Set up each image animation + images.forEach((_, index) => { + const imageSection = containerRef.current.children[index]; + + gsap.fromTo( + imageSection, + { + opacity: 1, + y: "20vh", + }, + { + opacity: 1, + y: "-100vh", + ease: "none", + scrollTrigger: { + trigger: imageSection, + start: "top bottom", + end: "bottom top", + scrub: 1, + markers: false, + }, + }, + ); + }); + + return () => { + ScrollTrigger.getAll().forEach((trigger) => trigger.kill()); + }; + }, []); + + return ( +
+ {/* Fixed description */} +
+

+ Events Highlight +

+
+ + {/* Images container */} +
+ {images.map((image) => ( +
+
+ {image.alt} +
+
+ ))} +
+
+ ); +} + +export default EventsHighlight; diff --git a/src/components/Footer/index.jsx b/src/components/Footer/index.jsx deleted file mode 100644 index f81d6c7..0000000 --- a/src/components/Footer/index.jsx +++ /dev/null @@ -1,59 +0,0 @@ -import { useState, useContext } from "react"; -import { Link, useLocation } from "react-router-dom"; -import PropTypes from "prop-types"; -import SymbiosisLogo from "@/assets/images/symbiosis-logo.png"; -import CodexLogo from "@/assets/images/codex-logo.png"; -import { CursorVariantContext } from "@/context/CursorVariantProvider"; -import Heading from "@/components/Heading/index"; - -function Footer() { - const [isOpen, setIsOpen] = useState(false); - const location = useLocation(); - - const { setCursorVariantNone, setCursorVariantDefault } = - useContext(CursorVariantContext); - - const handleLinkClick = () => { - setIsOpen(false); - }; - - return ( -
-
-
-

CONNECT WITH US

- -
-
-
- Symbiosis Institute of Technology -

MADE WITH LOVE BY

- Team Codex -
-

- © 2024 CODEX | ALL RIGHTS RESERVED -

-
-
-
- ); -} - -export default Footer; diff --git a/src/components/ScrollToTop/index.jsx b/src/components/ScrollToTop/index.jsx new file mode 100644 index 0000000..50dc1f6 --- /dev/null +++ b/src/components/ScrollToTop/index.jsx @@ -0,0 +1,14 @@ +import { useEffect } from "react"; +import { useLocation } from "react-router-dom"; + +function ScrollToTop() { + const location = useLocation(); + + useEffect(() => { + window.scrollTo(0, 0); + }, [location]); + + return null; +} + +export default ScrollToTop; diff --git a/src/pages/Home/index.jsx b/src/pages/Home/index.jsx index b42e3b0..66542c3 100644 --- a/src/pages/Home/index.jsx +++ b/src/pages/Home/index.jsx @@ -1,7 +1,12 @@ import { useContext } from "react"; import { CursorVariantContext } from "@/context/CursorVariantProvider"; import PageTransition from "@/components/PageTransition"; +import EventsHighlight from "../../components/EventsHighlight"; +import SkewButton from "../../components/SkewButton"; import AboutSection from "@/components/AboutUs"; +import TeamMember from "../Teams/TeamMember"; +import teamMembersData from "../Teams/teamsdata.json"; +import Heading from "@/components/Heading"; function Home() { const { setCursorVariantText, setCursorVariantDefault } = @@ -24,6 +29,26 @@ function Home() {

+
+
+
+ +
+ {teamMembersData.slice(0, 3).map((member) => ( + + ))} +
+ +
+
+
+ +
+ +
); }