aboutsummaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-10-24 22:50:34 +0300
committerValentin Popov <valentin@popov.link>2024-10-24 22:50:34 +0300
commitbc13a45d3dfa0109ed043e63a9afbc7266b447e2 (patch)
tree57043cbd969eb8abc5bf1a897e1c35ef8706743a /src/pages
parentef6185eb00b578c10034fe94be5131f0342a4d82 (diff)
downloadpopov.link-bc13a45d3dfa0109ed043e63a9afbc7266b447e2.tar.xz
popov.link-bc13a45d3dfa0109ed043e63a9afbc7266b447e2.zip
Updated the structure of the post's page
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/blog/[...slug].astro28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro
index 63d2c98..9445673 100644
--- a/src/pages/blog/[...slug].astro
+++ b/src/pages/blog/[...slug].astro
@@ -18,31 +18,41 @@ 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");
---
-<Layout description={post.data.description} title={post.data.title}>
- <article>
- <section>
- <h1>{post.data.title}</h1>
- </section>
+<style lang="scss">
+ @import "../../scss/_variables.scss";
- <section>
- <Content />
- </section>
+ 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>
+
+ <section>
+ <Content />
+ </section>
+
+ <section>
<Comments />
</section>
</article>