Skip to content

Commit cbbd68d

Browse files
authored
Add fifth secret (#263)
* Creat 5th secret * fixups
1 parent f7dda23 commit cbbd68d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/assets/js/script.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,8 @@ function triggerSecretUnlock(type) {
699699
addExperience(500); // Massive bonus for the long code
700700
} else if (type === "gravity" || type === "matrix") {
701701
addExperience(45); // 1 full level
702+
} else if (type === "pulse") {
703+
addExperience(180); // 4 levels
702704
} else {
703705
addExperience(75); // 2 full levels
704706
}
@@ -710,6 +712,48 @@ function triggerSecretUnlock(type) {
710712
}
711713
}
712714

715+
/**
716+
* Initialize the Easter Egg functionality for the talent directory status dot.
717+
*/
718+
function initDotEasterEgg() {
719+
const dot = document.querySelector(".animate-pulse");
720+
721+
if (!dot) return; // Exit if the dot isn't found
722+
723+
dot.style.cursor = "pointer";
724+
725+
// Define the hover behavior
726+
dot.onmouseover = function () {
727+
this.style.backgroundColor = "#fbbf24"; // Change to a "gold" color
728+
this.classList.remove("animate-pulse");
729+
this.style.transform = "scale(2.5)";
730+
this.style.transition = "transform 0.2s ease-in-out";
731+
};
732+
733+
dot.onmouseout = function () {
734+
this.style.backgroundColor = ""; // Reset to original green
735+
this.style.transform = "scale(1)";
736+
this.classList.add("animate-pulse");
737+
};
738+
739+
// Define the click behavior (The Easter Egg)
740+
dot.onclick = function () {
741+
console.log("Easter egg triggered pulse egg active!");
742+
// Example: Rotate the dot 360 degrees and change the text nearby
743+
this.animate(
744+
[{ transform: "rotate(0)" }, { transform: "rotate(360deg)" }],
745+
{ duration: 500 },
746+
);
747+
748+
// Bonus: You could trigger a custom event or reveal hidden content here
749+
// document.body.classList.add("pulse-egg-active");
750+
triggerSecretUnlock("pulse");
751+
};
752+
}
753+
754+
// Call the function once the DOM is ready
755+
document.addEventListener("DOMContentLoaded", initDotEasterEgg);
756+
713757
const konamiCode = [
714758
"arrowup",
715759
"arrowup",

0 commit comments

Comments
 (0)