fix(polish): 视觉复核三轮——热力图末列可见与 en 首页版面平权
- 热力图:桌面 10px 格+2px 缝收进版心(53 列 634px 无横滚——唯一有
数据的最新列曾被裁在滚出区呈空表);移动端锚定 scrollLeft 到最新列
- en 首页补 IdCard 名片区 + Latest photos 影像条(视觉复核版面平权建议)
- en/index 重复导入 getCollection 修复(构建炸点)
验证: pnpm astro build 21 页 exit 0;node tests/e2e.mjs 30/30 PASS
(新构建全链)
Spec: 2026-10-25_fix-site-polish
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
e21fac7e1d
commit
ebafa415b2
2 files changed
+26
-1
No files matched your search
@@ -3,6 +3,9 @@
|
||||
import { getCollection } from 'astro:content';
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
import { t } from '../../i18n/ui';
|
||||
import IdCard from '../../components/IdCard.astro';
|
||||
import { Image } from 'astro:assets';
|
||||
const photos = (await getCollection('photos')).slice(0, 4);
|
||||
import Heatmap from '../../components/geek/Heatmap.astro';
|
||||
import { POST_TRACKS, trackOf } from '../../content.config';
|
||||
|
||||
@@ -20,7 +23,18 @@ const t9 = (cat: keyof typeof POST_TRACKS) => trackOf(cat);
|
||||
|
||||
<BaseLayout title="wait4x" description="wait4x's blog: reading · code · photography" track="tech">
|
||||
<h1 class="visually-hidden">wait4x</h1>
|
||||
<IdCard>
|
||||
<a href="https://github.com/wait4xx" rel="noopener noreferrer" aria-label="GitHub">↗</a>
|
||||
<a href="/en/rss.xml" aria-label="RSS">RSS</a>
|
||||
</IdCard>
|
||||
{years.map((year) => (
|
||||
<section class="latest" aria-label={t('latest_photos', 'en')}>
|
||||
<span class="lab">{t('latest_photos', 'en')}</span>
|
||||
<a href="/en/gallery/">{t('enter_gallery', 'en')}</a>
|
||||
<div class="strip">
|
||||
{photos.map((p) => (<a href="/en/gallery/"><Image src={p.data.image} alt={p.data.alt ?? p.data.title} widths={[160, 320]} sizes="20vw" loading="lazy" /></a>))}
|
||||
</div>
|
||||
</section>
|
||||
<section class="year">
|
||||
<h2 class="y-label">{year}</h2>
|
||||
{(['reading', 'tech', 'photo'] as const).map((cat) => {
|
||||
|
||||
Reference in new issue
Block a user