From e53bddfc71d70eb9f2b7a2910b4b191bc43088ab Mon Sep 17 00:00:00 2001
From: Jakob Stendahl <jakobste@uio.no>
Date: Tue, 13 Oct 2020 20:28:52 +0200
Subject: First commit

---
 src/routes/_error.svelte | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 src/routes/_error.svelte

(limited to 'src/routes/_error.svelte')

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}
-- 
cgit v1.2.3

