blob: 2f7ca2522fc9c15dca295fd56e705b894bc722bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<script lang="ts">
import { resolve } from '$app/paths';
import type { PageProps } from '../_/$types';
import { browser } from '$app/environment';
import { onMount, tick } from 'svelte';
import { goto } from '$app/navigation';
let { data }: PageProps = $props();
let posts = $derived(Object.entries(data.posts));
onMount(() => {
requestAnimationFrame(() => goto(resolve('/blog/')));
tick().then(() => goto(resolve('/blog/')));
});
</script>
{#if !browser}
{#each posts as a}
<!-- svelte-ignore a11y_consider_explicit_label -->
<a
href={resolve('/blog/[id=int]-[slug]', {
id: a[1].metadata.id.toString(),
slug: a[1].metadata.slug,
})}
></a>
<!-- svelte-ignore a11y_consider_explicit_label -->
<a
href={resolve('/blog/[id=int]', {
id: a[1].metadata.id.toString(),
})}
></a>
{/each}
{/if}
|