Chapa Sigmóide. New photos. Easteregg CSS rules and Javascript simplification (no more easteregg-hidden class)

This commit is contained in:
Mateus Cezário Barreto 2025-11-18 22:17:16 -03:00
commit 7165598f2d
5 changed files with 31 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View file

@ -335,10 +335,9 @@ div.easteregg-visible
}
}
div.easteregg-visible div.description
{ display: none; }
div:not(.easteregg-visible) .easteregg
div.easteregg-visible div.description,
div:not(.easteregg-visible) .easteregg,
div:not(.easteregg-visible).easteregg
{ display: none; }
div.easteregg-visible .easteregg

View file

@ -5,7 +5,7 @@ for (const card of cards)
card.addEventListener('click', handleCardClick);
}
const eastereggContainers = document.querySelectorAll('div.ficha:has(.easteregg)');
const eastereggContainers = document.querySelectorAll('div.ficha:has(.easteregg), div.ficha.easteregg');
const messageBox = document.getElementById('message-box');
@ -20,7 +20,6 @@ function hideEastereggs() {
for (const div of eastereggContainers)
{
div.classList.remove('easteregg-visible');
div.classList.add('easteregg-hidden');
}
}
@ -28,7 +27,6 @@ function expandEastereggs() {
for (const div of eastereggContainers)
{
div.classList.add('easteregg-visible');
div.classList.remove('easteregg-hidden');
}
// Clear any existing timeout and set a new one
@ -74,6 +72,4 @@ function handleCardClick(event) {
// Check for the 3-click trigger
if (clickCount >= 3)
{ expandEastereggs(); }
}
window.onload = () => { hideEastereggs(); }
}