Download script.js from OzilDev/recruitervision-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/OzilDev/recruitervision-dashboard/resolve/main/script.js
- Command line
-
hf download hf://spaces/OzilDev/recruitervision-dashboard/script.js
-
curl -L -o script.js https://huggingface.co/spaces/OzilDev/recruitervision-dashboard/resolve/main/script.js
1.57 kB
| // Parallax effect for stars | |
| document.addEventListener('mousemove', (e) => { | |
| const stars = document.querySelector('.stars'); | |
| const twinkling = document.querySelector('.twinkling'); | |
| const x = e.clientX / window.innerWidth; | |
| const y = e.clientY / window.innerHeight; | |
| stars.style.transform = `translate(-${x * 30}px, -${y * 30}px)`; | |
| twinkling.style.transform = `translate(-${x * 15}px, -${y * 15}px)`; | |
| }); | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize tooltips | |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | |
| tooltipTriggerList.map(function (tooltipTriggerEl) { | |
| return new bootstrap.Tooltip(tooltipTriggerEl); | |
| }); | |
| // Color generator functionality | |
| const generateBtn = document.querySelector('.bg-primary-600'); | |
| if (generateBtn) { | |
| generateBtn.addEventListener('click', function() { | |
| const colorCards = document.querySelectorAll('.h-16'); | |
| colorCards.forEach(card => { | |
| const randomColor = Math.floor(Math.random()*16777215).toString(16); | |
| card.style.backgroundColor = `#${randomColor}`; | |
| }); | |
| }); | |
| } | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| }); |