From 55ae7f2e42b587ada30f81287a62935c5f7dd47c Mon Sep 17 00:00:00 2001 From: Rami Bitar Date: Wed, 16 Sep 2026 12:09:39 -0400 Subject: [PATCH] Improve mobile navigation, responsive layout, and theme styling --- app/globals.css | 2 +- app/page.tsx | 4 +- components/layout/mobile-navigation.tsx | 123 ++++++++++++++++++ components/layout/site-footer.tsx | 2 +- components/layout/site-header.tsx | 22 ++-- components/sections/features-section.tsx | 14 +- components/sections/features/global-globe.tsx | 25 +++- components/sections/features/usage-chart.tsx | 2 +- components/sections/hero-section.tsx | 2 +- components/shared/frame-crosses.tsx | 22 +++- 10 files changed, 187 insertions(+), 31 deletions(-) create mode 100644 components/layout/mobile-navigation.tsx diff --git a/app/globals.css b/app/globals.css index 2f431ba..e6434ee 100644 --- a/app/globals.css +++ b/app/globals.css @@ -169,7 +169,7 @@ background-size: 64px 100%; } html { - @apply font-sans; + @apply scroll-pt-20 font-sans; } } diff --git a/app/page.tsx b/app/page.tsx index 51cb699..ae231d8 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -11,7 +11,7 @@ import { TestimonialsSection } from "@/components/sections/testimonials-section" export default function Home() { return ( -
+
@@ -22,8 +22,8 @@ export default function Home() { -
+
) } diff --git a/components/layout/mobile-navigation.tsx b/components/layout/mobile-navigation.tsx new file mode 100644 index 0000000..89ac27c --- /dev/null +++ b/components/layout/mobile-navigation.tsx @@ -0,0 +1,123 @@ +"use client" + +import { useEffect, useRef, useState } from "react" +import { RiArrowRightLine, RiCloseLine, RiMenu3Line } from "@remixicon/react" +import { Dialog as DialogPrimitive } from "radix-ui" + +import { Brand } from "@/components/shared/brand" +import { + Dialog, + DialogClose, + DialogDescription, + DialogOverlay, + DialogPortal, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog" + +type NavigationItem = { + label: string + href: string + description: string +} + +export function MobileNavigation({ items }: { items: NavigationItem[] }) { + const [open, setOpen] = useState(false) + const navigating = useRef(false) + + useEffect(() => { + const desktop = window.matchMedia("(min-width: 768px)") + const closeOnDesktop = () => { + if (desktop.matches) setOpen(false) + } + + desktop.addEventListener("change", closeOnDesktop) + return () => desktop.removeEventListener("change", closeOnDesktop) + }, []) + + return ( + + + + + + + + { + // Let the anchor move focus to its section without the trigger + // interrupting the page's smooth scroll when the dialog closes. + if (navigating.current) event.preventDefault() + navigating.current = false + }} + > +
+ + + + +
+ + + + +
+
+
+ ) +} diff --git a/components/layout/site-footer.tsx b/components/layout/site-footer.tsx index f8a010c..03205b0 100644 --- a/components/layout/site-footer.tsx +++ b/components/layout/site-footer.tsx @@ -5,7 +5,7 @@ import { Button } from "@/components/ui/button" export function SiteFooter() { return ( -