website/src/routes/blog/+page.svelte

27 lines
886 B
Svelte
Raw Normal View History

2022-12-27 20:58:47 +05:30
<script lang="ts">
import type { PageData } from "./$types";
export let data: PageData;
2023-01-25 22:41:11 +05:30
2023-01-01 13:52:26 +05:30
import { PostsContainer, PostOuter, Title, Meta, ReadMore } from "$lib/BlogCard";
2022-12-27 20:58:47 +05:30
</script>
2023-01-25 22:41:11 +05:30
<div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4">
<span class="text-4xl font-bold">{data.title}</span>
<a href="/blog/tags" class="button sm:w-fit"><div class="i-ic:outline-bookmarks" /> Tags</a>
<a href="/blog/authors" class="button sm:w-fit"><div class="i-ic:outline-people text-xl" /> Authors</a>
<a href="https://blog.projectsegfau.lt/rss" class="button sm:w-fit !bg-[#ee802f]"><div class="i-simple-icons:rss" /> RSS</a>
</div>
2022-12-27 20:58:47 +05:30
2023-01-25 22:41:11 +05:30
{#if !data.posts.error}
<PostsContainer>
{#each data.posts.posts as post}
<PostOuter>
<Title {post} />
<Meta {post} />
<ReadMore {post} />
</PostOuter>
{/each}
</PostsContainer>
{:else}
<p>{data.posts.message}</p>
{/if}