Skip to content

Commit 246258e

Browse files
IanSSenneSnaveSutit
authored andcommitted
💩 :? add 404 page
1 parent 11673e9 commit 246258e

File tree

2 files changed

+99
-1
lines changed

2 files changed

+99
-1
lines changed

src/routes/+layout.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const prerender = true
55
export const load = createKitDocsLoader({
66
sidebar: {
77
'/': null,
8-
'/docs': '/docs'
8+
'/docs': '/docs',
9+
"/404": "/docs"
910
}
1011
})

src/routes/404/+page.svelte

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<script lang="ts">
2+
</script>
3+
4+
<div class="page">
5+
<div class="center-container">
6+
<div class="header-container">
7+
<!-- svelte-ignore a11y-missing-attribute -->
8+
<img src="/img/animated_java_icon.svg" />
9+
<div>
10+
<h1>Uh oh :(</h1>
11+
<p>Something's missing here.</p>
12+
</div>
13+
14+
</div>
15+
</div>
16+
</div>
17+
18+
<style>
19+
/* :global(.discord-widget-container) {
20+
position: fixed;
21+
bottom: 16px;
22+
right: 16px;
23+
background-color: rgb(88, 101, 242);
24+
border-radius: 16px;
25+
padding-top: 1rem;
26+
}
27+
:global(.discord-widget-container > button) {
28+
position: absolute;
29+
top: 0.25rem;
30+
right: -0.5rem;
31+
}
32+
.discord-widget {
33+
border-radius: 16px;
34+
}
35+
.discord-widget :global(.widgetBody-38iyIo) {
36+
display: none;
37+
} */
38+
.page {
39+
display: flex;
40+
flex-direction: column;
41+
align-items: stretch;
42+
margin: 0px 32px 0 16px;
43+
width: auto;
44+
overflow: visible;
45+
}
46+
47+
.center-container {
48+
display: flex;
49+
flex-direction: column;
50+
align-items: center;
51+
overflow: visible;
52+
}
53+
54+
.header-container {
55+
display: flex;
56+
align-items: center;
57+
margin: 6rem 0 0rem 0;
58+
}
59+
.header-container div {
60+
display: flex;
61+
flex-direction: column;
62+
justify-content: center;
63+
margin-left: 2rem;
64+
}
65+
.header-container img {
66+
width: 192px;
67+
border-radius: 16px;
68+
box-shadow: 4px 4px 8px -4px black;
69+
}
70+
.header-container h1 {
71+
margin: 0px;
72+
font-size: 3rem;
73+
}
74+
hr {
75+
width: 100%;
76+
margin: 0rem 0 0.5rem 0;
77+
border: 1px solid rgb(var(--kd-color-brand));
78+
}
79+
80+
@media (max-width: 768px) {
81+
.header-container {
82+
flex-direction: column;
83+
margin: 2rem 0 0 0;
84+
}
85+
.header-container > div {
86+
margin-left: unset;
87+
}
88+
.header-container img {
89+
width: 128px;
90+
}
91+
.header-container h1 {
92+
font-size: 2.5rem;
93+
text-align: center;
94+
margin-bottom: 0.75rem;
95+
}
96+
}
97+
</style>

0 commit comments

Comments
 (0)