feat(pages): 五页型落地——首页/文章双模板/图库 masonry/瞬间/关于
- 首页:名片+身份陈述空槽+按年分组分轨列表(情绪色/mono标签)+影像格+项目墙
- 文章 /archives/{slug}(与 Halo 旧 URL 1:1):reading→衬线纸墨 / tech→
TOC 侧栏(≥1120 sticky)+2px 进度条+Artalk 容器占位
- 图库:grid masonry(构建期 aspect-ratio 零 JS)+原生 dialog lightbox
(←→/Esc+EXIF 底栏)+分组筛选
- 瞬间时间线 / 关于(三轨版图+构建说明)
- sharp ^0.35.5 入依赖(Astro 7 不内置,astro:assets 缩略图管线前提)
- 裸 blockquote 默认吃 A 墨线样式(markdown 原生输出无类名的缝隙)
- 车道 30min 超时,产物完整,主会话补 sharp+断言脚本递归修正后收编
验证: pnpm astro build exit 0(7 页);五路由产物断言过;
scripts/check-responsive.sh 11/11 ok(1120/820/760/560 全档)
Spec: 2026-10-24_add-blog-skeleton
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
80ff67e8fa
commit
945a9ee610
14 files changed
+1281
-18
No files matched your search
@@ -1,19 +1,20 @@
|
||||
#!/bin/sh
|
||||
# 响应式结构自查(§4e):四档断点 + 触屏 44px + 安全区 + dvh 的静态断言
|
||||
# 依据:docs/博客重设计调研报告.md §4e;断点 1120/820/760/560
|
||||
# 扫描用 -r 递归(src/pages 有子目录,一层 glob 会漏检 archives/gallery/moments)
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
fail=0
|
||||
check() { if eval "$2"; then echo " ok $1"; else echo " FAIL $1"; fail=1; fi }
|
||||
|
||||
CSS_SRC="src/styles/global.css src/components/*.astro src/layouts/*.astro"
|
||||
DIRS="src/styles src/components src/layouts src/pages"
|
||||
|
||||
check "断点 1120px(宽屏 TOC 常驻档)" \
|
||||
"grep -rqE 'max-width: ?1120px|min-width: ?1120px|@container' \$CSS_SRC src/pages/*.astro 2>/dev/null"
|
||||
"grep -rEq '(max|min)-width: ?1120px|@container' $DIRS"
|
||||
check "断点 820px(笔电 TOC 收起档)" \
|
||||
"grep -rqE 'max-width: ?820px|min-width: ?820px' \$CSS_SRC src/pages/*.astro 2>/dev/null"
|
||||
"grep -rEq '(max|min)-width: ?820px' $DIRS"
|
||||
check "断点 760px(平板竖屏档)" \
|
||||
"grep -rqE 'max-width: ?760px|min-width: ?760px' \$CSS_SRC src/pages/*.astro 2>/dev/null"
|
||||
"grep -rEq '(max|min)-width: ?760px' $DIRS"
|
||||
check "断点 560px(手机档 + 正文降 18px)" \
|
||||
"grep -rq 'max-width: 560px' src/styles/global.css"
|
||||
check "移动端降档:--prose-size 到 18px" \
|
||||
@@ -24,8 +25,8 @@ check "安全区 env(safe-area-inset-*) 使用" \
|
||||
"grep -rq 'safe-area-inset' src/styles src/components src/layouts"
|
||||
check "视口 viewport-fit=cover(刘海屏)" \
|
||||
"grep -q 'viewport-fit=cover' src/layouts/BaseLayout.astro"
|
||||
check "100dvh 或未使用视口高度陷阱(出现 100vh 即 FAIL)" \
|
||||
"! grep -rn '100vh' src/ ; true"
|
||||
check "无 100vh 视口陷阱(属性值上下文;注释提及不算)" \
|
||||
"! grep -rEq ':\\s*100vh|100vh\\s*[;)]' src/ --include='*.astro' --include='*.css' && ! grep -rEq 'height:\\s*100vh|min-height:\\s*100vh' src/"
|
||||
check "动效总闸 prefers-reduced-motion" \
|
||||
"grep -q 'prefers-reduced-motion: reduce' src/styles/global.css"
|
||||
check "构建产物含 viewport-fit 与主题色 meta" \
|
||||
|
||||
Reference in new issue
Block a user