Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions frontend/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 - Page Not Found</title>
<style>
body {
background: #0d1117;
color: #58a6ff;
font-family: monospace;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.terminal {
max-width: 700px;
padding: 20px;
}

a {
color: #7ee787;
text-decoration: none;
display: block;
margin-top: 10px;
}

a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="terminal">
<p>guest@codepvg:~$ cd /that-page</p>
<p>bash: /that-page: No such file or directory</p>

<br>

<p>404: Route not found.</p>
<p>This route doesn't exist. Unlike your rank, which does.</p>

<a href="/leaderboard">→ Leaderboard</a>
<a href="/registration">→ Registration</a>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@
</div>
</div>
</main>

<div class="custom-cursor"></div>

<script src="js/boot.js"></script>
<script src="js/hero_fx.js"></script>
<script src="js/matrix.js"></script>
<script src="js/custom_cursor.js"></script>
</body>

</html>
26 changes: 26 additions & 0 deletions frontend/js/custom_cursor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const cursor = document.querySelector(".custom-cursor");

let lastTrail = 0;

document.addEventListener("mousemove", (e) => {
cursor.style.left = e.clientX + "px";
cursor.style.top = e.clientY + "px";

const now = Date.now();

if (now - lastTrail > 20) {
lastTrail = now;

const trail = document.createElement("div");
trail.className = "trail";

trail.style.left = e.clientX + "px";
trail.style.top = e.clientY + "px";

document.body.appendChild(trail);

setTimeout(() => {
trail.remove();
}, 500);
}
});
49 changes: 49 additions & 0 deletions frontend/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2517,3 +2517,52 @@ body::-webkit-scrollbar-thumb {
.rank-neutral {
color: var(--text-muted);
}


.custom-cursor {
position: fixed;
width: 18px;
height: 18px;
border-radius: 50%;
background: #00ff66;
box-shadow:
0 0 10px #00ff66,
0 0 20px #00ff66,
0 0 40px #00ff66;
pointer-events: none;
transform: translate(-50%, -50%);
z-index: 9999;
transition: transform 0.08s linear;
}

.trail {
position: fixed;
width: 8px;
height: 8px;
border-radius: 50%;
background: #00ff66;
box-shadow:
0 0 10px #00ff66,
0 0 20px #00ff66,
0 0 30px #00ff66;
pointer-events: none;
transform: translate(-50%, -50%);
animation: fadeTrail 0.8s linear forwards;
z-index: 9998;
}

@keyframes fadeTrail {
from {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}

to {
opacity: 0;
transform: translate(-50%, -50%) scale(0.2);
}
}

body{
cursor: none;
}
7 changes: 7 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,10 @@ app.use((req, res) => {
app.listen(PORT, () => {
console.log(`Server running at http://localhost:${PORT}`);
});

// Must be last route
app.use((req, res) => {
res
.status(404)
.sendFile(path.join(__dirname, "frontend", "404.html"));
});
Loading