Spaces:
Running
Running
File size: 931 Bytes
c9aa735 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | document.addEventListener('DOMContentLoaded', () => {
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Add animation classes to cards
const cards = document.querySelectorAll('.bg-gray-800');
cards.forEach((card, index) => {
card.classList.add('animate-fade-in');
card.classList.add(`delay-${(index % 3) * 100}`);
});
// Theme toggle functionality
const themeToggle = document.getElementById('theme-toggle');
if (themeToggle) {
themeToggle.addEventListener('click', () => {
document.documentElement.classList.toggle('dark');
localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light');
});
}
}); |