Add 404 page for static site in Netlify

This commit is contained in:
Lewin Kelly 2023-07-19 17:34:23 +01:00
parent e368722b9f
commit 10c6f8cf8d
No known key found for this signature in database
GPG Key ID: C103AD9C84014FD7
3 changed files with 18 additions and 15 deletions

1
_redirects Normal file
View File

@ -0,0 +1 @@
/* /404 404

View File

@ -1,15 +0,0 @@
<script lang="ts">
import { page } from "$app/stores"
</script>
<svelte:head>
<meta name="description" content={$page.error?.message} />
<title>{$page.error?.message} • Revival Archive</title>
</svelte:head>
<div class="flex flex-col items-center justify-center">
<div class="bg-a px-22 rounded-4 mt-30vh p-8 text-center">
<h1 class="text-2.2rem m-0 mb-5">Error {$page.status}</h1>
{$page.error?.message}
</div>
</div>

View File

@ -0,0 +1,17 @@
<script lang="ts">
</script>
<svelte:head>
<meta name="description" content="Page not found" />
<title>Not found • Revival Archive</title>
</svelte:head>
<div class="flex flex-col items-center justify-center">
<div class="bg-a px-22 rounded-4 mt-30vh p-8 text-center">
<h1 class="text-2.2rem m-0 mb-5">Error 404</h1>
<p class="mb-1">
<strong>Page not found</strong>
</p>
<a href="/">Head home?</a>
</div>
</div>