-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
330 lines (311 loc) · 21.9 KB
/
search.html
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
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="2G9">
<link href="./output.css" rel="stylesheet">
<title>Search Page</title>
<link rel="icon" type="image/png" href="./images/logo.png">
<!-- Icons -->
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:[email protected]&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script src="./js/script.js"></script>
</head>
<style>
body {
font-family: "Noto Kufi Arabic", sans-serif;
}
.gradient-border {
border-width: 3px;
border-style: solid;
border-image: linear-gradient(180deg, #D3A600 0%, #7F6503 100%);
border-image-slice: 1;
border-radius: 10px;
}
</style>
<body >
<!-- Start Navbar -->
<div id="navbar"></div>
<!-- End Navbar -->
<!-- Start Section -->
<div class="container mx-auto p-5">
<h2 class="text-[#2B2F4E] font-bold sm:text-[40px] text-2xl mt-5"> البحث</h2>
<div class="flex justify-center items-center gap-3 lg:gap-5 mb-6 mt-6">
<form class="">
<label for="default-search" class="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white">Search</label>
<div class="relative">
<div class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"/>
</svg>
</div>
<input type="search" id="default-search" class="block w-full p-4 ps-10 font-medium text-sm text-[#2B2F4E] outline-none rounded-lg bg-[#FAFAFA]" placeholder="ابحث عن سيارتك المفضلة" required />
</div>
</form>
<button class="filter-btn bg-transparent text-black font-semibold py-2 px-4 border border-[#C10D10] rounded-[10px] w-[134px] h-[42px]">
بحث
</button>
</div>
</div>
<!-- End Section -->
<!-- Start Cards -->
<div class="container mx-auto mt-8 px-4 mb-8">
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
<div class="col-span-1">
<!-- Categories -->
<div class="border p-4 rounded-lg bg-white shadow-md">
<label class="block text-lg font-bold mb-2">Categories</label>
<div class="flex flex-wrap gap-2">
<button class="border p-2 rounded-md bg-gray-200 hover:bg-gray-300">Cars for Sale</button>
<button class="border p-2 rounded-md bg-gray-200 hover:bg-gray-300">Cars for Rent</button>
<button class="border p-2 rounded-md bg-gray-200 hover:bg-gray-300">Car Spare Parts</button>
</div>
</div>
<!-- Location -->
<div class="border p-4 mt-6 rounded-lg bg-white shadow-md">
<label for="location" class="block text-lg font-bold mb-2">Location</label>
<select id="location" class="w-full border p-2 rounded-md" onchange="showCities()">
<option value="none">Select a Country</option>
<option value="egypt">Egypt</option>
<option value="uae">United Arab Emirates</option>
<option value="ksa">Saudi Arabia</option>
<option value="lebanon">Lebanon</option>
<option value="jordan">Jordan</option>
<option value="kuwait">Kuwait</option>
</select>
<div id="egypt-cities" class="mt-4 hidden">
<h3 class="text-lg font-bold">Egypt</h3>
<ul class="mt-2 space-y-1">
<li><a href="#cairo" class="text-blue-500 hover:underline">Cairo (194)</a></li>
<li><a href="#giza" class="text-blue-500 hover:underline">Giza (68)</a></li>
<li><a href="#alexandria" class="text-blue-500 hover:underline">Alexandria (52)</a></li>
<li><a href="#dakahlia" class="text-blue-500 hover:underline">Dakahlia (13)</a></li>
<li><a href="#qalyubia" class="text-blue-500 hover:underline">Qalyubia (8)</a></li>
<li><a href="#gharbia" class="text-blue-500 hover:underline">Gharbia (8)</a></li>
<li><a href="#redsea" class="text-blue-500 hover:underline">Red Sea (6)</a></li>
<li><a href="#damietta" class="text-blue-500 hover:underline">Damietta (6)</a></li>
</ul>
</div>
<div id="uae-cities" class="mt-4 hidden">
<h3 class="text-lg font-bold">United Arab Emirates</h3>
<ul class="mt-2 space-y-1">
<li><a href="#dubai" class="text-blue-500 hover:underline">Dubai (150)</a></li>
<li><a href="#abu-dhabi" class="text-blue-500 hover:underline">Abu Dhabi (90)</a></li>
<li><a href="#sharjah" class="text-blue-500 hover:underline">Sharjah (60)</a></li>
</ul>
</div>
<div id="ksa-cities" class="mt-4 hidden">
<h3 class="text-lg font-bold">Saudi Arabia</h3>
<ul class="mt-2 space-y-1">
<li><a href="#riyadh" class="text-blue-500 hover:underline">Riyadh (180)</a></li>
<li><a href="#jeddah" class="text-blue-500 hover:underline">Jeddah (120)</a></li>
<li><a href="#dammam" class="text-blue-500 hover:underline">Dammam (85)</a></li>
</ul>
</div>
<div id="lebanon-cities" class="mt-4 hidden">
<h3 class="text-lg font-bold">Lebanon</h3>
<ul class="mt-2 space-y-1">
<li><a href="#beirut" class="text-blue-500 hover:underline">Beirut (65)</a></li>
<li><a href="#tripoli" class="text-blue-500 hover:underline">Tripoli (30)</a></li>
</ul>
</div>
<div id="jordan-cities" class="mt-4 hidden">
<h3 class="text-lg font-bold">Jordan</h3>
<ul class="mt-2 space-y-1">
<li><a href="#amman" class="text-blue-500 hover:underline">Amman (75)</a></li>
<li><a href="#irbid" class="text-blue-500 hover:underline">Irbid (35)</a></li>
</ul>
</div>
<div id="kuwait-cities" class="mt-4 hidden">
<h3 class="text-lg font-bold">Kuwait</h3>
<ul class="mt-2 space-y-1">
<li><a href="#kuwait-city" class="text-blue-500 hover:underline">Kuwait City (50)</a></li>
</ul>
</div>
</div>
<!-- Price Section -->
<div class="border p-4 mt-6 rounded-lg bg-white shadow-md">
<label class="block text-lg font-bold mb-2">Price</label>
<div class="flex justify-between items-center gap-2">
<input type="text" id="min-price" value="0" class="w-1/2 border text-center p-2 rounded-md bg-gray-100" oninput="formatPrice(this)">
<input type="text" id="max-price" value="1,000,000,000" class="w-1/2 border text-center p-2 rounded-md bg-gray-100" oninput="formatPrice(this)">
</div>
</div>
</div>
<div class="col-span-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="relative max-w-[384px] mx-auto">
<ion-icon name="heart-outline" class="heartIcon sm:flex hidden absolute top-[-15px] left-[-15px] z-10 text-[#C10D10] bg-white rounded-full p-1 text-2xl"></ion-icon>
<div class="card rounded-[20px] overflow-hidden bg-white shadow-md">
<img class="object-contain" src="./images/Rectangle2.webp" alt="Washing">
<div class="p-4 sm:p-6">
<h2 class="font-bold text-lg sm:text-xl mb-2 text-right ltr:text-left">
غسيل السيارات Car Wash
</h2>
<div class="sm:flex flex-col sm:flex-row justify-between items-center mt-4 mb-4 hidden">
<p class="font-bold text-xl sm:text-2xl">د.إ 80,000</p>
<a href="./washing.html">
<button class="bg-transparent text-[#C10D10] font-semibold py-2 px-4 border border-[#C10D10] rounded-md mt-2 sm:mt-0">
مزيد التفاصيل
</button>
</a>
</div>
<hr class="my-4 sm:flex hidden">
<div class="flex items-center text-[#837F7F] gap-1 text-[12px] sm:text-base sm:font-bold font-normal">
<ion-icon name="location-outline"></ion-icon>
<p>دبي - القوز</p>
</div>
</div>
</div>
</div>
<div class="relative max-w-[384px] mx-auto ">
<ion-icon name="heart-outline" class="heartIcon sm:flex hidden absolute top-[-15px] left-[-15px] z-10 text-[#C10D10] bg-white rounded-full p-1 text-2xl"></ion-icon>
<div class="card rounded-[20px] overflow-hidden bg-white shadow-md">
<img class="object-contain" src="./images/Rectangle2.webp" alt="Washing">
<div class="p-4 sm:p-6">
<h2 class="font-bold text-lg sm:text-xl mb-2 text-right ltr:text-left">
غسيل السيارات Car Wash
</h2>
<div class="sm:flex flex-col sm:flex-row justify-between items-center mt-4 mb-4 hidden">
<p class="font-bold text-xl sm:text-2xl">د.إ 80,000</p>
<a href="./washing.html">
<button class="bg-transparent text-[#C10D10] font-semibold py-2 px-4 border border-[#C10D10] rounded-md mt-2 sm:mt-0">
مزيد التفاصيل
</button>
</a>
</div>
<hr class="my-4 sm:flex hidden">
<div class="flex items-center text-[#837F7F] gap-1 text-[12px] sm:text-base sm:font-bold font-normal">
<ion-icon name="location-outline"></ion-icon>
<p>دبي - القوز</p>
</div>
</div>
</div>
</div>
<div class="relative max-w-[384px] mx-auto">
<ion-icon name="heart-outline" class="heartIcon sm:flex hidden absolute top-[-15px] left-[-15px] z-10 text-[#C10D10] bg-white rounded-full p-1 text-2xl"></ion-icon>
<div class="card rounded-[20px] overflow-hidden bg-white shadow-md">
<img class="object-contain" src="./images/Rectangle2.webp" alt="Washing">
<div class="p-4 sm:p-6">
<h2 class="font-bold text-lg sm:text-xl mb-2 text-right ltr:text-left">
غسيل السيارات Car Wash
</h2>
<div class="sm:flex flex-col sm:flex-row justify-between items-center mt-4 mb-4 hidden">
<p class="font-bold text-xl sm:text-2xl">د.إ 80,000</p>
<a href="./washing.html">
<button class="bg-transparent text-[#C10D10] font-semibold py-2 px-4 border border-[#C10D10] rounded-md mt-2 sm:mt-0">
مزيد التفاصيل
</button>
</a>
</div>
<hr class="my-4 sm:flex hidden">
<div class="flex items-center text-[#837F7F] gap-1 text-[12px] sm:text-base sm:font-bold font-normal">
<ion-icon name="location-outline"></ion-icon>
<p>دبي - القوز</p>
</div>
</div>
</div>
</div>
<div class="relative max-w-[384px] mx-auto">
<ion-icon name="heart-outline" class="heartIcon sm:flex hidden absolute top-[-15px] left-[-15px] z-10 text-[#C10D10] bg-white rounded-full p-1 text-2xl"></ion-icon>
<div class="card rounded-[20px] overflow-hidden bg-white shadow-md">
<img class="object-contain" src="./images/Rectangle2.webp" alt="Washing">
<div class="p-4 sm:p-6">
<h2 class="font-bold text-lg sm:text-xl mb-2 text-right ltr:text-left">
غسيل السيارات Car Wash
</h2>
<div class="sm:flex flex-col sm:flex-row justify-between items-center mt-4 mb-4 hidden">
<p class="font-bold text-xl sm:text-2xl">د.إ 80,000</p>
<a href="./washing.html">
<button class="bg-transparent text-[#C10D10] font-semibold py-2 px-4 border border-[#C10D10] rounded-md mt-2 sm:mt-0">
مزيد التفاصيل
</button>
</a>
</div>
<hr class="my-4 sm:flex hidden">
<div class="flex items-center text-[#837F7F] gap-1 text-[12px] sm:text-base sm:font-bold font-normal">
<ion-icon name="location-outline"></ion-icon>
<p>دبي - القوز</p>
</div>
</div>
</div>
</div>
<div class="relative max-w-[384px] mx-auto">
<ion-icon name="heart-outline" class="heartIcon sm:flex hidden absolute top-[-15px] left-[-15px] z-10 text-[#C10D10] bg-white rounded-full p-1 text-2xl"></ion-icon>
<div class="card rounded-[20px] overflow-hidden bg-white shadow-md">
<img class="object-contain" src="./images/Rectangle2.webp" alt="Washing">
<div class="p-4 sm:p-6">
<h2 class="font-bold text-lg sm:text-xl mb-2 text-right ltr:text-left">
غسيل السيارات Car Wash
</h2>
<div class="sm:flex flex-col sm:flex-row justify-between items-center mt-4 mb-4 hidden">
<p class="font-bold text-xl sm:text-2xl">د.إ 80,000</p>
<a href="./washing.html">
<button class="bg-transparent text-[#C10D10] font-semibold py-2 px-4 border border-[#C10D10] rounded-md mt-2 sm:mt-0">
مزيد التفاصيل
</button>
</a>
</div>
<hr class="my-4 sm:flex hidden">
<div class="flex items-center text-[#837F7F] gap-1 text-[12px] sm:text-base sm:font-bold font-normal">
<ion-icon name="location-outline"></ion-icon>
<p>دبي - القوز</p>
</div>
</div>
</div>
</div>
<div class="relative max-w-[384px] mx-auto">
<ion-icon name="heart-outline" class="heartIcon sm:flex hidden absolute top-[-15px] left-[-15px] z-10 text-[#C10D10] bg-white rounded-full p-1 text-2xl"></ion-icon>
<div class="card rounded-[20px] overflow-hidden bg-white shadow-md">
<img class="object-contain" src="./images/Rectangle2.webp" alt="Washing">
<div class="p-4 sm:p-6">
<h2 class="font-bold text-lg sm:text-xl mb-2 text-right ltr:text-left">
غسيل السيارات Car Wash
</h2>
<div class="sm:flex flex-col sm:flex-row justify-between items-center mt-4 mb-4 hidden">
<p class="font-bold text-xl sm:text-2xl">د.إ 80,000</p>
<a href="./washing.html">
<button class="bg-transparent text-[#C10D10] font-semibold py-2 px-4 border border-[#C10D10] rounded-md mt-2 sm:mt-0">
مزيد التفاصيل
</button>
</a>
</div>
<hr class="my-4 sm:flex hidden">
<div class="flex items-center text-[#837F7F] gap-1 text-[12px] sm:text-base sm:font-bold font-normal">
<ion-icon name="location-outline"></ion-icon>
<p>دبي - القوز</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Cards -->
<!-- Start Footer -->
<div id="footer"></div>
<!-- End Footer -->
<script>
function showCities() {
const cityDivs = document.querySelectorAll('[id$="-cities"]');
cityDivs.forEach(div => div.classList.add('hidden'));
const selectedCountry = document.getElementById('location').value;
if (selectedCountry !== 'none') {
document.getElementById(`${selectedCountry}-cities`).classList.remove('hidden');
}
}
</script>
<script>
function formatPrice(input) {
const cleanedValue = input.value.replace(/[^\d,]/g, '');
const formattedValue = cleanedValue.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
input.value = formattedValue;
}
</script>
</body>
</html>