website/src/lib/BlogCard/Title.svelte

22 lines
432 B
Svelte
Raw Normal View History

2023-01-01 13:52:26 +05:30
<script lang="ts">
export let post: any;
2023-01-03 14:17:39 +05:30
export let isPost: boolean = false;
2023-01-01 13:52:26 +05:30
</script>
2023-01-03 14:17:39 +05:30
{#if !isPost}
{#if post.feature_image}
2023-02-03 23:25:33 +05:30
<img
src={post.feature_image}
alt="{post.title} image"
class="rounded"
/>
{/if}
2023-02-03 23:25:33 +05:30
<a
href="/blog/{post.slug}"
class="text-text no-underline hover:underline"
><span class="text-xl font-bold">{post.title}</span></a
>
2023-01-03 14:17:39 +05:30
{:else}
<span class="text-xl font-bold">{post.title}</span>
{/if}