This commit is contained in:
eric
2026-03-08 12:30:50 -05:00
parent 0e75fb2e6e
commit 57a788006f
12 changed files with 536 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ const navLinks = [
{ labelKey: "roadmap" as const, href: "#roadmap" },
{ labelKey: "tools" as const, href: "#tools" },
{ labelKey: "community" as const, href: "#community" },
{ labelKey: "shop" as const, href: "#shop" },
];
export default function Header() {
@@ -57,13 +58,6 @@ export default function Header() {
{tNav(link.labelKey)}
</a>
))}
<button
type="button"
onClick={() => router.replace(pathname, { locale: locale === "zh" ? "en" : "zh" })}
className="rounded-lg px-3 py-2 text-sm font-medium text-slate-600 transition-colors hover:bg-slate-100 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-100"
>
{locale === "zh" ? "EN" : "中文"}
</button>
</nav>
<div className="flex shrink-0 items-center gap-1 sm:gap-3">
@@ -87,6 +81,15 @@ export default function Header() {
{t("loginRegister")}
</button>
)}
<button
type="button"
onClick={() => router.replace(pathname, { locale: locale === "zh" ? "en" : "zh" })}
className="inline-flex shrink-0 items-center justify-center rounded-lg p-2 text-sm font-medium text-slate-600 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800"
aria-label={locale === "zh" ? "Switch to English" : "切换到中文"}
title={locale === "zh" ? "EN" : "中文"}
>
{locale === "zh" ? "EN" : "中文"}
</button>
<ThemeToggle />
<button
onClick={() => setMobileOpen(!mobileOpen)}