1
0
Fork 0
mirror of https://github.com/mat-1/matdoesdev.git synced 2025-08-02 14:46:04 +00:00
This commit is contained in:
mat 2023-08-22 23:14:52 -05:00
parent 95a1c97822
commit d78f7d034a
4 changed files with 46 additions and 2 deletions

View file

@ -1,7 +1,8 @@
<script lang="ts">
import BackAnchor from '$lib/BackAnchor.svelte'
import { page } from '$app/stores'
const message = $page.error?.message
</script>
<nav>
@ -10,7 +11,9 @@
<section class="error-page">
<div>
<h1>{$page.status}</h1>
<h2>{$page.error.message}</h2>
{#if message}
<h2>{message}</h2>
{/if}
</div>
</section>

View file

@ -1,3 +1,5 @@
export const prerender = true
export const load = async function ({ url }) {
return {
pathname: url.pathname,

View file

@ -0,0 +1,37 @@
<script lang="ts">
import BackAnchor from '$lib/BackAnchor.svelte'
</script>
<nav>
<BackAnchor href="/" />
</nav>
<section class="error-page">
<div>
<h1>404</h1>
<h2>Not found</h2>
</div>
</section>
<style>
.error-page {
max-width: fit-content;
text-align: center;
margin: 0 auto;
display: flex;
justify-content: center;
flex-direction: column;
height: 100%;
}
h1 {
margin: 0;
font-size: 5rem;
}
h2 {
margin: 0;
color: var(--text-color-alt-3);
font-weight: normal;
}
</style>

View file

@ -19,10 +19,12 @@ const config = {
kit: {
adapter: staticAdapter({
precompress: true,
fallback: 'fallback.html',
}),
prerender: {
entries: [
'*',
'/404',
'/minecraft-scanning/minecraft-server-background.png',
// redirect /blog/* to /*
'/blog/matdoes-dev-markdown',