Update /post to use news card component
This commit is contained in:
parent
8b8b81f3d1
commit
b6f8ef8f37
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import NewsCard from '$lib/posts/NewsCard.svelte';
|
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
|
export let data; // <- contains post data
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -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>
|
<h1>All posts on deprived.dev!</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{#each posts_data.summaries as summary}
|
{#each data.summaries as summary}
|
||||||
<li><a href="/post/{summary.url}">{summary.title}</a></li>
|
<NewsCard post_url={summary.url} title={summary.title} summary={summary.summary} creation_date={summary.creation_date} />
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue