Skip to content

Commit 83a5e23

Browse files
pescnclaude
andcommitted
feat: Replace nav title with back to dashboard link
- Remove "NexusGate Docs" text from sidebar header - Add NavTitle component with "返回控制台/Back to Dashboard" link - Remove sidebar banner (no longer needed) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 68e9b95 commit 83a5e23

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

src/components/nav-title.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'use client';
2+
3+
import { ArrowLeft } from 'lucide-react';
4+
5+
interface NavTitleProps {
6+
locale?: string;
7+
}
8+
9+
export function NavTitle({ locale }: NavTitleProps) {
10+
const isZh = locale === 'zh';
11+
12+
// Use relative path to go up from /docs/ to root /
13+
return (
14+
<a
15+
href="/"
16+
className="flex items-center gap-2 text-sm font-medium text-fd-foreground transition-colors hover:text-fd-foreground/80"
17+
>
18+
<ArrowLeft className="size-4" />
19+
{isZh ? '返回控制台' : 'Back to Dashboard'}
20+
</a>
21+
);
22+
}

src/lib/layout.shared.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import type { DocsLayoutProps } from 'fumadocs-ui/layouts/docs';
2-
import { SidebarBanner } from '@/components/sidebar-banner';
2+
import { NavTitle } from '@/components/nav-title';
33
import { i18n } from './i18n';
44

55
export function baseOptions(locale: string): Omit<DocsLayoutProps, 'tree' | 'children'> {
66
return {
77
i18n,
88
nav: {
9-
title: 'NexusGate Docs',
10-
},
11-
sidebar: {
12-
banner: <SidebarBanner locale={locale} />,
9+
title: <NavTitle locale={locale} />,
1310
},
1411
};
1512
}

0 commit comments

Comments
 (0)