Поиск все ещё не работает, и добавь пожалуйста все города и районы молдовы, и добавь опцию чтобы можно выбрать "все" чтобы можно было просмотреть полностью все объекты что есть - Follow Up Deployment
Browse files- index.html +114 -11
index.html
CHANGED
|
@@ -325,30 +325,71 @@
|
|
| 325 |
|
| 326 |
<!-- Search Box -->
|
| 327 |
<div class="glass-effect rounded-xl p-4 md:p-6 max-w-4xl mx-auto search-box mt-20 md:mt-0">
|
|
|
|
| 328 |
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 mb-3">
|
| 329 |
<div>
|
| 330 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Город</label>
|
| 331 |
-
<select class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
|
|
|
| 332 |
<option>Кишинёв</option>
|
| 333 |
<option>Бельцы</option>
|
| 334 |
<option>Тирасполь</option>
|
|
|
|
|
|
|
| 335 |
<option>Кагул</option>
|
|
|
|
|
|
|
| 336 |
<option>Оргеев</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 337 |
</select>
|
| 338 |
</div>
|
| 339 |
<div>
|
| 340 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Район</label>
|
| 341 |
-
<select class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
|
|
|
| 342 |
<option>Центр</option>
|
| 343 |
<option>Ботаника</option>
|
| 344 |
<option>Рышкановка</option>
|
| 345 |
<option>Чеканы</option>
|
| 346 |
<option>Телецентр</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
</select>
|
| 348 |
</div>
|
| 349 |
<div>
|
| 350 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Тип предложения</label>
|
| 351 |
-
<select class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
|
|
|
| 352 |
<option>Премиум</option>
|
| 353 |
<option>Вторичка</option>
|
| 354 |
<option>Новострой</option>
|
|
@@ -362,28 +403,29 @@
|
|
| 362 |
<div class="grid grid-cols-2 gap-3">
|
| 363 |
<div>
|
| 364 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Цена от (€)</label>
|
| 365 |
-
<input type="number" placeholder="Минимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 366 |
</div>
|
| 367 |
<div>
|
| 368 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Цена до (€)</label>
|
| 369 |
-
<input type="number" placeholder="Максимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 370 |
</div>
|
| 371 |
</div>
|
| 372 |
<div class="grid grid-cols-2 gap-3">
|
| 373 |
<div>
|
| 374 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Площадь от (м²)</label>
|
| 375 |
-
<input type="number" placeholder="Минимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 376 |
</div>
|
| 377 |
<div>
|
| 378 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Площадь до (м²)</label>
|
| 379 |
-
<input type="number" placeholder="Максимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 380 |
</div>
|
| 381 |
</div>
|
| 382 |
</div>
|
| 383 |
|
| 384 |
-
<button class="mt-6 w-full bg-[#FFD700] text-black font-bold py-3 md:py-4 px-8 rounded-xl hover:shadow-lg hover:shadow-yellow-500/30 transition-all duration-300 text-base md:text-lg">
|
| 385 |
Поиск <i class="fas fa-search ml-2"></i>
|
| 386 |
</button>
|
|
|
|
| 387 |
</div>
|
| 388 |
|
| 389 |
<div class="mt-5 flex justify-center">
|
|
@@ -407,7 +449,9 @@
|
|
| 407 |
|
| 408 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
| 409 |
<!-- Property 1 -->
|
| 410 |
-
<div class="property-card glass-effect rounded-xl overflow-hidden transition duration-500 ease-in-out hover:shadow-lg"
|
|
|
|
|
|
|
| 411 |
<div class="relative">
|
| 412 |
<img src="https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Luxury House" class="w-full h-64 object-cover">
|
| 413 |
<div class="type-tag premium-tag">ПРЕМИУМ</div>
|
|
@@ -445,7 +489,9 @@
|
|
| 445 |
</div>
|
| 446 |
|
| 447 |
<!-- Property 2 -->
|
| 448 |
-
<div class="property-card glass-effect rounded-xl overflow-hidden transition duration-500 ease-in-out hover:shadow-lg"
|
|
|
|
|
|
|
| 449 |
<div class="relative">
|
| 450 |
<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 Apartment" class="w-full h-64 object-cover">
|
| 451 |
<div class="type-tag secondary-tag">ВТОРИЧКА</div>
|
|
@@ -483,7 +529,9 @@
|
|
| 483 |
</div>
|
| 484 |
|
| 485 |
<!-- Property 3 -->
|
| 486 |
-
<div class="property-card glass-effect rounded-xl overflow-hidden transition duration-500 ease-in-out hover:shadow-lg"
|
|
|
|
|
|
|
| 487 |
<div class="relative">
|
| 488 |
<img src="https://images.unsplash.com/photo-1605276374104-dee2a0ed3cd6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Penthouse" class="w-full h-64 object-cover">
|
| 489 |
<div class="type-tag premium-tag">ПРЕМИУМ</div>
|
|
@@ -1084,6 +1132,61 @@
|
|
| 1084 |
</div>
|
| 1085 |
|
| 1086 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1087 |
// Mobile menu toggle
|
| 1088 |
document.getElementById('mobile-menu-button').addEventListener('click', function() {
|
| 1089 |
const menu = document.getElementById('mobile-menu');
|
|
|
|
| 325 |
|
| 326 |
<!-- Search Box -->
|
| 327 |
<div class="glass-effect rounded-xl p-4 md:p-6 max-w-4xl mx-auto search-box mt-20 md:mt-0">
|
| 328 |
+
<form id="search-form">
|
| 329 |
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 mb-3">
|
| 330 |
<div>
|
| 331 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Город</label>
|
| 332 |
+
<select id="city" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 333 |
+
<option value="Все">Все города</option>
|
| 334 |
<option>Кишинёв</option>
|
| 335 |
<option>Бельцы</option>
|
| 336 |
<option>Тирасполь</option>
|
| 337 |
+
<option>Бендеры</option>
|
| 338 |
+
<option>Рыбница</option>
|
| 339 |
<option>Кагул</option>
|
| 340 |
+
<option>Унгень</option>
|
| 341 |
+
<option>Сороки</option>
|
| 342 |
<option>Оргеев</option>
|
| 343 |
+
<option>Комрат</option>
|
| 344 |
+
<option>Чадыр-Лунга</option>
|
| 345 |
+
<option>Страшены</option>
|
| 346 |
+
<option>Дрокия</option>
|
| 347 |
+
<option>Единцы</option>
|
| 348 |
+
<option>Флорешты</option>
|
| 349 |
+
<option>Резина</option>
|
| 350 |
+
<option>Глодяны</option>
|
| 351 |
+
<option>Кантемир</option>
|
| 352 |
+
<option>Леова</option>
|
| 353 |
+
<option>Ниспорены</option>
|
| 354 |
+
<option>Окница</option>
|
| 355 |
+
<option>Вадул-луй-Водэ</option>
|
| 356 |
</select>
|
| 357 |
</div>
|
| 358 |
<div>
|
| 359 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Район</label>
|
| 360 |
+
<select id="district" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 361 |
+
<option value="Все">Все районы</option>
|
| 362 |
<option>Центр</option>
|
| 363 |
<option>Ботаника</option>
|
| 364 |
<option>Рышкановка</option>
|
| 365 |
<option>Чеканы</option>
|
| 366 |
<option>Телецентр</option>
|
| 367 |
+
<option>Буюканы</option>
|
| 368 |
+
<option>Скулянка</option>
|
| 369 |
+
<option>Бубуечь</option>
|
| 370 |
+
<option>Дурлешты</option>
|
| 371 |
+
<option>Ватра</option>
|
| 372 |
+
<option>Друмул Таберей</option>
|
| 373 |
+
<option>Ставчены</option>
|
| 374 |
+
<option>Трушены</option>
|
| 375 |
+
<option>Григориополь</option>
|
| 376 |
+
<option>Дубоссары</option>
|
| 377 |
+
<option>Слободзея</option>
|
| 378 |
+
<option>Каменка</option>
|
| 379 |
+
<option>Криуляны</option>
|
| 380 |
+
<option>Яловены</option>
|
| 381 |
+
<option>Хынчешты</option>
|
| 382 |
+
<option>Калараш</option>
|
| 383 |
+
<option>Шолданешты</option>
|
| 384 |
+
<option>Штефан-Водэ</option>
|
| 385 |
+
<option>Тараклия</option>
|
| 386 |
+
<option>Басарабяска</option>
|
| 387 |
</select>
|
| 388 |
</div>
|
| 389 |
<div>
|
| 390 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Тип предложения</label>
|
| 391 |
+
<select id="property-type" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 392 |
+
<option value="Все">Все типы</option>
|
| 393 |
<option>Премиум</option>
|
| 394 |
<option>Вторичка</option>
|
| 395 |
<option>Новострой</option>
|
|
|
|
| 403 |
<div class="grid grid-cols-2 gap-3">
|
| 404 |
<div>
|
| 405 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Цена от (€)</label>
|
| 406 |
+
<input id="min-price" type="number" placeholder="Минимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 407 |
</div>
|
| 408 |
<div>
|
| 409 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Цена до (€)</label>
|
| 410 |
+
<input id="max-price" type="number" placeholder="Максимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 411 |
</div>
|
| 412 |
</div>
|
| 413 |
<div class="grid grid-cols-2 gap-3">
|
| 414 |
<div>
|
| 415 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Площадь от (м²)</label>
|
| 416 |
+
<input id="min-area" type="number" placeholder="Минимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 417 |
</div>
|
| 418 |
<div>
|
| 419 |
<label class="block text-left text-white mb-1 text-sm md:text-base">Площадь до (м²)</label>
|
| 420 |
+
<input id="max-area" type="number" placeholder="Максимум" class="w-full bg-gray-800 text-white p-2 md:p-3 rounded-lg border border-gray-700 focus:border-gold-500 focus:outline-none text-sm md:text-base">
|
| 421 |
</div>
|
| 422 |
</div>
|
| 423 |
</div>
|
| 424 |
|
| 425 |
+
<button type="submit" class="mt-6 w-full bg-[#FFD700] text-black font-bold py-3 md:py-4 px-8 rounded-xl hover:shadow-lg hover:shadow-yellow-500/30 transition-all duration-300 text-base md:text-lg">
|
| 426 |
Поиск <i class="fas fa-search ml-2"></i>
|
| 427 |
</button>
|
| 428 |
+
</form>
|
| 429 |
</div>
|
| 430 |
|
| 431 |
<div class="mt-5 flex justify-center">
|
|
|
|
| 449 |
|
| 450 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
| 451 |
<!-- Property 1 -->
|
| 452 |
+
<div class="property-card glass-effect rounded-xl overflow-hidden transition duration-500 ease-in-out hover:shadow-lg"
|
| 453 |
+
data-city="Кишинёв" data-district="Буюканы" data-type="premium"
|
| 454 |
+
data-price="450000" data-area="250" data-rooms="5">
|
| 455 |
<div class="relative">
|
| 456 |
<img src="https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Luxury House" class="w-full h-64 object-cover">
|
| 457 |
<div class="type-tag premium-tag">ПРЕМИУМ</div>
|
|
|
|
| 489 |
</div>
|
| 490 |
|
| 491 |
<!-- Property 2 -->
|
| 492 |
+
<div class="property-card glass-effect rounded-xl overflow-hidden transition duration-500 ease-in-out hover:shadow-lg"
|
| 493 |
+
data-city="Кишинёв" data-district="Центр" data-type="Вторичка"
|
| 494 |
+
data-price="220000" data-area="120" data-rooms="3">
|
| 495 |
<div class="relative">
|
| 496 |
<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 Apartment" class="w-full h-64 object-cover">
|
| 497 |
<div class="type-tag secondary-tag">ВТОРИЧКА</div>
|
|
|
|
| 529 |
</div>
|
| 530 |
|
| 531 |
<!-- Property 3 -->
|
| 532 |
+
<div class="property-card glass-effect rounded-xl overflow-hidden transition duration-500 ease-in-out hover:shadow-lg"
|
| 533 |
+
data-city="Кишинёв" data-district="Рышкановка" data-price="380000"
|
| 534 |
+
data-area="180" data-rooms="4">
|
| 535 |
<div class="relative">
|
| 536 |
<img src="https://images.unsplash.com/photo-1605276374104-dee2a0ed3cd6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Penthouse" class="w-full h-64 object-cover">
|
| 537 |
<div class="type-tag premium-tag">ПРЕМИУМ</div>
|
|
|
|
| 1132 |
</div>
|
| 1133 |
|
| 1134 |
<script>
|
| 1135 |
+
// Property search functionality
|
| 1136 |
+
document.getElementById('search-form').addEventListener('submit', function(e) {
|
| 1137 |
+
e.preventDefault();
|
| 1138 |
+
|
| 1139 |
+
// Get filter values
|
| 1140 |
+
const city = document.getElementById('city').value;
|
| 1141 |
+
const district = document.getElementById('district').value;
|
| 1142 |
+
const propertyType = document.getElementById('property-type').value;
|
| 1143 |
+
const minPrice = parseInt(document.getElementById('min-price').value) || 0;
|
| 1144 |
+
const maxPrice = parseInt(document.getElementById('max-price').value) || Infinity;
|
| 1145 |
+
const minArea = parseInt(document.getElementById('min-area').value) || 0;
|
| 1146 |
+
const maxArea = parseInt(document.getElementById('max-area').value) || Infinity;
|
| 1147 |
+
|
| 1148 |
+
// Get all property cards
|
| 1149 |
+
const propertyCards = document.querySelectorAll('.property-card');
|
| 1150 |
+
let hasMatches = false;
|
| 1151 |
+
|
| 1152 |
+
// Filter properties
|
| 1153 |
+
propertyCards.forEach(card => {
|
| 1154 |
+
const cardCity = card.dataset.city || '';
|
| 1155 |
+
const cardDistrict = card.dataset.district || '';
|
| 1156 |
+
const cardPrice = parseInt(card.dataset.price) || 0;
|
| 1157 |
+
const cardArea = parseInt(card.dataset.area) || 0;
|
| 1158 |
+
const cardRooms = parseInt(card.dataset.rooms) || 0;
|
| 1159 |
+
|
| 1160 |
+
// Get property type from tag
|
| 1161 |
+
const typeTag = card.querySelector('.type-tag');
|
| 1162 |
+
const cardType = typeTag ? typeTag.textContent.trim() : '';
|
| 1163 |
+
|
| 1164 |
+
// Check filters
|
| 1165 |
+
const cityMatch = city === 'Все города' || city === 'Все' || !city || city.toLowerCase() === cardCity.toLowerCase();
|
| 1166 |
+
const districtMatch = district === 'Все районы' || district === 'Все' || !district || district.toLowerCase() === cardDistrict.toLowerCase();
|
| 1167 |
+
const typeMatch = propertyType === 'Все типы' || propertyType === 'Все' || !propertyType ||
|
| 1168 |
+
cardType.toLowerCase().includes(propertyType.toLowerCase());
|
| 1169 |
+
const priceMatch = cardPrice >= minPrice && cardPrice <= maxPrice;
|
| 1170 |
+
const areaMatch = cardArea >= minArea && cardArea <= maxArea;
|
| 1171 |
+
|
| 1172 |
+
// Show/hide based on matches
|
| 1173 |
+
if (cityMatch && districtMatch && typeMatch && priceMatch && areaMatch) {
|
| 1174 |
+
card.style.display = 'block';
|
| 1175 |
+
hasMatches = true;
|
| 1176 |
+
} else {
|
| 1177 |
+
card.style.display = 'none';
|
| 1178 |
+
}
|
| 1179 |
+
});
|
| 1180 |
+
|
| 1181 |
+
// Show message if no matches
|
| 1182 |
+
if (!hasMatches) {
|
| 1183 |
+
alert('По вашему запросу ничего не найдено. Попробуйте изменить параметры поиска.');
|
| 1184 |
+
} else {
|
| 1185 |
+
// Scroll to properties section
|
| 1186 |
+
document.getElementById('properties').scrollIntoView({ behavior: 'smooth' });
|
| 1187 |
+
}
|
| 1188 |
+
});
|
| 1189 |
+
|
| 1190 |
// Mobile menu toggle
|
| 1191 |
document.getElementById('mobile-menu-button').addEventListener('click', function() {
|
| 1192 |
const menu = document.getElementById('mobile-menu');
|