From 98b6c2934e5b67a163a2627999e26fdce9270ac0 Mon Sep 17 00:00:00 2001 From: dimitar Date: Fri, 28 Mar 2025 19:44:51 +0100 Subject: [PATCH] hamburger menu --- src/app/[locale]/about/page.tsx | 8 +++---- src/components/hero.tsx | 4 ++-- src/components/navbar.tsx | 39 +++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx index 767f2bf..36feeaf 100644 --- a/src/app/[locale]/about/page.tsx +++ b/src/app/[locale]/about/page.tsx @@ -30,8 +30,8 @@ export default async function AboutPage({ params: { locale } }: Props) { {[1, 2, 3].map((index) => (
-
-
+
+ {/*
-
-

+

*/} +

{t(`values.${index}.title`)}

diff --git a/src/components/hero.tsx b/src/components/hero.tsx index 92ca719..5e55402 100644 --- a/src/components/hero.tsx +++ b/src/components/hero.tsx @@ -1,6 +1,6 @@ import { getTranslations } from "next-intl/server"; import { Button } from "./ui/button"; -import Image from "next/image"; +// import Image from "next/image"; export async function Hero() { const t = await getTranslations("hero"); @@ -48,7 +48,7 @@ export async function Hero() { }} />

-
+

{t("title")}{" "} diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index e459e7e..c985d4a 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -3,7 +3,7 @@ import { useTheme } from "./theme-provider"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { Sun, Moon } from "lucide-react"; +import { Sun, Moon, Menu, X } from "lucide-react"; import { useState } from "react"; const languages = [ @@ -35,6 +35,7 @@ export function Navbar() { if (path !== "" && currentPath.startsWith(path)) return true; return false; }; + const [isMenuOpen, setIsMenuOpen] = useState(false); return (

);