Skip to content

Commit 426f419

Browse files
committed
feat: redesign custom 404 error page with Appwrite branding
1 parent 0059958 commit 426f419

1 file changed

Lines changed: 69 additions & 9 deletions

File tree

src/routes/+error.svelte

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,76 @@
11
<script>
22
import { base } from '$app/paths';
3-
import { page } from '$app/state';
4-
import { Button } from '$lib/elements/forms';
53
import { Unauthenticated } from '$lib/layout';
6-
import { Typography } from '@appwrite.io/pink-svelte';
4+
import { Button } from '$lib/elements/forms';
75
</script>
86

97
<Unauthenticated>
10-
<Typography.Title size="xl"
11-
>{'status' in page.error
12-
? page.error.status || 'Invalid Argument'
13-
: 'Invalid Argument'}</Typography.Title>
14-
<Typography.Title>{page.error.message}</Typography.Title>
15-
<Button href={base}>Back to the console</Button>
8+
<div class="content">
9+
<div class="center">
10+
<span>404 Page not found</span>
11+
</div>
12+
<h1>The page you're looking for doesn't exist.</h1>
13+
<div class="center">
14+
<a href={base}>
15+
<Button>Back to console</Button>
16+
</a>
17+
</div>
18+
</div>
1619
</Unauthenticated>
20+
21+
<style>
22+
.content {
23+
text-align: center;
24+
}
25+
26+
span {
27+
padding: var(--space-1, 2px) var(--space-3, 6px);
28+
border-radius: var(--border-radius-XS, 6px);
29+
background: rgba(0, 0, 0, 0.08);
30+
color: #56565c;
31+
text-align: center;
32+
font-family: var(--font-family-sansSerif, Inter), sans-serif;
33+
font-size: var(--font-size-S, 14px);
34+
font-style: normal;
35+
font-weight: 400;
36+
line-height: 140%;
37+
letter-spacing: -0.063px;
38+
display: inline-block;
39+
}
40+
41+
h1 {
42+
color: #2d2d31;
43+
text-align: center;
44+
font-family: var(--font-family-sansSerif, Inter), sans-serif;
45+
font-size: var(--font-size-XXXL, 32px);
46+
font-style: normal;
47+
font-weight: 400;
48+
line-height: 140%;
49+
letter-spacing: -0.144px;
50+
margin-top: 8px;
51+
margin-bottom: 32px;
52+
}
53+
54+
.center {
55+
display: flex;
56+
justify-content: center;
57+
}
58+
59+
:global(.theme-light) span {
60+
background: rgba(0, 0, 0, 0.08);
61+
color: #56565c;
62+
}
63+
64+
:global(.theme-light) h1 {
65+
color: #2d2d31;
66+
}
67+
68+
:global(.theme-dark) span {
69+
background: rgba(255, 255, 255, 0.2);
70+
color: #c3c3c6;
71+
}
72+
73+
:global(.theme-dark) h1 {
74+
color: #ededf0;
75+
}
76+
</style>

0 commit comments

Comments
 (0)