| |
| console.log('DashVista loaded'); |
|
|
| |
| document.addEventListener('DOMContentLoaded', function() { |
| |
| if (document.querySelector('#mainChart')) { |
| VANTA.NET({ |
| el: 'body', |
| mouseControls: true, |
| touchControls: true, |
| gyroControls: false, |
| minHeight: 200.00, |
| minWidth: 200.00, |
| scale: 1.00, |
| scaleMobile: 1.00, |
| color: 0xe74141, |
| backgroundColor: 0xf9fafb, |
| points: 12.00, |
| maxDistance: 22.00, |
| spacing: 18.00 |
| }); |
| |
| |
| document.getElementById('theme-toggle').addEventListener('click', function() { |
| setTimeout(() => { |
| const isDark = document.documentElement.classList.contains('dark'); |
| VANTA.NET({ |
| el: 'body', |
| mouseControls: true, |
| touchControls: true, |
| gyroControls: false, |
| minHeight: 200.00, |
| minWidth: 200.00, |
| scale: 1.00, |
| scaleMobile: 1.00, |
| color: isDark ? 0xd11f1f : 0xe74141, |
| backgroundColor: isDark ? 0x111827 : 0xf9fafb, |
| points: 12.00, |
| maxDistance: 22.00, |
| spacing: 18.00 |
| }); |
| }, 300); |
| }); |
| } |
| |
| |
| document.querySelectorAll('.hover\\:bg-gray-50').forEach(card => { |
| card.addEventListener('mouseenter', () => { |
| card.classList.add('shadow-md'); |
| card.classList.remove('shadow'); |
| }); |
| card.addEventListener('mouseleave', () => { |
| card.classList.remove('shadow-md'); |
| card.classList.add('shadow'); |
| }); |
| }); |
| }); |