feat: add icons to posts and photos to featured posts
All checks were successful
Deploy to SFTP Server / build (push) Successful in 4m33s
All checks were successful
Deploy to SFTP Server / build (push) Successful in 4m33s
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user