Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions src/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ function triggerSecretUnlock(type) {
addExperience(500); // Massive bonus for the long code
} else if (type === "gravity" || type === "matrix") {
addExperience(45); // 1 full level
} else if (type === "pulse") {
addExperience(180); // 4 levels
} else {
addExperience(75); // 2 full levels
}
Expand All @@ -710,6 +712,48 @@ function triggerSecretUnlock(type) {
}
}

/**
* Initialize the Easter Egg functionality for the talent directory status dot.
*/
function initDotEasterEgg() {
const dot = document.querySelector(".animate-pulse");

if (!dot) return; // Exit if the dot isn't found

dot.style.cursor = "pointer";

// Define the hover behavior
dot.onmouseover = function () {
this.style.backgroundColor = "#fbbf24"; // Change to a "gold" color
this.classList.remove("animate-pulse");
this.style.transform = "scale(2.5)";
this.style.transition = "transform 0.2s ease-in-out";
};

dot.onmouseout = function () {
this.style.backgroundColor = ""; // Reset to original green
this.style.transform = "scale(1)";
this.classList.add("animate-pulse");
};

// Define the click behavior (The Easter Egg)
dot.onclick = function () {
console.log("Easter egg triggered pulse egg active!");
// Example: Rotate the dot 360 degrees and change the text nearby
this.animate(
[{ transform: "rotate(0)" }, { transform: "rotate(360deg)" }],
{ duration: 500 },
);

// Bonus: You could trigger a custom event or reveal hidden content here
// document.body.classList.add("pulse-egg-active");
triggerSecretUnlock("pulse");
};
}

// Call the function once the DOM is ready
document.addEventListener("DOMContentLoaded", initDotEasterEgg);

const konamiCode = [
"arrowup",
"arrowup",
Expand Down