homeconnect / index.html
abdelhak66's picture
Add 1 files
3198325 verified
Raw History Blame Contribute Delete
34.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HomeConnect | Smart Real Estate Lead Generator</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary: #4f46e5;
--secondary: #10b981;
--dark: #1e293b;
--light: #f8fafc;
--accent: #f97316;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(--light);
color: var(--dark);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Navbar Styles */
.navbar {
background-color: white;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
}
.logo i {
color: var(--primary);
font-size: 1.8rem;
}
.logo h1 {
font-size: 1.5rem;
font-weight: 700;
background: linear-gradient(to right, var(--primary), var(--secondary));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.nav-links {
display: flex;
gap: 1.5rem;
align-items: center;
}
.nav-links a {
text-decoration: none;
color: var(--dark);
font-weight: 500;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary);
}
.btn {
padding: 0.6rem 1.2rem;
border-radius: 0.5rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
border: none;
}
.btn-primary {
background-color: var(--primary);
color: white;
}
.btn-primary:hover {
background-color: #4338ca;
transform: translateY(-2px);
}
.btn-outline {
background-color: transparent;
border: 1px solid var(--primary);
color: var(--primary);
}
.btn-outline:hover {
background-color: var(--primary);
color: white;
}
/* Hero Section */
.hero {
padding: 4rem 0;
background: linear-gradient(135deg, rgba(79,70,229,0.1) 0%, rgba(16,185,129,0.1) 100%);
}
.hero-content {
display: flex;
align-items: center;
gap: 3rem;
}
.hero-text {
flex: 1;
}
.hero-text h2 {
font-size: 3rem;
line-height: 1.2;
margin-bottom: 1.5rem;
color: var(--dark);
}
.hero-text p {
font-size: 1.2rem;
color: #64748b;
margin-bottom: 2rem;
line-height: 1.6;
}
.hero-image {
flex: 1;
border-radius: 1rem;
overflow: hidden;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.hero-image img {
width: 100%;
height: auto;
display: block;
}
.action-buttons {
display: flex;
gap: 1rem;
}
/* Features Section */
.features {
padding: 4rem 0;
}
.section-title {
text-align: center;
margin-bottom: 3rem;
}
.section-title h3 {
font-size: 2rem;
color: var(--dark);
margin-bottom: 1rem;
}
.section-title p {
color: #64748b;
max-width: 600px;
margin: 0 auto;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.feature-card {
background-color: white;
border-radius: 1rem;
padding: 2rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.feature-icon {
font-size: 2.5rem;
color: var(--primary);
margin-bottom: 1.5rem;
}
.feature-card h4 {
font-size: 1.25rem;
margin-bottom: 1rem;
color: var(--dark);
}
.feature-card p {
color: #64748b;
line-height: 1.6;
}
/* Auth Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: white;
padding: 2rem;
border-radius: 0.5rem;
width: 100%;
max-width: 500px;
position: relative;
}
.close-btn {
position: absolute;
top: 1rem;
right: 1rem;
font-size: 1.5rem;
cursor: pointer;
color: #64748b;
}
.modal-title {
margin-bottom: 1.5rem;
font-size: 1.5rem;
color: var(--dark);
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--dark);
}
.form-control {
width: 100%;
padding: 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 0.375rem;
font-size: 1rem;
transition: border-color 0.3s;
}
.form-control:focus {
outline: none;
border-color: var(--primary);
}
.form-footer {
margin-top: 1.5rem;
text-align: center;
}
.form-footer p {
color: #64748b;
margin-top: 1rem;
}
.form-footer a {
color: var(--primary);
text-decoration: none;
font-weight: 500;
}
/* Dashboard styles */
.dashboard {
padding: 4rem 0;
}
.dashboard-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
}
.stats-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background-color: white;
border-radius: 0.5rem;
padding: 1.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.stat-card h5 {
font-size: 0.875rem;
color: #64748b;
margin-bottom: 0.5rem;
font-weight: 500;
}
.stat-card p {
font-size: 1.5rem;
font-weight: 700;
color: var(--dark);
}
.leads-container {
background-color: white;
border-radius: 0.5rem;
padding: 1.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.leads-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.leads-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
.lead-card {
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
padding: 1.5rem;
transition: transform 0.3s, box-shadow 0.3s;
}
.lead-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.lead-card h4 {
font-size: 1.125rem;
margin-bottom: 0.5rem;
color: var(--dark);
}
.lead-card p {
color: #64748b;
margin-bottom: 0.5rem;
font-size: 0.875rem;
}
.lead-card .price {
font-size: 1.25rem;
font-weight: 700;
color: var(--secondary);
margin-bottom: 1rem;
}
.lead-actions {
display: flex;
justify-content: space-between;
margin-top: 1rem;
}
/* Responsive styles */
@media (max-width: 768px) {
.hero-content {
flex-direction: column;
}
.hero-text h2 {
font-size: 2.2rem;
}
.nav-links {
display: none;
}
.leads-grid {
grid-template-columns: 1fr;
}
}
/* Animation */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
animation: fadeIn 0.5s ease-out forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar">
<div class="container nav-container">
<div class="logo">
<i class="fas fa-home"></i>
<h1>HomeConnect</h1>
</div>
<div class="nav-links">
<a href="#features">Features</a>
<a href="#how-it-works">How It Works</a>
<a href="#testimonials">Testimonials</a>
<button class="btn btn-outline" id="login-btn">Login</button>
<button class="btn btn-primary" id="register-btn">Register</button>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="hero">
<div class="container hero-content">
<div class="hero-text animate-fade-in">
<h2>Smart Real Estate Lead Generation</h2>
<p>Connect buyers with the perfect agents automatically. Our AI-powered platform matches properties to qualified leads, saving you time and increasing conversions.</p>
<div class="action-buttons">
<button class="btn btn-primary" id="hero-register-btn">Get Started</button>
<button class="btn btn-outline"><i class="fas fa-play"></i> Watch Demo</button>
</div>
</div>
<div class="hero-image animate-fade-in delay-1">
<img src="https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Modern House">
</div>
</div>
</section>
<!-- Features Section -->
<section class="features" id="features">
<div class="container">
<div class="section-title">
<h3>Powerful Features</h3>
<p>Everything you need to grow your real estate business with high-quality leads</p>
</div>
<div class="features-grid">
<div class="feature-card animate-fade-in delay-1">
<div class="feature-icon">
<i class="fas fa-bolt"></i>
</div>
<h4>Instant Matching</h4>
<p>Our algorithm instantly matches buyers with the perfect agents based on budget, location, and preferences.</p>
</div>
<div class="feature-card animate-fade-in delay-2">
<div class="feature-icon">
<i class="fas fa-robot"></i>
</div>
<h4>AI-Powered Leads</h4>
<p>Leverage artificial intelligence to analyze buyer behavior and predict high-intent leads before they contact you.</p>
</div>
<div class="feature-card animate-fade-in delay-3">
<div class="feature-icon">
<i class="fas fa-mobile-alt"></i>
</div>
<h4>Mobile Dashboard</h4>
<p>Access and manage your leads from anywhere with our fully responsive dashboard designed for mobile agents.</p>
</div>
</div>
</div>
</section>
<!-- Login Modal -->
<div class="modal" id="login-modal">
<div class="modal-content">
<span class="close-btn" id="close-login">&times;</span>
<h3 class="modal-title">Login to Your Account</h3>
<div class="form-group">
<label for="login-email">Email</label>
<input type="email" id="login-email" class="form-control" placeholder="your@email.com">
</div>
<div class="form-group">
<label for="login-password">Password</label>
<input type="password" id="login-password" class="form-control" placeholder="••••••••">
</div>
<button class="btn btn-primary" style="width: 100%;" id="login-submit">Login</button>
<div class="form-footer">
<p>Don't have an account? <a href="#" id="show-register">Register</a></p>
</div>
</div>
</div>
<!-- Register Modal -->
<div class="modal" id="register-modal">
<div class="modal-content">
<span class="close-btn" id="close-register">&times;</span>
<h3 class="modal-title">Create Your Account</h3>
<div class="form-group">
<label>I am a:</label>
<div style="display: flex; gap: 1rem; margin-top: 0.5rem;">
<button class="btn btn-outline" style="flex: 1;" id="agent-type">Real Estate Agent</button>
<button class="btn btn-outline" style="flex: 1;" id="buyer-type">Property Buyer</button>
</div>
</div>
<div class="form-group">
<label for="register-name">Full Name</label>
<input type="text" id="register-name" class="form-control" placeholder="John Smith">
</div>
<div class="form-group">
<label for="register-email">Email</label>
<input type="email" id="register-email" class="form-control" placeholder="your@email.com">
</div>
<div class="form-group">
<label for="register-password">Password</label>
<input type="password" id="register-password" class="form-control" placeholder="••••••••">
</div>
<div class="form-group" id="agent-fields" style="display: none;">
<label for="license-number">License Number (Optional)</label>
<input type="text" id="license-number" class="form-control" placeholder="RE123456">
</div>
<div class="form-group" id="buyer-fields" style="display: none;">
<label for="buyer-budget">Budget Range</label>
<select id="buyer-budget" class="form-control">
<option value="">Select budget range</option>
<option value="100000-300000">$100K - $300K</option>
<option value="300000-500000">$300K - $500K</option>
<option value="500000-800000">$500K - $800K</option>
<option value="800000-1000000">$800K - $1M</option>
<option value="1000000+">$1M+</option>
</select>
<label style="margin-top: 1rem;" for="buyer-location">Preferred Locations</label>
<div style="margin-top: 0.5rem;">
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<button class="tag-btn" data-location="Downtown">Downtown</button>
<button class="tag-btn" data-location="Suburbs">Suburbs</button>
<button class="tag-btn" data-location="Beachfront">Beachfront</button>
<button class="tag-btn" data-location="Mountains">Mountains</button>
</div>
</div>
<input type="text" id="buyer-location" style="display: none;">
</div>
<button class="btn btn-primary" style="width: 100%; margin-top: 1rem;" id="register-submit">Create Account</button>
<div class="form-footer">
<p>Already have an account? <a href="#" id="show-login">Login</a></p>
</div>
</div>
</div>
<!-- Dashboard Section (Hidden by default) -->
<section class="dashboard" id="dashboard" style="display: none;">
<div class="container">
<div class="dashboard-header">
<h3>Your Leads Dashboard</h3>
<button class="btn btn-primary" id="scrape-listings">
<i class="fas fa-sync-alt"></i> Refresh Listings
</button>
</div>
<div class="stats-cards">
<div class="stat-card">
<h5>Total Leads</h5>
<p id="total-leads">24</p>
</div>
<div class="stat-card">
<h5>Hot Leads</h5>
<p id="hot-leads">8</p>
</div>
<div class="stat-card">
<h5>Closed Deals</h5>
<p id="closed-deals">3</p>
</div>
<div class="stat-card">
<h5>Estimated Commission</h5>
<p id="estimated-commission">$12,450</p>
</div>
</div>
<div class="leads-container">
<div class="leads-header">
<h4>Your Latest Leads</h4>
<div style="display: flex; gap: 0.5rem;">
<button class="btn btn-outline" style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Filter</button>
<button class="btn btn-outline" style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Sort</button>
</div>
</div>
<div class="leads-grid" id="leads-grid">
<!-- Leads will be dynamically inserted here -->
</div>
</div>
</div>
</section>
<script>
// Mock data for leads
const mockLeads = [
{
id: 1,
name: "Sarah Johnson",
email: "sarah.j@example.com",
phone: "(555) 123-4567",
budget: 650000,
location: "Downtown",
status: "New",
propertyType: "Condominium",
urgency: "High"
},
{
id: 2,
name: "Michael Chen",
email: "michael.c@example.com",
phone: "(555) 987-6543",
budget: 450000,
location: "Suburbs",
status: "Contacted",
propertyType: "Single Family",
urgency: "Medium"
},
{
id: 3,
name: "Elizabeth Williams",
email: "elizabeth.w@example.com",
phone: "(555) 456-7890",
budget: 3200000,
location: "Beachfront",
status: "New",
propertyType: "Luxury Villa",
urgency: "High"
},
{
id: 4,
name: "David Rodriguez",
email: "david.r@example.com",
phone: "(555) 789-0123",
budget: 750000,
location: "Downtown",
status: "Meeting Scheduled",
propertyType: "Penthouse",
urgency: "Medium"
}
];
// DOM Elements
const loginBtn = document.getElementById('login-btn');
const registerBtn = document.getElementById('register-btn');
const heroRegisterBtn = document.getElementById('hero-register-btn');
const loginModal = document.getElementById('login-modal');
const registerModal = document.getElementById('register-modal');
const closeLogin = document.getElementById('close-login');
const closeRegister = document.getElementById('close-register');
const showRegister = document.getElementById('show-register');
const showLogin = document.getElementById('show-login');
const agentBtn = document.getElementById('agent-type');
const buyerBtn = document.getElementById('buyer-type');
const agentFields = document.getElementById('agent-fields');
const buyerFields = document.getElementById('buyer-fields');
const tagButtons = document.querySelectorAll('.tag-btn');
const buyerLocation = document.getElementById('buyer-location');
const dashboard = document.getElementById('dashboard');
const leadsGrid = document.getElementById('leads-grid');
const scrapeBtn = document.getElementById('scrape-listings');
// Selected locations array
let selectedLocations = [];
let currentUserType = 'agent';
// Event Listeners
loginBtn.addEventListener('click', () => loginModal.style.display = 'flex');
registerBtn.addEventListener('click', () => {
registerModal.style.display = 'flex';
currentUserType = 'agent';
agentBtn.classList.add('btn-primary');
agentBtn.classList.remove('btn-outline');
buyerBtn.classList.add('btn-outline');
buyerBtn.classList.remove('btn-primary');
agentFields.style.display = 'block';
buyerFields.style.display = 'none';
});
heroRegisterBtn.addEventListener('click', () => registerModal.style.display = 'flex');
closeLogin.addEventListener('click', () => loginModal.style.display = 'none');
closeRegister.addEventListener('click', () => registerModal.style.display = 'none');
showRegister.addEventListener('click', (e) => {
e.preventDefault();
loginModal.style.display = 'none';
registerModal.style.display = 'flex';
});
showLogin.addEventListener('click', (e) => {
e.preventDefault();
registerModal.style.display = 'none';
loginModal.style.display = 'flex';
});
agentBtn.addEventListener('click', () => {
currentUserType = 'agent';
agentBtn.classList.add('btn-primary');
agentBtn.classList.remove('btn-outline');
buyerBtn.classList.add('btn-outline');
buyerBtn.classList.remove('btn-primary');
agentFields.style.display = 'block';
buyerFields.style.display = 'none';
});
buyerBtn.addEventListener('click', () => {
currentUserType = 'buyer';
buyerBtn.classList.add('btn-primary');
buyerBtn.classList.remove('btn-outline');
agentBtn.classList.add('btn-outline');
agentBtn.classList.remove('btn-primary');
buyerFields.style.display = 'block';
agentFields.style.display = 'none';
});
// Tag buttons for locations
tagButtons.forEach(button => {
button.addEventListener('click', function(e) {
e.preventDefault();
const location = this.getAttribute('data-location');
if (this.classList.contains('btn-primary')) {
// Already selected, remove it
this.classList.remove('btn-primary');
this.classList.add('btn-outline');
selectedLocations = selectedLocations.filter(loc => loc !== location);
} else {
// Not selected, add it
this.classList.add('btn-primary');
this.classList.remove('btn-outline');
selectedLocations.push(location);
}
buyerLocation.value = selectedLocations.join(',');
});
});
// Login submit
document.getElementById('login-submit').addEventListener('click', () => {
// In a real app, would validate and authenticate here
loginModal.style.display = 'none';
// Show the dashboard (mock login)
document.querySelectorAll('section').forEach(section => {
if (section.id !== 'dashboard') {
section.style.display = 'none';
}
});
dashboard.style.display = 'block';
// Populate leads
populateLeads();
});
// Register submit
document.getElementById('register-submit').addEventListener('click', () => {
// In a real app, would validate and register here
registerModal.style.display = 'none';
// Show the dashboard (mock login)
document.querySelectorAll('section').forEach(section => {
if (section.id !== 'dashboard') {
section.style.display = 'none';
}
});
dashboard.style.display = 'block';
// Populate leads
populateLeads();
});
// Scrape listings button
scrapeBtn.addEventListener('click', () => {
scrapeBtn.disabled = true;
scrapeBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Loading...';
// Simulate API call
setTimeout(() => {
// Show a notification that new leads were found
showNotification('New leads found! 3 new matches added to your dashboard.');
// Add some mock data to the leads
const newLead = {
id: mockLeads.length + 1,
name: "New Lead " + (mockLeads.length + 1),
email: "newlead" + (mockLeads.length + 1) + "@example.com",
phone: "(555) " + (Math.floor(Math.random() * 800) + 100) + "-" + (Math.floor(Math.random() * 8000) + 1000),
budget: Math.floor(Math.random() * 1000000) + 200000,
location: ["Downtown", "Suburbs", "Beachfront", "Mountains"][Math.floor(Math.random() * 4)],
status: "New",
propertyType: ["Condominium", "Single Family", "Townhouse", "Luxury Villa"][Math.floor(Math.random() * 4)],
urgency: ["Low", "Medium", "High"][Math.floor(Math.random() * 3)]
};
mockLeads.unshift(newLead);
populateLeads();
scrapeBtn.disabled = false;
scrapeBtn.innerHTML = '<i class="fas fa-sync-alt"></i> Refresh Listings';
}, 2000);
});
// Populate leads grid
function populateLeads() {
leadsGrid.innerHTML = '';
mockLeads.forEach(lead => {
const leadCard = document.createElement('div');
leadCard.className = 'lead-card';
let urgencyBadge = '';
if (lead.urgency === 'High') {
urgencyBadge = '<span style="background-color: #fecaca; color: #b91c1c; padding: 0.25rem 0.5rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600;">Hot Lead</span>';
}
leadCard.innerHTML = `
<h4>${lead.name} ${urgencyBadge}</h4>
<p><i class="fas fa-envelope"></i> ${lead.email}</p>
<p><i class="fas fa-phone"></i> ${lead.phone}</p>
<p class="price">$${lead.budget.toLocaleString()}</p>
<p><i class="fas fa-map-marker-alt"></i> ${lead.location}</p>
<p><i class="fas fa-home"></i> Looking for: ${lead.propertyType}</p>
<div class="lead-actions">
<button class="btn btn-outline" style="padding: 0.5rem;" onclick="contactLead(${lead.id})">
<i class="fas fa-phone-alt"></i> Contact
</button>
<button class="btn btn-primary" style="padding: 0.5rem;" onclick="scheduleMeeting(${lead.id})">
<i class="fas fa-calendar-alt"></i> Schedule
</button>
</div>
<div style="margin-top: 1rem; display: flex; justify-content: space-between;">
<span style="font-size: 0.75rem; color: #64748b;">Status: ${lead.status}</span>
<button
class="btn btn-outline"
style="padding: 0.25rem 0.5rem; font-size: 0.75rem;"
onclick="removeLead(${lead.id})">
Remove
</button>
</div>
`;
leadsGrid.appendChild(leadCard);
});
}
// Show notification function
function showNotification(message) {
const notification = document.createElement('div');
notification.style.position = 'fixed';
notification.style.bottom = '20px';
notification.style.right = '20px';
notification.style.backgroundColor = '#4f46e5';
notification.style.color = 'white';
notification.style.padding = '1rem 1.5rem';
notification.style.borderRadius = '0.5rem';
notification.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.1)';
notification.style.zIndex = '1000';
notification.style.animation = 'fadeIn 0.3s ease-out forwards';
notification.innerHTML = `
<div style="display: flex; align-items: center; gap: 0.5rem;">
<i class="fas fa-check-circle"></i>
<span>${message}</span>
</div>
`;
document.body.appendChild(notification);
setTimeout(() => {
notification.style.animation = 'fadeIn 0.3s ease-out reverse forwards';
setTimeout(() => {
notification.remove();
}, 300);
}, 3000);
}
// Global functions for lead actions
window.contactLead = function(id) {
const lead = mockLeads.find(lead => lead.id === id);
showNotification(`Called ${lead.name} at ${lead.phone}`);
// Update status
lead.status = "Contacted";
populateLeads();
}
window.scheduleMeeting = function(id) {
const lead = mockLeads.find(lead => lead.id === id);
showNotification(`Meeting scheduled with ${lead.name}`);
// Update status
lead.status = "Meeting Scheduled";
populateLeads();
}
window.removeLead = function(id) {
const index = mockLeads.findIndex(lead => lead.id === id);
const leadName = mockLeads[index].name;
mockLeads.splice(index, 1);
showNotification(`Lead ${leadName} removed`);
populateLeads();
}
// Close modals when clicking outside
window.addEventListener('click', (e) => {
if (e.target === loginModal) {
loginModal.style.display = 'none';
}
if (e.target === registerModal) {
registerModal.style.display = 'none';
}
});
// Animate elements when they come into view
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animate-fade-in');
}
});
}, { threshold: 0.1 });
document.querySelectorAll('.feature-card, .hero-text, .hero-image').forEach(el => {
observer.observe(el);
});
// Sample simulation of a real "scraping" process
function simulateScraping() {
return new Promise(resolve => {
setTimeout(() => {
const newLeads = [
// Would be actual scraped data in a real app
];
resolve(newLeads);
}, 2000);
});
}
</script>
</body>
</html>