blob: 889cc47871676e8e1eed84d1a046c0e04a4dab32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
---
import dayjs from "dayjs";
const { post } = Astro.props;
---
<style lang="scss">
@import "../scss/_variables.scss";
/* Post */
.post {
padding-bottom: 3rem;
}
.link {
color: $colorText;
}
/* Meta */
.meta {
padding-bottom: 1.5rem;
}
.date {
opacity: 0.5;
}
.tag {
display: none;
}
</style>
<article class="post">
<h2><a class="link" href={`/blog/${post.slug}`}>{post.data.title}</a></h2>
<div class="meta">
<time class="date" datetime={post.data.pubDate.toISOString()}>
{dayjs(post.data.pubDate.toString()).format("YYYY-MM-DD")}
</time>
<ul class="tag">
<li><a href="#">tag1</a></li>
<li><a href="#">tag2</a></li>
</ul>
</div>
<p>{post.data.description}</p>
<a href={`/blog/${post.slug}`}>Read More</a>
</article>
|