refactor: Use PostList in tag

This commit is contained in:
Leni Aniva 2024-10-18 10:48:02 -07:00
parent 19519fb30e
commit 38aeb1e80d
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 3 additions and 13 deletions

View File

@ -1,9 +1,9 @@
<script lang="ts">
import type { PageData } from './$types';
import PostList from '$lib/components/PostList.svelte'
import siteMetadata from '$content/metadata.json';
export let data: PageData;
const { name, posts } = data;
import siteMetadata from '$content/metadata.json';
import PostHeader from '$lib/components/PostHeader.svelte';
</script>
<svelte:head>
@ -11,19 +11,9 @@
</svelte:head>
<h1>{name} ({posts.length})</h1>
<hr class="separator" />
<ul id="catalog" class="content">
{#each posts as post}
<li>
<PostHeader post={post}/>
</li>
{/each}
</ul>
<PostList {posts}/>
<hr class="separator" />
<style>
#catalog li {
margin-bottom: 10px;
}
</style>