-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
document.getElementById('current-year').textContent = new Date().getFullYear(); | ||
|
||
const toggle = document.getElementById('dark-mode-toggle'); | ||
toggle.addEventListener('click', () => { | ||
document.body.classList.toggle('dark-mode'); | ||
if (document.body.classList.contains('dark-mode')) { | ||
toggle.classList.replace('fa-moon', 'fa-sun'); | ||
} else { | ||
toggle.classList.replace('fa-sun', 'fa-moon'); | ||
} | ||
}); | ||
|
||
// Show logo and animate box after ZETEO text animation | ||
const letters = document.querySelectorAll('.letter'); | ||
const lastLetter = letters[letters.length - 1]; | ||
lastLetter.addEventListener('animationend', () => { | ||
const logo = document.getElementById('logo'); | ||
const logoBox = document.getElementById('logo-box'); | ||
|
||
logo.style.opacity = 1; | ||
logoBox.style.animation = 'drawBox 3s forwards'; | ||
|
||
// Add shimmer effect to the logo | ||
logo.classList.add('shimmer'); | ||
}); | ||
|
||
// Hover effect for the logo container | ||
const logoContainer = document.getElementById('logo-container'); | ||
logoContainer.addEventListener('mouseover', () => { | ||
const logoBox = document.getElementById('logo-box'); | ||
logoBox.style.animation = 'rotateShimmer 2s infinite'; | ||
}); | ||
logoContainer.addEventListener('mouseout', () => { | ||
const logoBox = document.getElementById('logo-box'); | ||
logoBox.style.animation = ''; | ||
}); |