Spaces:
Running
Running
Download script.js from PrometheusGroup/voidscape-noir: direct link, hf CLI and curl.
- Browser
- Download file 909 Bytes
-
https://huggingface.co/spaces/PrometheusGroup/voidscape-noir/resolve/6ce77d4268dc415873ec9a7ff5abb94a4c19ec6d/script.js
- Command line
-
hf download hf://spaces/PrometheusGroup/voidscape-noir@6ce77d4268dc415873ec9a7ff5abb94a4c19ec6d/script.js
-
curl -L -o script.js https://huggingface.co/spaces/PrometheusGroup/voidscape-noir/resolve/6ce77d4268dc415873ec9a7ff5abb94a4c19ec6d/script.js
909 Bytes
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize animations | |
| const animatedElements = document.querySelectorAll('.fade-in, .slide-up'); | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('animate'); | |
| observer.unobserve(entry.target); | |
| } | |
| }); | |
| }, { | |
| threshold: 0.1 | |
| }); | |
| animatedElements.forEach(el => observer.observe(el)); | |
| // 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'); | |
| }); | |
| } | |
| }); |