Spaces:
Running
Running
Download script.js from Akramjon111/flowsync-orderly: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/spaces/Akramjon111/flowsync-orderly/resolve/main/script.js
- Command line
-
hf download hf://spaces/Akramjon111/flowsync-orderly/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Akramjon111/flowsync-orderly/resolve/main/script.js
1.51 kB
| document.addEventListener('DOMContentLoaded', function() { | |
| // Form validation | |
| const form = document.querySelector('form'); | |
| if (form) { | |
| form.addEventListener('submit', function(e) { | |
| const email = document.getElementById('email'); | |
| const password = document.getElementById('password'); | |
| if (!email.value || !password.value) { | |
| e.preventDefault(); | |
| alert('Please fill in all fields'); | |
| return false; | |
| } | |
| // Simulate successful login | |
| console.log('Login submitted:', { | |
| email: email.value, | |
| password: password.value | |
| }); | |
| // In a real app, you would handle the form submission here | |
| // e.preventDefault(); | |
| // handleLogin(email.value, password.value); | |
| }); | |
| } | |
| // Add animation to the delivery truck logo on hover | |
| const logo = document.querySelector('.flex.justify-center div'); | |
| if (logo) { | |
| logo.addEventListener('mouseenter', function() { | |
| this.style.animation = 'pulse 1.5s infinite'; | |
| }); | |
| logo.addEventListener('mouseleave', function() { | |
| this.style.animation = 'none'; | |
| }); | |
| } | |
| // Add hover effects to buttons | |
| const buttons = document.querySelectorAll('button, a[href="#"]'); | |
| buttons.forEach(button => { | |
| button.classList.add('btn-transition', 'btn-hover'); | |
| }); | |
| }); |