Compare commits
3 commits
baed80cac6
...
6394e16a45
Author | SHA1 | Date | |
---|---|---|---|
6394e16a45 | |||
02a6276240 | |||
59a6d8ea38 |
3 changed files with 53 additions and 1 deletions
5
frontend/src/app.d.ts
vendored
5
frontend/src/app.d.ts
vendored
|
@ -2,7 +2,10 @@
|
|||
// for information about these interfaces
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
export interface Error {
|
||||
status: number;
|
||||
message: string;
|
||||
}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface Platform {}
|
||||
|
|
|
@ -3,6 +3,10 @@ export async function handle({ event, resolve }) {
|
|||
return response;
|
||||
}
|
||||
|
||||
export async function handleFetch({ request, fetch }) {
|
||||
return fetch(request);
|
||||
}
|
||||
|
||||
export async function handleError({ error, event, status, message }) {
|
||||
console.error(error)
|
||||
return {
|
||||
|
|
45
frontend/src/routes/+error.svelte
Normal file
45
frontend/src/routes/+error.svelte
Normal file
|
@ -0,0 +1,45 @@
|
|||
<script>
|
||||
import { page } from '$app/stores';
|
||||
</script>
|
||||
|
||||
<div id='container'>
|
||||
<div class="wrapper">
|
||||
<p id="status">{$page.status}</p>
|
||||
<p id="message">{$page.error.message}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#container {
|
||||
background-image: url(/splash.webp);
|
||||
background-size: cover;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
height: 100dvh;
|
||||
width: 100dvw;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
font-size: 24px;
|
||||
font-family: monospace;
|
||||
}
|
||||
.wrapper {
|
||||
background: transparent;
|
||||
display: flex;
|
||||
backdrop-filter: blur(5px);
|
||||
border-radius: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
#status {
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
p {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in a new issue