feat: 404
This commit is contained in:
parent
267790933a
commit
832b67e081
1 changed files with 43 additions and 0 deletions
43
src/pages/404.astro
Normal file
43
src/pages/404.astro
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||
---
|
||||
|
||||
<BaseLayout title="404 - Not Found">
|
||||
<div class="not-found-container">
|
||||
<h1>404</h1>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const terminalText = " /not-found";
|
||||
const terminalPrompt = document.querySelector(".terminal-prompt");
|
||||
const delay = 250;
|
||||
|
||||
let i = 0;
|
||||
function typechar() {
|
||||
if (i < terminalText.length) {
|
||||
terminalPrompt.innerHTML += terminalText.charAt(i++);
|
||||
setTimeout(typechar, delay / terminalText.length);
|
||||
}
|
||||
}
|
||||
typechar();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.not-found-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
min-height: 60vh;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 5em;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</BaseLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue