diff --git a/frontend/404.html b/frontend/404.html new file mode 100644 index 00000000..c4c25efa --- /dev/null +++ b/frontend/404.html @@ -0,0 +1,49 @@ + + + + + 404 - Page Not Found + + + +
+

guest@codepvg:~$ cd /that-page

+

bash: /that-page: No such file or directory

+ +
+ +

404: Route not found.

+

This route doesn't exist. Unlike your rank, which does.

+ + → Leaderboard + → Registration +
+ + \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 3255d3b0..58629b16 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -92,8 +92,13 @@ + +
+ + + diff --git a/frontend/js/custom_cursor.js b/frontend/js/custom_cursor.js new file mode 100644 index 00000000..0a0d6d70 --- /dev/null +++ b/frontend/js/custom_cursor.js @@ -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); + } +}); \ No newline at end of file diff --git a/frontend/styles/main.css b/frontend/styles/main.css index 1bed409b..c1191b23 100644 --- a/frontend/styles/main.css +++ b/frontend/styles/main.css @@ -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; +} \ No newline at end of file diff --git a/server.js b/server.js index 668defe2..4b4e9f94 100644 --- a/server.js +++ b/server.js @@ -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")); +}); \ No newline at end of file