From 1ddaabe64b8399d6bc46e00350884a500c195a61 Mon Sep 17 00:00:00 2001 From: xy <10816187@qq.com> Date: Mon, 20 Jul 2026 23:15:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ts=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=8Clightbox=E9=94=99=E8=AF=AF=E5=B0=86link=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E4=B8=BA=E5=9B=BE=E7=89=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.astro | 2 +- src/pages/page/[...page].astro | 4 ++-- src/pages/post/[...slug].astro | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 7cee4ed..0c1df84 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -15,7 +15,7 @@ const {list, total} = await http.get>("post", { }); const totalPage = Math.ceil(total / metadata.postPageSize) -const {data: categories} = await http.get>("category/stats"); +const {data: categories} = await http.get>("category/stats"); --- diff --git a/src/pages/page/[...page].astro b/src/pages/page/[...page].astro index b772473..e5cea66 100644 --- a/src/pages/page/[...page].astro +++ b/src/pages/page/[...page].astro @@ -22,11 +22,11 @@ const {list, total} = await http.get>("post", { const totalPage = Math.ceil(total / metadata.postPageSize) -if (totalPage < page) { +if (totalPage < Number(page)) { return Astro.redirect('/404') } -const {data: categories} = await http.get>("category/stats"); +const {data: categories} = await http.get>("category/stats"); --- diff --git a/src/pages/post/[...slug].astro b/src/pages/post/[...slug].astro index 93f3bac..f0f54fd 100644 --- a/src/pages/post/[...slug].astro +++ b/src/pages/post/[...slug].astro @@ -180,7 +180,7 @@ const published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日') const lightbox = new PhotoSwipeLightbox({ gallery: ".post", - children: "a", + children: "a[data-pswp-width]", pswpModule: () => import("photoswipe"), padding: {