File size: 1,510 Bytes
13585a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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');
    });
});