diff options
author | Valentin Popov <valentin@popov.link> | 2024-09-13 01:10:31 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-09-13 01:10:31 +0300 |
commit | de1885fe8fe279c95c2c2b101fad916958dadd4a (patch) | |
tree | 11925fe753743b85a0c37333848ab4322665468e /src/components/PostElement.astro | |
parent | 3591bebabff902106632f0f0b309f3baa1e04a17 (diff) | |
download | popov.link-de1885fe8fe279c95c2c2b101fad916958dadd4a.tar.xz popov.link-de1885fe8fe279c95c2c2b101fad916958dadd4a.zip |
Added Pagination component
Diffstat (limited to 'src/components/PostElement.astro')
-rw-r--r-- | src/components/PostElement.astro | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/components/PostElement.astro b/src/components/PostElement.astro deleted file mode 100644 index 2f98130..0000000 --- a/src/components/PostElement.astro +++ /dev/null @@ -1,51 +0,0 @@ ---- -import { type CollectionEntry } from "astro:content"; -import dayjs from "dayjs"; - -type Props = { - readonly post: CollectionEntry<"blog">; -}; - -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> |