diff --git a/src/components/geek/PhotoZoom.astro b/src/components/geek/PhotoZoom.astro new file mode 100644 index 0000000..3505023 --- /dev/null +++ b/src/components/geek/PhotoZoom.astro @@ -0,0 +1,165 @@ +--- +// 正文图片缩放视图(文章页):单图极简——无画廊专属的 EXIF/caption/FLIP/chrome, +// 只有图 + 关闭钮。缩放引擎与 GalleryPage v2 同源:钳制数学(applyZoom clamp / 回 1 归零) +// 与 contain 几何判定(img 元素盒铺满 → 背景按内容盒算)逐行对齐,勿另起炉灶。 +--- + + + + + + + + + diff --git a/src/pages/archives/[...slug].astro b/src/pages/archives/[...slug].astro index 0ba64cd..66b1477 100644 --- a/src/pages/archives/[...slug].astro +++ b/src/pages/archives/[...slug].astro @@ -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); +