This commit is contained in:
parent
0ab1e1068d
commit
7c331406a5
@ -21,10 +21,8 @@ interface Props {
|
|||||||
const { post } = Astro.props;
|
const { post } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a
|
<div class="rounded-diag-md border border-neutral p-4 overflow-hidden">
|
||||||
href={tp(`/${post.collection}/${post.slug.split("/")[0]}`)}
|
<a href={tp(`/${post.collection}/${post.slug.split("/")[0]}`)}>
|
||||||
class="rounded-diag-md border border-neutral p-4 overflow-hidden"
|
|
||||||
>
|
|
||||||
<h2
|
<h2
|
||||||
class="text-2xl flex gap-2 items-center line-clamp text-ellipsis overflow-hidden"
|
class="text-2xl flex gap-2 items-center line-clamp text-ellipsis overflow-hidden"
|
||||||
>
|
>
|
||||||
@ -34,15 +32,19 @@ const { post } = Astro.props;
|
|||||||
<p class="text-ellipsis overflow-hidden line-clamp-2">
|
<p class="text-ellipsis overflow-hidden line-clamp-2">
|
||||||
{post.data.description || markdownToText(post.body).slice(0, 200)}
|
{post.data.description || markdownToText(post.body).slice(0, 200)}
|
||||||
</p>
|
</p>
|
||||||
|
</a>
|
||||||
{
|
{
|
||||||
post.data.tags && (
|
post.data.tags && (
|
||||||
<div class="flex gap-2 mt-2">
|
<div class="flex gap-2 mt-2">
|
||||||
{post.data.tags.map((tag) => (
|
{post.data.tags.map((tag) => (
|
||||||
<span class="text-xs border border-neutral p-2 rounded-md">
|
<a
|
||||||
|
href={tp(`/tag/${tag}`)}
|
||||||
|
class="text-xs border border-neutral p-2 rounded-md"
|
||||||
|
>
|
||||||
{tag}
|
{tag}
|
||||||
</span>
|
</a>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</a>
|
</div>
|
||||||
|
0
src/components/Tag.astro
Normal file
0
src/components/Tag.astro
Normal file
Loading…
Reference in New Issue
Block a user