From 151ecc56dfacc81fce9b6627aef8093b80a54b97 Mon Sep 17 00:00:00 2001 From: Aditya raj Date: Sat, 6 Jul 2024 16:08:43 +0530 Subject: [PATCH 1/5] add NEXTAUTH_URL in .env --- .env.development | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.development b/.env.development index 101a861..8f99e0c 100644 --- a/.env.development +++ b/.env.development @@ -4,4 +4,5 @@ GOOGLE_CLIENT_ID=807365755259-3pfhavcjh2i6vhqdvvrjvb6dr86vceu9.apps.googleuserco GOOGLE_CLIENT_SECRET=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 UPLOADTHING_SECRET=sk_live_eda154ad1d74cc73f9413cede632cc607ea256e2155ecbd1736ab8035f0fc938 UPLOADTHING_APP_ID=broaesm4xr -SUPER_ADMIN=2021ceb1007 \ No newline at end of file +SUPER_ADMIN=2021ceb1007 +NEXTAUTH_URL=https://bost-portal.nalinangrish.me/ \ No newline at end of file From f67bfbceb5d5d5d416c6e4ef09b0a45d94dd86df Mon Sep 17 00:00:00 2001 From: Aditya raj Date: Sat, 6 Jul 2024 22:35:36 +0530 Subject: [PATCH 2/5] minor fix :) --- src/auth.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; From 6cf720c0b7afe9d4bb791d34936b79742be5f246 Mon Sep 17 00:00:00 2001 From: Aditya raj Date: Sun, 7 Jul 2024 11:02:50 +0530 Subject: [PATCH 3/5] Fix: Blog content not displaying correctly. --- src/app/blogs/[blogid]/page.jsx | 2 +- src/app/globals.css | 24 ++++++++++++++++++++++++ src/components/editor.jsx | 3 +-- 3 files changed, 26 insertions(+), 3 deletions(-) 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/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/components/editor.jsx b/src/components/editor.jsx index 48f1869..88b0f49 100644 --- a/src/components/editor.jsx +++ b/src/components/editor.jsx @@ -5,7 +5,6 @@ import "react-quill/dist/quill.snow.css"; import parse from "html-react-parser"; export default function Editor({value,setValue}) { // const [value, setValue] = useState(""); - console.log(value) // Customize the toolbar options const modules = { toolbar: [ @@ -32,7 +31,7 @@ export default function Editor({value,setValue}) { return (
-
+
Date: Mon, 8 Jul 2024 12:57:50 +0530 Subject: [PATCH 4/5] add some animation to hero --- package-lock.json | 16 ++++++++ package.json | 2 + src/components/Home/Hero.jsx | 9 +++-- src/components/Navbar/Navbar.jsx | 65 +++++++++++++------------------- 4 files changed, 50 insertions(+), 42 deletions(-) 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 ( -
- +
+
- + -