Skip to content

Commit 46bc84e

Browse files
committed
re-capped
1 parent acc6dae commit 46bc84e

3 files changed

Lines changed: 10 additions & 37 deletions

File tree

docs/website/app.js

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ const Sidebar = (() => {
251251

252252
const EasterEgg = (() => {
253253
const toastId = "egg-toast";
254-
const rubyGemAsset = "web_assets/media/ruby-gem.png";
255254
const secretQueries = {
256255
asrfrb: () => {
257256
showToast("Alias recognized: asrfrb");
@@ -266,10 +265,9 @@ const EasterEgg = (() => {
266265
},
267266
overdrivesync: () => {
268267
activateOverdrive({
269-
message: "over drive sync - ribbons and ruby fall",
268+
message: "over drive sync - ribbons fall",
270269
duration: 14000,
271-
confettiCount: 30,
272-
rubyChance: 0.3
270+
confettiCount: 30
273271
});
274272
}
275273
};
@@ -319,12 +317,7 @@ const EasterEgg = (() => {
319317
}
320318

321319
function spawnConfetti(options = {}) {
322-
const normalized = Number.isFinite(options)
323-
? { count: options }
324-
: options;
325-
326-
const count = Number.isFinite(normalized.count) ? normalized.count : 20;
327-
const rubyChance = Math.max(0, Math.min(1, Number.isFinite(normalized.rubyChance) ? normalized.rubyChance : 0));
320+
const count = Number.isFinite(options) ? options : (Number.isFinite(options.count) ? options.count : 20);
328321
const layer = document.createElement("div");
329322
layer.className = "egg-confetti-layer";
330323
DocsElements.body.appendChild(layer);
@@ -333,23 +326,13 @@ const EasterEgg = (() => {
333326
const total = Math.max(8, Math.min(count, 48));
334327

335328
for (let i = 0; i < total; i += 1) {
336-
const rubyDrop = Math.random() < rubyChance;
337-
const bit = rubyDrop ? document.createElement("img") : document.createElement("span");
338-
bit.className = rubyDrop ? "egg-confetti egg-confetti-ruby" : "egg-confetti";
329+
const bit = document.createElement("span");
330+
bit.className = "egg-confetti";
339331
bit.style.left = `${Math.random() * 100}%`;
332+
bit.style.background = colors[i % colors.length];
340333
bit.style.setProperty("--egg-drift", `${(Math.random() * 180) - 90}px`);
341334
bit.style.animationDuration = `${2.2 + (Math.random() * 1.8)}s`;
342335
bit.style.animationDelay = `${Math.random() * 0.25}s`;
343-
344-
if (rubyDrop) {
345-
bit.src = rubyGemAsset;
346-
bit.alt = "";
347-
bit.setAttribute("aria-hidden", "true");
348-
bit.setAttribute("draggable", "false");
349-
} else {
350-
bit.style.background = colors[i % colors.length];
351-
}
352-
353336
layer.appendChild(bit);
354337
}
355338

@@ -362,11 +345,10 @@ const EasterEgg = (() => {
362345
const message = options.message || "Recon overdrive enabled for 12 seconds";
363346
const duration = Number.isFinite(options.duration) ? options.duration : 12000;
364347
const confettiCount = Number.isFinite(options.confettiCount) ? options.confettiCount : 24;
365-
const rubyChance = Math.max(0, Math.min(1, Number.isFinite(options.rubyChance) ? options.rubyChance : 0));
366348

367349
DocsElements.body.classList.add("egg-overdrive");
368350
showToast(message);
369-
spawnConfetti({ count: confettiCount, rubyChance });
351+
spawnConfetti(confettiCount);
370352

371353
if (overdriveTimer) {
372354
window.clearTimeout(overdriveTimer);
@@ -801,12 +783,11 @@ const App = (() => {
801783

802784
const triggerOverdriveSync = () => {
803785
logo.classList.add("egg-overdrive-sync");
804-
showEggText("over drive sync - ribbons and ruby fall", 5200);
786+
showEggText("over drive sync - ribbons fall", 5200);
805787
EasterEgg.activateOverdrive({
806-
message: "over drive sync - ribbons and ruby fall",
788+
message: "over drive sync - ribbons fall",
807789
duration: 14000,
808-
confettiCount: 34,
809-
rubyChance: 0.3
790+
confettiCount: 34
810791
});
811792

812793
if (syncTimer) {

docs/website/styles.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,6 @@ body.egg-clean-screen::before {
169169
transform: translate3d(0, 0, 0) rotate(0deg);
170170
}
171171

172-
.egg-confetti-ruby {
173-
width: 11px;
174-
height: 11px;
175-
object-fit: contain;
176-
border-radius: 0;
177-
filter: drop-shadow(0 0 2px rgba(255, 40, 40, 0.55));
178-
}
179-
180172
@keyframes egg-confetti-fall {
181173
to {
182174
transform: translate3d(var(--egg-drift, 0px), 115vh, 0) rotate(760deg);
-76.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)