feat(i18n): UI 字典串接与三页薄化——/en/ 全站落成
- op-gitea 车道:ui.ts 扩 26 键(占位 {n}/{title}/{exif} 约定),五组件
locale prop 串接,zh 零回归(48 键/18 页实测)
- orchestrator 收尾:gallery/moments/about 三页 body 提取为
components/pages/*Page(zh/en 薄页双路由),/en/ 全家福 21 页
- 提取工程三坑入库:HTML 注释不可进 frontmatter 模块区;搬移脚本会吃
开栏 ---;单级页面搬二级目录后 import 全线差一层
验证: astro build 21 页 exit 0;/en/ 七类路由产物断言过;en 页
ICP 备案保留;zh 侧文案抽查不变
Spec: 2026-10-25_add-blog-i18n
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
c74815b516
commit
4aa79fca06
13 files changed
+757
-653
No files matched your search
@@ -0,0 +1,122 @@
|
||||
---
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
import IdCard from '../../components/IdCard.astro';
|
||||
import { t } from '../../i18n/ui';
|
||||
import type { Locale } from '../../lib/locale';
|
||||
|
||||
// /en/ 侧由 T4 薄页传 locale='en';zh 路由无人传参,默认 zh 零回归
|
||||
interface Props {
|
||||
locale?: Locale;
|
||||
}
|
||||
const { locale = 'zh' } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout title={`${t('about_title', locale)} · wait4x`}>
|
||||
<h1 class="page-title">{t('about_title', locale)}</h1>
|
||||
|
||||
<IdCard />
|
||||
|
||||
<section class="tracks" aria-label={t('about_tracks_title', locale)}>
|
||||
<h2 class="sec-title">{t('about_tracks_title', locale)}</h2>
|
||||
<ul>
|
||||
<li class="track-row">
|
||||
<span class="track-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2z"></path>
|
||||
<path d="M22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<div>
|
||||
<strong>{t('about_track_reading_name', locale)}</strong>
|
||||
<p>{t('about_track_reading_desc', locale)}</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="track-row">
|
||||
<span class="track-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="m4 5.5 6.5 6.5L4 18.5"></path>
|
||||
<path d="M12.5 18.5H20"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<div>
|
||||
<strong>{t('about_track_tech_name', locale)}</strong>
|
||||
<p>{t('about_track_tech_desc', locale)}</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="track-row">
|
||||
<span class="track-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path>
|
||||
<circle cx="12" cy="13" r="4"></circle>
|
||||
</svg>
|
||||
</span>
|
||||
<div>
|
||||
<strong>{t('about_track_photo_name', locale)}</strong>
|
||||
<p>{t('about_track_photo_desc', locale)}</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="build" aria-label={t('about_build_aria', locale)}>
|
||||
<h2 class="sec-title">{t('about_build_title', locale)}</h2>
|
||||
<p>{t('about_build_desc', locale)}</p>
|
||||
</section>
|
||||
</BaseLayout>
|
||||
|
||||
<style>
|
||||
.page-title {
|
||||
font-size: var(--text-h1);
|
||||
line-height: var(--leading-heading);
|
||||
color: var(--ink-1);
|
||||
margin-top: var(--space-5);
|
||||
text-wrap: balance;
|
||||
}
|
||||
.sec-title {
|
||||
font-size: 14px;
|
||||
font-family: var(--font-mono);
|
||||
color: var(--ink-3);
|
||||
letter-spacing: 0.08em;
|
||||
margin: var(--space-5) 0 var(--space-3);
|
||||
}
|
||||
.tracks ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.track-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-3);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
}
|
||||
.track-icon {
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 8px;
|
||||
background: var(--bg-soft);
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.track-row strong {
|
||||
font-size: 15px;
|
||||
color: var(--ink-1);
|
||||
}
|
||||
.track-row p {
|
||||
font-size: 14px;
|
||||
color: var(--ink-3);
|
||||
margin-top: 2px;
|
||||
}
|
||||
.build p {
|
||||
font-size: 15px;
|
||||
color: var(--ink-2);
|
||||
max-width: var(--measure);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user