Spaces:
Running
Running
| // Document ready function | |
| document.addEventListener('DOMContentLoaded', function() { | |
| console.log('Frontend magic is happening! 🎩✨'); | |
| // Example of dynamic year in footer | |
| const yearSpan = document.getElementById('current-year'); | |
| if (yearSpan) { | |
| yearSpan.textContent = new Date().getFullYear(); | |
| } | |
| // Simple scroll animation for all anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| }); |