Template
feat(pages): add an animated Tux 404 page
The previous 404 reused hero styles that only load on the home page, so it rendered almost unstyled. Give it a self-contained scene instead: Tux unplugs an RJ45 cable from a switch, then drops it on the floor where it settles.
This commit is contained in:
3 files changed
+621
-6
No files matched your search
@@ -0,0 +1,110 @@
|
||||
@import "./var.css";
|
||||
|
||||
/* ── 404 — Tux débranche le câble réseau ─────────────────────────────────────
|
||||
Mise en page uniquement : le mouvement (Tux, connecteur, câble) est piloté
|
||||
par p/assets/js/not-found.js. Le SVG est livré dans son état « branché »,
|
||||
donc la page reste propre même sans JavaScript. */
|
||||
|
||||
.notfound {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
|
||||
align-items: center;
|
||||
gap: clamp(1.5rem, 4vw, 3rem);
|
||||
padding: clamp(1.75rem, 4vw, 3.25rem);
|
||||
border-radius: 1.25rem;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
|
||||
.notfound::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: -35% -10% auto;
|
||||
height: 70%;
|
||||
background: radial-gradient(60% 100% at 78% 0%, rgba(56, 189, 248, 0.16), transparent 70%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.notfound-copy {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.notfound-code {
|
||||
margin: 0 0 0.35rem;
|
||||
font-family: "Georgia", "Palatino Linotype", serif;
|
||||
font-size: clamp(3.5rem, 11vw, 6.5rem);
|
||||
line-height: 0.9;
|
||||
letter-spacing: -0.04em;
|
||||
color: transparent;
|
||||
background: linear-gradient(180deg, var(--accent-soft), var(--accent-strong));
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.notfound-title {
|
||||
margin: 0 0 0.75rem;
|
||||
font-family: "Georgia", "Palatino Linotype", serif;
|
||||
font-size: clamp(1.6rem, 3.6vw, 2.6rem);
|
||||
line-height: 1.1;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.notfound-lead {
|
||||
margin: 0 0 1.5rem;
|
||||
max-width: 46ch;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.7;
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
.notfound-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.notfound-visual {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.nf-scene {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* ── Responsive ───────────────────────────────────────────────────────────── */
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.notfound {
|
||||
grid-template-columns: 1fr;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.notfound-visual {
|
||||
order: 2;
|
||||
max-width: 34rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.notfound-lead {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.notfound-actions {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.notfound-actions .button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user