Spaces:
Running
Running
File size: 1,709 Bytes
74a0332 | 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 44 45 46 47 48 49 | document.addEventListener('DOMContentLoaded', function() {
// Initialize animations
const animateElements = document.querySelectorAll('.animate-fade-in');
animateElements.forEach((el, index) => {
el.style.animationDelay = `${index * 0.1}s`;
});
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Property card hover effect
const propertyCards = document.querySelectorAll('.property-card-hover');
propertyCards.forEach(card => {
card.addEventListener('mouseenter', () => {
card.classList.add('shadow-xl');
});
card.addEventListener('mouseleave', () => {
card.classList.remove('shadow-xl');
});
});
});
// Auth functions
function togglePasswordVisibility(inputId) {
const input = document.getElementById(inputId);
const icon = document.querySelector(`[data-password="${inputId}"]`);
if (input.type === 'password') {
input.type = 'text';
icon.setAttribute('data-feather', 'eye-off');
} else {
input.type = 'password';
icon.setAttribute('data-feather', 'eye');
}
feather.replace();
}
function handleAuthFormSubmit(type) {
// In a real app, this would handle form submission
console.log(`${type} form submitted`);
document.querySelector('luxe-auth-modal').setAttribute('visible', 'false');
return false; // Prevent actual form submission for demo
} |