diff options
| author | Leo Goetz <dev@leogtz.de> | 2026-05-08 15:37:39 +0200 |
|---|---|---|
| committer | Leo Goetz <dev@leogtz.de> | 2026-05-08 15:37:39 +0200 |
| commit | d4f98e2d1f85fbdffa2470071e22bba2dacc00c0 (patch) | |
| tree | 02aff46bd5791d1eddca4432f89bc44945b8b033 /src/components/BlogPost.astro | |
Diffstat (limited to 'src/components/BlogPost.astro')
| -rw-r--r-- | src/components/BlogPost.astro | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/BlogPost.astro b/src/components/BlogPost.astro new file mode 100644 index 0000000..0070f2b --- /dev/null +++ b/src/components/BlogPost.astro @@ -0,0 +1,14 @@ +--- +const { post } = Astro.props; +const date: Date = new Date(post.frontmatter.date); +--- + +<a class="block" href={post.url}> + <h2> + {post.frontmatter.title}<span class="text-xs no-underline"> + {date.toLocaleDateString("de-DE")}</span + > + </h2> + <p>{post.frontmatter.description}</p> + <p class="text-xs">Tags: {post.frontmatter.tags.join(", ")}</p> +</a> |
