Skip to content

Commit 9d21eff

Browse files
committedNov 27, 2024··
add custom 404
1 parent f0fafe5 commit 9d21eff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
 

‎src/routes/404/+page.svelte

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<img class="centered" src="logo404.png" alt=""/>
2+
<style>
3+
.centered {
4+
text-align: center;
5+
position: absolute;
6+
top: 20%;
7+
left: 50%;
8+
transform: translate(-50%, -50%);
9+
width: 300px;
10+
}
11+
</style>

‎svelte.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const config = {
3939
adapter: adapter({
4040
pages: "build",
4141
assets: "build",
42+
fallback: "404.html",
4243
}),
4344

4445
alias: {

0 commit comments

Comments
 (0)
Please sign in to comment.