aboutsummaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/+error.svelte25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte
index e8b9d0f1..03e5bfc0 100644
--- a/src/routes/+error.svelte
+++ b/src/routes/+error.svelte
@@ -1,8 +1,9 @@
<script lang="ts">
- import { browser } from '$app/environment';
+ import { page } from '$app/stores';
import { closest } from '$lib/Error/path';
+ import Popup from '$lib/Popup.svelte';
- $: suggestion = closest(browser ? window.location.pathname : '...', [
+ $: suggestion = closest($page.url.pathname, [
'birthdays',
'completed',
'schedule',
@@ -15,12 +16,16 @@
]);
</script>
-<p>Page not found.</p>
+<Popup>
+ <p style="text-align: center;">
+ <a href={$page.url.pathname}>{$page.url.pathname}</a> not found
+ </p>
-<blockquote>
- Did you mean "<a
- href={suggestion}
- style={suggestion === '...' ? 'pointer-events: none; color: inherit;' : ''}
- >{suggestion.charAt(0).toUpperCase() + suggestion.slice(1)}</a
- >"?
-</blockquote>
+ <blockquote style="margin: 0 0 0 1.5rem;">
+ Did you mean "<a
+ href={suggestion}
+ style={suggestion === '...' ? 'pointer-events: none; color: inherit;' : ''}
+ >{suggestion.charAt(0).toUpperCase() + suggestion.slice(1)}</a
+ >"?
+ </blockquote>
+</Popup>