2026-03-24 17:33:01 +00:00
|
|
|
---
|
2026-03-24 23:40:19 +00:00
|
|
|
const data = Astro.props;
|
2026-03-24 17:33:01 +00:00
|
|
|
---
|
2026-03-24 23:40:19 +00:00
|
|
|
|
|
|
|
|
<li class="post-card">
|
|
|
|
|
<a href={data.url} class="post-link">
|
|
|
|
|
<div class="post-text">
|
|
|
|
|
<span class="post-title">{data.title}</span>
|
|
|
|
|
<span class="post-date">{data.date}</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<img src={data.img} alt={data.title} class="post-image" />
|
|
|
|
|
</a>
|
2026-03-24 17:33:01 +00:00
|
|
|
</li>
|
|
|
|
|
|
2026-03-24 23:40:19 +00:00
|
|
|
<div class="section-divider"></div>
|
|
|
|
|
|
2026-03-24 17:33:01 +00:00
|
|
|
<style>
|
2026-03-24 23:40:19 +00:00
|
|
|
.post-card {
|
|
|
|
|
list-style: none;
|
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.post-link {
|
2026-03-24 17:33:01 +00:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
2026-03-24 23:40:19 +00:00
|
|
|
align-items: stretch;
|
|
|
|
|
gap: 1rem;
|
2026-03-24 17:33:01 +00:00
|
|
|
width: 100%;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-24 23:40:19 +00:00
|
|
|
.post-text {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
min-height: calc(1.6em * 4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.post-title {
|
|
|
|
|
color: inherit;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
font-size: 1.05rem;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
-webkit-line-clamp: 3;
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.post-date {
|
|
|
|
|
color: gray;
|
|
|
|
|
font-size: 0.95rem;
|
2026-03-24 17:33:01 +00:00
|
|
|
white-space: nowrap;
|
2026-03-24 23:40:19 +00:00
|
|
|
line-height: 1.6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.post-image {
|
|
|
|
|
width: calc((1.6em * 4) * 16 / 9);
|
|
|
|
|
height: calc(1.6em * 4);
|
|
|
|
|
aspect-ratio: 16 / 9;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
object-position: center;
|
|
|
|
|
border-radius: 0.5rem;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 640px) {
|
|
|
|
|
.post-link {
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.post-image {
|
|
|
|
|
width: 120px;
|
|
|
|
|
height: calc(120px * 9 / 16);
|
2026-03-24 17:33:01 +00:00
|
|
|
}
|
2026-03-24 23:40:19 +00:00
|
|
|
}
|
|
|
|
|
</style>
|