codecraft-studio / script.js
Abmacode12's picture
<!doctype html>
6e8f694 verified
raw
history blame contribute delete
559 Bytes
document.addEventListener('DOMContentLoaded', () => {
// Animation for project cards
const cards = document.querySelectorAll('project-card');
cards.forEach((card, index) => {
card.style.transitionDelay = `${index * 0.1}s`;
card.classList.add('animate-fade-in');
});
// Theme toggle functionality
const themeToggle = document.getElementById('theme-toggle');
if (themeToggle) {
themeToggle.addEventListener('click', () => {
document.documentElement.classList.toggle('dark');
});
}
});