File size: 652 Bytes
1f36718
d51dbe5
a2050be
 
1f36718
a2050be
d51dbe5
 
a2050be
d51dbe5
 
2db1da7
a2050be
 
 
 
 
 
 
 
1f36718
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

document.addEventListener('DOMContentLoaded', function() {
    // Initialize all pages with common functionality
    feather.replace();
    
    // Smooth transitions
    document.body.style.opacity = '0';
    setTimeout(() => {
        document.body.style.transition = 'opacity 0.3s ease-in';
        document.body.style.opacity = '1';
    }, 100);

    // Handle active nav links
    const currentPath = window.location.pathname;
    const navLinks = document.querySelectorAll('custom-navbar a');
    navLinks.forEach(link => {
        if (link.getAttribute('href') === currentPath) {
            link.classList.add('active');
        }
    });
});