This commit is contained in:
2021-07-02 15:43:55 +01:00
parent eadc0aa412
commit 88895c1622
15 changed files with 6656 additions and 0 deletions

40
src/routes/_error.svelte Normal file
View File

@@ -0,0 +1,40 @@
<script lang="ts">
export let status: number;
export let error: Error;
const dev = process.env.NODE_ENV === 'development';
</script>
<style>
h1, p {
margin: 0 auto;
}
h1 {
font-size: 2.8em;
font-weight: 700;
margin: 0 0 0.5em 0;
}
p {
margin: 1em auto;
}
@media (min-width: 480px) {
h1 {
font-size: 4em;
}
}
</style>
<svelte:head>
<title>{status}</title>
</svelte:head>
<h1>{status}</h1>
<p>{error.message}</p>
{#if dev && error.stack}
<pre>{error.stack}</pre>
{/if}

View File

@@ -0,0 +1,7 @@
<script lang="ts">
export let segment: string;
</script>
<main>
<slot></slot>
</main>