Spaces:
Running
Running
Download script.js from Nickberg1/luxehaven-estates: direct link, hf CLI and curl.
- Browser
- Download file 1.71 kB
-
https://huggingface.co/spaces/Nickberg1/luxehaven-estates/resolve/main/script.js
- Command line
-
hf download hf://spaces/Nickberg1/luxehaven-estates/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Nickberg1/luxehaven-estates/resolve/main/script.js
1.71 kB
| 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 | |
| } |