"use client" import NextLink from "next/link" import { Link } from "@/i18n/navigation" import Image from "next/image" import { Book, GitBranch, FileText, Github, Menu, Rss } from "lucide-react" import { useState } from "react" import { useLocale, useTranslations } from "next-intl" import { SearchDialog } from "./search-dialog" import { LanguageSwitcher } from "./language-switcher" export default function Navbar() { const [isMenuOpen, setIsMenuOpen] = useState(false) const t = useTranslations("nav") const locale = useLocale() // English keeps the canonical root /rss.xml; other locales use the // per-locale feed at /{locale}/rss.xml (mirrors components/rss-link.tsx). const rssUrl = locale === "en" ? "https://proxmenux.com/rss.xml" : `https://proxmenux.com/${locale}/rss.xml` // Internal hrefs use the locale-aware Link from @/i18n/navigation, // so the active /[locale]/ segment is added automatically. External // URLs (GitHub) stay as `next/link` via NextLink to avoid the // locale prefix. Labels read from messages//common.json // under the `nav.*` namespace. const navItems = [ { href: "/docs/introduction", icon: , label: t("documentation"), external: false }, { href: "/changelog", icon: , label: t("changelog"), external: false }, { href: "/guides", icon: , label: t("guides"), external: false }, { href: "https://github.com/MacRimi/ProxMenux", icon: , label: t("github"), external: true }, ] return (
ProxMenux Logo ProxMenux {/* Right side — search (responsive) + desktop nav + mobile menu button */}
{/* Search — always visible: icon only on mobile/tablet, full button on lg+ */} {/* Desktop menu — only on lg+ to avoid overlap with the logo on tablet portrait */} {/* Mobile + tablet menu button — visible until lg breakpoint */}
{/* Mobile + tablet menu */} {isMenuOpen && ( )}
) }