Update /post to use news card component

This commit is contained in:
Sveske_Juice 2024-02-20 21:09:53 +01:00
parent 8b8b81f3d1
commit b6f8ef8f37
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts">
import NewsCard from '$lib/posts/NewsCard.svelte';
import ShowcaseNewsCard from '$lib/posts/ShowcaseNewsCard.svelte';
import ShowcaseNewsCard from '$lib/posts/ShowcaseNewsCard.svelte';
export let data; // <- contains post data
</script>

View File

@ -1,6 +1,12 @@
<script>
import NewsCard from '$lib/posts/NewsCard.svelte';
export let data; // <- contains post data
</script>
<h1>All posts on deprived.dev!</h1>
<ul>
{#each posts_data.summaries as summary}
<li><a href="/post/{summary.url}">{summary.title}</a></li>
{#each data.summaries as summary}
<NewsCard post_url={summary.url} title={summary.title} summary={summary.summary} creation_date={summary.creation_date} />
{/each}
</ul>