Add animated 404 page and nginx error_page config

This commit is contained in:
clarth 2026-12-02 17:34:39 -05:00
parent c013835d49
commit 1ac2899bc8
3 changed files with 252 additions and 0 deletions

94
404.html Normal file
View file

@ -0,0 +1,94 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>404 - Channel Not Found | Claytonia Fluxer</title>
<meta name="description" content="This page could not be found on Claytonia Fluxer.">
<meta name="robots" content="noindex, follow">
<meta name="theme-color" content="#09090d">
<meta name="color-scheme" content="dark">
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="stylesheet" href="styles.css">
<noscript><style>.reveal{opacity:1!important;transform:none!important}</style></noscript>
</head>
<body class="page-404">
<div class="ambient" aria-hidden="true">
<span class="orb orb-a"></span>
<span class="orb orb-b"></span>
<span class="orb orb-c"></span>
</div>
<header class="site-header" id="top">
<a class="brand" href="index.html" aria-label="Claytonia Fluxer home">
<span class="brand-mark">C</span>
<span class="brand-text">Claytonia <span>Fluxer</span></span>
</a>
<nav class="site-nav" aria-label="Main">
<a href="index.html#communities">Communities</a>
<a href="index.html#apps">Apps</a>
<a href="index.html#why">Why here</a>
<a href="index.html#faq">FAQ</a>
</nav>
<a class="btn btn-small" href="https://fluxer.claytonia.net/register" data-signup>Sign up</a>
</header>
<main class="nf-main">
<section class="nf-hero reveal">
<div class="nf-visual" aria-hidden="true">
<div class="nf-orbit">
<div class="nf-planet">
<span class="nf-face">?</span>
</div>
<div class="nf-ring"></div>
<div class="nf-sat"><span></span></div>
<div class="nf-dot nf-dot-a"></div>
<div class="nf-dot nf-dot-b"></div>
<div class="nf-dot nf-dot-c"></div>
</div>
</div>
<p class="eyebrow">Error 404</p>
<h1 class="nf-title"><span class="gradient-text nf-glitch" data-text="404">404</span></h1>
<p class="nf-sub">Channel not found.</p>
<p class="lead nf-lead">Looks like this page got yeeted into the void by a rogue mod. Either the link is cursed, the page moved, or it never existed in this timeline.</p>
<div class="nf-terminal" aria-hidden="true">
<div class="nf-terminal-bar"><span></span><span></span><span></span></div>
<div class="nf-terminal-body">
<p><span class="nf-prompt">$</span> locate page</p>
<p class="nf-dim">searching all channels...</p>
<p class="nf-dim">searching voice lounge...</p>
<p class="nf-dim">asking the hamsters powering the server...</p>
<p class="nf-err">ERROR: page not found. hamsters are also confused.</p>
<p><span class="nf-prompt">$</span> <span class="nf-cursor"></span></p>
</div>
</div>
<div class="cta-row cta-center">
<a class="btn btn-primary" href="index.html">Take me home</a>
<a class="btn btn-ghost" href="about.html">About this place</a>
</div>
</section>
</main>
<footer class="site-footer">
<p>Claytonia Fluxer is a public instance run by Claytonia. Fluxer is made by Fluxer Platform AB and is open source.</p>
<p>&copy; 2026 Claytonia. All rights reserved.
<a class="first-wave" href="https://claytonia.net/fluxer-first-wave/" target="_blank" rel="noopener" aria-label="First wave"><img src="first-wave-badge.png" alt="" width="20" height="20" loading="lazy" decoding="async"></a>
</p>
<p>
<a href="about.html">About</a> &middot;
<a href="other-servers.html">Other servers</a> &middot;
<a href="tos.html">Terms</a> &middot;
<a href="privacy.html">Privacy</a> &middot;
<a href="https://fluxer.com" target="_blank" rel="noopener">About Fluxer</a> &middot;
<a href="https://claytonia.net" target="_blank" rel="noopener">Claytonia</a>
</p>
</footer>
<script src="script.js"></script>
</body>
</html>

View file

@ -6,6 +6,12 @@ server {
root /home/clay/Projects/git/fluxer-website; root /home/clay/Projects/git/fluxer-website;
index index.html; index index.html;
error_page 404 /404.html;
location = /404.html {
internal;
}
location / { location / {
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }

View file

@ -569,6 +569,158 @@ details p {
} }
.policy-list li + li { margin-top: 0.45rem; } .policy-list li + li { margin-top: 0.45rem; }
/* 404 page */
.nf-main { width: min(860px, 100% - 2.5rem); margin: 0 auto; padding-bottom: 2rem; }
.nf-hero { text-align: center; padding: clamp(2rem, 6vw, 4rem) 0 1rem; }
.nf-visual { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.nf-orbit {
position: relative;
width: 220px;
height: 220px;
display: grid;
place-items: center;
}
.nf-planet {
width: 120px;
height: 120px;
border-radius: 50%;
background: linear-gradient(145deg, rgba(139,124,255,0.35), rgba(94,234,212,0.15) 60%, rgba(244,114,182,0.25));
border: 1px solid rgba(255,255,255,0.1);
display: grid;
place-items: center;
box-shadow: 0 0 60px rgba(139,124,255,0.25), inset 0 -10px 30px rgba(0,0,0,0.3);
animation: nf-float 5s ease-in-out infinite;
}
.nf-face {
font-size: 3rem;
font-weight: 800;
color: var(--text);
text-shadow: 0 0 20px rgba(139,124,255,0.6);
animation: nf-blink 4s ease-in-out infinite;
}
.nf-ring {
position: absolute;
width: 190px;
height: 56px;
border: 2px solid rgba(94,234,212,0.35);
border-radius: 50%;
transform: rotate(-18deg);
animation: nf-spin 12s linear infinite;
}
.nf-ring::after {
content: "";
position: absolute;
inset: 6px;
border: 1px solid rgba(139,124,255,0.2);
border-radius: 50%;
}
.nf-sat {
position: absolute;
inset: 0;
animation: nf-orbit 6s linear infinite;
}
.nf-sat span {
position: absolute;
top: 8px;
left: 50%;
width: 14px;
height: 14px;
margin-left: -7px;
border-radius: 4px;
background: linear-gradient(135deg, var(--accent-2), var(--accent));
box-shadow: 0 0 12px rgba(94,234,212,0.8);
}
.nf-sat span::before, .nf-sat span::after {
content: "";
position: absolute;
top: 3px;
width: 10px;
height: 8px;
background: rgba(94,234,212,0.45);
border: 1px solid rgba(94,234,212,0.5);
}
.nf-sat span::before { right: 14px; border-radius: 2px 0 0 2px; }
.nf-sat span::after { left: 14px; border-radius: 0 2px 2px 0; }
.nf-dot {
position: absolute;
border-radius: 50%;
background: var(--accent-2);
opacity: 0.7;
animation: nf-twinkle 2.4s ease-in-out infinite alternate;
}
.nf-dot-a { width: 6px; height: 6px; top: 18px; right: 28px; }
.nf-dot-b { width: 4px; height: 4px; bottom: 30px; left: 20px; animation-delay: .7s; background: var(--accent-3); }
.nf-dot-c { width: 5px; height: 5px; top: 40px; left: 12px; animation-delay: 1.4s; background: var(--accent); }
.nf-title { font-size: clamp(4.5rem, 12vw, 8rem); margin: 0.1em 0 0; line-height: 1; }
.nf-glitch { position: relative; display: inline-block; }
.nf-glitch::before, .nf-glitch::after {
content: attr(data-text);
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
background: var(--bg);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
opacity: 0;
}
.nf-glitch::before {
text-shadow: 2px 0 rgba(94,234,212,0.7);
animation: nf-glitch 5s infinite;
}
.nf-glitch::after {
text-shadow: -2px 0 rgba(244,114,182,0.7);
animation: nf-glitch 5s infinite 0.15s;
}
.nf-sub { font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 0 0 0.5rem; }
.nf-lead { margin: 0 auto 1.5rem; max-width: 620px; }
.nf-terminal {
max-width: 560px;
margin: 0 auto 2rem;
text-align: left;
border-radius: 14px;
background: rgba(20,20,29,0.85);
border: 1px solid var(--border);
overflow: hidden;
box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
}
.nf-terminal-bar {
display: flex; gap: 6px; padding: 0.65rem 0.9rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.nf-terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a3a4a; }
.nf-terminal-bar span:nth-child(1) { background: #f87171; }
.nf-terminal-bar span:nth-child(2) { background: #fbbf24; }
.nf-terminal-bar span:nth-child(3) { background: #34d399; }
.nf-terminal-body { padding: 1rem 1.2rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }
.nf-terminal-body p { margin: 0.35rem 0; color: var(--muted); }
.nf-prompt { color: var(--accent-2); margin-right: 0.4rem; }
.nf-dim { opacity: 0.75; }
.nf-err { color: #fda4af !important; }
.nf-cursor {
display: inline-block;
width: 0.55em;
height: 1.1em;
vertical-align: text-bottom;
background: var(--accent-2);
animation: nf-cursor 1s step-end infinite;
}
@keyframes nf-float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-10px); } }
@keyframes nf-orbit { from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
@keyframes nf-spin { from{ transform: rotate(-18deg); } to{ transform: rotate(342deg); } }
@keyframes nf-twinkle { from{ opacity: .3; transform: scale(.8); } to{ opacity: 1; transform: scale(1.3); } }
@keyframes nf-blink { 0%,42%,44%,100%{ opacity: 1; } 43%{ opacity: .2; } }
@keyframes nf-cursor { 0%,50%{ opacity: 1; } 50.01%,100%{ opacity: 0; } }
@keyframes nf-glitch {
0%,88%,100%{ opacity: 0; transform: translate(0); }
89%{ opacity: .8; transform: translate(-2px, 1px); }
90%{ opacity: .8; transform: translate(2px, -1px); }
91%{ opacity: 0; transform: translate(0); }
96%{ opacity: .6; transform: translate(1px, 0); }
97%{ opacity: 0; transform: translate(0); }
}
/* responsive */ /* responsive */
@media (max-width: 960px) { @media (max-width: 960px) {
.hero { grid-template-columns: 1fr; min-height: auto; } .hero { grid-template-columns: 1fr; min-height: auto; }