From c62fbcf85c82b93a400dadc4448a69ba1171657e Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:42:44 +0100 Subject: [PATCH] Added backdrop on nav --- frontend/components/nav-bar.css | 15 ++++ frontend/components/nav-bar.tsx | 141 ++++++-------------------------- 2 files changed, 42 insertions(+), 114 deletions(-) create mode 100644 frontend/components/nav-bar.css diff --git a/frontend/components/nav-bar.css b/frontend/components/nav-bar.css new file mode 100644 index 0000000..4883708 --- /dev/null +++ b/frontend/components/nav-bar.css @@ -0,0 +1,15 @@ +.animate-header-slide-down-fade { + animation: header-slide-down-fade 1s ease-in-out; +} + +@keyframes header-slide-down-fade { + 0% { + opacity: 0; + transform: translateY(-16px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} diff --git a/frontend/components/nav-bar.tsx b/frontend/components/nav-bar.tsx index cd12f56..db463c3 100644 --- a/frontend/components/nav-bar.tsx +++ b/frontend/components/nav-bar.tsx @@ -1,14 +1,8 @@ "use client"; -import { Book, Menu, Sunset, Trees, Zap } from "lucide-react"; +import { Menu } from "lucide-react"; import { cn } from "@/lib/utils"; -import { - Accordion, - AccordionContent, - AccordionItem, - AccordionTrigger, -} from "@/components/ui/accordion"; import { Button, buttonVariants } from "@/components/ui/button"; import { navigationMenuTriggerStyle } from "@/components/ui/navigation-menu"; import { @@ -22,53 +16,27 @@ import Link from "next/link"; import { deleteCookie, getCookie } from "cookies-next"; import { useEffect, useState } from "react"; import { ThemeSwitcher } from "./theme-switcher"; +import "./nav-bar.css"; -const subMenuItemsOne = [ - { - title: "Blog", - description: "The latest industry news, updates, and info", - icon: , - }, - { - title: "Compnay", - description: "Our mission is to innovate and empower the world", - icon: , - }, - { - title: "Careers", - description: "Browse job listing and discover our workspace", - icon: , - }, - { - title: "Support", - description: - "Get in touch with our support team or visit our community forums", - icon: , - }, -]; - -const subMenuItemsTwo = [ - { - title: "Help Center", - description: "Get all the answers you need right here", - icon: , - }, - { - title: "Contact Us", - description: "We are here to help you with any questions you have", - icon: , - }, - { - title: "Status", - description: "Check the current status of our services and APIs", - icon: , - }, - { - title: "Terms of Service", - description: "Our terms and conditions for using our services", - icon: , - }, -]; +const Href: React.FC> = ({ + href, + children, +}) => { + return ( + + {children} + + ); +}; const Navbar = () => { const [cookie, setCookie] = useState(null); @@ -77,7 +45,7 @@ const Navbar = () => { setCookie(_cookie?.toString() ?? null); }, []); return ( - + @@ -92,66 +60,11 @@ const Navbar = () => { - - Accueil - - - Planning - - - A propos - - - Gallerie - - - Blog - + Accueil + Planning + À propos + Gallerie + Blog