forked from FWS/FWS-TEMPLATE-Website-OnePage
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.
204 lines
12 KiB
PHP
204 lines
12 KiB
PHP
<?php
|
|
/**
|
|
* FWS Linux — page 404 (incluse par page.php avec http_response_code(404)).
|
|
*
|
|
* La scène (Tux qui débranche le câble RJ45 d'un switch) est un SVG statique
|
|
* dans son état « branché » ; p/assets/js/not-found.js anime ensuite Tux, le
|
|
* connecteur et le câble (physique à ressort, câble recalculé chaque image).
|
|
* Sans JavaScript, la scène reste propre et immobile.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
if (!isset($title, $extraCss, $extraJs)) {
|
|
http_response_code(404);
|
|
exit('Page introuvable.');
|
|
}
|
|
|
|
$title = 'Page introuvable | FWS Linux';
|
|
$extraCss[] = fws_url('/p/assets/styles/404.css');
|
|
$extraJs[] = fws_url('/p/assets/js/not-found.js');
|
|
?>
|
|
<section class="notfound" aria-labelledby="notfound-title">
|
|
<div class="notfound-copy">
|
|
<p class="notfound-code" aria-hidden="true">404</p>
|
|
<h1 class="notfound-title" id="notfound-title">Cette page a été débranchée</h1>
|
|
<p class="notfound-lead">Tux a tiré un peu fort sur le câble RJ45… La page demandée n'existe pas ou a été déplacée. Le reste du réseau tient bon.</p>
|
|
<div class="notfound-actions">
|
|
<a class="button button-primary" href="<?= e(fws_url('/?p/index/')) ?>">Retour à l'accueil</a>
|
|
<a class="button button-secondary" href="<?= e(fws_url('/?p/contact/')) ?>">Signaler un lien cassé</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="notfound-visual" aria-hidden="true">
|
|
<svg class="nf-scene" viewBox="0 0 720 440" xmlns="http://www.w3.org/2000/svg" focusable="false">
|
|
<defs>
|
|
<linearGradient id="nf-switch-body" x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0" stop-color="#3a4a68" />
|
|
<stop offset="1" stop-color="#202b3e" />
|
|
</linearGradient>
|
|
<radialGradient id="nf-ambient" cx="50%" cy="50%" r="50%">
|
|
<stop offset="0" stop-color="rgba(56,189,248,0.15)" />
|
|
<stop offset="1" stop-color="rgba(56,189,248,0)" />
|
|
</radialGradient>
|
|
<radialGradient id="nf-tux-glow" cx="50%" cy="50%" r="50%">
|
|
<stop offset="0" stop-color="rgba(125,211,252,0.22)" />
|
|
<stop offset="1" stop-color="rgba(125,211,252,0)" />
|
|
</radialGradient>
|
|
<linearGradient id="nf-body" x1="0.15" y1="0" x2="0.9" y2="1">
|
|
<stop offset="0" stop-color="#33405a" />
|
|
<stop offset="1" stop-color="#151d2b" />
|
|
</linearGradient>
|
|
<linearGradient id="nf-body-light" x1="0" y1="0" x2="1" y2="1">
|
|
<stop offset="0" stop-color="#3d4c69" />
|
|
<stop offset="1" stop-color="#1a2231" />
|
|
</linearGradient>
|
|
<linearGradient id="nf-belly" x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0" stop-color="#ffffff" />
|
|
<stop offset="1" stop-color="#dae2ec" />
|
|
</linearGradient>
|
|
<linearGradient id="nf-beak" x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0" stop-color="#fcd34d" />
|
|
<stop offset="1" stop-color="#f59e0b" />
|
|
</linearGradient>
|
|
<linearGradient id="nf-plug" x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0" stop-color="#e2e8f0" />
|
|
<stop offset="1" stop-color="#b6c2d1" />
|
|
</linearGradient>
|
|
<clipPath id="nf-body-clip">
|
|
<path d="M 180 92 C 138 92 112 124 110 166 C 108 196 126 212 130 234 C 118 266 104 298 104 326 C 104 352 138 364 180 364 C 222 364 256 352 256 326 C 256 298 242 266 230 234 C 234 212 252 196 250 166 C 248 124 222 92 180 92 Z" />
|
|
</clipPath>
|
|
</defs>
|
|
|
|
<!-- Ambiance -->
|
|
<ellipse cx="420" cy="330" rx="340" ry="130" fill="url(#nf-ambient)" />
|
|
<ellipse cx="180" cy="252" rx="185" ry="195" fill="url(#nf-tux-glow)" />
|
|
|
|
<!-- ── Switch ──────────────────────────────────────────────────────── -->
|
|
<g id="nf-switch">
|
|
<ellipse cx="515" cy="306" rx="190" ry="16" fill="rgba(0,0,0,0.38)" />
|
|
<rect x="326" y="196" width="16" height="40" rx="4" fill="#1b2434" />
|
|
<rect x="688" y="196" width="16" height="40" rx="4" fill="#1b2434" />
|
|
<rect x="340" y="120" width="350" height="172" rx="20" fill="url(#nf-switch-body)" stroke="rgba(148,163,184,0.28)" stroke-width="2" />
|
|
<rect x="344" y="124" width="342" height="42" rx="16" fill="rgba(226,232,240,0.06)" />
|
|
<circle cx="668" cy="146" r="7" fill="#22c55e" opacity="0.2" />
|
|
<circle cx="668" cy="146" r="3.5" fill="#22c55e" />
|
|
<text x="364" y="152" fill="rgba(226,232,240,0.75)" font-family="'Segoe UI', system-ui, sans-serif" font-size="16" font-weight="600">SW-FWS-01</text>
|
|
|
|
<!-- Pastille « link down » -->
|
|
<g id="nf-badge" opacity="0">
|
|
<circle cx="648" cy="150" r="18" fill="#ef4444" />
|
|
<circle cx="648" cy="150" r="18" fill="none" stroke="rgba(255,255,255,0.35)" stroke-width="2" />
|
|
<rect x="645.5" y="140" width="5" height="12" rx="2.5" fill="#ffffff" />
|
|
<circle cx="648" cy="158" r="3" fill="#ffffff" />
|
|
</g>
|
|
|
|
<!-- Bandeau des ports -->
|
|
<rect x="356" y="196" width="318" height="68" rx="12" fill="#141d2b" stroke="rgba(15,23,42,0.6)" />
|
|
|
|
<?php foreach ([372, 414, 456, 498, 540, 582] as $i => $px): ?>
|
|
<g>
|
|
<rect x="<?= $px ?>" y="216" width="34" height="26" rx="5" fill="#0b1220" stroke="rgba(148,163,184,0.3)" />
|
|
<rect x="<?= $px + 5 ?>" y="221" width="24" height="16" rx="3" fill="#070d18" />
|
|
<rect x="<?= $px + 12 ?>" y="214" width="10" height="5" rx="2" fill="#2b3a52" />
|
|
<?php foreach ([8, 13, 18, 23] as $g): ?>
|
|
<rect x="<?= $px + $g ?>" y="230" width="2.5" height="5" rx="1" fill="rgba(245,158,11,0.55)" />
|
|
<?php endforeach; ?>
|
|
<text x="<?= $px + 17 ?>" y="259" text-anchor="middle" fill="rgba(148,163,184,0.45)" font-family="'Segoe UI', system-ui, sans-serif" font-size="10"><?= $i + 1 ?></text>
|
|
</g>
|
|
<?php endforeach; ?>
|
|
|
|
<!-- Anneau du port utilisé -->
|
|
<rect x="538" y="213" width="38" height="32" rx="7" fill="none" stroke="rgba(56,189,248,0.45)" />
|
|
|
|
<!-- LED du port utilisé -->
|
|
<circle class="nf-led-green" cx="557" cy="186" r="12" fill="#22c55e" opacity="0.18" />
|
|
<circle class="nf-led-green" cx="557" cy="186" r="6" fill="#22c55e" />
|
|
<circle class="nf-led-red" cx="557" cy="186" r="12" fill="#ef4444" opacity="0" />
|
|
<circle class="nf-led-red" cx="557" cy="186" r="6" fill="#ef4444" opacity="0" />
|
|
|
|
<!-- LED des autres ports -->
|
|
<?php foreach ([389, 431, 473, 515, 599] as $lx): ?>
|
|
<circle cx="<?= $lx ?>" cy="186" r="5" fill="#22c55e" opacity="0.32" />
|
|
<?php endforeach; ?>
|
|
</g>
|
|
|
|
<!-- Étincelle de débranchement -->
|
|
<g id="nf-spark" opacity="0" transform="translate(557 228) scale(0.7) translate(-557 -228)">
|
|
<g stroke="#fde68a" stroke-width="2.5" stroke-linecap="round">
|
|
<line x1="557" y1="212" x2="557" y2="198" />
|
|
<line x1="541" y1="216" x2="530" y2="206" />
|
|
<line x1="573" y1="216" x2="584" y2="206" />
|
|
<line x1="536" y1="232" x2="520" y2="232" />
|
|
<line x1="578" y1="232" x2="594" y2="232" />
|
|
</g>
|
|
<circle cx="557" cy="205" r="3" fill="#fef3c7" />
|
|
<circle cx="534" cy="212" r="2.4" fill="#fef3c7" />
|
|
<circle cx="581" cy="213" r="2.4" fill="#fef3c7" />
|
|
</g>
|
|
|
|
<!-- ── Tux ─────────────────────────────────────────────────────────── -->
|
|
<g id="nf-tux">
|
|
<ellipse cx="180" cy="362" rx="74" ry="13" fill="rgba(0,0,0,0.35)" />
|
|
|
|
<!-- Aileron arrière -->
|
|
<ellipse cx="110" cy="250" rx="18" ry="56" transform="rotate(16 110 250)" fill="url(#nf-body)" stroke="rgba(125,211,252,0.25)" stroke-width="2" />
|
|
|
|
<!-- Corps -->
|
|
<path d="M 180 92 C 138 92 112 124 110 166 C 108 196 126 212 130 234 C 118 266 104 298 104 326 C 104 352 138 364 180 364 C 222 364 256 352 256 326 C 256 298 242 266 230 234 C 234 212 252 196 250 166 C 248 124 222 92 180 92 Z"
|
|
fill="url(#nf-body)" stroke="rgba(125,211,252,0.35)" stroke-width="2" />
|
|
|
|
<g clip-path="url(#nf-body-clip)">
|
|
<ellipse cx="180" cy="286" rx="52" ry="72" fill="url(#nf-belly)" />
|
|
<ellipse cx="152" cy="158" rx="30" ry="37" fill="#ffffff" />
|
|
<ellipse cx="208" cy="158" rx="30" ry="37" fill="#ffffff" />
|
|
</g>
|
|
|
|
<g id="nf-eyes">
|
|
<circle cx="156" cy="150" r="12" fill="#eef2f7" />
|
|
<circle cx="204" cy="150" r="12" fill="#eef2f7" />
|
|
<circle cx="156" cy="150" r="8.5" fill="#101826" />
|
|
<circle cx="204" cy="150" r="8.5" fill="#101826" />
|
|
<circle cx="153" cy="147" r="3" fill="#ffffff" />
|
|
<circle cx="201" cy="147" r="3" fill="#ffffff" />
|
|
</g>
|
|
|
|
<path d="M 172 178 C 198 180 218 186 230 194 C 216 204 196 208 174 206 C 178 196 176 186 172 178 Z" fill="url(#nf-beak)" />
|
|
<path d="M 176 195 C 194 199 212 195 226 190" fill="none" stroke="rgba(120,53,15,0.45)" stroke-width="2" stroke-linecap="round" />
|
|
|
|
<!-- Pattes (devant le corps pour rester visibles) -->
|
|
<g id="nf-foot-l">
|
|
<ellipse cx="134" cy="358" rx="34" ry="15" fill="url(#nf-beak)" />
|
|
<path d="M 121 348 L 121 368 M 147 346 L 147 370" stroke="rgba(120,53,15,0.4)" stroke-width="2" stroke-linecap="round" />
|
|
</g>
|
|
<g id="nf-foot-r">
|
|
<ellipse cx="226" cy="358" rx="34" ry="15" fill="url(#nf-beak)" />
|
|
<path d="M 213 346 L 213 370 M 239 348 L 239 368" stroke="rgba(120,53,15,0.4)" stroke-width="2" stroke-linecap="round" />
|
|
</g>
|
|
</g>
|
|
|
|
<!-- ── Câble (recalculé par le JS) ─────────────────────────────────── -->
|
|
<path class="nf-cable" d="M 534 236 C 488 305, 340 320, 276 265" fill="none" stroke="#38bdf8" stroke-width="13" stroke-linecap="round" stroke-linejoin="round" opacity="0.12" />
|
|
<path class="nf-cable" d="M 534 236 C 488 305, 340 320, 276 265" fill="none" stroke="#475569" stroke-width="9" stroke-linecap="round" stroke-linejoin="round" />
|
|
<path class="nf-cable" d="M 534 236 C 488 305, 340 320, 276 265" fill="none" stroke="#94a3b8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5" />
|
|
|
|
<!-- ── Aileron avant (tient le câble) ──────────────────────────────── -->
|
|
<g id="nf-arm">
|
|
<ellipse cx="237" cy="245" rx="16" ry="44" transform="rotate(118 237 245)" fill="url(#nf-body-light)" stroke="rgba(125,211,252,0.3)" stroke-width="2" />
|
|
<ellipse cx="274" cy="263" rx="15" ry="12" fill="url(#nf-body-light)" stroke="rgba(125,211,252,0.3)" stroke-width="2" />
|
|
</g>
|
|
|
|
<!-- ── Connecteur RJ45 ─────────────────────────────────────────────── -->
|
|
<g id="nf-connector">
|
|
<rect x="524" y="229" width="12" height="14" rx="3" fill="#475569" />
|
|
<rect x="534" y="223" width="32" height="22" rx="4" fill="url(#nf-plug)" stroke="#94a3b8" stroke-width="1.5" />
|
|
<rect x="540" y="216" width="14" height="9" rx="2" fill="#94a3b8" />
|
|
<rect x="534" y="227" width="9" height="3" rx="1.5" fill="#f59e0b" />
|
|
<rect x="534" y="232" width="9" height="3" rx="1.5" fill="#f59e0b" />
|
|
<rect x="534" y="237" width="9" height="3" rx="1.5" fill="#f59e0b" />
|
|
<rect x="546" y="226" width="14" height="3" rx="1.5" fill="rgba(255,255,255,0.6)" />
|
|
</g>
|
|
</svg>
|
|
</div>
|
|
</section>
|