From 30c9f29e066da5696e13355bf8eb91d351dcf1ef Mon Sep 17 00:00:00 2001 From: toom1996 Date: Tue, 15 Jul 2025 17:31:29 +0800 Subject: [PATCH] update --- src/pages/news/[...slug].astro | 11 +++++++---- utils/rpc.ts | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/news/[...slug].astro b/src/pages/news/[...slug].astro index 1f99424..e4212e0 100644 --- a/src/pages/news/[...slug].astro +++ b/src/pages/news/[...slug].astro @@ -6,6 +6,7 @@ import '../../assets/css1/style5.css' import { newsDetail } from "../../../utils/rpc"; const { slug } = Astro.params; const config = getConfig(Astro) +const requestUrl = Astro.request.url; if (!slug) { return Astro.redirect('/404'); } @@ -39,9 +40,10 @@ if (!data || code !== 0) {
-

原文地址: xxx

+ 原文地址:{requestUrl}
+
{ data.prevNews && ( @@ -112,7 +114,8 @@ if (!data || code !== 0) { .top-icon { - padding-bottom: 30px; + margin-bottom: 1rem; + margin-top: 1rem; border-bottom: 1px solid #e0e0e0 } @@ -243,11 +246,11 @@ if (!data || code !== 0) { .news-navigation { margin-top: 1rem; - padding-top: 2rem; border-top: 1px solid var(--divider-color); } .news-sidebar { + padding: 0 1.5rem 3rem; /* position: sticky; */ top: 2rem; height: fit-content; @@ -277,7 +280,7 @@ if (!data || code !== 0) { flex-direction: column; text-decoration: none; transition: all 0.3s ease; - padding: 0.3rem; + padding: 0.2rem; border-radius: var(--radius-md); } diff --git a/utils/rpc.ts b/utils/rpc.ts index dc17cd4..0f690bb 100644 --- a/utils/rpc.ts +++ b/utils/rpc.ts @@ -44,6 +44,7 @@ export async function newsIndex(websiteId:number = 0):Promise