diff --git a/client/src/components/Navbar.tsx b/client/src/components/Navbar.tsx index 56b25fe..2794177 100644 --- a/client/src/components/Navbar.tsx +++ b/client/src/components/Navbar.tsx @@ -1,228 +1,10 @@ -import { MEMBERSHIP_FORM_URL } from "../lib/siteLinks"; +import NewNavbar from "./NewNavbar"; import Marquee from "./Marquee"; -import { useEffect, useState } from "react"; -import { Link, NavLink, useLocation } from "react-router-dom"; -import { AnimatePresence, motion } from "motion/react"; -import { FiChevronDown, FiMenu, FiX } from "react-icons/fi"; -import logo from "../assets/brand/umsa-logo.png"; - -const ABOUT_MENU = [ - { to: "/about", label: "About Us" }, - { to: "/contact", label: "Contact" }, - { to: "/team", label: "Our Team" }, -]; - -const LINKS = [ - { to: "/", label: "Home", end: true }, - { to: "/events", label: "Events" }, - { to: "/sponsors", label: "Sponsors" }, - { to: "/gallery", label: "Photos" }, -]; - -const LINK_BASE = - "font-heading text-[13px] tracking-[0.12em] uppercase transition-colors"; - -function AboutMenu() { - const [open, setOpen] = useState(false); - const { pathname } = useLocation(); - const active = ABOUT_MENU.some((item) => pathname === item.to); - - useEffect(() => { - if (!open) return; - const onKey = (e: KeyboardEvent) => e.key === "Escape" && setOpen(false); - document.addEventListener("keydown", onKey); - return () => document.removeEventListener("keydown", onKey); - }, [open]); - - return ( -
setOpen(true)} - onMouseLeave={() => setOpen(false)} - onFocus={() => setOpen(true)} - onBlur={(e) => { - if (!e.currentTarget.contains(e.relatedTarget as Node)) setOpen(false); - }} - > - setOpen(false)} - aria-expanded={open} - aria-haspopup="menu" - className={`relative flex items-center gap-1 ${LINK_BASE} ${ - active - ? "text-accent2-primary" - : "text-accent1-primary hover:text-accent2-primary" - }`} - > - About - - {active && ( - - )} - - - - {open && ( - - {ABOUT_MENU.map((item) => ( - setOpen(false)} - className={({ isActive }) => - `block px-5 py-2.5 ${LINK_BASE} ${ - isActive - ? "text-accent2-primary" - : "text-accent1-primary hover:text-accent2-primary" - }` - } - > - {item.label} - - ))} - - )} - -
- ); -} export default function Navbar() { - const [open, setOpen] = useState(false); - - const linkClass = ({ isActive }: { isActive: boolean }) => - `relative ${LINK_BASE} ${ - isActive - ? "text-accent2-primary" - : "text-accent1-primary hover:text-accent2-primary" - }`; - return (
- - + ); diff --git a/client/src/components/NewNavbar.tsx b/client/src/components/NewNavbar.tsx new file mode 100644 index 0000000..c574103 --- /dev/null +++ b/client/src/components/NewNavbar.tsx @@ -0,0 +1,183 @@ +import { MEMBERSHIP_FORM_URL } from "../lib/siteLinks"; +import { NavLink } from "react-router-dom"; +import { useState } from "react"; +import UMSALogo from "./UMSALogo.png"; + +export default function NewNavbar() { + const [isOpen, setIsOpen] = useState(false); + const [openMenu, setOpenMenu] = useState<"about" | "events" | null>(null); + const linkClass = + "text-[16px] whitespace-nowrap font-normal uppercase [font-family:'Sekuya'] text-[#2727DC] transition-colors hover:text-blue-700"; + + const dropdownItem = + "px-4 py-2 text-[14px] uppercase [font-family:'Sekuya'] text-[#2727DC] hover:bg-[#e6e6fa]"; + + const loginClass = + "rounded-full bg-[#FF4B55] px-5 py-[3px] text-[14px] uppercase text-white [font-family:'Sekuya'] " + + "shadow-[0_3px_0_#B3202B] transition-transform hover:translate-y-[1px] hover:shadow-[0_2px_0_#B3202B]"; + + return ( + + ); +} diff --git a/client/src/components/UMSALogo.png b/client/src/components/UMSALogo.png new file mode 100644 index 0000000..65156e6 Binary files /dev/null and b/client/src/components/UMSALogo.png differ