Add Nyancat easter egg to WebUI
Rust / Clippy, Rustfmt, Tests (push) Waiting to run
Rust / Linux-x64 build (push) Blocked by required conditions
Rust / GitHub release (push) Blocked by required conditions

This commit is contained in:
2026-06-10 00:08:50 +02:00
parent fda0a3c70d
commit 4933041490
+200 -1
View File
@@ -1409,7 +1409,181 @@ const INDEX_HTML: &str = r##"<!DOCTYPE html>
@media (max-width: 1024px) {
.hero, .content, .controls, .status-grid, .metrics-grid { grid-template-columns: 1fr; }
}
</style>
.nyan-wrap {
position: fixed;
right: 24px;
bottom: 18px;
width: 220px;
height: 84px;
pointer-events: none;
z-index: 30;
opacity: 0.92;
filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}
.nyan-rainbow {
position: absolute;
left: 0;
top: 24px;
width: 132px;
height: 36px;
display: grid;
grid-template-rows: repeat(6, 1fr);
gap: 2px;
animation: nyan-rainbow 0.8s steps(2) infinite;
}
.nyan-rainbow .stripe {
border-radius: 999px;
}
.nyan-rainbow .s1 { background: #ff4d6d; }
.nyan-rainbow .s2 { background: #ff8c42; }
.nyan-rainbow .s3 { background: #ffd93d; }
.nyan-rainbow .s4 { background: #51cf66; }
.nyan-rainbow .s5 { background: #339af0; }
.nyan-rainbow .s6 { background: #845ef7; }
.nyan-cat {
position: absolute;
right: 0;
top: 8px;
width: 110px;
height: 64px;
animation: nyan-float 0.9s steps(2) infinite;
}
.nyan-body {
position: absolute;
left: 30px;
top: 14px;
width: 52px;
height: 32px;
background:
radial-gradient(circle at 12px 11px, #ff7aa2 0 3px, transparent 3px),
radial-gradient(circle at 38px 11px, #ff7aa2 0 3px, transparent 3px),
radial-gradient(circle at 25px 22px, #ff7aa2 0 3px, transparent 3px),
linear-gradient(135deg, #ffb3c7, #ff99bc);
border: 3px solid #1f2937;
border-radius: 8px;
box-sizing: border-box;
}
.nyan-head {
position: absolute;
left: 74px;
top: 8px;
width: 28px;
height: 24px;
background: #9ca3af;
border: 3px solid #1f2937;
border-radius: 8px;
box-sizing: border-box;
}
.nyan-head::before,
.nyan-head::after {
content: "";
position: absolute;
top: -8px;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 10px solid #1f2937;
}
.nyan-head::before { left: 1px; transform: rotate(-12deg); }
.nyan-head::after { right: 1px; transform: rotate(12deg); }
.nyan-head .eye,
.nyan-head .blush {
position: absolute;
display: block;
border-radius: 999px;
}
.nyan-head .eye {
top: 8px;
width: 3px;
height: 3px;
background: #111827;
}
.nyan-head .e1 { left: 6px; }
.nyan-head .e2 { right: 6px; }
.nyan-head .blush {
top: 12px;
width: 5px;
height: 3px;
background: #ff8fab;
opacity: 0.9;
}
.nyan-head .b1 { left: 3px; }
.nyan-head .b2 { right: 3px; }
.nyan-tail {
position: absolute;
left: 20px;
top: 24px;
width: 16px;
height: 8px;
background: #9ca3af;
border: 3px solid #1f2937;
border-right: none;
border-radius: 8px 0 0 8px;
box-sizing: border-box;
animation: nyan-tail 0.5s steps(2) infinite;
}
.nyan-leg {
position: absolute;
width: 8px;
height: 14px;
background: #9ca3af;
border: 3px solid #1f2937;
border-top: none;
border-radius: 0 0 6px 6px;
box-sizing: border-box;
animation: nyan-legs 0.5s steps(2) infinite;
}
.nyan-leg.l1 { left: 38px; top: 42px; }
.nyan-leg.l2 { left: 54px; top: 42px; animation-delay: 0.12s; }
.nyan-leg.l3 { left: 72px; top: 38px; }
.nyan-leg.l4 { left: 88px; top: 38px; animation-delay: 0.12s; }
@keyframes nyan-float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-4px); }
}
@keyframes nyan-rainbow {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(-6px); }
}
@keyframes nyan-tail {
0%, 100% { transform: translateY(0) scaleX(1); }
50% { transform: translateY(-2px) scaleX(0.92); }
}
@keyframes nyan-legs {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(2px); }
}
@media (max-width: 900px) {
.nyan-wrap {
right: 14px;
bottom: 12px;
transform: scale(0.78);
transform-origin: bottom right;
}
}
</style>
</head>
<body>
<main>
@@ -1468,6 +1642,31 @@ const INDEX_HTML: &str = r##"<!DOCTYPE html>
</section>
</main>
<div id="toast" class="toast"></div>
<div class="nyan-wrap" aria-hidden="true">
<div class="nyan-rainbow">
<span class="stripe s1"></span>
<span class="stripe s2"></span>
<span class="stripe s3"></span>
<span class="stripe s4"></span>
<span class="stripe s5"></span>
<span class="stripe s6"></span>
</div>
<div class="nyan-cat">
<div class="nyan-tail"></div>
<div class="nyan-body"></div>
<div class="nyan-head">
<span class="eye e1"></span>
<span class="eye e2"></span>
<span class="blush b1"></span>
<span class="blush b2"></span>
</div>
<div class="nyan-leg l1"></div>
<div class="nyan-leg l2"></div>
<div class="nyan-leg l3"></div>
<div class="nyan-leg l4"></div>
</div>
</div>
<script>
const state = {
images: [],