strip theme transition on load to use early script

This commit is contained in:
2025-07-15 21:02:04 -05:00
parent 543516baba
commit 40acf8f34a
5 changed files with 19 additions and 113 deletions

View File

@@ -35,18 +35,13 @@
if (themeToggle && overlay) {
themeToggle.addEventListener('click', () => {
// Add transitioning class to optimize performance
document.documentElement.classList.add('theme-transitioning');
// Fade in overlay
overlay.style.opacity = '0.15';
overlay.style.transition = 'opacity 0.3s ease';
setTimeout(() => {
// Fade out overlay
overlay.style.opacity = '0';
// Remove transitioning class after animation completes
setTimeout(() => {
document.documentElement.classList.remove('theme-transitioning');
}, 700);