feat: add icons to posts and photos to featured posts
All checks were successful
Deploy to SFTP Server / build (push) Successful in 4m33s

This commit is contained in:
2025-02-23 14:31:14 +01:00
parent 6aa6ddabb0
commit 59eeadd4b3
8 changed files with 34 additions and 3 deletions

View File

@ -21,7 +21,13 @@ const { post } = Astro.props;
<a href={tp(`/${post.collection}/${post.id.split("/")[0]}`)}>
<h2
class="text-2xl flex gap-2 items-center line-clamp text-ellipsis overflow-hidden">
{post.data.icon && <img src={post.data.icon} class="h-6" />}
{
post.data.icon?.length > 3 ? (
<img src={post.data.icon} class="h-6" />
) : post.data.icon?.length ? (
<span>{post.data.icon}</span>
) : null
}
{post.data.title}
</h2>
<p class="text-ellipsis overflow-hidden line-clamp-2">