From 8cf7bd79e3c767dfa46ac2056b2b3b8a602de1dc Mon Sep 17 00:00:00 2001 From: Rad14nt Date: Tue, 30 Dec 2025 10:57:08 +0100 Subject: [PATCH] Mobile friendly navbar --- app/faq/page.tsx | 2 +- components/navigation.tsx | 141 +++++++++++++++++++++++++++----------- 2 files changed, 103 insertions(+), 40 deletions(-) diff --git a/app/faq/page.tsx b/app/faq/page.tsx index 9292715..2a48f17 100644 --- a/app/faq/page.tsx +++ b/app/faq/page.tsx @@ -39,7 +39,7 @@ export default function FAQPage() { > + + -
-
- {navigationData.main.map((item, index) => { + {/* Mobile dropdown */} +
+
+
+ {navigationData.main.map((item) => { const isActive = pathname === item.href const isExternal = item.external return ( - - {item.label} - {isExternal && } - + setMobileOpen(false)} + className={`flex items-center justify-between w-full px-4 py-3 rounded-lg font-medium transition-all duration-200 ${ + isActive + ? "bg-(--color-primary) dark:bg-blue-600 text-white" + : "text-(--color-gray) dark:text-gray-300 hover:bg-(--color-surface) dark:hover:bg-gray-800 hover:text-(--color-primary) dark:hover:text-blue-400" + }`} + > + {item.label} + {isExternal && } + ) })}
-
- + ) }