From 0674d0188b2f6bad08f9a66b318d8ac9c586b0d3 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Fri, 8 May 2026 22:25:47 +0000 Subject: [PATCH] Header redesign: dropdowns + site-wide leaderboard, drop secondary nav MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorganize the navigation: - navLinks now carries an optional dropdown[] per section. NEWS / GEAR & REVIEWS / SHOW COVERAGE / TECHNOLOGY get sub-items pulled from the old flat categoryLinks list. - Desktop main nav renders each top-level item as a hover-triggered dropdown (CSS-only via Tailwind group-hover + group-focus-within for keyboard accessibility). aria-haspopup advertises the popup; the panel is role=menu with menuitem children. - Mobile drawer's category list now groups by parent section instead of showing a flat list. - Removed the secondary category sub-nav row that previously sat below the main nav (its content is in the dropdowns now). - Added a site-wide 728x90 ad slot between the top utility bar and the main nav (md+ only). Uses so the existing ad-rotation pool serves it. Net: 566 → ~600 lines (markup heavier than what was removed because the dropdown panels are inline). --- src/components/Header.tsx | 162 ++++++++++++++++++++++++-------------- 1 file changed, 101 insertions(+), 61 deletions(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 52fbed8..84f99b0 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -15,32 +15,57 @@ import { import { createClient } from "@/lib/supabase/client"; import NotificationCenter from "@/components/NotificationCenter"; import LanguageSwitcher from "@/components/LanguageSwitcher"; +import AdSlot from "@/components/AdSlot"; -const navLinks = [ - { label: "NEWS", href: "/news" }, - { label: "GEAR & REVIEWS", href: "/gear" }, - { label: "SHOW COVERAGE", href: "/show-coverage" }, - { label: "TECHNOLOGY", href: "/technology" }, +interface NavItem { + label: string; + href: string; + dropdown?: { label: string; href: string }[]; +} + +const navLinks: NavItem[] = [ + { + label: "NEWS", + href: "/news", + dropdown: [ + { label: "Live Production", href: "/news?category=live-production" }, + { label: "IP & Cloud", href: "/news?category=ip-cloud" }, + { label: "AI & Automation", href: "/news?category=ai" }, + { label: "People", href: "/news?category=people" }, + ], + }, + { + label: "GEAR & REVIEWS", + href: "/gear", + dropdown: [ + { label: "Audio", href: "/gear?category=audio" }, + { label: "Cameras", href: "/gear?category=cameras" }, + { label: "Reviews", href: "/gear" }, + ], + }, + { + label: "SHOW COVERAGE", + href: "/show-coverage", + dropdown: [ + { label: "NAB Show", href: "/show-coverage" }, + { label: "IBC", href: "/show-coverage?event=ibc" }, + ], + }, + { + label: "TECHNOLOGY", + href: "/technology", + dropdown: [ + { label: "Storage & MAM", href: "/technology?category=storage" }, + { label: "Streaming", href: "/technology?category=streaming" }, + { label: "AI & Automation", href: "/technology?category=ai" }, + ], + }, { label: "NEWSLETTER", href: "/newsletter/archive" }, { label: "FORUM", href: "/forum" }, { label: "ADVERTISE", href: "/advertise" }, { label: "ABOUT", href: "/about" }, ]; -const categoryLinks = [ - { label: "Live Production", href: "/news?category=live-production" }, - { label: "IP & Cloud", href: "/news?category=ip-cloud" }, - { label: "Audio", href: "/gear?category=audio" }, - { label: "Cameras", href: "/gear?category=cameras" }, - { label: "Storage & MAM", href: "/technology?category=storage" }, - { label: "Streaming", href: "/technology?category=streaming" }, - { label: "AI & Automation", href: "/technology?category=ai" }, - { label: "NAB Show", href: "/show-coverage" }, - { label: "IBC", href: "/show-coverage?event=ibc" }, - { label: "People", href: "/news?category=people" }, - { label: "Reviews", href: "/gear" }, -]; - export default function Header() { const [scrolled, setScrolled] = useState(false); const [mobileOpen, setMobileOpen] = useState(false); @@ -56,7 +81,6 @@ export default function Header() { const mobileMenuRef = useRef(null); const hamburgerRef = useRef(null); const navLinksRef = useRef<(HTMLAnchorElement | null)[]>([]); - const categoryLinksRef = useRef<(HTMLAnchorElement | null)[]>([]); useEffect(() => { const handler = () => setScrolled(window.scrollY > 60); @@ -336,7 +360,14 @@ export default function Header() { - {/* MAIN NAV + CATEGORY SUB-NAV */} + {/* HEADER LEADERBOARD — site-wide 728x90 between utility bar and main nav */} +
+
+ +
+
+ + {/* MAIN NAV */}
- - {/* SECONDARY CATEGORY SUB-NAV */} -
);