From 529dce6247a79707bfbf918eb41decb1575b6207 Mon Sep 17 00:00:00 2001 From: Kuizuo Date: Sat, 2 Nov 2024 01:39:05 +0800 Subject: [PATCH] fix: navbar style invalid in english version --- i18n/en/docusaurus-theme-classic/navbar.json | 14 ++++++- src/pages/about.mdx | 4 +- src/pages/videos/index.tsx | 41 -------------------- src/theme/Navbar/Layout/index.tsx | 2 +- 4 files changed, 17 insertions(+), 44 deletions(-) delete mode 100644 src/pages/videos/index.tsx diff --git a/i18n/en/docusaurus-theme-classic/navbar.json b/i18n/en/docusaurus-theme-classic/navbar.json index 05482cb62..16126237d 100644 --- a/i18n/en/docusaurus-theme-classic/navbar.json +++ b/i18n/en/docusaurus-theme-classic/navbar.json @@ -19,6 +19,18 @@ "message": "Projects", "description": "Navbar item with label 项目" }, + "item.label.友链": { + "message": "Projects", + "description": "Navbar item with label 项目" + }, + "item.label.关于": { + "message": "About", + "description": "Navbar item with label 关于" + }, + "item.label.更多": { + "message": "More", + "description": "Navbar item with label 更多" + }, "item.label.标签": { "message": "Tags", "description": "Navbar item with label 标签" @@ -59,4 +71,4 @@ "message": "Cloudreve", "description": "Navbar item with label 网盘" } -} \ No newline at end of file +} diff --git a/src/pages/about.mdx b/src/pages/about.mdx index faebb2939..536551925 100644 --- a/src/pages/about.mdx +++ b/src/pages/about.mdx @@ -40,12 +40,14 @@ import social from '@site/data/social' ### 兴趣爱好 -- **手指极限** 入坑长达 8 年(现已退坑),如转笔、魔方、花切等有关手指旋转的都能够杂耍一番, 现在偶尔还会转转卡片/手机。我不擅长录制,因此没留下多少[素材](/videos)。 +- **手指极限** 入坑长达 8 年(现已退坑),如转笔、魔方、花切等有关手指旋转的都能够杂耍一番。 - **电音迷** 歌单只有电音,也只听电音。戴上耳机,沉浸在无限律动之中。有生之年定要制作首电子音乐。 - **编程开发** 将想法付诸实践, 享受创造的乐趣。 +> 生命不息,折腾不止。 + ### 我的设备 - MacBook Pro M2 14 (买完 3 个月后, 苹果出 M3 了...) diff --git a/src/pages/videos/index.tsx b/src/pages/videos/index.tsx deleted file mode 100644 index 72098f6e6..000000000 --- a/src/pages/videos/index.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { translate } from '@docusaurus/Translate' - -import MyLayout from '@site/src/theme/MyLayout' - -const TITLE = translate({ - id: 'theme.video.title', - message: '视频正在快马加鞭的赶来', -}) -const DESCRIPTION = translate({ - id: 'theme.video.description', - message: '', -}) - -function ShowcaseHeader() { - return ( -
-

{TITLE}

-

{DESCRIPTION}

- {/* - 前往 Github 克隆项目 - */} -
- ) -} - -function Videos() { - return ( - -
- -
-
- ) -} - -export default Videos diff --git a/src/theme/Navbar/Layout/index.tsx b/src/theme/Navbar/Layout/index.tsx index 14abe9c3c..b7353f7dd 100644 --- a/src/theme/Navbar/Layout/index.tsx +++ b/src/theme/Navbar/Layout/index.tsx @@ -21,7 +21,7 @@ export default function NavbarLayout({ children }: Props): JSX.Element { const { navbarRef, isNavbarVisible } = useHideableNavbar(hideOnScroll) const location = useLocation() - const isHomePage = location.pathname === '/' + const isHomePage = location.pathname === '/' || location.pathname === '/en/' return (