feat(pages): /stack 装备页 + /colophon 制作页(双语)与页脚入口

- colophon:五节灰阶数据表讲"这站怎么造的"(build/visual/写作流
  /i18n/features,变字体提速等实数入表)
- stack:homelab/自托管/站点依赖/日常四节(版本号实读
  package.json;硬件细节与 daily 清单 TODO(下轮) 待补)
- Footer 顺手修真缺陷:locale prop 机制存在但从未透传,en 全站
  页脚实为 zh 文案——改 Astro.url.pathname 构建期自推断(localeOf
  复用,显式 prop 优先),零 BaseLayout 改动
- 页脚「装备 · 制作」双入口(en 轨自动 /en/ 前缀)

车道:op-artalk(自验 15/15:双页双语桌面+390 溢出断言+Footer
双轨感知);收编验收 6 检全过

验证: pnpm astro build 34 页 exit 0;双页双语 390 视口无溢出;E2E
      31/31 PASS

Spec: none (两静态页+Footer 修复,车道级交付)

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-10-25 20:51:02 +08:00
1 parent a347ce8baf
commit aa050d8035
6 files changed
+479 -2

No files matched your search

+9 -2
View File
@@ -3,11 +3,14 @@
import { t } from '../i18n/ui';
import type { Locale } from '../lib/locale';
// /en/ 侧由 T4 薄页传 locale='en';zh 路由无人传参,默认 zh 零回归
// locale 感知:显式 prop 优先;无 prop 时构建期按页面 URL 推断轨道
// (BaseLayout 引用本组件不透传 locale,靠 Astro.url 静态解析补全 en 轨)
import { localeOf } from '../lib/locale';
interface Props {
locale?: Locale;
}
const { locale = 'zh' } = Astro.props;
const { locale: propLocale } = Astro.props;
const locale = propLocale ?? localeOf(Astro.url.pathname);
---
<footer class="site-footer safe-area">
@@ -17,6 +20,10 @@ const { locale = 'zh' } = Astro.props;
<a href="https://beian.miit.gov.cn/" rel="noopener noreferrer" target="_blank" class="link">
{t('footer_icp', locale)}
</a>
·
<a href={locale === 'en' ? '/en/stack/' : '/stack/'} class="link">{t('footer_stack', locale)}</a>
·
<a href={locale === 'en' ? '/en/colophon/' : '/colophon/'} class="link">{t('footer_colophon', locale)}</a>
</p>
<!-- T7 注入:built from {commit} · {time} · Astro(链到 gitea commit) -->
<slot name="build-info" />