A lot of clean up

This commit is contained in:
Dan 2025-12-31 12:50:21 +00:00
parent d89744f46f
commit 931fa141dc
62 changed files with 447 additions and 993 deletions

42
assets/js/konami.js Normal file
View file

@ -0,0 +1,42 @@
// Konami Code Easter Egg
(function () {
const konamiCode = [
"ArrowUp",
"ArrowUp",
"ArrowDown",
"ArrowDown",
"ArrowLeft",
"ArrowRight",
"ArrowLeft",
"ArrowRight",
"KeyB",
"KeyA",
];
let konamiIndex = 0;
// Create audio element
const audio = new Audio("/audio/wow.mp3"); // You'll need to add this audio file
document.addEventListener("keydown", function (e) {
// Check if the pressed key matches the next key in the sequence
if (e.code === konamiCode[konamiIndex]) {
konamiIndex++;
// If we've completed the sequence
if (konamiIndex === konamiCode.length) {
// Play the WOW sound
audio.currentTime = 0; // Reset to start
audio.play();
// Optional: Add some visual feedback
console.log("🎮 Konami Code activated!");
// Reset the sequence
konamiIndex = 0;
}
} else {
// Wrong key, reset the sequence
konamiIndex = 0;
}
});
})();