refactor: Use PostList in tag
This commit is contained in:
parent
19519fb30e
commit
38aeb1e80d
|
@ -1,9 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
import PostList from '$lib/components/PostList.svelte'
|
||||||
|
import siteMetadata from '$content/metadata.json';
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
const { name, posts } = data;
|
const { name, posts } = data;
|
||||||
import siteMetadata from '$content/metadata.json';
|
|
||||||
import PostHeader from '$lib/components/PostHeader.svelte';
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
@ -11,19 +11,9 @@
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<h1>{name} ({posts.length})</h1>
|
<h1>{name} ({posts.length})</h1>
|
||||||
|
|
||||||
<hr class="separator" />
|
<hr class="separator" />
|
||||||
<ul id="catalog" class="content">
|
<PostList {posts}/>
|
||||||
{#each posts as post}
|
|
||||||
<li>
|
|
||||||
<PostHeader post={post}/>
|
|
||||||
</li>
|
|
||||||
{/each}
|
|
||||||
</ul>
|
|
||||||
<hr class="separator" />
|
<hr class="separator" />
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#catalog li {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue