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/app/blogs/[blogid]/page.jsx b/src/app/blogs/[blogid]/page.jsx index 59a9de6..913691b 100644 --- a/src/app/blogs/[blogid]/page.jsx +++ b/src/app/blogs/[blogid]/page.jsx @@ -7,7 +7,7 @@ const page = async ({ params }) => { const blogDetails = await getBlogById(blogid); return

{blogDetails.title}

-

{parse(blogDetails.content)}

+

{parse(blogDetails.content)}

Author: {blogDetails.author} Club: {blogDetails.club} diff --git a/src/app/error/page.jsx b/src/app/error/page.jsx index 5e67f00..03b3809 100644 --- a/src/app/error/page.jsx +++ b/src/app/error/page.jsx @@ -11,7 +11,7 @@ const errorMap = { Configuration

), - AccessDenied: "Access Denied. Try sigining in from different account Or", + AccessDenied: "Access Denied :( ", }; export default function AuthErrorPage() { @@ -19,16 +19,16 @@ export default function AuthErrorPage() { const error = search.get("error"); return ( -
-
- +
+
+ {" "} {errorMap[error] || "Please contact us if this error persists."}
- + Go Back to Home
diff --git a/src/app/globals.css b/src/app/globals.css index c258320..c271737 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -21,3 +21,27 @@ body { font-weight: 400; font-style: normal; } +.blogcontent>h1{ + font-size: 26px; + font-weight: 800; +} +.blogcontent>h2{ + font-size: 19px; + font-weight: 600; +} +.blogcontent>h3{ + font-size: 16px; + font-weight: 400; +} +.blogcontent>h4{ + font-size: 13px; + font-weight: 200; +} +.blogcontent>h5{ + font-size: 10px; + font-weight: 150; +} +.blogcontent>p{ + font-size: 13px; + font-weight: 100; +} diff --git a/src/auth.js b/src/auth.js index 060ac68..0f48834 100644 --- a/src/auth.js +++ b/src/auth.js @@ -29,7 +29,8 @@ export const { handlers, signIn, signOut, auth } = NextAuth({ if (account.provider == "google") { try { const { email, name, image, id } = user; - const found=allowedEmails.find((email)=>email===email) + const found=allowedEmails.find((allowedemail)=>allowedemail===email) + console.log("found mail",found) if(!found)return false; 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 ( -
- +
+
- + -