From 7c331406a5f6e8f99efe7ecf5bb43281c345eb1c Mon Sep 17 00:00:00 2001 From: Max Richter Date: Sun, 7 Apr 2024 02:45:06 +0200 Subject: [PATCH] feat: add links to tags --- src/components/SmallCard.astro | 34 ++++++++++++++++++---------------- src/components/Tag.astro | 0 2 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 src/components/Tag.astro diff --git a/src/components/SmallCard.astro b/src/components/SmallCard.astro index a147fef..c2d8db6 100644 --- a/src/components/SmallCard.astro +++ b/src/components/SmallCard.astro @@ -21,28 +21,30 @@ interface Props { const { post } = Astro.props; --- - -

- {post.data.icon && } - {post.data.title} -

-

- {post.data.description || markdownToText(post.body).slice(0, 200)} -

+
+ +

+ {post.data.icon && } + {post.data.title} +

+

+ {post.data.description || markdownToText(post.body).slice(0, 200)} +

+
{ post.data.tags && (
{post.data.tags.map((tag) => ( - + {tag} - + ))}
) } - +
diff --git a/src/components/Tag.astro b/src/components/Tag.astro new file mode 100644 index 0000000..e69de29