extensiondash-pro / script.js
Gabszap's picture
based on this pic, https://litter.catbox.moe/hygr3ys83bsoyu4m.png, made a better site based on them (is mine, i just want a better version of my dashboard for my extension)
c9aa735 verified
Raw
History Blame Contribute Delete
931 Bytes
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');
});
}
});