543 lines
17 KiB
HTML
543 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Properties - Dubai DLD Analytics</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header {
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
margin-bottom: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.header h1 {
|
|
color: #333;
|
|
font-size: 2.5rem;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.header p {
|
|
color: #666;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.type-selector {
|
|
background: white;
|
|
padding: 25px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
margin-bottom: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.type-selector h2 {
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.type-options {
|
|
display: flex;
|
|
gap: 20px;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.type-option {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.type-option input[type="radio"] {
|
|
display: none;
|
|
}
|
|
|
|
.type-option label {
|
|
display: block;
|
|
padding: 20px;
|
|
border: 3px solid #e0e0e0;
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
background: white;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
font-size: 1.1rem;
|
|
color: #666;
|
|
}
|
|
|
|
.type-option input[type="radio"]:checked + label {
|
|
border-color: #f5576c;
|
|
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
color: white;
|
|
transform: scale(1.05);
|
|
box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
|
|
}
|
|
|
|
.type-option label:hover {
|
|
border-color: #f5576c;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.filters-section {
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.filters-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
gap: 20px;
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.filter-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.filter-group label {
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 8px;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.filter-group select,
|
|
.filter-group input {
|
|
padding: 12px;
|
|
border: 2px solid #e0e0e0;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
transition: all 0.3s ease;
|
|
background: white;
|
|
}
|
|
|
|
.filter-group select:focus,
|
|
.filter-group input:focus {
|
|
outline: none;
|
|
border-color: #f5576c;
|
|
box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.1);
|
|
}
|
|
|
|
.slider-container {
|
|
padding: 10px 0;
|
|
}
|
|
|
|
.slider-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.range-container { position: relative; width: 100%; height: 36px; }
|
|
.range-track {
|
|
position: absolute; top: 50%; transform: translateY(-50%);
|
|
height: 8px; width: 100%; border-radius: 5px; background: #e0e0e0;
|
|
}
|
|
.range-fill { position: absolute; top: 50%; transform: translateY(-50%); height: 8px; border-radius: 5px; background: linear-gradient(135deg,#f093fb,#f5576c); }
|
|
.slider { position: absolute; left: 0; right: 0; width: 100%; pointer-events: none; background: none; height: 36px; }
|
|
.slider input[type=range] { pointer-events: none; -webkit-appearance: none; appearance: none; width: 100%; background: transparent; height: 36px; position: absolute; top: 50%; transform: translateY(-50%); }
|
|
.slider input[type=range]:nth-child(1) { z-index: 3; }
|
|
.slider input[type=range]:nth-child(2) { z-index: 4; }
|
|
.slider input[type=range]::-webkit-slider-thumb { pointer-events: all; -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #f5576c; cursor: pointer; box-shadow: 0 0 0 3px rgba(245,87,108,.2); }
|
|
.slider input[type=range]::-moz-range-thumb { pointer-events: all; width: 20px; height: 20px; border-radius: 50%; background: #f5576c; cursor: pointer; border: none; box-shadow: 0 0 0 3px rgba(245,87,108,.2); }
|
|
|
|
.slider-value {
|
|
min-width: 120px;
|
|
text-align: center;
|
|
padding: 8px 12px;
|
|
background: #f5f5f5;
|
|
border-radius: 6px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
/* Make size filter span full row for longer slider */
|
|
.filter-group.size-group { grid-column: 1 / -1; }
|
|
|
|
.button-group {
|
|
display: flex;
|
|
gap: 15px;
|
|
margin-top: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.btn {
|
|
padding: 14px 30px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
color: white;
|
|
flex: 1;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #6c757d;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #5a6268;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
color: #666;
|
|
font-size: 1.2rem;
|
|
display: none;
|
|
}
|
|
|
|
.error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
margin: 20px 0;
|
|
display: none;
|
|
}
|
|
|
|
.results-section {
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.results-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 25px;
|
|
flex-wrap: wrap;
|
|
gap: 15px;
|
|
}
|
|
|
|
.results-count {
|
|
font-size: 1.3rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.table-container {
|
|
overflow-x: auto;
|
|
border-radius: 8px;
|
|
border: 1px solid #e0e0e0;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
min-width: 800px;
|
|
}
|
|
|
|
thead {
|
|
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
color: white;
|
|
}
|
|
|
|
th {
|
|
padding: 15px;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
td {
|
|
padding: 15px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
}
|
|
|
|
tbody tr:hover {
|
|
background: #f8f9fa;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 5px 12px;
|
|
border-radius: 20px;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge-primary {
|
|
background: #f5576c;
|
|
color: white;
|
|
}
|
|
|
|
.badge-success {
|
|
background: #28a745;
|
|
color: white;
|
|
}
|
|
|
|
.badge-warning {
|
|
background: #ffc107;
|
|
color: #333;
|
|
}
|
|
|
|
.no-results {
|
|
text-align: center;
|
|
padding: 60px 20px;
|
|
color: #999;
|
|
}
|
|
|
|
.no-results svg {
|
|
width: 80px;
|
|
height: 80px;
|
|
margin-bottom: 20px;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.filters-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.slider-wrapper {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.results-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.button-group {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
}
|
|
|
|
.type-options {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 345px) {
|
|
body {
|
|
padding: 10px;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.filters-section,
|
|
.results-section {
|
|
padding: 15px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>🏘️ Properties Search</h1>
|
|
<p>Filter and explore properties for rent or sale in Dubai</p>
|
|
</div>
|
|
|
|
<div class="type-selector">
|
|
<h2>Select Property Type</h2>
|
|
<div class="type-options">
|
|
<div class="type-option">
|
|
<input type="radio" id="type_rent" name="type" value="rent" checked>
|
|
<label for="type_rent">🏠 Rent</label>
|
|
</div>
|
|
<div class="type-option">
|
|
<input type="radio" id="type_sale" name="type" value="sale">
|
|
<label for="type_sale">💰 Sale</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="filters-section">
|
|
<h2 style="margin-bottom: 20px; color: #333;">Filters</h2>
|
|
<form id="filtersForm">
|
|
<input type="hidden" id="type" name="type" value="rent">
|
|
<div class="filters-grid">
|
|
<div class="filter-group size-group">
|
|
<label for="area_name">Area</label>
|
|
<select id="area_name" name="area_name">
|
|
<option value="">All Areas</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="property_type">Property Type</label>
|
|
<select id="property_type" name="property_type">
|
|
<option value="all">All Types</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group" id="roomsGroup">
|
|
<label for="rooms">Rooms</label>
|
|
<select id="rooms" name="rooms">
|
|
<option value="all">All</option>
|
|
<option value="1">1.0</option>
|
|
<option value="2">2.0</option>
|
|
<option value="3">3.0</option>
|
|
<option value="4">4.0</option>
|
|
<option value="5">5.0</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group" id="bedsGroup" style="display: none;">
|
|
<label for="beds">Bedrooms</label>
|
|
<select id="beds" name="beds">
|
|
<option value="all">All</option>
|
|
<option value="studio">Studio</option>
|
|
<option value="1 b/r">1 B/R</option>
|
|
<option value="2 b/r">2 B/R</option>
|
|
<option value="3 b/r">3 B/R</option>
|
|
<option value="4 b/r">4 B/R</option>
|
|
<option value="5 b/r">5 B/R</option>
|
|
<option value="6 b/r">6 B/R</option>
|
|
<option value="7 b/r">7 B/R</option>
|
|
<option value="10 b/r">10 B/R</option>
|
|
<option value="penthouse">Penthouse</option>
|
|
<option value="office">Office</option>
|
|
<option value="shop">Shop</option>
|
|
<option value="gym">Gym</option>
|
|
<option value="single room">Single Room</option>
|
|
<option value="null">NULL</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="project">Project</label>
|
|
<select id="project" name="project">
|
|
<option value="all">All Projects</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label for="page_size">Page Size</label>
|
|
<select id="page_size" name="page_size">
|
|
<option value="10">10</option>
|
|
<option value="20">20</option>
|
|
<option value="30" selected>30</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
<input type="hidden" id="page" name="page" value="1">
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label>Size (sq. ft)</label>
|
|
<div class="slider-container">
|
|
<div class="slider-wrapper" style="width:100%">
|
|
<div class="range-container">
|
|
<div class="range-track"></div>
|
|
<div class="range-fill" id="sizeFill" style="left:0%; width:100%"></div>
|
|
<div class="slider">
|
|
<input type="range" id="size_min_range" min="1.0" max="1715752.11" step="100" value="1.0">
|
|
<input type="range" id="size_max_range" min="1.0" max="1715752.11" step="100" value="1715752.11">
|
|
</div>
|
|
</div>
|
|
<div class="slider-value" id="sizeValue">All Sizes</div>
|
|
</div>
|
|
<input type="hidden" id="size_min" name="size_min" value="">
|
|
<input type="hidden" id="size_max" name="size_max" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="button-group">
|
|
<button type="submit" class="btn btn-primary">🔍 Search Properties</button>
|
|
<button type="button" class="btn btn-secondary" id="resetBtn">🔄 Reset Filters</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="loading" id="loading">
|
|
🔍 Fetching properties...
|
|
</div>
|
|
|
|
<div class="error" id="error"></div>
|
|
|
|
<div class="results-section" id="resultsSection" style="display: none;">
|
|
<div class="results-header">
|
|
<div class="results-count" id="resultsCount"></div>
|
|
<div class="pagination-controls" style="display:flex;gap:10px;align-items:center;">
|
|
<button type="button" class="btn btn-secondary" id="prevPage">Prev</button>
|
|
<div id="pageInfo" style="font-weight:600;color:#333;"></div>
|
|
<button type="button" class="btn btn-secondary" id="nextPage">Next</button>
|
|
</div>
|
|
</div>
|
|
<div class="table-container" id="tableContainer">
|
|
<table id="propertiesTable">
|
|
<thead id="tableHead">
|
|
</thead>
|
|
<tbody id="propertiesBody">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/properties.js"></script>
|
|
</body>
|
|
</html>
|
|
|