style: 调整cover样式
This commit is contained in:
@@ -39,7 +39,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
|||||||
<h1>{data.title}</h1>
|
<h1>{data.title}</h1>
|
||||||
|
|
||||||
{data.cover &&
|
{data.cover &&
|
||||||
<div class="cover-container">
|
<div>
|
||||||
<img class="cover" src={data.cover} alt={data.title}>
|
<img class="cover" src={data.cover} alt={data.title}>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -67,22 +67,9 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cover-container {
|
|
||||||
padding-bottom: 56.25%;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
margin-bottom: 20px;
|
||||||
object-fit: cover;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta {
|
||||||
@@ -91,6 +78,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-left {
|
.meta-left {
|
||||||
@@ -107,12 +95,12 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
|
|||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin: 20px 0 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 20px;
|
||||||
color: var(--text-meta);
|
color: var(--text-meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user