Adjusting error page

This commit is contained in:
Fred Boniface 2023-06-16 22:12:31 +01:00
parent 0d80556556
commit 8535492298
6 changed files with 29 additions and 4 deletions

View File

@ -38,6 +38,7 @@
--second-bg-color: #2b343c; /* Use as first arg in radial gradient */ --second-bg-color: #2b343c; /* Use as first arg in radial gradient */
--accent-color: #007979; --accent-color: #007979;
--overlay-color: #3c6f79de; --overlay-color: #3c6f79de;
--overlay-color-solid: #3c6f79;
--main-text-color: #00b7b7; --main-text-color: #00b7b7;
--second-text-color: #0afdfd; --second-text-color: #0afdfd;
--note-text-color: #9de7ff; --note-text-color: #9de7ff;

View File

@ -16,7 +16,7 @@
</div> </div>
<style> <style>
.headerBar { .headerBar {
background: var(--overlay-color); background: var(--overlay-color-solid);
position: fixed; position: fixed;
top: 0; left: 0; top: 0; left: 0;
width: 100%; width: 100%;

View File

@ -37,7 +37,7 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 50px; height: 50px;
background-color: rgba(0, 0, 0, 0.123); background-color: rgb(54, 54, 54);
} }
footer a { footer a {

View File

@ -10,7 +10,7 @@ function fromLocalStorage(storageKey, fallback) {
if (storedValue !== 'undefined' && storedValue !== null) { if (storedValue !== 'undefined' && storedValue !== null) {
return (typeof fallback === 'object') return (typeof fallback === 'object')
? JSON.parse(storedValue) ? JSON.parse(storedValue)
: storedValue : storedValue
} }
} }
return fallback return fallback

24
src/routes/+error.svelte Normal file
View File

@ -0,0 +1,24 @@
<script>
import { page } from '$app/stores';
import Header from '$lib/navigation/header.svelte';
import Nav from '$lib/navigation/nav.svelte';
const title = "OwlBoard - Error"
</script>
<Header {title} />
<h1>{$page.status}: {$page?.error?.message}</h1>
{#if $page.status === 404}
<p>This is not the page you're looking for.</p>
<p>The page you are looking for doesn't exist, use the tabs below to find another page.</p>
{:else if $page.status === 500}
<p>Something went wrong loading the app.<br>
Try going <a href="/">home</a> and try again.</p>
<p>If the problem persists, you can report an issue from the 'More' menu.</p>
{:else}
<p>Not sure what went wrong, please try again later or report an issue from
the 'More' menu.</p>
{/if}
<Nav />

View File

@ -5,7 +5,7 @@ export default {
adapter: adapter({ adapter: adapter({
pages: 'build', pages: 'build',
assets: 'build', assets: 'build',
fallback: undefined, fallback: '/',
precompress: true, precompress: true,
strict: true strict: true
}) })