From 96234f1d453f32749e5a2f5a2e1544821bfe2151 Mon Sep 17 00:00:00 2001 From: saicharan Date: Tue, 21 Oct 2025 19:36:55 +0530 Subject: [PATCH 1/7] add FAQ section to nav bar --- apps/web/src/components/faq/FaqSection.tsx | 2 +- apps/web/src/components/landing-sections/navbar.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/faq/FaqSection.tsx b/apps/web/src/components/faq/FaqSection.tsx index 220f446..05c758c 100644 --- a/apps/web/src/components/faq/FaqSection.tsx +++ b/apps/web/src/components/faq/FaqSection.tsx @@ -9,7 +9,7 @@ import { faqs } from "./faqData"; export function FaqSection() { return ( -
+
{ { name: "How it works", href: "/#HIW" }, { name: "Stats", href: "/#Stats" }, { name: "Contact", href: "/#Contact" }, + {name:"FAQ",href:"./#faq"} ]; return ( From 45fdbde8561844b0dd234c96273a5ce5394ce61b Mon Sep 17 00:00:00 2001 From: saicharan Date: Wed, 22 Oct 2025 21:02:23 +0530 Subject: [PATCH 2/7] add mobile responsiveness to navbar --- .../components/landing-sections/navbar.tsx | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/landing-sections/navbar.tsx b/apps/web/src/components/landing-sections/navbar.tsx index 435d115..1245db9 100644 --- a/apps/web/src/components/landing-sections/navbar.tsx +++ b/apps/web/src/components/landing-sections/navbar.tsx @@ -3,7 +3,7 @@ import React, { useState } from "react"; import PrimaryButtom from "../ui/custom-button"; import { motion, useScroll, useMotionValueEvent } from "framer-motion"; import Image from "next/image"; -import { Terminal, Github } from "lucide-react"; +import { Terminal, Github,Menu ,X } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; @@ -13,6 +13,7 @@ const Navbar = () => { const pathname = usePathname(); const isPricingPage = pathname === "/pricing"; const [showNavbar, setShowNavbar] = useState(isPricingPage ? true : false); + const [isOpen,setIsOpen] = useState(false); useMotionValueEvent(scrollYProgress, "change", (latest) => { if (!isPricingPage) { @@ -42,6 +43,11 @@ const Navbar = () => { : "fixed rounded-3xl top-4 border w-[94%] md:w-[80%] mx-auto left-1/2 -translate-x-1/2" )} > +
+ +
{ ); })}
-
+
{
+ + {isOpen && ( + + {links.map((link,index)=>( + setIsOpen(false)} className="text-white hover:text-gray-300 text-lg">{link.name} + + + ))} + + setIsOpen(false)} + className="flex items-center gap-2 px-4 py-2 bg-[0#d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" + > + + Contribute + + + setIsOpen(false)} className="cursor-pointer z-30"> + + + Get Started + + + + + )} ); }; From 79187a7e4b5e5f434afbd7a272a8ebc4e9a460cd Mon Sep 17 00:00:00 2001 From: saicharan Date: Wed, 22 Oct 2025 21:11:03 +0530 Subject: [PATCH 3/7] fix typo --- apps/web/src/components/landing-sections/navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/landing-sections/navbar.tsx b/apps/web/src/components/landing-sections/navbar.tsx index 1245db9..1f22fbf 100644 --- a/apps/web/src/components/landing-sections/navbar.tsx +++ b/apps/web/src/components/landing-sections/navbar.tsx @@ -112,7 +112,7 @@ const Navbar = () => { target="_blank" rel="noopener noreferrer" onClick={()=>setIsOpen(false)} - className="flex items-center gap-2 px-4 py-2 bg-[0#d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" + className="flex items-center gap-2 px-4 py-2 bg-[#0d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" > Contribute From cb6bb30ed5cad2bb5632544b8acdf2b358f7d269 Mon Sep 17 00:00:00 2001 From: saicharan Date: Wed, 22 Oct 2025 22:28:17 +0530 Subject: [PATCH 4/7] style: format and remove spaces --- apps/web/src/components/faq/FaqSection.tsx | 2 +- .../components/landing-sections/navbar.tsx | 30 ++++++++----------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/apps/web/src/components/faq/FaqSection.tsx b/apps/web/src/components/faq/FaqSection.tsx index 05c758c..f46b393 100644 --- a/apps/web/src/components/faq/FaqSection.tsx +++ b/apps/web/src/components/faq/FaqSection.tsx @@ -9,7 +9,7 @@ import { faqs } from "./faqData"; export function FaqSection() { return ( -
+
{ const pathname = usePathname(); const isPricingPage = pathname === "/pricing"; const [showNavbar, setShowNavbar] = useState(isPricingPage ? true : false); - const [isOpen,setIsOpen] = useState(false); + const [isOpen, setIsOpen] = useState(false); useMotionValueEvent(scrollYProgress, "change", (latest) => { if (!isPricingPage) { @@ -28,7 +28,7 @@ const Navbar = () => { { name: "How it works", href: "/#HIW" }, { name: "Stats", href: "/#Stats" }, { name: "Contact", href: "/#Contact" }, - {name:"FAQ",href:"./#faq"} + { name: "FAQ", href: "/#faq"} ]; return ( @@ -93,7 +93,6 @@ const Navbar = () => {
- {isOpen && ( { {links.map((link,index)=>( setIsOpen(false)} className="text-white hover:text-gray-300 text-lg">{link.name} - ))} - setIsOpen(false)} className="flex items-center gap-2 px-4 py-2 bg-[#0d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" - > - - Contribute - - - setIsOpen(false)} className="cursor-pointer z-30"> - - - Get Started - - - - + > + + Contribute + + setIsOpen(false)} className="cursor-pointer z-30"> + + + Get Started + + )} ); From aeac4acebcf5275bff9f65b1759d3e6f010b98df Mon Sep 17 00:00:00 2001 From: saicharan Date: Thu, 23 Oct 2025 16:56:42 +0530 Subject: [PATCH 5/7] style: format code for spaces and indentation --- .../components/landing-sections/navbar.tsx | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/apps/web/src/components/landing-sections/navbar.tsx b/apps/web/src/components/landing-sections/navbar.tsx index a902307..ed65148 100644 --- a/apps/web/src/components/landing-sections/navbar.tsx +++ b/apps/web/src/components/landing-sections/navbar.tsx @@ -3,7 +3,7 @@ import React, { useState } from "react"; import PrimaryButtom from "../ui/custom-button"; import { motion, useScroll, useMotionValueEvent } from "framer-motion"; import Image from "next/image"; -import { Terminal, Github,Menu ,X } from "lucide-react"; +import { Terminal, Github, Menu, X } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; @@ -28,7 +28,7 @@ const Navbar = () => { { name: "How it works", href: "/#HIW" }, { name: "Stats", href: "/#Stats" }, { name: "Contact", href: "/#Contact" }, - { name: "FAQ", href: "/#faq"} + { name: "FAQ", href: "/#faq" } ]; return ( @@ -43,11 +43,14 @@ const Navbar = () => { : "fixed rounded-3xl top-4 border w-[94%] md:w-[80%] mx-auto left-1/2 -translate-x-1/2" )} > -
- -
+
{
{isOpen && ( - {links.map((link,index)=>( - setIsOpen(false)} className="text-white hover:text-gray-300 text-lg">{link.name} + {links.map((link, index)=>( + setIsOpen(false)} className="text-white hover:text-gray-300 text-lg">{link.name} ))} setIsOpen(false)} + onClick={() => setIsOpen(false)} className="flex items-center gap-2 px-4 py-2 bg-[#0d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" > Contribute - setIsOpen(false)} className="cursor-pointer z-30"> + setIsOpen(false)} className="cursor-pointer z-30"> Get Started From c968dde1cff3f51faa77f5acfa8719586caa81b4 Mon Sep 17 00:00:00 2001 From: saicharan Date: Thu, 23 Oct 2025 17:05:51 +0530 Subject: [PATCH 6/7] feat: add escape key support to close the mobile menu --- apps/web/src/components/landing-sections/navbar.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/web/src/components/landing-sections/navbar.tsx b/apps/web/src/components/landing-sections/navbar.tsx index ed65148..c58f836 100644 --- a/apps/web/src/components/landing-sections/navbar.tsx +++ b/apps/web/src/components/landing-sections/navbar.tsx @@ -14,7 +14,19 @@ const Navbar = () => { const isPricingPage = pathname === "/pricing"; const [showNavbar, setShowNavbar] = useState(isPricingPage ? true : false); const [isOpen, setIsOpen] = useState(false); + + React.useEffect(() => { + const handleEscape = (e: KeyboardEvent) => { + if (e.key === 'Escape' && isOpen) { + setIsOpen(false); + (document.activeElement as HTMLElement)?.blur(); + } + }; + document.addEventListener('keydown', handleEscape); + return () => document.removeEventListener('keydown', handleEscape); + }, [isOpen]); + useMotionValueEvent(scrollYProgress, "change", (latest) => { if (!isPricingPage) { setShowNavbar(latest > 0); From ac75c1272f3d2ca159bdce6be98a79427b932ec3 Mon Sep 17 00:00:00 2001 From: apsinghdev Date: Fri, 24 Oct 2025 21:52:18 +0530 Subject: [PATCH 7/7] chore: fix corners of the card below navbar (mobile) --- .../components/landing-sections/navbar.tsx | 57 +++++++++++-------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/apps/web/src/components/landing-sections/navbar.tsx b/apps/web/src/components/landing-sections/navbar.tsx index c58f836..2a735ad 100644 --- a/apps/web/src/components/landing-sections/navbar.tsx +++ b/apps/web/src/components/landing-sections/navbar.tsx @@ -14,19 +14,19 @@ const Navbar = () => { const isPricingPage = pathname === "/pricing"; const [showNavbar, setShowNavbar] = useState(isPricingPage ? true : false); const [isOpen, setIsOpen] = useState(false); - + React.useEffect(() => { const handleEscape = (e: KeyboardEvent) => { - if (e.key === 'Escape' && isOpen) { + if (e.key === "Escape" && isOpen) { setIsOpen(false); (document.activeElement as HTMLElement)?.blur(); } }; - document.addEventListener('keydown', handleEscape); - return () => document.removeEventListener('keydown', handleEscape); + document.addEventListener("keydown", handleEscape); + return () => document.removeEventListener("keydown", handleEscape); }, [isOpen]); - + useMotionValueEvent(scrollYProgress, "change", (latest) => { if (!isPricingPage) { setShowNavbar(latest > 0); @@ -40,7 +40,7 @@ const Navbar = () => { { name: "How it works", href: "/#HIW" }, { name: "Stats", href: "/#Stats" }, { name: "Contact", href: "/#Contact" }, - { name: "FAQ", href: "/#faq" } + { name: "FAQ", href: "/#faq" }, ]; return ( @@ -55,13 +55,13 @@ const Navbar = () => { : "fixed rounded-3xl top-4 border w-[94%] md:w-[80%] mx-auto left-1/2 -translate-x-1/2" )} > -
@@ -109,33 +109,44 @@ const Navbar = () => {
{isOpen && ( - - {links.map((link, index)=>( - setIsOpen(false)} className="text-white hover:text-gray-300 text-lg">{link.name} + {links.map((link, index) => ( + setIsOpen(false)} + className="text-white hover:text-gray-300 text-lg" + > + {link.name} ))} setIsOpen(false)} - className="flex items-center gap-2 px-4 py-2 bg-[#0d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" + href="https://github.com/apsinghdev/opensox" + target="_blank" + rel="noopener noreferrer" + onClick={() => setIsOpen(false)} + className="flex items-center gap-2 px-4 py-2 bg-[#0d1117] hover:bg-[#161b22] rounded-lg border border-[#30363d] text-white transition-colors" > Contribute - setIsOpen(false)} className="cursor-pointer z-30"> + setIsOpen(false)} + className="cursor-pointer z-30" + > Get Started - )} + + )} ); };