Download script.js from tuandesu/undefined: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/spaces/tuandesu/undefined/resolve/main/script.js
- Command line
-
hf download hf://spaces/tuandesu/undefined/script.js
-
curl -L -o script.js https://huggingface.co/spaces/tuandesu/undefined/resolve/main/script.js
1.96 kB
| // Shared JavaScript for dashboard | |
| console.log('DashVista loaded'); | |
| // Initialize Vanta.js background effect | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Check if we're on the main dashboard page | |
| 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 | |
| }); | |
| // Update Vanta on theme change | |
| 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); | |
| }); | |
| } | |
| // Make all cards hoverable | |
| 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'); | |
| }); | |
| }); | |
| }); |