forked from TonTon-UFPA-Comput/site
Chapa Sigmóide. New photos. Easteregg CSS rules and Javascript simplification (no more easteregg-hidden class)
This commit is contained in:
parent
f8f69b2973
commit
7165598f2d
5 changed files with 31 additions and 12 deletions
|
|
@ -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(); }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue