0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-03 08:00:26 +03:00

Updated the structure of the post's page

This commit is contained in:
2024-10-24 19:50:34 +00:00
parent ef6185eb00
commit bc13a45d3d
4 changed files with 33 additions and 658 deletions

View File

@ -18,12 +18,32 @@ export async function getStaticPaths() {
}
const post = Astro.props;
const { Content } = await post.render();
const { Content, remarkPluginFrontmatter } = await post.render();
const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
---
<style lang="scss">
@import "../../scss/_variables.scss";
p {
opacity: 0.5;
}
</style>
<Layout description={post.data.description} title={post.data.title}>
<article>
<section>
<p>
<small>
Posted
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
by&nbsp;{post.data.author}
<span>&nbsp;•&nbsp;</span>
<span>{remarkPluginFrontmatter.minutesRead}</span>
</small>
</p>
</section>
<section>
<h1>{post.data.title}</h1>
</section>
@ -32,16 +52,6 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"
<Content />
</section>
<section>
<p>
<small>
Posted
<time datetime={post.data.pubDate.toISOString()}>{formattedDate}</time>
by&nbsp;{post.data.author}
</small>
</p>
</section>
<section>
<Comments />
</section>