aboutsummaryrefslogtreecommitdiff
path: root/src/routes/_error.svelte
diff options
context:
space:
mode:
authorJakob Stendahl <jakobste@uio.no>2020-10-13 20:28:52 +0200
committerJakob Stendahl <jakobste@uio.no>2020-10-13 20:28:52 +0200
commite53bddfc71d70eb9f2b7a2910b4b191bc43088ab (patch)
tree6074f957be167995845588352ce4108b9759fa00 /src/routes/_error.svelte
downloadAurora-data-e53bddfc71d70eb9f2b7a2910b4b191bc43088ab.tar.gz
Aurora-data-e53bddfc71d70eb9f2b7a2910b4b191bc43088ab.zip
First commit
Diffstat (limited to 'src/routes/_error.svelte')
-rw-r--r--src/routes/_error.svelte40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/routes/_error.svelte b/src/routes/_error.svelte
new file mode 100644
index 0000000..92fcca8
--- /dev/null
+++ b/src/routes/_error.svelte
@@ -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}