// Property data
const properties = [
{
id: 1,
title: "Luxury Riverside Apartment",
type: "apartment",
price: "$1,250,000",
bedrooms: 3,
bathrooms: 2,
area: "1,850 sq ft",
location: "Downtown",
image: "http://static.photos/real-estate/640x360/101"
},
{
id: 2,
title: "Modern Loft with City Views",
type: "apartment",
price: "$895,000",
bedrooms: 2,
bathrooms: 2,
area: "1,350 sq ft",
location: "Midtown",
image: "http://static.photos/real-estate/640x360/102"
},
{
id: 3,
title: "Exclusive Skyline Penthouse",
type: "penthouse",
price: "$3,500,000",
bedrooms: 4,
bathrooms: 3.5,
area: "3,200 sq ft",
location: "Uptown",
image: "http://static.photos/real-estate/640x360/103"
},
{
id: 4,
title: "Charming Brownstone House",
type: "house",
price: "$2,100,000",
bedrooms: 5,
bathrooms: 3,
area: "2,800 sq ft",
location: "Suburb",
image: "http://static.photos/real-estate/640x360/104"
},
{
id: 5,
title: "Top-Floor Penthouse Suite",
type: "penthouse",
price: "$4,200,000",
bedrooms: 5,
bathrooms: 4,
area: "3,700 sq ft",
location: "Downtown",
image: "http://static.photos/real-estate/640x360/105"
},
{
id: 6,
title: "Contemporary Studio Apartment",
type: "apartment",
price: "$650,000",
bedrooms: 1,
bathrooms: 1,
area: "800 sq ft",
location: "Midtown",
image: "http://static.photos/real-estate/640x360/106"
}
];
// Load properties on properties.html
if (window.location.pathname.includes('properties.html')) {
document.addEventListener('DOMContentLoaded', function() {
const container = document.querySelector('.property-container');
properties.forEach(property => {
const propertyCard = document.createElement('div');
propertyCard.className = `property-card bg-white rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300`;
propertyCard.dataset.type = property.type;
propertyCard.innerHTML = `
${property.location} • ${property.bedrooms} beds • ${property.bathrooms} baths • ${property.area}
${property.price}
View Details