38 create generic error page (#42)
* added basic error page and test link fixed error code display cleanup * Reformat error page GET EM OUTTA HERE! format * update sveltekit --------- Co-authored-by: Benjamin Palko <benjaminpalko@hotmail.com>
This commit is contained in:
parent
276e77fd2c
commit
96d0d65dc5
4 changed files with 23 additions and 2 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
|
@ -20,5 +20,6 @@
|
|||
"sms_prompt": "Send a Message",
|
||||
"sms_label_phone": "Phone Number",
|
||||
"sms_label_message": "Message",
|
||||
"sms_button_submit": "Send Message"
|
||||
"sms_button_submit": "Send Message",
|
||||
"error_page_go_home": "Go Home"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
"@storybook/sveltekit": "^8.4.7",
|
||||
"@storybook/test": "^8.4.7",
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/kit": "^2.9.0",
|
||||
"@sveltejs/kit": "^2.15.3",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||
"@types/bun": "^1.1.14",
|
||||
"autoprefixer": "^10.4.20",
|
||||
|
|
|
|||
20
src/routes/+error.svelte
Normal file
20
src/routes/+error.svelte
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/state';
|
||||
import { messages } from '$lib/i18n';
|
||||
</script>
|
||||
|
||||
<main class="flex h-full w-full flex-col items-center justify-center gap-8">
|
||||
<div class="flex items-center gap-2">
|
||||
<h1 class="text-5xl font-bold tracking-widest text-white">
|
||||
{page.status}
|
||||
</h1>
|
||||
<div class="divider divider-horizontal"></div>
|
||||
<h1 class="text-2xl font-bold">
|
||||
{page.error?.message}
|
||||
</h1>
|
||||
</div>
|
||||
<button onclick={() => goto('/')} class="btn btn-outline btn-neutral btn-wide"
|
||||
>{messages.error_page_go_home()}</button
|
||||
>
|
||||
</main>
|
||||
Loading…
Add table
Reference in a new issue