tzamaod commited on
Commit
93e3d86
·
verified ·
1 Parent(s): 678c060

تطبيق بسيط للموبايل أو الويب، يحتوي على: أذكار الصباح والمساء (قابلة للتشغيل صوتيًا). القرآن الكريم (قراءة + استماع). مواقيت الصلاة (حسب الموقع الجغرافي باستخدام API). تنبيهات (إشعار عند دخول وقت الصلاة + تذكير بالأذكار). - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +758 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: T
3
- emoji:
4
- colorFrom: red
5
- colorTo: purple
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: t
3
+ emoji: 🐳
4
+ colorFrom: yellow
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,758 @@
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="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Muslim Supplications - Hisn Al-Muslim</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=Amiri:wght@400;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Amiri', serif;
14
+ direction: rtl;
15
+ background-color: #f5f5f5;
16
+ }
17
+
18
+ .arabic-text {
19
+ font-size: 1.5rem;
20
+ line-height: 2.5rem;
21
+ }
22
+
23
+ .prayer-time.active {
24
+ background-color: #2F855A;
25
+ color: white;
26
+ }
27
+
28
+ .tab-active {
29
+ border-bottom: 3px solid #2F855A;
30
+ color: #2F855A;
31
+ font-weight: bold;
32
+ }
33
+
34
+ .remembrance-card {
35
+ transition: all 0.3s ease;
36
+ }
37
+
38
+ .remembrance-card:hover {
39
+ transform: translateY(-5px);
40
+ box-shadow: 0 10px 20px rgba(0,0,0,0.1);
41
+ }
42
+
43
+ .audio-controls {
44
+ background-color: rgba(255,255,255,0.9);
45
+ }
46
+ </style>
47
+ </head>
48
+ <body class="bg-gray-100">
49
+ <!-- Header -->
50
+ <header class="bg-green-800 text-white shadow-lg">
51
+ <div class="container mx-auto px-4 py-6">
52
+ <div class="flex flex-col md:flex-row justify-between items-center">
53
+ <div class="flex items-center mb-4 md:mb-0">
54
+ <i class="fas fa-mosque text-3xl mr-3"></i>
55
+ <div>
56
+ <h1 class="text-2xl font-bold hovered-element">معتز</h1>
57
+ <p class="text-green-200">أذكار الصباح والمساء والأدعية اليومية</p>
58
+ </div>
59
+ </div>
60
+ <div class="flex items-center space-x-4 space-x-reverse">
61
+ <button class="bg-green-700 hover:bg-green-600 px-4 py-2 rounded-lg flex items-center">
62
+ <i class="fas fa-share-alt mr-2"></i>
63
+ مشاركة
64
+ </button>
65
+ <button class="bg-green-600 hover:bg-green-500 px-4 py-2 rounded-lg flex items-center">
66
+ <i class="fas fa-download mr-2"></i>
67
+ حفظ
68
+ </button>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </header>
73
+
74
+ <!-- Prayer Times -->
75
+ <section class="py-6 bg-white shadow-md">
76
+ <div class="container mx-auto px-4">
77
+ <h2 class="text-2xl font-bold text-center mb-6 text-gray-800">أوقات الصلاة</h2>
78
+ <div class="flex justify-center mb-4">
79
+ <select id="city-select" class="px-4 py-2 border border-gray-300 rounded-lg">
80
+ <option value="riyadh">الرياض</option>
81
+ <option value="makkah">مكة المكرمة</option>
82
+ <option value="madina">المدينة المنورة</option>
83
+ <option value="jeddah">جدة</option>
84
+ <option value="algiers">الجزائر</option>
85
+ </select>
86
+ </div>
87
+ <div class="grid grid-cols-5 gap-2 text-center" id="prayer-times-container">
88
+ <div class="prayer-time p-3 rounded-lg border border-gray-200">
89
+ <div class="font-bold">الفجر</div>
90
+ <div class="text-gray-600" id="fajr-time">--:--</div>
91
+ </div>
92
+ <div class="prayer-time p-3 rounded-lg border border-gray-200">
93
+ <div class="font-bold">الظهر</div>
94
+ <div class="text-gray-600" id="dhuhr-time">--:--</div>
95
+ </div>
96
+ <div class="prayer-time p-3 rounded-lg border border-gray-200">
97
+ <div class="font-bold">العصر</div>
98
+ <div class="text-gray-600" id="asr-time">--:--</div>
99
+ </div>
100
+ <div class="prayer-time p-3 rounded-lg border border-gray-200">
101
+ <div class="font-bold">المغرب</div>
102
+ <div class="text-gray-600" id="maghrib-time">--:--</div>
103
+ </div>
104
+ <div class="prayer-time p-3 rounded-lg border border-gray-200">
105
+ <div class="font-bold">العشاء</div>
106
+ <div class="text-gray-600" id="isha-time">--:--</div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </section>
111
+
112
+ <!-- Main Content -->
113
+ <main class="container mx-auto px-4 py-8">
114
+ <!-- Tabs Navigation -->
115
+ <div class="flex border-b border-gray-200 mb-8 overflow-x-auto">
116
+ <button class="tab-active px-6 py-3 text-lg whitespace-nowrap">أذكار الصباح</button>
117
+ <button class="px-6 py-3 text-lg text-gray-600 whitespace-nowrap">أذكار المساء</button>
118
+ <button class="px-6 py-3 text-lg text-gray-600 whitespace-nowrap">أذكار بعد الصلاة</button>
119
+ <button class="px-6 py-3 text-lg text-gray-600 whitespace-nowrap">أذكار النوم</button>
120
+ <button class="px-6 py-3 text-lg text-gray-600 whitespace-nowrap">أدعية متنوعة</button>
121
+ <button class="px-6 py-3 text-lg text-gray-600 whitespace-nowrap">الرقية الشرعية</button>
122
+ <button class="px-6 py-3 text-lg text-gray-600 whitespace-nowrap">القرآن الكريم</button>
123
+ </div>
124
+
125
+ <!-- Current Remembrance -->
126
+ <div class="bg-white rounded-xl shadow-lg p-6 mb-8">
127
+ <div class="flex justify-between items-center mb-6">
128
+ <h3 class="text-xl font-bold text-gray-800">أعوذ بالله من الشيطان الرجيم</h3>
129
+ <div class="flex space-x-2 space-x-reverse">
130
+ <button class="bg-green-100 hover:bg-green-200 text-green-800 p-2 rounded-full transition-colors">
131
+ <i class="fas fa-bookmark hover:text-yellow-500"></i>
132
+ </button>
133
+ <button class="bg-green-100 hover:bg-green-200 text-green-800 p-2 rounded-full transition-colors">
134
+ <i class="fas fa-share hover:text-blue-500"></i>
135
+ </button>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="arabic-text mb-6 text-right leading-loose">
140
+ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ
141
+ <br>
142
+ قُلْ هُوَ اللَّهُ أَحَدٌ (1) اللَّهُ الصَّمَدُ (2) لَمْ يَلِدْ وَلَمْ يُولَدْ (3) وَلَمْ يَكُنْ لَهُ كُفُوًا أَحَدٌ (4)
143
+ </div>
144
+
145
+ <div class="bg-gray-100 p-4 rounded-lg mb-6">
146
+ <p class="text-gray-700">"قل هو الله أحد" تعدل ثلث القرآن (رواه البخاري)</p>
147
+ </div>
148
+
149
+ <div class="audio-controls flex items-center justify-between p-3 rounded-lg border border-gray-200">
150
+ <audio id="audio-player" src="https://server.mp3quran.net/mish_rms/001.mp3"></audio>
151
+ <div class="flex items-center space-x-4 space-x-reverse">
152
+ <button id="play-button" class="w-10 h-10 bg-green-600 text-white rounded-full flex items-center justify-center">
153
+ <i class="fas fa-play"></i>
154
+ </button>
155
+ <div>
156
+ <div class="text-sm text-gray-500">تلاوة الشيخ مشاري راشد</div>
157
+ </div>
158
+ </div>
159
+ <div class="flex items-center space-x-4 space-x-reverse">
160
+ <button id="rewind-button" class="text-gray-500">
161
+ <i class="fas fa-backward"></i>
162
+ </button>
163
+ <span id="time-display" class="text-sm">0:00 / 0:00</span>
164
+ <button id="forward-button" class="text-gray-500">
165
+ <i class="fas fa-forward"></i>
166
+ </button>
167
+ </div>
168
+ </div>
169
+ </div>
170
+
171
+ <!-- Remembrance Counter -->
172
+ <div class="bg-white rounded-xl shadow-lg p-6 mb-8">
173
+ <div class="flex flex-col md:flex-row justify-between items-center">
174
+ <div class="text-center mb-4 md:mb-0">
175
+ <div class="text-4xl font-bold text-green-600">3</div>
176
+ <div class="text-gray-600">عدد المرات</div>
177
+ </div>
178
+ <div class="flex space-x-4 space-x-reverse">
179
+ <button class="bg-green-600 hover:bg-green-700 text-white px-6 py-3 rounded-lg text-lg">
180
+ <i class="fas fa-check mr-2"></i>
181
+ تمت القراءة
182
+ </button>
183
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-6 py-3 rounded-lg text-lg">
184
+ <i class="fas fa-redo mr-2"></i>
185
+ إعادة
186
+ </button>
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+ <!-- More Remembrances -->
192
+ <h3 class="text-xl font-bold mb-4 text-gray-800">أذكار أخرى</h3>
193
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
194
+ <div class="remembrance-card bg-white rounded-lg shadow-md p-6">
195
+ <h4 class="font-bold text-lg mb-3">أذكار الاستيقاظ</h4>
196
+ <p class="text-gray-600 mb-4">الحمد لله الذي أحيانا بعد ما أماتنا وإليه النشور</p>
197
+ <div class="flex justify-between items-center">
198
+ <span class="text-sm text-green-600">10 مرات</span>
199
+ <button class="text-green-600">
200
+ <i class="fas fa-chevron-left"></i>
201
+ </button>
202
+ </div>
203
+ </div>
204
+
205
+ <div class="remembrance-card bg-white rounded-lg shadow-md p-6">
206
+ <h4 class="font-bold text-lg mb-3">دعاء الخروج من المنزل</h4>
207
+ <p class="text-gray-600 mb-4">بسم الله توكلت على الله ولا حول ولا قوة إلا بالله</p>
208
+ <div class="flex justify-between items-center">
209
+ <span class="text-sm text-green-600">مرة واحدة</span>
210
+ <button class="text-green-600">
211
+ <i class="fas fa-chevron-left"></i>
212
+ </button>
213
+ </div>
214
+ </div>
215
+
216
+ <div class="remembrance-card bg-white rounded-lg shadow-md p-6">
217
+ <h4 class="font-bold text-lg mb-3">أذكار الطعام</h4>
218
+ <p class="text-gray-600 mb-4">بسم الله، اللهم بارك لنا فيه وأطعمنا خيرًا منه</p>
219
+ <div class="flex justify-between items-center">
220
+ <span class="text-sm text-green-600">3 مرات</span>
221
+ <button class="text-green-600">
222
+ <i class="fas fa-chevron-left"></i>
223
+ </button>
224
+ </div>
225
+ </div>
226
+ </div>
227
+
228
+ <!-- Quran Section -->
229
+ <div id="quran-section" class="hidden bg-white rounded-xl shadow-lg p-6 mb-8">
230
+ <div class="flex justify-between items-center mb-6">
231
+ <h3 class="text-xl font-bold text-gray-800">القرآن الكريم</h3>
232
+ </div>
233
+
234
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
235
+ <div class="p-4 border border-green-200 rounded-lg">
236
+ <h4 class="font-bold mb-3 text-green-700">قراءة القرآن</h4>
237
+ <select class="w-full p-2 border border-gray-300 rounded mb-3" id="surah-select">
238
+ <option value="">اختر سورة</option>
239
+ <!-- Surahs will be populated by JS -->
240
+ </select>
241
+ <div id="quran-text" class="arabic-text text-right leading-loose min-h-[300px] border p-4 rounded bg-gray-50"></div>
242
+ </div>
243
+
244
+ <div class="p-4 border border-green-200 rounded-lg">
245
+ <h4 class="font-bold mb-3 text-green-700">استماع للقرآن</h4>
246
+ <select class="w-full p-2 border border-gray-300 rounded mb-3" id="reciter-select">
247
+ <option value="">اختر قارئ</option>
248
+ <option value="mishary">مشاري راشد</option>
249
+ <option value="hudhaify">علي الحذيفي</option>
250
+ <option value="shatri">سعد الغامدي</option>
251
+ </select>
252
+ <audio id="quran-audio" controls class="w-full mb-3"></audio>
253
+ <div class="flex justify-between">
254
+ <button id="prev-ayah" class="bg-green-100 px-4 py-2 rounded">السابقة</button>
255
+ <button id="next-ayah" class="bg-green-100 px-4 py-2 rounded">التالية</button>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ </main>
261
+
262
+ <!-- Features Section -->
263
+ <section class="bg-green-50 py-12">
264
+ <div class="container mx-auto px-4">
265
+ <h2 class="text-2xl font-bold text-center mb-8 text-gray-800">مميزات التطبيق</h2>
266
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
267
+ <div class="bg-white p-6 rounded-lg shadow-md text-center">
268
+ <div class="text-green-600 text-4xl mb-4">
269
+ <i class="fas fa-bell"></i>
270
+ </div>
271
+ <h3 class="font-bold text-lg mb-2">تنبيهات يومية</h3>
272
+ <p class="text-gray-600">تذكير بأذكار الصباح والمساء والنوم تلقائيًا</p>
273
+ </div>
274
+
275
+ <div class="bg-white p-6 rounded-lg shadow-md text-center">
276
+ <div class="text-green-600 text-4xl mb-4">
277
+ <i class="fas fa-volume-up"></i>
278
+ </div>
279
+ <h3 class="font-bold text-lg mb-2">تلاوة صوتية</h3>
280
+ <p class="text-gray-600">استماع للأذكار بصوت أشهر القراء</p>
281
+ </div>
282
+
283
+ <div class="bg-white p-6 rounded-lg shadow-md text-center">
284
+ <div class="text-green-600 text-4xl mb-4">
285
+ <i class="fas fa-moon"></i>
286
+ </div>
287
+ <h3 class="font-bold text-lg mb-2">وضع الليل</h3>
288
+ <p class="text-gray-600">وضع مظلم لقراءة الأذكار ليلاً بسهولة</p>
289
+ </div>
290
+ </div>
291
+ </div>
292
+ </section>
293
+
294
+ <!-- Contact Section -->
295
+ <section class="py-12 bg-white">
296
+ <div class="container mx-auto px-4">
297
+ <h2 class="text-2xl font-bold text-center mb-8 text-gray-800">تواصل معنا</h2>
298
+ <div class="max-w-md mx-auto bg-gray-50 p-6 rounded-lg shadow-md">
299
+ <form>
300
+ <div class="mb-4">
301
+ <label class="block text-gray-700 mb-2">اسمك</label>
302
+ <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500">
303
+ </div>
304
+ <div class="mb-4">
305
+ <label class="block text-gray-700 mb-2">البريد الإلكتروني</label>
306
+ <input type="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500">
307
+ </div>
308
+ <div class="mb-4">
309
+ <label class="block text-gray-700 mb-2">رسالتك</label>
310
+ <textarea rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500"></textarea>
311
+ </div>
312
+ <button type="submit" class="w-full bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg">
313
+ إرسال الرسالة
314
+ </button>
315
+ </form>
316
+ </div>
317
+ </div>
318
+ </section>
319
+
320
+ <!-- Footer -->
321
+ <footer class="bg-green-900 text-white py-8">
322
+ <div class="container mx-auto px-4">
323
+ <div class="flex flex-col md:flex-row justify-between items-center">
324
+ <div class="mb-4 md:mb-0">
325
+ <h3 class="text-xl font-bold mb-2">حصن المسلم</h3>
326
+ <p class="text-green-200">أذكار وأدعية المسلم اليومية</p>
327
+ </div>
328
+ <div class="flex space-x-6 space-x-reverse">
329
+ <a href="#" class="text-green-200 hover:text-white">
330
+ <i class="fab fa-facebook-f text-xl"></i>
331
+ </a>
332
+ <a href="#" class="text-green-200 hover:text-white">
333
+ <i class="fab fa-twitter text-xl"></i>
334
+ </a>
335
+ <a href="#" class="text-green-200 hover:text-white">
336
+ <i class="fab fa-instagram text-xl"></i>
337
+ </a>
338
+ </div>
339
+ </div>
340
+ <div class="border-t border-green-800 mt-6 pt-6 text-center text-green-300">
341
+ <p>© 2023 حصن المسلم. جميع الحقوق محفوظة.</p>
342
+ </div>
343
+ </div>
344
+ </footer>
345
+
346
+ <!-- Bottom Navigation -->
347
+ <nav class="fixed bottom-0 left-0 right-0 bg-white shadow-lg md:hidden">
348
+ <div class="flex justify-around">
349
+ <a href="#" class="flex flex-col items-center justify-center p-3 text-green-600">
350
+ <i class="fas fa-home text-xl"></i>
351
+ <span class="text-xs mt-1">الرئيسية</span>
352
+ </a>
353
+ <a href="#" class="flex flex-col items-center justify-center p-3 text-gray-500">
354
+ <i class="fas fa-book text-xl"></i>
355
+ <span class="text-xs mt-1">الأذكار</span>
356
+ </a>
357
+ <a href="#" class="flex flex-col items-center justify-center p-3 text-gray-500">
358
+ <i class="fas fa-pray text-xl"></i>
359
+ <span class="text-xs mt-1">الأدعية</span>
360
+ </a>
361
+ <a href="#" class="flex flex-col items-center justify-center p-3 text-gray-500">
362
+ <i class="fas fa-cog text-xl"></i>
363
+ <span class="text-xs mt-1">الإعدادات</span>
364
+ </a>
365
+ </div>
366
+ </nav>
367
+
368
+ <script>
369
+ document.addEventListener('DOMContentLoaded', function() {
370
+ // Tab functionality
371
+ const tabs = document.querySelectorAll('.flex.border-b button');
372
+ const morningRemembrances = [
373
+ { id: 1, text: "أعوذ بالله من الشيطان الرجيم", count: 3 },
374
+ { id: 2, text: "سبحان الله وبحمده", count: 100 }
375
+ ];
376
+
377
+ const eveningRemembrances = [
378
+ { id: 1, text: "أعوذ بالله من الشيطان الرجيم", count: 3 },
379
+ { id: 2, text: "لا إله إلا الله وحده لا شريك له", count: 100 }
380
+ ];
381
+
382
+ tabs.forEach((tab, index) => {
383
+ tab.addEventListener('click', () => {
384
+ tabs.forEach(t => t.classList.remove('tab-active'));
385
+ tab.classList.add('tab-active');
386
+
387
+ // Load appropriate remembrances based on tab
388
+ if (index === 0) { // Morning
389
+ remembrances = [...morningRemembrances];
390
+ } else if (index === 1) { // Evening
391
+ remembrances = [...eveningRemembrances];
392
+ }
393
+
394
+ // Reset to first remembrance
395
+ loadRemembrance(0);
396
+ });
397
+ });
398
+
399
+ // Bookmark and share buttons
400
+ const bookmarkButtons = document.querySelectorAll('.fa-bookmark, .fa-share');
401
+ bookmarkButtons.forEach(btn => {
402
+ btn.addEventListener('click', function() {
403
+ if (this.classList.contains('fa-bookmark')) {
404
+ this.classList.toggle('text-yellow-500');
405
+ }
406
+ // Add actual bookmark/share functionality here
407
+ });
408
+ });
409
+
410
+ // Audio player functionality
411
+ const audioPlayer = document.getElementById('audio-player');
412
+ const playButton = document.getElementById('play-button');
413
+ const rewindButton = document.getElementById('rewind-button');
414
+ const forwardButton = document.getElementById('forward-button');
415
+ const timeDisplay = document.getElementById('time-display');
416
+
417
+ // Update time display
418
+ audioPlayer.addEventListener('timeupdate', function() {
419
+ const currentTime = formatTimeDisplay(audioPlayer.currentTime);
420
+ const duration = formatTimeDisplay(audioPlayer.duration);
421
+ timeDisplay.textContent = `${currentTime} / ${duration}`;
422
+ });
423
+
424
+ audioPlayer.addEventListener('loadedmetadata', function() {
425
+ timeDisplay.textContent = `0:00 / ${formatTimeDisplay(audioPlayer.duration)}`;
426
+ });
427
+
428
+ playButton.addEventListener('click', function() {
429
+ const icon = this.querySelector('i');
430
+ if (audioPlayer.paused) {
431
+ audioPlayer.play()
432
+ .then(() => {
433
+ icon.classList.replace('fa-play', 'fa-pause');
434
+ })
435
+ .catch(error => {
436
+ console.error('Audio playback failed:', error);
437
+ alert('حدث خطأ في تشغيل الصوت. يرجى المحاولة مرة أخرى.');
438
+ });
439
+ } else {
440
+ audioPlayer.pause();
441
+ icon.classList.replace('fa-pause', 'fa-play');
442
+ }
443
+ });
444
+
445
+ rewindButton.addEventListener('click', function() {
446
+ audioPlayer.currentTime = Math.max(0, audioPlayer.currentTime - 10);
447
+ });
448
+
449
+ forwardButton.addEventListener('click', function() {
450
+ audioPlayer.currentTime = Math.min(audioPlayer.duration, audioPlayer.currentTime + 10);
451
+ });
452
+
453
+ function formatTimeDisplay(seconds) {
454
+ const mins = Math.floor(seconds / 60);
455
+ const secs = Math.floor(seconds % 60);
456
+ return `${mins}:${secs < 10 ? '0' : ''}${secs}`;
457
+ }
458
+
459
+ // Remembrance Counter System
460
+ const counterElement = document.querySelector('.text-4xl.font-bold.text-green-600');
461
+ const doneButton = document.querySelector('.bg-green-600');
462
+ const resetButton = document.querySelector('.bg-gray-200');
463
+
464
+ // Sample remembrance data
465
+ const remembrances = [
466
+ { id: 1, text: "أعوذ بالله من الشيطان الرجيم", count: 3 },
467
+ { id: 2, text: "سبحان الله وبحمده", count: 100 },
468
+ { id: 3, text: "لا إله إلا الله وحده لا شريك له", count: 1 }
469
+ ];
470
+
471
+ let currentRemembrance = 0;
472
+ let count = 1; // Start counting from 1 instead of 0
473
+
474
+ function loadRemembrance(index) {
475
+ currentRemembrance = index;
476
+ count = 1; // Reset to 1 instead of 0
477
+ const rem = remembrances[index];
478
+
479
+ // Update UI
480
+ document.querySelector('.arabic-text').innerHTML = rem.text;
481
+ counterElement.textContent = count;
482
+ document.querySelector('.text-xl.font-bold').textContent = `ذكر ${index + 1}/${remembrances.length}`;
483
+
484
+ // Reset button states
485
+ doneButton.classList.replace('bg-gray-400', 'bg-green-600');
486
+ doneButton.classList.replace('hover:bg-gray-500', 'hover:bg-green-700');
487
+ doneButton.disabled = false;
488
+ }
489
+
490
+ doneButton.addEventListener('click', function() {
491
+ counterElement.textContent = count;
492
+
493
+ if (count >= remembrances[currentRemembrance].count) {
494
+ count = 1; // Reset to 1 for next time
495
+ this.classList.replace('bg-green-600', 'bg-gray-400');
496
+ this.classList.replace('hover:bg-green-700', 'hover:bg-gray-500');
497
+ this.disabled = true;
498
+
499
+ // Move to next remembrance after 1 second
500
+ setTimeout(() => {
501
+ const nextIndex = (currentRemembrance + 1) % remembrances.length;
502
+ loadRemembrance(nextIndex);
503
+ }, 1000);
504
+ }
505
+ });
506
+
507
+ resetButton.addEventListener('click', function() {
508
+ count = 1;
509
+ counterElement.textContent = count;
510
+ doneButton.classList.replace('bg-gray-400', 'bg-green-600');
511
+ doneButton.classList.replace('hover:bg-gray-500', 'hover:bg-green-700');
512
+ doneButton.disabled = false;
513
+ });
514
+
515
+ // Initialize first remembrance
516
+ loadRemembrance(0);
517
+
518
+ // Notification permission
519
+ if ('Notification' in window) {
520
+ Notification.requestPermission().then(permission => {
521
+ if (permission === 'granted') {
522
+ console.log('Notification permission granted');
523
+ }
524
+ });
525
+ }
526
+
527
+ // Geolocation
528
+ function getLocation() {
529
+ if (navigator.geolocation) {
530
+ navigator.geolocation.getCurrentPosition(
531
+ position => {
532
+ const {latitude, longitude} = position.coords;
533
+ fetchPrayerTimesByCoords(latitude, longitude);
534
+ },
535
+ error => {
536
+ console.error('Geolocation error:', error);
537
+ fetchPrayerTimes('riyadh'); // Default to Riyadh if geolocation fails
538
+ }
539
+ );
540
+ } else {
541
+ fetchPrayerTimes('riyadh');
542
+ }
543
+ }
544
+
545
+ async function fetchPrayerTimesByCoords(lat, lng) {
546
+ try {
547
+ const response = await fetch(`https://api.aladhan.com/v1/timings?latitude=${lat}&longitude=${lng}&method=4`);
548
+ const data = await response.json();
549
+ updatePrayerTimesUI(data.data.timings);
550
+ } catch (error) {
551
+ console.error('Error fetching prayer times by coordinates:', error);
552
+ fetchPrayerTimes('riyadh');
553
+ }
554
+ }
555
+
556
+ // Prayer Times API
557
+ async function fetchPrayerTimes(city) {
558
+ try {
559
+ const country = city === 'algiers' ? 'Algeria' : 'SaudiArabia';
560
+ const response = await fetch(`https://api.aladhan.com/v1/timingsByCity?city=${city}&country=${country}&method=4`);
561
+ const data = await response.json();
562
+
563
+ if (data.code === 200) {
564
+ const timings = data.data.timings;
565
+ document.getElementById('fajr-time').textContent = formatTime(timings.Fajr);
566
+ document.getElementById('dhuhr-time').textContent = formatTime(timings.Dhuhr);
567
+ document.getElementById('asr-time').textContent = formatTime(timings.Asr);
568
+ document.getElementById('maghrib-time').textContent = formatTime(timings.Maghrib);
569
+ document.getElementById('isha-time').textContent = formatTime(timings.Isha);
570
+
571
+ // Highlight current prayer time
572
+ highlightCurrentPrayer(timings);
573
+ setupPrayerNotifications(timings);
574
+ }
575
+ } catch (error) {
576
+ console.error('Error fetching prayer times:', error);
577
+ }
578
+ }
579
+
580
+ function formatTime(timeString) {
581
+ const [hours, minutes] = timeString.split(':');
582
+ const hour = parseInt(hours);
583
+ const ampm = hour >= 12 ? 'م' : 'ص';
584
+ const hour12 = hour % 12 || 12;
585
+ return `${hour12}:${minutes} ${ampm}`;
586
+ }
587
+
588
+ function highlightCurrentPrayer(timings) {
589
+ const now = new Date();
590
+ const currentHour = now.getHours();
591
+ const currentMinute = now.getMinutes();
592
+
593
+ const prayerTimes = [
594
+ { name: 'fajr', time: timings.Fajr.split(':') },
595
+ { name: 'dhuhr', time: timings.Dhuhr.split(':') },
596
+ { name: 'asr', time: timings.Asr.split(':') },
597
+ { name: 'maghrib', time: timings.Maghrib.split(':') },
598
+ { name: 'isha', time: timings.Isha.split(':') }
599
+ ];
600
+
601
+ let currentPrayer = null;
602
+
603
+ for (let i = 0; i < prayerTimes.length; i++) {
604
+ const prayerHour = parseInt(prayerTimes[i].time[0]);
605
+ const prayerMinute = parseInt(prayerTimes[i].time[1]);
606
+
607
+ if ((currentHour < prayerHour) ||
608
+ (currentHour === prayerHour && currentMinute < prayerMinute)) {
609
+ currentPrayer = prayerTimes[i].name;
610
+ break;
611
+ }
612
+ }
613
+
614
+ // Remove all active classes first
615
+ document.querySelectorAll('.prayer-time').forEach(el => {
616
+ el.classList.remove('active');
617
+ });
618
+
619
+ // Add active class to current prayer
620
+ if (currentPrayer) {
621
+ document.querySelector(`#${currentPrayer}-time`).parentElement.classList.add('active');
622
+ }
623
+ }
624
+
625
+ // Initial load and city change
626
+ document.getElementById('city-select').addEventListener('change', function() {
627
+ fetchPrayerTimes(this.value);
628
+ });
629
+
630
+ function setupPrayerNotifications(timings) {
631
+ if (!('Notification' in window)) return;
632
+
633
+ const now = new Date();
634
+ const currentTime = now.getHours() * 60 + now.getMinutes();
635
+
636
+ const prayerNames = {
637
+ Fajr: 'الفجر',
638
+ Dhuhr: 'الظهر',
639
+ Asr: 'العصر',
640
+ Maghrib: 'المغرب',
641
+ Isha: 'العشاء'
642
+ };
643
+
644
+ Object.entries(timings).forEach(([prayer, time]) => {
645
+ if (prayerNames[prayer]) {
646
+ const [hours, minutes] = time.split(':');
647
+ const prayerTime = parseInt(hours) * 60 + parseInt(minutes);
648
+
649
+ // Notify 5 minutes before prayer
650
+ if (prayerTime > currentTime && prayerTime - currentTime <= 5) {
651
+ const notification = new Notification(`حان وقت صلاة ${prayerNames[prayer]} قريبًا`, {
652
+ body: `سيحين وقت الصلاة خلال 5 دقائق`,
653
+ icon: 'https://i.imgur.com/7kQEsHU.png'
654
+ });
655
+ }
656
+ }
657
+ });
658
+ }
659
+
660
+ // Quran functionality
661
+ const quranSection = document.getElementById('quran-section');
662
+ const surahSelect = document.getElementById('surah-select');
663
+ const quranText = document.getElementById('quran-text');
664
+ const quranAudio = document.getElementById('quran-audio');
665
+ const reciterSelect = document.getElementById('reciter-select');
666
+
667
+ // Load Surahs list
668
+ async function loadSurahs() {
669
+ try {
670
+ const response = await fetch('https://api.alquran.cloud/v1/surah');
671
+ const data = await response.json();
672
+
673
+ data.data.forEach(surah => {
674
+ const option = document.createElement('option');
675
+ option.value = surah.number;
676
+ option.textContent = `${surah.number}. ${surah.englishName} (${surah.name})`;
677
+ surahSelect.appendChild(option);
678
+ });
679
+ } catch (error) {
680
+ console.error('Error loading surahs:', error);
681
+ }
682
+ }
683
+
684
+ surahSelect.addEventListener('change', async function() {
685
+ if (!this.value) return;
686
+
687
+ try {
688
+ const response = await fetch(`https://api.alquran.cloud/v1/surah/${this.value}/ar.alafasy`);
689
+ const data = await response.json();
690
+
691
+ let text = '';
692
+ data.data.ayahs.forEach(ayah => {
693
+ text += `${ayah.text} (${ayah.numberInSurah}) `;
694
+ });
695
+
696
+ quranText.innerHTML = text;
697
+ } catch (error) {
698
+ console.error('Error loading surah text:', error);
699
+ }
700
+ });
701
+
702
+ reciterSelect.addEventListener('change', function() {
703
+ if (!this.value || !surahSelect.value) return;
704
+
705
+ const reciters = {
706
+ mishary: 'https://server.mp3quran.net/mish_rms',
707
+ hudhaify: 'https://server.mp3quran.net/hud',
708
+ shatri: 'https://server.mp3quran.net/s_gmd'
709
+ };
710
+
711
+ quranAudio.src = `${reciters[this.value]}/${surahSelect.value.padStart(3, '0')}.mp3`;
712
+ });
713
+
714
+ // Tab switching for Quran
715
+ tabs.forEach((tab, index) => {
716
+ tab.addEventListener('click', () => {
717
+ // ... existing tab code ...
718
+
719
+ if (tab.textContent.includes('القرآن')) {
720
+ quranSection.classList.remove('hidden');
721
+ loadSurahs();
722
+ } else {
723
+ quranSection.classList.add('hidden');
724
+ }
725
+ });
726
+ });
727
+
728
+ // Load initial prayer times using geolocation
729
+ getLocation();
730
+
731
+ // Setup morning/evening reminders
732
+ function setupDhikrReminders() {
733
+ const now = new Date();
734
+ const hours = now.getHours();
735
+
736
+ // Morning reminder at 6 AM
737
+ if (hours >= 5 && hours < 12 && Notification.permission === 'granted') {
738
+ new Notification('تذكير بأذكار الصباح', {
739
+ body: 'حان وقت قراءة أذكار الصباح',
740
+ icon: 'https://i.imgur.com/7kQEsHU.png'
741
+ });
742
+ }
743
+ // Evening reminder at 6 PM
744
+ else if (hours >= 18 && Notification.permission === 'granted') {
745
+ new Notification('تذكير بأذكار المساء', {
746
+ body: 'حان وقت قراءة أذكار المساء',
747
+ icon: 'https://i.imgur.com/7kQEsHU.png'
748
+ });
749
+ }
750
+ }
751
+
752
+ // Check for reminders every hour
753
+ setInterval(setupDhikrReminders, 60 * 60 * 1000);
754
+ setupDhikrReminders();
755
+ });
756
+ </script>
757
+ <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=tzamaod/t" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
758
+ </html>