From c735556726e75428550a3d28a2cf58e2c8490b7d Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Mon, 21 Jul 2025 21:56:55 +0300 Subject: Initial template --- src/components/blog/SinglePost.astro | 103 +++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 src/components/blog/SinglePost.astro (limited to 'src/components/blog/SinglePost.astro') diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro new file mode 100644 index 0000000..297cca9 --- /dev/null +++ b/src/components/blog/SinglePost.astro @@ -0,0 +1,103 @@ +--- +import { Icon } from 'astro-icon/components'; + +import Image from '~/components/common/Image.astro'; +import PostTags from '~/components/blog/Tags.astro'; +import SocialShare from '~/components/common/SocialShare.astro'; + +import { getPermalink } from '~/utils/permalinks'; +import { getFormattedDate } from '~/utils/utils'; + +import type { Post } from '~/types'; + +export interface Props { + post: Post; + url: string | URL; +} + +const { post, url } = Astro.props; +--- + +
+
+
+
+

+ + + { + post.author && ( + <> + {' '} + · + {post.author} + + ) + } + { + post.category && ( + <> + {' '} + ·{' '} + + {post.category.title} + + + ) + } + { + post.readingTime && ( + <> +  · {post.readingTime} min read + + ) + } +

+
+ +

+ {post.title} +

+

+ {post.excerpt} +

+ + { + post.image ? ( + {post?.excerpt + ) : ( +
+
+
+ ) + } +
+
+ +
+
+ + +
+
+
-- cgit v1.2.3