amrora00 commited on
Commit
0551fdd
·
verified ·
1 Parent(s): 5c3d075

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +736 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Https Enzostvs Deepsite Hf Space
3
- emoji: 🐠
4
- colorFrom: green
5
- colorTo: red
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: https-enzostvs-deepsite-hf-space
3
+ emoji: 🐳
4
+ colorFrom: gray
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,736 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="ar" dir="rtl">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>جاري - تأجير الأغراض بين الأفراد</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');
11
+
12
+ body {
13
+ font-family: 'Tajawal', sans-serif;
14
+ }
15
+
16
+ .country-flag {
17
+ width: 30px;
18
+ height: 20px;
19
+ object-fit: cover;
20
+ border-radius: 2px;
21
+ margin-left: 8px;
22
+ }
23
+
24
+ .item-card {
25
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
26
+ }
27
+
28
+ .item-card:hover {
29
+ transform: translateY(-5px);
30
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
31
+ }
32
+ </style>
33
+ </head>
34
+ <body class="bg-gray-50">
35
+ <!-- Country Selection Modal -->
36
+ <div id="countryModal" class="fixed inset-0 bg-gray-900 bg-opacity-50 flex items-center justify-center z-50">
37
+ <div class="bg-white rounded-lg p-8 w-full max-w-md mx-4">
38
+ <h2 class="text-2xl font-bold text-center mb-6">اختر بلدك</h2>
39
+ <div class="flex flex-col space-y-4">
40
+ <button onclick="selectCountry('sa')" class="flex items-center justify-center py-4 px-6 border border-gray-300 rounded-lg hover:bg-gray-100 transition">
41
+ <img src="https://flagcdn.com/w20/sa.png" class="country-flag" alt="Saudi Arabia">
42
+ <span class="font-medium">السعودية (ريال سعودي)</span>
43
+ </button>
44
+ <button onclick="selectCountry('eg')" class="flex items-center justify-center py-4 px-6 border border-gray-300 rounded-lg hover:bg-gray-100 transition">
45
+ <img src="https://flagcdn.com/w20/eg.png" class="country-flag" alt="Egypt">
46
+ <span class="font-medium">مصر (جنيه مصري)</span>
47
+ </button>
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+ <!-- Navigation -->
53
+ <nav class="bg-white shadow-sm sticky top-0 z-40">
54
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
55
+ <div class="flex justify-between h-16">
56
+ <div class="flex items-center">
57
+ <a href="#" onclick="showHome()" class="flex-shrink-0 flex items-center">
58
+ <span class="text-blue-600 font-bold text-xl">جاري</span>
59
+ </a>
60
+ </div>
61
+ <div class="hidden md:ml-6 md:flex md:items-center md:space-x-4 space-x-reverse">
62
+ <button id="homeTab" onclick="showHome()" class="px-3 py-2 text-sm font-medium tab-active">الرئيسية</button>
63
+ <button id="addItemTab" onclick="showAddItem()" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-blue-600">إضافة غرض</button>
64
+ <button id="loginTab" onclick="showLogin()" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-blue-600">تسجيل الدخول</button>
65
+ <div id="countrySelector" class="flex items-center">
66
+ <span id="currentCountry" class="text-sm text-gray-600"></span>
67
+ <button onclick="changeCountry()" class="ml-2 text-blue-600 hover:text-blue-800 text-sm">
68
+ <i class="fas fa-exchange-alt"></i>
69
+ </button>
70
+ </div>
71
+ </div>
72
+ <div class="-mr-2 flex items-center md:hidden">
73
+ <button onclick="toggleMobileMenu()" class="inline-flex items-center justify-center p-2 rounded-md text-gray-700 hover:text-blue-600 hover:bg-gray-100 focus:outline-none">
74
+ <i class="fas fa-bars text-xl"></i>
75
+ </button>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ <!-- Mobile menu -->
81
+ <div id="mobileMenu" class="hidden md:hidden bg-white border-t">
82
+ <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
83
+ <button onclick="showHome()" class="block w-full text-right px-3 py-2 text-base font-medium text-gray-700 hover:text-blue-600 hover:bg-gray-50">الرئيسية</button>
84
+ <button onclick="showAddItem()" class="block w-full text-right px-3 py-2 text-base font-medium text-gray-700 hover:text-blue-600 hover:bg-gray-50">إضافة غرض</button>
85
+ <button onclick="showLogin()" class="block w-full text-right px-3 py-2 text-base font-medium text-gray-700 hover:text-blue-600 hover:bg-gray-50">تسجيل الدخول</button>
86
+ <div class="flex items-center justify-between px-3 py-2">
87
+ <span id="mobileCurrentCountry" class="text-sm text-gray-600"></span>
88
+ <button onclick="changeCountry()" class="text-blue-600 hover:text-blue-800 text-sm">
89
+ <i class="fas fa-exchange-alt"></i> تغيير البلد
90
+ </button>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </nav>
95
+
96
+ <!-- Main Content -->
97
+ <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
98
+ <!-- Home Page -->
99
+ <div id="homePage">
100
+ <div class="flex justify-between items-center mb-6">
101
+ <h1 class="text-2xl font-bold text-gray-900">الأغراض المتاحة للإيجار</h1>
102
+ <div class="flex items-center">
103
+ <select id="cityFilter" class="border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
104
+ <option value="">كل المدن</option>
105
+ </select>
106
+ </div>
107
+ </div>
108
+
109
+ <div id="itemsContainer" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
110
+ <!-- Items will be loaded here -->
111
+ </div>
112
+ </div>
113
+
114
+ <!-- Add Item Page -->
115
+ <div id="addItemPage" class="hidden max-w-2xl mx-auto">
116
+ <h1 class="text-2xl font-bold text-gray-900 mb-6">إضافة غرض جديد للإيجار</h1>
117
+
118
+ <form id="addItemForm" class="space-y-4">
119
+ <div>
120
+ <label for="itemTitle" class="block text-sm font-medium text-gray-700">عنوان الغرض</label>
121
+ <input type="text" id="itemTitle" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
122
+ </div>
123
+
124
+ <div>
125
+ <label for="itemDescription" class="block text-sm font-medium text-gray-700">وصف الغرض</label>
126
+ <textarea id="itemDescription" rows="4" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500"></textarea>
127
+ </div>
128
+
129
+ <div>
130
+ <label for="itemImage" class="block text-sm font-medium text-gray-700">صورة الغرض</label>
131
+ <input type="file" id="itemImage" accept="image/*" class="mt-1 block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
132
+ <div id="imagePreview" class="mt-2 hidden">
133
+ <img id="previewImage" src="#" alt="Preview" class="h-32 object-cover rounded-md">
134
+ </div>
135
+ </div>
136
+
137
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
138
+ <div>
139
+ <label for="itemPrice" class="block text-sm font-medium text-gray-700">السعر اليومي</label>
140
+ <div class="mt-1 relative rounded-md shadow-sm">
141
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
142
+ <span id="priceCurrency" class="text-gray-500 sm:text-sm">ريال</span>
143
+ </div>
144
+ <input type="number" id="itemPrice" min="1" required class="focus:ring-blue-500 focus:border-blue-500 block w-full pr-12 pl-16 py-2 sm:text-sm border-gray-300 rounded-md">
145
+ </div>
146
+ </div>
147
+
148
+ <div>
149
+ <label for="itemCity" class="block text-sm font-medium text-gray-700">المدينة</label>
150
+ <select id="itemCity" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
151
+ <option value="">اختر المدينة</option>
152
+ </select>
153
+ </div>
154
+ </div>
155
+
156
+ <div>
157
+ <label for="itemCategory" class="block text-sm font-medium text-gray-700">التصنيف</label>
158
+ <select id="itemCategory" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
159
+ <option value="">اختر التصنيف</option>
160
+ <option value="electronics">إلكترونيات</option>
161
+ <option value="tools">أدوات</option>
162
+ <option value="sports">رياضة</option>
163
+ <option value="fashion">أزياء</option>
164
+ <option value="home">أدوات منزلية</option>
165
+ <option value="other">أخرى</option>
166
+ </select>
167
+ </div>
168
+
169
+ <div class="pt-4">
170
+ <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
171
+ إضافة الغرض
172
+ </button>
173
+ </div>
174
+ </form>
175
+ </div>
176
+
177
+ <!-- Login/Register Page -->
178
+ <div id="loginPage" class="hidden max-w-md mx-auto">
179
+ <div class="bg-white py-8 px-4 shadow rounded-lg sm:px-10">
180
+ <div class="text-center mb-8">
181
+ <h1 class="text-2xl font-bold text-gray-900">مرحباً بك في جاري</h1>
182
+ <p class="mt-2 text-sm text-gray-600">سجل الدخول أو أنشئ حساباً جديداً</p>
183
+ </div>
184
+
185
+ <div class="flex border-b mb-6">
186
+ <button id="loginTabBtn" class="flex-1 py-2 px-4 text-center font-medium tab-active">تسجيل الدخول</button>
187
+ <button id="registerTabBtn" class="flex-1 py-2 px-4 text-center font-medium text-gray-500 hover:text-blue-600">إنشاء حساب</button>
188
+ </div>
189
+
190
+ <form id="loginForm" class="space-y-4">
191
+ <div>
192
+ <label for="loginEmail" class="block text-sm font-medium text-gray-700">البريد الإلكتروني</label>
193
+ <input type="email" id="loginEmail" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
194
+ </div>
195
+
196
+ <div>
197
+ <label for="loginPassword" class="block text-sm font-medium text-gray-700">كلمة المرور</label>
198
+ <input type="password" id="loginPassword" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
199
+ </div>
200
+
201
+ <div>
202
+ <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
203
+ تسجيل الدخول
204
+ </button>
205
+ </div>
206
+ </form>
207
+
208
+ <form id="registerForm" class="hidden space-y-4">
209
+ <div>
210
+ <label for="registerName" class="block text-sm font-medium text-gray-700">الاسم الكامل</label>
211
+ <input type="text" id="registerName" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
212
+ </div>
213
+
214
+ <div>
215
+ <label for="registerEmail" class="block text-sm font-medium text-gray-700">البريد الإلكتروني</label>
216
+ <input type="email" id="registerEmail" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
217
+ </div>
218
+
219
+ <div>
220
+ <label for="registerPhone" class="block text-sm font-medium text-gray-700">رقم الهاتف</label>
221
+ <input type="tel" id="registerPhone" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
222
+ </div>
223
+
224
+ <div>
225
+ <label for="registerPassword" class="block text-sm font-medium text-gray-700">كلمة المرور</label>
226
+ <input type="password" id="registerPassword" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
227
+ </div>
228
+
229
+ <div>
230
+ <label for="registerConfirmPassword" class="block text-sm font-medium text-gray-700">تأكيد كلمة المرور</label>
231
+ <input type="password" id="registerConfirmPassword" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
232
+ </div>
233
+
234
+ <div>
235
+ <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
236
+ إنشاء حساب
237
+ </button>
238
+ </div>
239
+ </form>
240
+
241
+ <div class="mt-4 text-center">
242
+ <p class="text-sm text-gray-600">
243
+ بمتابعتك أنت توافق على
244
+ <a href="#" class="font-medium text-blue-600 hover:text-blue-500">شروط الاستخدام</a>
245
+ و
246
+ <a href="#" class="font-medium text-blue-600 hover:text-blue-500">سياسة الخصوصية</a>
247
+ </p>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </main>
252
+
253
+ <!-- Footer -->
254
+ <footer class="bg-white border-t mt-12">
255
+ <div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
256
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
257
+ <div>
258
+ <h3 class="text-lg font-medium text-gray-900 mb-4">جاري</h3>
259
+ <p id="footerDescription" class="text-gray-500 text-sm">منصة لتأجير الأغراض الشخصية بين الأفراد</p>
260
+ </div>
261
+
262
+ <div>
263
+ <h3 class="text-lg font-medium text-gray-900 mb-4">روابط سريعة</h3>
264
+ <ul class="space-y-2">
265
+ <li><a href="#" onclick="showHome()" class="text-gray-500 hover:text-blue-600 text-sm">الرئيسية</a></li>
266
+ <li><a href="#" onclick="showAddItem()" class="text-gray-500 hover:text-blue-600 text-sm">إضافة غرض</a></li>
267
+ <li><a href="#" onclick="showLogin()" class="text-gray-500 hover:text-blue-600 text-sm">تسجيل الدخول</a></li>
268
+ </ul>
269
+ </div>
270
+
271
+ <div>
272
+ <h3 class="text-lg font-medium text-gray-900 mb-4">تواصل معنا</h3>
273
+ <div class="flex space-x-4 space-x-reverse">
274
+ <a href="#" class="text-gray-500 hover:text-blue-600">
275
+ <i class="fab fa-facebook-f"></i>
276
+ </a>
277
+ <a href="#" class="text-gray-500 hover:text-blue-600">
278
+ <i class="fab fa-twitter"></i>
279
+ </a>
280
+ <a href="#" class="text-gray-500 hover:text-blue-600">
281
+ <i class="fab fa-instagram"></i>
282
+ </a>
283
+ </div>
284
+ <p class="text-gray-500 text-sm mt-4">info@jari.com</p>
285
+ </div>
286
+ </div>
287
+
288
+ <div class="mt-8 pt-8 border-t border-gray-200 text-center">
289
+ <p class="text-gray-500 text-sm">&copy; 2023 جاري. جميع الحقوق محفوظة.</p>
290
+ </div>
291
+ </div>
292
+ </footer>
293
+
294
+ <!-- Loading Spinner -->
295
+ <div id="loadingSpinner" class="fixed inset-0 bg-gray-900 bg-opacity-50 flex items-center justify-center z-50 hidden">
296
+ <div class="animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-blue-500"></div>
297
+ </div>
298
+
299
+ <!-- Success Notification -->
300
+ <div id="successNotification" class="fixed bottom-4 right-4 bg-green-500 text-white px-4 py-2 rounded-md shadow-lg flex items-center hidden z-50">
301
+ <i class="fas fa-check-circle mr-2"></i>
302
+ <span id="successMessage"></span>
303
+ </div>
304
+
305
+ <!-- Error Notification -->
306
+ <div id="errorNotification" class="fixed bottom-4 right-4 bg-red-500 text-white px-4 py-2 rounded-md shadow-lg flex items-center hidden z-50">
307
+ <i class="fas fa-exclamation-circle mr-2"></i>
308
+ <span id="errorMessage"></span>
309
+ </div>
310
+
311
+ <script>
312
+ // App State
313
+ let selectedCountry = null;
314
+ let currentPage = null;
315
+
316
+ // Cities data
317
+ const cities = {
318
+ sa: ['الرياض', 'جدة', 'مكة المكرمة', 'المدينة المنورة', 'الدمام', 'الخبر', 'الطائف', 'بريدة', 'تبوك', 'نجران'],
319
+ eg: ['القاهرة', 'الجيزة', 'الإسكندرية', 'المنصورة', 'طنطا', 'المنيا', 'أسيوط', 'سوهاج', 'الأقصر', 'أسوان']
320
+ };
321
+
322
+ // Sample items data
323
+ const sampleItems = {
324
+ sa: [
325
+ {
326
+ id: 1,
327
+ title: "كاميرا احترافية",
328
+ description: "كاميرا كانون EOS 5D مارك الرابع مع عدسة 24-70mm، حالة ممتازة",
329
+ price: 150,
330
+ city: "الرياض",
331
+ category: "electronics",
332
+ image: "https://images.unsplash.com/photo-1516035069371-29a1b244cc32?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
333
+ },
334
+ {
335
+ id: 2,
336
+ title: "دراجة هوائية",
337
+ description: "دراجة هوائية ماركة تريك بحالة جيدة، مناسبة للطرق الوعرة",
338
+ price: 80,
339
+ city: "جدة",
340
+ category: "sports",
341
+ image: "https://images.unsplash.com/photo-1485965120184-e220f721d03e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
342
+ },
343
+ {
344
+ id: 3,
345
+ title: "أدوات كهربائية",
346
+ description: "مجموعة أدوات كهربائية كاملة مع صندوق تخزين، جديدة تماماً",
347
+ price: 50,
348
+ city: "الدمام",
349
+ category: "tools",
350
+ image: "https://images.unsplash.com/photo-1585771724684-38269d6639fd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
351
+ }
352
+ ],
353
+ eg: [
354
+ {
355
+ id: 1,
356
+ title: "كاميرا احترافية",
357
+ description: "كاميرا نيكون D850 مع عدسة 24-70mm، حالة ممتازة",
358
+ price: 200,
359
+ city: "القاهرة",
360
+ category: "electronics",
361
+ image: "https://images.unsplash.com/photo-1516035069371-29a1b244cc32?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
362
+ },
363
+ {
364
+ id: 2,
365
+ title: "ماكينة خياطة",
366
+ description: "ماكينة خياطة سنجر جديدة، مع جميع الملحقات",
367
+ price: 40,
368
+ city: "الجيزة",
369
+ category: "home",
370
+ image: "https://images.unsplash.com/photo-1565350736281-0510a3a1b5e2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
371
+ },
372
+ {
373
+ id: 3,
374
+ title: "مولد كهرباء",
375
+ description: "مولد كهرباء 5 كيلو وات، يعمل بالبنزين، بحالة جيدة",
376
+ price: 120,
377
+ city: "الإسكندرية",
378
+ category: "tools",
379
+ image: "https://images.unsplash.com/photo-1615242860221-8a9d594f2a4a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
380
+ }
381
+ ]
382
+ };
383
+
384
+ // Initialize the app
385
+ document.addEventListener('DOMContentLoaded', function() {
386
+ // Check if country is already selected
387
+ const savedCountry = localStorage.getItem('country');
388
+ if (savedCountry) {
389
+ selectedCountry = savedCountry;
390
+ initApp();
391
+ } else {
392
+ // Show country selection modal
393
+ document.getElementById('countryModal').classList.remove('hidden');
394
+ }
395
+
396
+ // Setup event listeners
397
+ setupEventListeners();
398
+ });
399
+
400
+ // Country selection
401
+ function selectCountry(country) {
402
+ selectedCountry = country;
403
+ localStorage.setItem('country', country);
404
+ document.getElementById('countryModal').classList.add('hidden');
405
+ initApp();
406
+ }
407
+
408
+ // Change country
409
+ function changeCountry() {
410
+ localStorage.removeItem('country');
411
+ selectedCountry = null;
412
+ document.getElementById('countryModal').classList.remove('hidden');
413
+ }
414
+
415
+ // Initialize the app after country selection
416
+ function initApp() {
417
+ // Set currency and cities based on country
418
+ const currency = selectedCountry === 'sa' ? 'ريال' : 'جنيه';
419
+ const countryName = selectedCountry === 'sa' ? 'السعودية' : 'مصر';
420
+
421
+ document.getElementById('priceCurrency').textContent = currency;
422
+ document.getElementById('currentCountry').textContent = countryName;
423
+ document.getElementById('mobileCurrentCountry').textContent = countryName;
424
+
425
+ // Update footer description
426
+ document.getElementById('footerDescription').textContent =
427
+ `منصة لتأجير الأغراض الشخصية بين الأفراد في ${countryName}`;
428
+
429
+ // Populate city filters
430
+ populateCitySelect('cityFilter', 'كل المدن');
431
+ populateCitySelect('itemCity', 'اختر المدينة');
432
+
433
+ // Load items for selected country
434
+ loadItems();
435
+
436
+ // Load home page by default
437
+ showHome();
438
+ }
439
+
440
+ // Populate city select dropdown
441
+ function populateCitySelect(selectId, defaultText) {
442
+ const select = document.getElementById(selectId);
443
+ select.innerHTML = '';
444
+
445
+ const defaultOption = document.createElement('option');
446
+ defaultOption.value = '';
447
+ defaultOption.textContent = defaultText;
448
+ select.appendChild(defaultOption);
449
+
450
+ cities[selectedCountry].forEach(city => {
451
+ const option = document.createElement('option');
452
+ option.value = city;
453
+ option.textContent = city;
454
+ select.appendChild(option);
455
+ });
456
+ }
457
+
458
+ // Setup event listeners
459
+ function setupEventListeners() {
460
+ // Image preview for add item
461
+ document.getElementById('itemImage').addEventListener('change', function(e) {
462
+ if (e.target.files.length > 0) {
463
+ const reader = new FileReader();
464
+ reader.onload = function(event) {
465
+ document.getElementById('previewImage').src = event.target.result;
466
+ document.getElementById('imagePreview').classList.remove('hidden');
467
+ };
468
+ reader.readAsDataURL(e.target.files[0]);
469
+ }
470
+ });
471
+
472
+ // City filter change
473
+ document.getElementById('cityFilter').addEventListener('change', function() {
474
+ loadItems();
475
+ });
476
+
477
+ // Login/Register tab switch
478
+ document.getElementById('loginTabBtn').addEventListener('click', function(e) {
479
+ e.preventDefault();
480
+ document.getElementById('loginForm').classList.remove('hidden');
481
+ document.getElementById('registerForm').classList.add('hidden');
482
+ document.getElementById('loginTabBtn').classList.add('tab-active');
483
+ document.getElementById('registerTabBtn').classList.remove('tab-active');
484
+ });
485
+
486
+ document.getElementById('registerTabBtn').addEventListener('click', function(e) {
487
+ e.preventDefault();
488
+ document.getElementById('loginForm').classList.add('hidden');
489
+ document.getElementById('registerForm').classList.remove('hidden');
490
+ document.getElementById('loginTabBtn').classList.remove('tab-active');
491
+ document.getElementById('registerTabBtn').classList.add('tab-active');
492
+ });
493
+
494
+ // Form submissions
495
+ document.getElementById('loginForm').addEventListener('submit', function(e) {
496
+ e.preventDefault();
497
+ login();
498
+ });
499
+
500
+ document.getElementById('registerForm').addEventListener('submit', function(e) {
501
+ e.preventDefault();
502
+ register();
503
+ });
504
+
505
+ document.getElementById('addItemForm').addEventListener('submit', function(e) {
506
+ e.preventDefault();
507
+ addItem();
508
+ });
509
+ }
510
+
511
+ // Show loading spinner
512
+ function showLoading() {
513
+ document.getElementById('loadingSpinner').classList.remove('hidden');
514
+ }
515
+
516
+ // Hide loading spinner
517
+ function hideLoading() {
518
+ document.getElementById('loadingSpinner').classList.add('hidden');
519
+ }
520
+
521
+ // Show success notification
522
+ function showSuccess(message) {
523
+ const notification = document.getElementById('successNotification');
524
+ document.getElementById('successMessage').textContent = message;
525
+ notification.classList.remove('hidden');
526
+
527
+ setTimeout(() => {
528
+ notification.classList.add('hidden');
529
+ }, 3000);
530
+ }
531
+
532
+ // Show error notification
533
+ function showError(message) {
534
+ const notification = document.getElementById('errorNotification');
535
+ document.getElementById('errorMessage').textContent = message;
536
+ notification.classList.remove('hidden');
537
+
538
+ setTimeout(() => {
539
+ notification.classList.add('hidden');
540
+ }, 3000);
541
+ }
542
+
543
+ // Toggle mobile menu
544
+ function toggleMobileMenu() {
545
+ document.getElementById('mobileMenu').classList.toggle('hidden');
546
+ }
547
+
548
+ // Page navigation functions
549
+ function showHome() {
550
+ if (!selectedCountry) {
551
+ document.getElementById('countryModal').classList.remove('hidden');
552
+ return;
553
+ }
554
+
555
+ hideAllPages();
556
+ document.getElementById('homePage').classList.remove('hidden');
557
+ document.getElementById('homeTab').classList.add('tab-active');
558
+ document.getElementById('addItemTab').classList.remove('tab-active');
559
+ document.getElementById('loginTab').classList.remove('tab-active');
560
+ currentPage = 'home';
561
+ }
562
+
563
+ function showAddItem() {
564
+ if (!selectedCountry) {
565
+ document.getElementById('countryModal').classList.remove('hidden');
566
+ return;
567
+ }
568
+
569
+ hideAllPages();
570
+ document.getElementById('addItemPage').classList.remove('hidden');
571
+ document.getElementById('homeTab').classList.remove('tab-active');
572
+ document.getElementById('addItemTab').classList.add('tab-active');
573
+ document.getElementById('loginTab').classList.remove('tab-active');
574
+ currentPage = 'addItem';
575
+ }
576
+
577
+ function showLogin() {
578
+ if (!selectedCountry) {
579
+ document.getElementById('countryModal').classList.remove('hidden');
580
+ return;
581
+ }
582
+
583
+ hideAllPages();
584
+ document.getElementById('loginPage').classList.remove('hidden');
585
+ document.getElementById('homeTab').classList.remove('tab-active');
586
+ document.getElementById('addItemTab').classList.remove('tab-active');
587
+ document.getElementById('loginTab').classList.add('tab-active');
588
+ currentPage = 'login';
589
+ }
590
+
591
+ function hideAllPages() {
592
+ const pages = ['homePage', 'addItemPage', 'loginPage'];
593
+ pages.forEach(page => {
594
+ document.getElementById(page).classList.add('hidden');
595
+ });
596
+ }
597
+
598
+ // Load items for home page
599
+ function loadItems() {
600
+ if (!selectedCountry) return;
601
+
602
+ const cityFilter = document.getElementById('cityFilter').value;
603
+ let items = sampleItems[selectedCountry];
604
+
605
+ // Filter by city if selected
606
+ if (cityFilter) {
607
+ items = items.filter(item => item.city === cityFilter);
608
+ }
609
+
610
+ const itemsContainer = document.getElementById('itemsContainer');
611
+ itemsContainer.innerHTML = '';
612
+
613
+ if (items.length === 0) {
614
+ itemsContainer.innerHTML = `
615
+ <div class="col-span-full text-center py-12">
616
+ <i class="fas fa-box-open text-4xl text-gray-300 mb-4"></i>
617
+ <p class="text-gray-500">لا توجد أغراض متاحة للإيجار حالياً</p>
618
+ </div>
619
+ `;
620
+ return;
621
+ }
622
+
623
+ const currency = selectedCountry === 'sa' ? 'ريال' : 'جنيه';
624
+
625
+ items.forEach(item => {
626
+ const itemCard = document.createElement('div');
627
+ itemCard.className = 'bg-white rounded-lg shadow-md overflow-hidden item-card';
628
+ itemCard.innerHTML = `
629
+ <div class="h-48 bg-gray-200 relative">
630
+ <img src="${item.image}" alt="${item.title}" class="w-full h-full object-cover">
631
+ <div class="absolute bottom-2 left-2 bg-blue-600 text-white px-2 py-1 rounded text-sm">
632
+ ${item.price} ${currency} / يوم
633
+ </div>
634
+ </div>
635
+ <div class="p-4">
636
+ <h3 class="font-bold text-lg mb-1">${item.title}</h3>
637
+ <p class="text-gray-600 text-sm mb-2">${item.city}</p>
638
+ <p class="text-gray-700 text-sm mb-4 line-clamp-2">${item.description}</p>
639
+ <div class="flex justify-between items-center">
640
+ <button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
641
+ <i class="fas fa-comment-dots mr-1"></i> تواصل
642
+ </button>
643
+ <span class="text-xs text-gray-500">منذ يومين</span>
644
+ </div>
645
+ </div>
646
+ `;
647
+ itemsContainer.appendChild(itemCard);
648
+ });
649
+ }
650
+
651
+ // Login function (simulated)
652
+ function login() {
653
+ const email = document.getElementById('loginEmail').value;
654
+ const password = document.getElementById('loginPassword').value;
655
+
656
+ if (!email || !password) {
657
+ showError('الرجاء إدخال البريد الإلكتروني وكلمة المرور');
658
+ return;
659
+ }
660
+
661
+ showLoading();
662
+
663
+ // Simulate API call
664
+ setTimeout(() => {
665
+ hideLoading();
666
+ showSuccess('تم تسجيل الدخول بنجاح');
667
+ showHome();
668
+ }, 1000);
669
+ }
670
+
671
+ // Register function (simulated)
672
+ function register() {
673
+ const name = document.getElementById('registerName').value;
674
+ const email = document.getElementById('registerEmail').value;
675
+ const phone = document.getElementById('registerPhone').value;
676
+ const password = document.getElementById('registerPassword').value;
677
+ const confirmPassword = document.getElementById('registerConfirmPassword').value;
678
+
679
+ if (!name || !email || !phone || !password || !confirmPassword) {
680
+ showError('الرجاء ملء جميع الحقول');
681
+ return;
682
+ }
683
+
684
+ if (password !== confirmPassword) {
685
+ showError('كلمة المرور غير متطابقة');
686
+ return;
687
+ }
688
+
689
+ if (password.length < 6) {
690
+ showError('كلمة المرور يجب أن تكون 6 أحرف على الأقل');
691
+ return;
692
+ }
693
+
694
+ showLoading();
695
+
696
+ // Simulate API call
697
+ setTimeout(() => {
698
+ hideLoading();
699
+ showSuccess('تم إنشاء الحساب بنجاح، الرجاء تسجيل الدخول');
700
+ document.getElementById('loginTabBtn').click();
701
+ document.getElementById('loginEmail').value = email;
702
+ document.getElementById('loginPassword').value = '';
703
+ }, 1500);
704
+ }
705
+
706
+ // Add item function (simulated)
707
+ function addItem() {
708
+ const title = document.getElementById('itemTitle').value;
709
+ const description = document.getElementById('itemDescription').value;
710
+ const price = document.getElementById('itemPrice').value;
711
+ const city = document.getElementById('itemCity').value;
712
+ const category = document.getElementById('itemCategory').value;
713
+ const imageFile = document.getElementById('itemImage').files[0];
714
+
715
+ if (!title || !description || !price || !city || !category) {
716
+ showError('الرجاء ملء جميع الحقول المطلوبة');
717
+ return;
718
+ }
719
+
720
+ showLoading();
721
+
722
+ // Simulate API call
723
+ setTimeout(() => {
724
+ hideLoading();
725
+
726
+ // Reset form
727
+ document.getElementById('addItemForm').reset();
728
+ document.getElementById('imagePreview').classList.add('hidden');
729
+
730
+ showSuccess('تم إضافة الغرض بنجاح');
731
+ showHome();
732
+ }, 1500);
733
+ }
734
+ </script>
735
+ <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=amrora00/https-enzostvs-deepsite-hf-space" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
736
+ </html>
prompts.txt ADDED
File without changes