feat(article): 正文图片可放大——PhotoZoom 极简 viewer 双轨挂载

正文 .prose-reading/.prose-tech 图片单击唤起全屏 dialog:fit-
contain+滚轮光标锚点缩放 1-5x+拖拽(钳制数学与图库 v2 逐行同
源)+双击 1x↔2.5x+Esc/关闭/背景点击关(contain 内容盒几何判
定);无 EXIF/caption/FLIP(纯图极简,按契约);document
委托点击软导航后仍生效。

车道:op-artalk(专项 9/9:SVG 架构图唤起/矢量 2.46x 不栅格化/
拖拽钳制/双击回正/Esc/jpg/背景关/软导航);收编验收四断言+E2E
34/34 全过

验证: 文章 SVG 点击唤起+滚轮放大(naturalWidth 960 矢量源)+Esc
      关闭实测;E2E 34/34

Spec: none (文章图放大,车道级交付)

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-11-02 08:47:24 +08:00
1 parent a761cf8129
commit 3050b0b959
3 files changed
+169

No files matched your search

+2
View File
@@ -1,6 +1,7 @@
---
import type { CollectionEntry } from 'astro:content';
import { getCollection, render } from 'astro:content';
import PhotoZoom from '../../components/geek/PhotoZoom.astro';
import BaseLayout from '../../layouts/BaseLayout.astro';
import ArtalkComments from '../../components/ArtalkComments.astro';
import { trackOf } from '../../content.config';
@@ -116,6 +117,7 @@ const toc = headings.filter((h) => h.depth === 2 || h.depth === 3);
</nav>
<ArtalkComments pageKey={`/archives/${entry.id}/`} pageTitle={entry.data.title} />
<PhotoZoom />
</BaseLayout>
<script>
+2
View File
@@ -2,6 +2,7 @@
// /en/archives/{slug}:英文版文章页——postsEn 优先;缺译回退 zh 正文 + 醒目标注
import type { CollectionEntry } from 'astro:content';
import { getCollection, render } from 'astro:content';
import PhotoZoom from '../../../components/geek/PhotoZoom.astro';
import BaseLayout from '../../../layouts/BaseLayout.astro';
import ArtalkComments from '../../../components/ArtalkComments.astro';
import AiTranslatedBadge from '../../../components/AiTranslatedBadge.astro';
@@ -67,6 +68,7 @@ const minutes = Math.max(1, Math.ceil(words / 220));
</nav>
<ArtalkComments pageKey={`/archives/${entry.id}/`} pageTitle={entry.data.title} />
</article>
<PhotoZoom />
</BaseLayout>
<style>