diff --git a/package-lock.json b/package-lock.json index 43e0cb4..2cfcbbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "bost-portal", "version": "0.1.0", "dependencies": { + "@gsap/react": "^2.1.1", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", @@ -23,6 +24,7 @@ "date-fns": "^3.6.0", "embla-carousel-react": "^8.1.5", "framer-motion": "^11.2.11", + "gsap": "^3.12.5", "html-react-parser": "^5.1.10", "lucide-react": "^0.379.0", "mongoose": "^8.4.0", @@ -144,6 +146,15 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" }, + "node_modules/@gsap/react": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@gsap/react/-/react-2.1.1.tgz", + "integrity": "sha512-apGPRrmpqxvl1T6Io1KgT8tFU+IuACI6z4zmT7t8+PASserJeLVRFJdSNUFA2Xb/eVkZI1noE8LIrY/w/oJECw==", + "dependencies": { + "gsap": "^3.12.5", + "react": ">=16" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2454,6 +2465,11 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/gsap": { + "version": "3.12.5", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.5.tgz", + "integrity": "sha512-srBfnk4n+Oe/ZnMIOXt3gT605BX9x5+rh/prT2F1SsNJsU1XuMiP0E2aptW481OnonOGACZWBqseH5Z7csHxhQ==" + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", diff --git a/package.json b/package.json index 544d768..65041dc 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@gsap/react": "^2.1.1", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", @@ -24,6 +25,7 @@ "date-fns": "^3.6.0", "embla-carousel-react": "^8.1.5", "framer-motion": "^11.2.11", + "gsap": "^3.12.5", "html-react-parser": "^5.1.10", "lucide-react": "^0.379.0", "mongoose": "^8.4.0", diff --git a/src/components/Home/Hero.jsx b/src/components/Home/Hero.jsx index ace1726..fb5795f 100644 --- a/src/components/Home/Hero.jsx +++ b/src/components/Home/Hero.jsx @@ -1,12 +1,13 @@ + export default function Hero() { return (
-

BOST PORTAL

-

To manage all things Bost

+

BOST PORTAL

+

To manage all things Bost

-
- {" "} +
+ {" "}
); diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 6889963..961afc2 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -7,37 +7,45 @@ import Link from "next/link"; import { handleLogin } from "@/app/actions/authentication"; import Image from "next/image"; import { usePathname, useRouter } from "next/navigation"; +import { useRef } from "react"; +import gsap from "gsap"; +import { useGSAP } from "@gsap/react"; +gsap.registerPlugin(useGSAP); export default function Navbar({ session }) { const pathname = usePathname(); const [isSheetOpen, setIsSheetOpen] = useState(false); + const container = useRef(); useEffect(() => { setIsSheetOpen(false); }, [pathname]); - // useEffect(() => { - // const handleKeyDown = (event) => { - // if (event.key === "L" || event.key === "l") { - // handleLogin(); - // } - // }; - - // window.addEventListener("keydown", handleKeyDown); - - // return () => { - // window.removeEventListener("keydown", handleKeyDown); - // }; - // }, []); + useGSAP( + () => { + gsap.from([".hamburger",".Logo"], { y:-50, + opacity:0, + duration:1 + }); + gsap.from([".Globe",".LandingHeroTitle",".LandingHeroSubtitle"], { opacity:0, + delay:1, + duration:1 + }); + }, + { } + ); if (pathname.startsWith("/dashboard")) return null; return ( -
- +
+
@@ -135,22 +143,3 @@ function MenuIcon(props) { ); } - -function MountainIcon(props) { - return ( - - - - ); -}