dld_backend/public/index.html
2025-11-04 15:06:55 +05:30

199 lines
6.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dubai DLD Analytics Dashboard</title>
<script src="/vendor/chart/chart.umd.js"></script>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 30px;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.query-section {
background: white;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.query-input {
width: 100%;
padding: 15px;
border: 2px solid #ddd;
border-radius: 8px;
font-size: 16px;
margin-bottom: 15px;
}
.query-button {
background: #007bff;
color: white;
padding: 15px 30px;
border: none;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
margin-right: 10px;
}
.query-button:hover {
background: #0056b3;
}
.cards-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.card {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
text-align: center;
}
.card-title {
font-size: 14px;
color: #666;
margin-bottom: 10px;
}
.card-value {
font-size: 24px;
font-weight: bold;
color: #333;
margin-bottom: 5px;
}
.card-subtitle {
font-size: 12px;
color: #999;
}
.chart-container {
background: white;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.chart-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 15px;
text-align: center;
color: #333;
}
.chart-summary {
background: #f8f9fa;
padding: 15px 20px;
border-radius: 8px;
margin-bottom: 20px;
font-size: 14px;
line-height: 1.6;
color: #555;
border-left: 4px solid #007bff;
text-align: left;
}
.loading {
text-align: center;
padding: 20px;
color: #666;
}
.error {
background: #f8d7da;
color: #721c24;
padding: 15px;
border-radius: 8px;
margin: 10px 0;
}
.predefined-queries {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 20px;
}
.predefined-btn {
background: #28a745;
color: white;
padding: 10px 15px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
}
.predefined-btn:hover {
background: #218838;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🏢 Dubai Land Department Analytics</h1>
<p>Real-time insights into Dubai's real estate market</p>
</div>
<div class="query-section">
<h3>Ask a Question</h3>
<input type="text" id="queryInput" class="query-input"
placeholder="e.g., Give me the last 6 months rental price trend for Business Bay">
<div class="predefined-queries">
<button class="predefined-btn" id="btn-rental-trend">
Rental Trend - Business Bay
</button>
<button class="predefined-btn" id="btn-top-areas">
Top Areas
</button>
<button class="predefined-btn" id="btn-project-summary">
Project Summary
</button>
<button class="predefined-btn" id="btn-commercial-leasing">
Commercial Leasing
</button>
<button class="predefined-btn" id="btn-residential-leasing">
Residential Leasing
</button>
<button class="predefined-btn" id="btn-example-marina">
📝 Example: Dubai Marina
</button>
<button class="predefined-btn" id="btn-example-top-areas">
📝 Example: Top Areas
</button>
<button class="predefined-btn" id="btn-example-villas">
📝 Example: Villas
</button>
<button class="predefined-btn" id="btn-example-3bhk">
📝 Example: 3 BHK
</button>
</div>
<button class="query-button" id="btn-analyze">Analyze</button>
<button class="query-button" id="btn-clear" style="background: #6c757d;">Clear</button>
</div>
<div id="loading" class="loading" style="display: none;">
🔍 Analyzing your query...
</div>
<div id="error" class="error" style="display: none;"></div>
<div id="cardsContainer" class="cards-container"></div>
<div id="chartsContainer"></div>
</div>
<script src="/js/index.js"></script>
</body>
</html>