mirror of
https://codeberg.org/bunbun/bunbun.dev
synced 2025-06-07 10:59:59 -07:00
added 404 page
This commit is contained in:
54
404.html
Normal file
54
404.html
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--foreground: #ffffff;
|
||||||
|
--background: #000000;
|
||||||
|
|
||||||
|
--accent-50: #adadad;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
--foreground: #000000;
|
||||||
|
--background: #ffffff;
|
||||||
|
|
||||||
|
--accent-50: #525252;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 0;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background);
|
||||||
|
font-family: "Roboto", sans-serif;
|
||||||
|
color: var(--foreground);
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin: 0;
|
||||||
|
color: var(--accent-50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>404</h1>
|
||||||
|
<h3>Page Not Found</h3>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -32,7 +32,8 @@
|
|||||||
(. _G.files uri) (. _G.files uri)
|
(. _G.files uri) (. _G.files uri)
|
||||||
(utils.file-exists? uri) (with-open [file (io.open uri :r)]
|
(utils.file-exists? uri) (with-open [file (io.open uri :r)]
|
||||||
(file:read :*a))
|
(file:read :*a))
|
||||||
"404 - Not Found"))
|
(with-open [file (io.open :404.html :r)]
|
||||||
|
(file:read :*a))))
|
||||||
|
|
||||||
(client:send "HTTP/1.1 200 OK\r\n\r\n")
|
(client:send "HTTP/1.1 200 OK\r\n\r\n")
|
||||||
(client:send content)
|
(client:send content)
|
||||||
|
Reference in New Issue
Block a user