fix(polish): 视觉复核二轮六项——网格单一高度源/导航i18n/热力图缓存等
- 图库:li 去 aspect-ratio(与行跨度双高度约束竞争=列洞根因面),
img 改 object-fit cover 填满;截图前整页滚动触发懒加载
- Header:导航标签按 locale 取字典(en 页曾是中文);图标钮暗色
提色去底块(视觉复核 02/12 的灰块)
- 热力图:构建期模块级缓存,zh/en 两页共享一次抓取(en 页曾空格)
- en 首页移除机器翻译横幅(文章级标注才是本意);面板居中;计数器
文字投影
- Artalk E2E 报 fetch 失败定性为测试环境跨域(127.0.0.1 页面拉
wait4x.online API),生产同源不受影响——上线后专项验证
验证: pnpm astro build 21 页 exit 0;node tests/e2e.mjs 30/30 PASS
(新构建全链重跑,含滚动后 21/21 图库断言)
Spec: 2026-10-25_fix-site-polish
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
7a2880b65d
commit
e21fac7e1d
6 files changed
+36
-9
No files matched your search
@@ -1,18 +1,19 @@
|
||||
---
|
||||
import { localeOf, localePath } from '../lib/locale';
|
||||
import { t } from '../i18n/ui';
|
||||
|
||||
// 顶部导航:≤4 项纪律(防 higan 十项复发);当前页 aria-current
|
||||
const nav = [
|
||||
{ href: '/archives/', label: '文章' },
|
||||
{ href: '/gallery/', label: '图库' },
|
||||
{ href: '/about/', label: '关于' },
|
||||
];
|
||||
const path = Astro.url.pathname;
|
||||
const isCurrent = (href: string) =>
|
||||
path === href || path === href.replace(/\/$/, '') || path.startsWith(href);
|
||||
|
||||
// 语言切换:同路径跨前缀跳转(zh 无前缀 ↔ /en/),预构建双语毫秒级
|
||||
const curLocale = localeOf(path);
|
||||
const nav = [
|
||||
{ href: '/archives/', label: t('nav_posts', curLocale) },
|
||||
{ href: '/gallery/', label: t('nav_gallery', curLocale) },
|
||||
{ href: '/about/', label: t('nav_about', curLocale) },
|
||||
];
|
||||
const switchHref = localePath(path, curLocale === 'zh' ? 'en' : 'zh');
|
||||
const switchLabel = curLocale === 'zh' ? 'EN' : '中';
|
||||
---
|
||||
@@ -114,6 +115,9 @@ const switchLabel = curLocale === 'zh' ? 'EN' : '中';
|
||||
.nav-link:hover { color: var(--ink-1); }
|
||||
.nav-link[aria-current='page'] { color: var(--accent); }
|
||||
.nav-lang { font-family: var(--font-mono); font-size: 13px; }
|
||||
/* 暗色下图标钮发灰难辨(视觉复核 02/12):图标链接统一提一档并去底块感 */
|
||||
.nav-link:has(svg) { color: var(--ink-2); background: transparent; }
|
||||
.nav-link:has(svg):hover { color: var(--ink-1); }
|
||||
@media (max-width: 560px) {
|
||||
.nav-link { font-size: 14px; padding-inline: var(--space-1); }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user