Spaces:
Running
Running
File size: 22,003 Bytes
8422f63 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>دليل عسير الذكي - الخرائط التفاعلية</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
#map {
height: 70vh;
border-radius: 16px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.custom-icon {
background-color: #fff;
border-radius: 50%;
padding: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
}
.location-info {
transition: all 0.3s ease;
}
.ar-marker {
background-color: #38a169;
color: white;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
cursor: pointer;
}
.filter-btn.active {
background-color: #2f855a;
color: white;
}
@media (max-width: 768px) {
#map {
height: 60vh;
}
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Header -->
<header class="bg-gradient-to-r from-green-800 to-green-600 text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-4">
<img src="https://via.placeholder.com/50" alt="شعار عسير" class="h-12 w-12 rounded-full border-2 border-white">
<h1 class="text-2xl font-bold">دليل عسير الذكي</h1>
</div>
<div class="flex items-center space-x-4">
<button class="bg-white text-green-800 px-4 py-2 rounded-lg font-medium hover:bg-gray-100 transition">
<i class="fas fa-user mr-2"></i>تسجيل الدخول
</button>
<button class="text-white">
<i class="fas fa-bars text-2xl"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- Search and Controls -->
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6 gap-4">
<div class="relative w-full md:w-1/2">
<input type="text" placeholder="ابحث عن موقع أو فعالية..."
class="w-full pr-12 pl-4 py-3 rounded-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent">
<button class="absolute left-4 top-3 text-gray-500">
<i class="fas fa-search"></i>
</button>
</div>
<div class="flex flex-wrap gap-2 w-full md:w-auto">
<button id="suggest-btn" class="flex items-center bg-green-100 text-green-800 px-4 py-2 rounded-lg font-medium hover:bg-green-200 transition">
<i class="fas fa-lightbulb ml-2"></i> اقتراح رحلة اليوم
</button>
<button id="location-btn" class="flex items-center bg-blue-100 text-blue-800 px-4 py-2 rounded-lg font-medium hover:bg-blue-200 transition">
<i class="fas fa-location-arrow ml-2"></i> موقعي الحالي
</button>
<button id="ar-btn" class="flex items-center bg-purple-100 text-purple-800 px-4 py-2 rounded-lg font-medium hover:bg-purple-200 transition">
<i class="fas fa-vr-cardboard ml-2"></i> الواقع المعزز
</button>
</div>
</div>
<!-- Map and Sidebar -->
<div class="flex flex-col lg:flex-row gap-6">
<!-- Filters Sidebar -->
<div class="w-full lg:w-1/4 bg-white p-4 rounded-xl shadow-md">
<h2 class="text-xl font-bold mb-4 text-gray-800 border-b pb-2">تصفية النتائج</h2>
<div class="space-y-3">
<h3 class="font-semibold text-gray-700">التصنيفات</h3>
<div class="flex flex-wrap gap-2">
<button class="filter-btn active" data-filter="all">
الكل
</button>
<button class="filter-btn" data-filter="nature">
<i class="fas fa-mountain mr-1"></i> طبيعة
</button>
<button class="filter-btn" data-filter="heritage">
<i class="fas fa-landmark mr-1"></i> تراث
</button>
<button class="filter-btn" data-filter="events">
<i class="fas fa-calendar-alt mr-1"></i> فعاليات
</button>
<button class="filter-btn" data-filter="food">
<i class="fas fa-utensils mr-1"></i> مطاعم
</button>
</div>
</div>
<div class="mt-6 space-y-3">
<h3 class="font-semibold text-gray-700">المسافة</h3>
<div class="flex items-center gap-2">
<input type="range" min="1" max="50" value="10" class="w-full h-2 bg-green-200 rounded-lg appearance-none cursor-pointer">
<span class="text-sm font-medium text-gray-600">10 كم</span>
</div>
</div>
<div class="mt-6">
<h3 class="font-semibold text-gray-700">الموصى بها</h3>
<div class="mt-2 space-y-2">
<div class="flex items-center p-2 hover:bg-gray-100 rounded-lg cursor-pointer">
<div class="bg-green-100 p-2 rounded-lg mr-2">
<i class="fas fa-mountain text-green-600"></i>
</div>
<div>
<p class="font-medium">جبل السودة</p>
<p class="text-xs text-gray-500">4.8 ★ (120 تقييم)</p>
</div>
</div>
<div class="flex items-center p-2 hover:bg-gray-100 rounded-lg cursor-pointer">
<div class="bg-yellow-100 p-2 rounded-lg mr-2">
<i class="fas fa-landmark text-yellow-600"></i>
</div>
<div>
<p class="font-medium">قرية رجال ألمع</p>
<p class="text-xs text-gray-500">4.7 ★ (95 تقييم)</p>
</div>
</div>
</div>
</div>
</div>
<!-- Map Container -->
<div class="w-full lg:w-3/4">
<div id="map"></div>
<!-- Location Info Card (hidden by default) -->
<div id="location-info" class="hidden mt-4 bg-white p-4 rounded-xl shadow-md location-info">
<div class="flex justify-between items-start">
<div>
<h3 class="text-xl font-bold text-gray-800" id="location-title">جبل السودة</h3>
<div class="flex items-center mt-1">
<div class="flex text-yellow-400">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star-half-alt"></i>
</div>
<span class="text-gray-600 text-sm mr-1">4.7 (128 تقييم)</span>
</div>
</div>
<button id="close-info" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mt-4 flex gap-4">
<img src="https://via.placeholder.com/150" alt="موقع" class="w-24 h-24 rounded-lg object-cover">
<p class="text-gray-700 text-sm flex-1" id="location-desc">
جبل السودة هو أعلى قمة في المملكة العربية السعودية، يصل ارتفاعه إلى حوالي 3,015 متر فوق مستوى سطح البحر. يتميز بإطلالة بانورامية رائعة وغابات كثيفة، وهو وجهة مثالية لعشاق الطبيعة والمغامرات.
</p>
</div>
<div class="mt-4 flex flex-wrap gap-2">
<button class="bg-green-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-green-700 transition flex items-center">
<i class="fas fa-route ml-2"></i> ابدأ المسار
</button>
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-blue-700 transition flex items-center">
<i class="fas fa-vr-cardboard ml-2"></i> مشاهدة AR
</button>
<button class="bg-purple-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-purple-700 transition flex items-center">
<i class="fas fa-headphones ml-2"></i> استماع للوصف
</button>
</div>
</div>
</div>
</div>
</main>
<!-- AI Assistant Modal -->
<div id="ai-modal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white rounded-xl p-6 max-w-md w-full mx-4">
<div class="flex justify-between items-center mb-4">
<div class="flex items-center">
<div class="bg-green-100 p-2 rounded-full mr-3">
<i class="fas fa-robot text-green-600"></i>
</div>
<h3 class="text-xl font-bold text-gray-800">مساعد إيفا الذكي</h3>
</div>
<button id="close-ai-modal" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="bg-gray-100 p-4 rounded-lg mb-4">
<p class="text-gray-800">مرحباً بك في عسير! بناءً على موقعك الحالي والطقس الجميل اليوم، أنصحك بزيارة:</p>
<ol class="list-decimal list-inside mt-2 space-y-2">
<li class="font-medium">قرية رجال ألمع التراثية (مسافة 15 كم)</li>
<li class="font-medium">منتزه السحاب (مسافة 8 كم)</li>
<li class="font-medium">سوق الثلاثاء الشعبي (يفتح بعد 3 ساعات)</li>
</ol>
</div>
<div class="flex justify-end">
<button id="confirm-suggestion" class="bg-green-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-green-700 transition">
عرض على الخريطة
</button>
</div>
</div>
</div>
<script>
// Initialize the map
const map = L.map('map').setView([19.0968, 42.8633], 10); // Asir coordinates
// Add OpenStreetMap tiles
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// Custom icons
const natureIcon = L.divIcon({
html: '<div class="custom-icon" style="border: 2px solid #38a169;"><i class="fas fa-mountain text-green-600"></i></div>',
className: 'dummy',
iconSize: [30, 30],
iconAnchor: [15, 15]
});
const heritageIcon = L.divIcon({
html: '<div class="custom-icon" style="border: 2px solid #d69e2e;"><i class="fas fa-landmark text-yellow-600"></i></div>',
className: 'dummy',
iconSize: [30, 30],
iconAnchor: [15, 15]
});
const eventIcon = L.divIcon({
html: '<div class="custom-icon" style="border: 2px solid #9f7aea;"><i class="fas fa-calendar-alt text-purple-600"></i></div>',
className: 'dummy',
iconSize: [30, 30],
iconAnchor: [15, 15]
});
const foodIcon = L.divIcon({
html: '<div class="custom-icon" style="border: 2px solid #e53e3e;"><i class="fas fa-utensils text-red-600"></i></div>',
className: 'dummy',
iconSize: [30, 30],
iconAnchor: [15, 15]
});
// Sample locations data
const locations = [
{
name: "جبل السودة",
type: "nature",
coords: [19.1819, 42.4153],
rating: 4.7,
reviews: 128,
description: "جبل السودة هو أعلى قمة في المملكة العربية السعودية، يصل ارتفاعه إلى حوالي 3,015 متر فوق مستوى سطح البحر. يتميز بإطلالة بانورامية رائعة وغابات كثيفة، وهو وجهة مثالية لعشاق الطبيعة والمغامرات."
},
{
name: "قرية رجال ألمع التراثية",
type: "heritage",
coords: [19.1606, 42.6497],
rating: 4.8,
reviews: 95,
description: "قرية تراثية تعود إلى أكثر من 350 عاماً، تتميز ببيوتها الحجرية المبنية بطريقة فريدة. تحتوي القرية على متحف يعرض التراث المحلي وأسلوب الحياة التقليدية في المنطقة."
},
{
name: "منتزه السحاب",
type: "nature",
coords: [18.9178, 42.9472],
rating: 4.5,
reviews: 76,
description: "منتزه طبيعي يقدم إطلالات خلابة على الضباب الذي يغطي الجبال صباحاً. يحتوي على مسارات للمشي ومقاعد للاسترخاء بين أحضان الطبيعة."
},
{
name: "سوق الثلاثاء الشعبي",
type: "events",
coords: [19.1200, 42.8000],
rating: 4.6,
reviews: 112,
description: "سوق أسبوعي يقام كل يوم ثلاثاء، يعرض المنتجات المحلية من أعمال يدوية، ملابس تقليدية، وأطعمة شعبية. فرصة رائعة لتجربة الثقافة المحلية وشراء الهدايا التذكارية."
},
{
name: "مطعم النخبة",
type: "food",
coords: [18.9878, 42.8672],
rating: 4.4,
reviews: 64,
description: "مطعم يقدم الأطباق المحلية الشهية بأسلوب عصري. تشتهر به بالكبسة العسيرية والمندي اللذيذ. يتميز بجو عائلي وديكور تقليدي حديث."
}
];
// Add markers to the map
const markers = [];
locations.forEach(location => {
let icon;
switch(location.type) {
case 'nature': icon = natureIcon; break;
case 'heritage': icon = heritageIcon; break;
case 'events': icon = eventIcon; break;
case 'food': icon = foodIcon; break;
default: icon = natureIcon;
}
const marker = L.marker(location.coords, { icon }).addTo(map);
marker.bindPopup(`<b>${location.name}</b><br>${location.type === 'nature' ? 'طبيعة' :
location.type === 'heritage' ? 'تراث' :
location.type === 'events' ? 'فعالية' : 'مطعم'} | ${location.rating} ★`);
marker.on('click', () => {
document.getElementById('location-title').textContent = location.name;
document.getElementById('location-desc').textContent = location.description;
document.getElementById('location-info').classList.remove('hidden');
// Scroll to info card on mobile
if (window.innerWidth < 1024) {
document.getElementById('location-info').scrollIntoView({ behavior: 'smooth' });
}
});
markers.push({ marker, type: location.type });
});
// Filter buttons functionality
document.querySelectorAll('.filter-btn').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
const filter = btn.dataset.filter;
markers.forEach(({ marker, type }) => {
if (filter === 'all' || type === filter) {
marker.addTo(map);
} else {
map.removeLayer(marker);
}
});
});
});
// Location button - simulate getting user location
document.getElementById('location-btn').addEventListener('click', () => {
// In a real app, you would use Geolocation API here
alert('جارٍ تحديد موقعك... سيتم عرض موقعك على الخريطة');
// Simulate location near Abha
const userLocation = [18.2167, 42.5053];
L.marker(userLocation, {
icon: L.divIcon({
html: '<div class="ar-marker"><i class="fas fa-user"></i></div>',
className: 'dummy',
iconSize: [40, 40],
iconAnchor: [20, 20]
})
}).addTo(map).bindPopup('موقعك الحالي').openPopup();
map.setView(userLocation, 13);
});
// Suggestion button
document.getElementById('suggest-btn').addEventListener('click', () => {
document.getElementById('ai-modal').classList.remove('hidden');
});
document.getElementById('close-ai-modal').addEventListener('click', () => {
document.getElementById('ai-modal').classList.add('hidden');
});
document.getElementById('confirm-suggestion').addEventListener('click', () => {
document.getElementById('ai-modal').classList.add('hidden');
// Filter to show recommended locations
document.querySelector('.filter-btn[data-filter="all"]').click();
map.setView([19.1606, 42.6497], 11); // Center on Rijal Almaa
});
// Close location info
document.getElementById('close-info').addEventListener('click', () => {
document.getElementById('location-info').classList.add('hidden');
});
// AR button
document.getElementById('ar-btn').addEventListener('click', () => {
alert('جارٍ فتح كاميرا الواقع المعزز... تأكد من السماح بالوصول إلى الكاميرا');
});
// Responsive adjustments
window.addEventListener('resize', () => {
map.invalidateSize();
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=wasmdashai/sh-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |