diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Head.astro | 6 | ||||
-rw-r--r-- | src/components/PostElement.astro | 5 | ||||
-rw-r--r-- | src/components/PostPagination.astro | 47 |
3 files changed, 10 insertions, 48 deletions
diff --git a/src/components/Head.astro b/src/components/Head.astro index 42ae32b..7a575a9 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -1,6 +1,10 @@ --- -const canonicalURL = new URL(Astro.url.pathname, Astro.site); +type Props = { + readonly description?: string; + readonly title?: string; +}; +const canonicalURL = new URL(Astro.url.pathname, Astro.site); const { title, description } = Astro.props; --- diff --git a/src/components/PostElement.astro b/src/components/PostElement.astro index 889cc47..2f98130 100644 --- a/src/components/PostElement.astro +++ b/src/components/PostElement.astro @@ -1,6 +1,11 @@ --- +import { type CollectionEntry } from "astro:content"; import dayjs from "dayjs"; +type Props = { + readonly post: CollectionEntry<"blog">; +}; + const { post } = Astro.props; --- diff --git a/src/components/PostPagination.astro b/src/components/PostPagination.astro deleted file mode 100644 index 6ae6bef..0000000 --- a/src/components/PostPagination.astro +++ /dev/null @@ -1,47 +0,0 @@ ---- -const { prevPost, nextPost } = Astro.props; ---- - -<style lang="scss"> - .pagination { - overflow: hidden; - padding: 5rem 0; - width: 100%; - } - - @media (width <=684px) { - .pagination { - padding: 2rem 0; - } - } - - .prev, - .next { - max-width: 40%; - } - - .prev { - float: left; - } - - .next { - float: right; - } -</style> - -<div class="pagination"> - { - prevPost && ( - <span class="prev"> - <a href={`/blog/${prevPost.slug}`}>< {prevPost.data.title}</a> - </span> - ) - } - { - nextPost && ( - <span class="next"> - <a href={`/blog/${nextPost.slug}`}>{nextPost.data.title} ></a> - </span> - ) - } -</div> |