refactor BlogPost component to use <ul> for tag list
This commit is contained in:
parent
c3837ef6c8
commit
a0f1a6499f
1 changed files with 9 additions and 7 deletions
|
|
@ -37,15 +37,17 @@ const { title, description, date, tags } = Astro.props;
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-wrap gap-2">
|
<ul class="flex flex-wrap gap-2">
|
||||||
{
|
{
|
||||||
tags?.map((tag) => (
|
tags?.map((tag) => (
|
||||||
<a href={`/tags/${tag}`}>
|
<li>
|
||||||
<span class="text-sm text-zinc-400 font-semibold rounded-md bg-zinc-800 px-2 py-2 hover:bg-zinc-700">
|
<a href={`/tags/${tag}`}>
|
||||||
#{tag}
|
<span class="text-sm text-zinc-400 font-semibold rounded-md bg-zinc-800 px-2 py-2 hover:bg-zinc-700">
|
||||||
</span>
|
#{tag}
|
||||||
</a>
|
</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</div>
|
</ul>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue