From 90574edce78421fd6a30f7cd162c99fc6cb51c87 Mon Sep 17 00:00:00 2001 From: wait4xx Date: Sun, 25 Oct 2026 12:44:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(pages):=20/books=20=E4=B9=A6=E6=9E=B6?= =?UTF-8?q?=E4=B8=8E=20/opensource=20=E5=BC=80=E6=BA=90=E9=A1=B5=E2=80=94?= =?UTF-8?q?=E2=80=94=E5=AF=BC=E8=88=AA=E7=AC=AC=E5=9B=9B=E9=A1=B9=EF=BC=88?= =?UTF-8?q?T2/T5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BooksPage:色脊排版卡(mood 竖脊+文楷书名+作者+三行截断策展语) × 年份分组规整网格;zh/en 双路由;阅读轨标题旁「书架 →」入口 - /opensource:全量仓墙(ProjectWall 加 limit prop,首页精选 6 不变) + 热力图 + 本站开源叙事段;导航第四项「开源」(i18n nav_opensource) - 五书 frontmatter 策展字段(含泥潭=刘楚昕) 验证: build 28 页 exit 0;books/opensource zh/en 五路由产物断言过; 五书卡与作者 grep 在案;E2E 30/30 PASS Spec: 2026-10-25_add-terminal-books-admin Co-authored-by: GLM-5.3 --- src/components/Header.astro | 1 + src/components/PostList.astro | 8 +- src/components/geek/ProjectWall.astro | 7 +- src/components/pages/BooksPage.astro | 116 ++++++++++++++++++++++++++ src/i18n/ui.ts | 1 + src/pages/books.astro | 4 + src/pages/en/books.astro | 4 + src/pages/en/opensource.astro | 20 +++++ src/pages/opensource.astro | 21 +++++ 9 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 src/components/pages/BooksPage.astro create mode 100644 src/pages/books.astro create mode 100644 src/pages/en/books.astro create mode 100644 src/pages/en/opensource.astro create mode 100644 src/pages/opensource.astro diff --git a/src/components/Header.astro b/src/components/Header.astro index 4baedd4..ab6b5cb 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -13,6 +13,7 @@ const nav = [ { href: '/archives/', label: t('nav_posts', curLocale) }, { href: '/gallery/', label: t('nav_gallery', curLocale) }, { href: '/about/', label: t('nav_about', curLocale) }, + { href: '/opensource/', label: t('nav_opensource', curLocale) }, ]; const switchHref = localePath(path, curLocale === 'zh' ? 'en' : 'zh'); const switchLabel = curLocale === 'zh' ? 'EN' : '中'; diff --git a/src/components/PostList.astro b/src/components/PostList.astro index e5a9158..65a2caf 100644 --- a/src/components/PostList.astro +++ b/src/components/PostList.astro @@ -41,7 +41,12 @@ const mmdd = (d: Date) => if (rows.length === 0) return null; return (
-

{TRACK_LABEL[cat]}

+

+ {TRACK_LABEL[cat]} + {cat === 'reading' && ( + {locale === 'en' ? 'Books →' : '书架 →'} + )} +