From 6385b36f6da533a2980fb37c4a80c46e6e27dd5b Mon Sep 17 00:00:00 2001
From: xy <10816187@qq.com>
Date: Sat, 15 Aug 2026 23:40:31 +0800
Subject: [PATCH] =?UTF-8?q?style:=20=E8=B0=83=E6=95=B4cover=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/post/[...slug].astro | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/src/pages/post/[...slug].astro b/src/pages/post/[...slug].astro
index 2a875b2..e151646 100644
--- a/src/pages/post/[...slug].astro
+++ b/src/pages/post/[...slug].astro
@@ -39,7 +39,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
{data.title}
{data.cover &&
-
+
}
@@ -67,22 +67,9 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
flex-shrink: 0;
}
- .cover-container {
- padding-bottom: 56.25%;
- position: relative;
- width: 100%;
- margin-bottom: 24px;
- }
-
.cover {
- position: absolute;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
width: 100%;
- height: 100%;
- object-fit: cover;
+ margin-bottom: 20px;
}
.meta {
@@ -91,6 +78,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
display: flex;
justify-content: space-between;
align-items: center;
+ margin-bottom: 20px;
}
.meta-left {
@@ -107,12 +95,12 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
font-size: 28px;
line-height: 1.4;
font-weight: 400;
- margin: 20px 0 20px;
+ margin-bottom: 20px;
}
.summary {
font-size: 14px;
- margin-bottom: 24px;
+ margin-bottom: 20px;
color: var(--text-meta);
}