nicco.io/src/routes/works.svelte

26 lines
508 B
Svelte
Raw Normal View History

2020-09-22 21:47:33 +02:00
<script context="module">
2020-09-24 19:29:43 +02:00
import { getAll, sortByAndMapDate } from '../lib/wp'
2020-09-22 21:47:33 +02:00
export async function preload() {
const data = await getAll('works')
2020-09-24 19:29:43 +02:00
return { data: sortByAndMapDate(data) }
2020-09-22 21:47:33 +02:00
}
</script>
2020-07-24 11:10:01 +02:00
<script>
import SimplePage from '../components/SimplePage.svelte'
2020-09-22 21:47:33 +02:00
import Work from '../components/Work.svelte'
export let data
2020-07-24 11:10:01 +02:00
</script>
<svelte:head>
<title>Works</title>
</svelte:head>
<SimplePage title="Works">
2020-09-22 21:47:33 +02:00
{#each data as work}
<Work {work} />
{/each}
2020-07-24 11:10:01 +02:00
</SimplePage>