style: 调整cover样式

This commit is contained in:
2026-08-15 23:40:31 +08:00
parent 76247eee92
commit 6385b36f6d

View File

@@ -39,7 +39,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
<h1>{data.title}</h1>
{data.cover &&
<div class="cover-container">
<div>
<img class="cover" src={data.cover} alt={data.title}>
</div>
}
@@ -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);
}