2025-06-10 14:17:48 +00:00
|
|
|
---
|
|
|
|
import { type CollectionEntry } from "astro:content";
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
readonly post: CollectionEntry<"blog">;
|
|
|
|
};
|
|
|
|
|
|
|
|
const { post } = Astro.props;
|
|
|
|
const { remarkPluginFrontmatter } = await post.render();
|
|
|
|
const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
|
|
|
|
---
|
|
|
|
|
|
|
|
<style lang="scss">
|
2025-06-10 22:38:58 +04:00
|
|
|
@use "../scss/variables" as *;
|
2025-06-10 14:17:48 +00:00
|
|
|
|
2025-06-11 16:34:34 +00:00
|
|
|
a {
|
|
|
|
color: $colorText;
|
|
|
|
}
|
|
|
|
|
2025-06-10 14:17:48 +00:00
|
|
|
small {
|
|
|
|
font-size: $fontSizeBase * 0.75;
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
|
|
|
|
<div>
|
|
|
|
<small>
|
|
|
|
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
|
|
|
|
<span>•</span>
|
|
|
|
<span>{remarkPluginFrontmatter.minutesRead}</span>
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</li>
|