Update /post to use news card component
This commit is contained in:
parent
8b8b81f3d1
commit
b6f8ef8f37
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue