Making stuff work better, adding a floppy

This commit is contained in:
Dan 2025-12-09 19:01:17 +00:00
parent 1d9bc87f1b
commit 7917326214
11 changed files with 261 additions and 32 deletions

View file

@ -92,8 +92,10 @@
}
function init() {
updateBlobCount();
updateLampBackground();
if (document.getElementById("lavaLamp")) {
updateBlobCount();
updateLampBackground();
}
}
init();

25
assets/js/pages/audio.js Normal file
View file

@ -0,0 +1,25 @@
if (document.getElementById("starfield")) {
let starfield = document.getElementById("starfield");
let numStars = 200;
// Create static twinkling stars
for (let i = 0; i < numStars; i++) {
const star = document.createElement("div");
star.className = "star";
// Random size
const sizeClass =
Math.random() < 0.7 ? "small" : Math.random() < 0.9 ? "medium" : "large";
star.classList.add(sizeClass);
// Random position
star.style.left = Math.random() * 100 + "%";
star.style.top = Math.random() * 100 + "%";
// Random animation duration (2-6 seconds) and delay
star.style.animationDuration = 2 + Math.random() * 4 + "s";
star.style.animationDelay = Math.random() * 5 + "s";
starfield.appendChild(star);
}
}