Spaces:
Running
Running
Add 2 files
Browse files- README.md +7 -5
- index.html +650 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
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: dhikr-enfant
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: blue
|
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,650 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="fr">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Dhikr pour Enfants - Récompenses</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 |
+
@keyframes bounce {
|
11 |
+
0%, 100% { transform: translateY(0); }
|
12 |
+
50% { transform: translateY(-10px); }
|
13 |
+
}
|
14 |
+
@keyframes fall {
|
15 |
+
to { transform: translateY(100vh) rotate(360deg); }
|
16 |
+
}
|
17 |
+
.bounce-animation {
|
18 |
+
animation: bounce 1s infinite;
|
19 |
+
}
|
20 |
+
.progress-ring__circle {
|
21 |
+
transition: stroke-dashoffset 0.35s;
|
22 |
+
transform: rotate(-90deg);
|
23 |
+
transform-origin: 50% 50%;
|
24 |
+
}
|
25 |
+
.star-reward {
|
26 |
+
transition: all 0.3s ease;
|
27 |
+
}
|
28 |
+
.star-reward:hover {
|
29 |
+
transform: scale(1.2);
|
30 |
+
}
|
31 |
+
.dhikr-option {
|
32 |
+
transition: all 0.3s ease;
|
33 |
+
}
|
34 |
+
.dhikr-option:hover {
|
35 |
+
transform: translateY(-5px);
|
36 |
+
}
|
37 |
+
.dhikr-option.selected {
|
38 |
+
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.5);
|
39 |
+
}
|
40 |
+
.fall-animation {
|
41 |
+
animation: fall linear forwards;
|
42 |
+
}
|
43 |
+
</style>
|
44 |
+
</head>
|
45 |
+
<body class="bg-gradient-to-b from-blue-50 to-purple-50 min-h-screen font-sans">
|
46 |
+
<div class="container mx-auto px-4 py-8">
|
47 |
+
<!-- Header -->
|
48 |
+
<header class="text-center mb-8">
|
49 |
+
<h1 class="text-4xl font-bold text-purple-800 mb-2">Dhikr des Petits Cœurs</h1>
|
50 |
+
<p class="text-lg text-purple-600">Choisis ton dhikr et gagne des récompenses !</p>
|
51 |
+
</header>
|
52 |
+
|
53 |
+
<!-- Main Content -->
|
54 |
+
<div class="flex flex-col lg:flex-row gap-8">
|
55 |
+
<!-- Dhikr Counter -->
|
56 |
+
<div class="bg-white rounded-2xl shadow-xl p-6 flex-1">
|
57 |
+
<div class="flex justify-between items-center mb-6">
|
58 |
+
<h2 class="text-2xl font-semibold text-purple-700">Dhikr du Jour</h2>
|
59 |
+
<span class="bg-purple-100 text-purple-800 px-3 py-1 rounded-full text-sm">Aujourd'hui</span>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<!-- Dhikr Selection -->
|
63 |
+
<div class="mb-8">
|
64 |
+
<h3 class="text-lg font-medium text-purple-800 mb-3">Choisis ton dhikr</h3>
|
65 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
66 |
+
<div class="dhikr-option bg-white border-2 border-purple-200 rounded-xl p-3 text-center cursor-pointer" data-dhikr="subhanallah">
|
67 |
+
<div class="w-12 h-12 mx-auto mb-2 bg-purple-100 rounded-full flex items-center justify-center">
|
68 |
+
<i class="fas fa-sun text-purple-600 text-xl"></i>
|
69 |
+
</div>
|
70 |
+
<p class="text-sm font-medium text-purple-800">Subhanallah</p>
|
71 |
+
<p class="text-xs text-purple-600">Gloire à Allah</p>
|
72 |
+
</div>
|
73 |
+
<div class="dhikr-option bg-white border-2 border-purple-200 rounded-xl p-3 text-center cursor-pointer" data-dhikr="alhamdulillah">
|
74 |
+
<div class="w-12 h-12 mx-auto mb-2 bg-green-100 rounded-full flex items-center justify-center">
|
75 |
+
<i class="fas fa-hands-praying text-green-600 text-xl"></i>
|
76 |
+
</div>
|
77 |
+
<p class="text-sm font-medium text-purple-800">Alhamdulillah</p>
|
78 |
+
<p class="text-xs text-purple-600">Louange à Allah</p>
|
79 |
+
</div>
|
80 |
+
<div class="dhikr-option bg-white border-2 border-purple-200 rounded-xl p-3 text-center cursor-pointer" data-dhikr="allahuakbar">
|
81 |
+
<div class="w-12 h-12 mx-auto mb-2 bg-blue-100 rounded-full flex items-center justify-center">
|
82 |
+
<i class="fas fa-mountain text-blue-600 text-xl"></i>
|
83 |
+
</div>
|
84 |
+
<p class="text-sm font-medium text-purple-800">Allahu Akbar</p>
|
85 |
+
<p class="text-xs text-purple-600">Allah est Grand</p>
|
86 |
+
</div>
|
87 |
+
<div class="dhikr-option bg-white border-2 border-purple-200 rounded-xl p-3 text-center cursor-pointer" data-dhikr="astaghfirullah">
|
88 |
+
<div class="w-12 h-12 mx-auto mb-2 bg-yellow-100 rounded-full flex items-center justify-center">
|
89 |
+
<i class="fas fa-hand-holding-heart text-yellow-600 text-xl"></i>
|
90 |
+
</div>
|
91 |
+
<p class="text-sm font-medium text-purple-800">Astaghfirullah</p>
|
92 |
+
<p class="text-xs text-purple-600">Je demande pardon</p>
|
93 |
+
</div>
|
94 |
+
<div class="dhikr-option bg-white border-2 border-purple-200 rounded-xl p-3 text-center cursor-pointer" data-dhikr="laillahaillallah">
|
95 |
+
<div class="w-12 h-12 mx-auto mb-2 bg-red-100 rounded-full flex items-center justify-center">
|
96 |
+
<i class="fas fa-star text-red-600 text-xl"></i>
|
97 |
+
</div>
|
98 |
+
<p class="text-sm font-medium text-purple-800">La ilaha illallah</p>
|
99 |
+
<p class="text-xs text-purple-600">Pas de divinité sauf Allah</p>
|
100 |
+
</div>
|
101 |
+
<div class="dhikr-option bg-white border-2 border-purple-200 rounded-xl p-3 text-center cursor-pointer" data-dhikr="salat">
|
102 |
+
<div class="w-12 h-12 mx-auto mb-2 bg-indigo-100 rounded-full flex items-center justify-center">
|
103 |
+
<i class="fas fa-mosque text-indigo-600 text-xl"></i>
|
104 |
+
</div>
|
105 |
+
<p class="text-sm font-medium text-purple-800">Salat ala Nabi</p>
|
106 |
+
<p class="text-xs text-purple-600">Prière sur le Prophète</p>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
<!-- Selected Dhikr Display -->
|
112 |
+
<div id="selectedDhikrContainer" class="hidden">
|
113 |
+
<div class="flex flex-col items-center mb-8">
|
114 |
+
<div class="relative w-48 h-48 mb-6">
|
115 |
+
<svg class="w-full h-full" viewBox="0 0 100 100">
|
116 |
+
<!-- Background circle -->
|
117 |
+
<circle class="text-purple-100" stroke-width="8" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" />
|
118 |
+
<!-- Progress circle -->
|
119 |
+
<circle class="text-purple-600 progress-ring__circle" stroke-width="8" stroke-linecap="round" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50"
|
120 |
+
stroke-dasharray="251.2" stroke-dashoffset="calc(251.2 - (251.2 * var(--progress)) / 100)" />
|
121 |
+
</svg>
|
122 |
+
<div class="absolute inset-0 flex items-center justify-center flex-col">
|
123 |
+
<span id="counter" class="text-5xl font-bold text-purple-800">0</span>
|
124 |
+
<span class="text-purple-600">/ <span id="dailyGoal">100</span></span>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
<div class="text-center mb-6">
|
129 |
+
<p class="text-purple-700 mb-2">Dis :</p>
|
130 |
+
<p id="dhikrArabic" class="text-2xl font-arabic text-purple-900 mb-2">سُبْحَانَ اللَّهِ</p>
|
131 |
+
<p id="dhikrTranslation" class="text-purple-600">"Gloire à Allah"</p>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<button id="dhikrBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-8 rounded-full text-lg transition-all transform hover:scale-105 shadow-lg">
|
135 |
+
<i class="fas fa-hands-praying mr-2"></i> J'ai fait un Dhikr
|
136 |
+
</button>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<div class="bg-purple-50 rounded-xl p-4">
|
140 |
+
<h3 class="font-semibold text-purple-800 mb-2">Objectif du jour</h3>
|
141 |
+
<div class="w-full bg-purple-200 rounded-full h-4">
|
142 |
+
<div id="dailyProgress" class="bg-purple-600 h-4 rounded-full" style="width: 0%"></div>
|
143 |
+
</div>
|
144 |
+
<p class="text-purple-700 text-sm mt-2"><span id="dailyCount">0</span>/<span id="dailyGoalText">100</span> - Continue comme ça !</p>
|
145 |
+
</div>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
|
149 |
+
<!-- Rewards Section -->
|
150 |
+
<div class="bg-white rounded-2xl shadow-xl p-6 flex-1">
|
151 |
+
<div class="flex justify-between items-center mb-6">
|
152 |
+
<h2 class="text-2xl font-semibold text-purple-700">Mes Récompenses</h2>
|
153 |
+
<div class="flex items-center bg-yellow-100 px-3 py-1 rounded-full">
|
154 |
+
<i class="fas fa-star text-yellow-500 mr-1"></i>
|
155 |
+
<span id="totalStars" class="font-medium text-yellow-800">0</span>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
|
159 |
+
<div class="mb-6">
|
160 |
+
<h3 class="text-lg font-medium text-purple-800 mb-3">Prochaines récompenses</h3>
|
161 |
+
<div class="grid grid-cols-3 gap-4">
|
162 |
+
<div class="reward-card bg-purple-50 rounded-xl p-3 text-center border-2 border-purple-200">
|
163 |
+
<div class="w-16 h-16 mx-auto mb-2 bg-purple-100 rounded-full flex items-center justify-center">
|
164 |
+
<i class="fas fa-star text-yellow-400 text-2xl"></i>
|
165 |
+
</div>
|
166 |
+
<p class="text-sm text-purple-800">10 Dhikrs</p>
|
167 |
+
<button id="claim10" class="mt-2 bg-purple-200 text-purple-800 text-xs py-1 px-2 rounded-full disabled:opacity-50" disabled>
|
168 |
+
À gagner
|
169 |
+
</button>
|
170 |
+
</div>
|
171 |
+
<div class="reward-card bg-purple-50 rounded-xl p-3 text-center border-2 border-purple-200">
|
172 |
+
<div class="w-16 h-16 mx-auto mb-2 bg-purple-100 rounded-full flex items-center justify-center">
|
173 |
+
<i class="fas fa-trophy text-yellow-400 text-2xl"></i>
|
174 |
+
</div>
|
175 |
+
<p class="text-sm text-purple-800">50 Dhikrs</p>
|
176 |
+
<button id="claim50" class="mt-2 bg-purple-200 text-purple-800 text-xs py-1 px-2 rounded-full disabled:opacity-50" disabled>
|
177 |
+
À gagner
|
178 |
+
</button>
|
179 |
+
</div>
|
180 |
+
<div class="reward-card bg-purple-50 rounded-xl p-3 text-center border-2 border-purple-200">
|
181 |
+
<div class="w-16 h-16 mx-auto mb-2 bg-purple-100 rounded-full flex items-center justify-center">
|
182 |
+
<i class="fas fa-crown text-yellow-400 text-2xl"></i>
|
183 |
+
</div>
|
184 |
+
<p class="text-sm text-purple-800">100 Dhikrs</p>
|
185 |
+
<button id="claim100" class="mt-2 bg-purple-200 text-purple-800 text-xs py-1 px-2 rounded-full disabled:opacity-50" disabled>
|
186 |
+
À gagner
|
187 |
+
</button>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
|
192 |
+
<div>
|
193 |
+
<h3 class="text-lg font-medium text-purple-800 mb-3">Mes trophées</h3>
|
194 |
+
<div id="trophies" class="grid grid-cols-4 gap-3">
|
195 |
+
<!-- Trophies will appear here -->
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
|
199 |
+
<!-- Dhikr Stats -->
|
200 |
+
<div class="mt-8">
|
201 |
+
<h3 class="text-lg font-medium text-purple-800 mb-3">Mes statistiques</h3>
|
202 |
+
<div class="space-y-3">
|
203 |
+
<div>
|
204 |
+
<div class="flex justify-between text-sm text-purple-700 mb-1">
|
205 |
+
<span>Subhanallah</span>
|
206 |
+
<span id="subhanallahCount">0</span>
|
207 |
+
</div>
|
208 |
+
<div class="w-full bg-purple-100 rounded-full h-2">
|
209 |
+
<div class="bg-purple-400 h-2 rounded-full" style="width: 0%" id="subhanallahProgress"></div>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
<div>
|
213 |
+
<div class="flex justify-between text-sm text-purple-700 mb-1">
|
214 |
+
<span>Alhamdulillah</span>
|
215 |
+
<span id="alhamdulillahCount">0</span>
|
216 |
+
</div>
|
217 |
+
<div class="w-full bg-green-100 rounded-full h-2">
|
218 |
+
<div class="bg-green-400 h-2 rounded-full" style="width: 0%" id="alhamdulillahProgress"></div>
|
219 |
+
</div>
|
220 |
+
</div>
|
221 |
+
<div>
|
222 |
+
<div class="flex justify-between text-sm text-purple-700 mb-1">
|
223 |
+
<span>Allahu Akbar</span>
|
224 |
+
<span id="allahuakbarCount">0</span>
|
225 |
+
</div>
|
226 |
+
<div class="w-full bg-blue-100 rounded-full h-2">
|
227 |
+
<div class="bg-blue-400 h-2 rounded-full" style="width: 0%" id="allahuakbarProgress"></div>
|
228 |
+
</div>
|
229 |
+
</div>
|
230 |
+
<div>
|
231 |
+
<div class="flex justify-between text-sm text-purple-700 mb-1">
|
232 |
+
<span>Astaghfirullah</span>
|
233 |
+
<span id="astaghfirullahCount">0</span>
|
234 |
+
</div>
|
235 |
+
<div class="w-full bg-yellow-100 rounded-full h-2">
|
236 |
+
<div class="bg-yellow-400 h-2 rounded-full" style="width: 0%" id="astaghfirullahProgress"></div>
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
<div>
|
240 |
+
<div class="flex justify-between text-sm text-purple-700 mb-1">
|
241 |
+
<span>La ilaha illallah</span>
|
242 |
+
<span id="laillahaillallahCount">0</span>
|
243 |
+
</div>
|
244 |
+
<div class="w-full bg-red-100 rounded-full h-2">
|
245 |
+
<div class="bg-red-400 h-2 rounded-full" style="width: 0%" id="laillahaillallahProgress"></div>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
<div>
|
249 |
+
<div class="flex justify-between text-sm text-purple-700 mb-1">
|
250 |
+
<span>Salat ala Nabi</span>
|
251 |
+
<span id="salatCount">0</span>
|
252 |
+
</div>
|
253 |
+
<div class="w-full bg-indigo-100 rounded-full h-2">
|
254 |
+
<div class="bg-indigo-400 h-2 rounded-full" style="width: 0%" id="salatProgress"></div>
|
255 |
+
</div>
|
256 |
+
</div>
|
257 |
+
</div>
|
258 |
+
</div>
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
|
262 |
+
<!-- Celebration Modal -->
|
263 |
+
<div id="celebrationModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
264 |
+
<div class="bg-white rounded-2xl p-8 max-w-md w-full mx-4 text-center relative">
|
265 |
+
<button id="closeModal" class="absolute top-4 right-4 text-gray-500 hover:text-gray-700">
|
266 |
+
<i class="fas fa-times"></i>
|
267 |
+
</button>
|
268 |
+
<div class="bounce-animation text-6xl text-yellow-400 mb-4">
|
269 |
+
<i id="modalIcon" class="fas fa-trophy"></i>
|
270 |
+
</div>
|
271 |
+
<h3 class="text-2xl font-bold text-purple-800 mb-2">Félicitations !</h3>
|
272 |
+
<p id="modalMessage" class="text-purple-600 mb-4">Tu as gagné une récompense !</p>
|
273 |
+
<div class="flex justify-center">
|
274 |
+
<div class="star-reward bg-yellow-100 rounded-full w-16 h-16 flex items-center justify-center">
|
275 |
+
<i class="fas fa-star text-yellow-400 text-3xl"></i>
|
276 |
+
<span class="absolute text-yellow-800 font-bold text-sm">+1</span>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
</div>
|
281 |
+
</div>
|
282 |
+
|
283 |
+
<script>
|
284 |
+
document.addEventListener('DOMContentLoaded', function() {
|
285 |
+
// Elements
|
286 |
+
const dhikrBtn = document.getElementById('dhikrBtn');
|
287 |
+
const counter = document.getElementById('counter');
|
288 |
+
const dailyCount = document.getElementById('dailyCount');
|
289 |
+
const dailyProgress = document.getElementById('dailyProgress');
|
290 |
+
const dailyGoal = document.getElementById('dailyGoal');
|
291 |
+
const dailyGoalText = document.getElementById('dailyGoalText');
|
292 |
+
const totalStars = document.getElementById('totalStars');
|
293 |
+
const claim10 = document.getElementById('claim10');
|
294 |
+
const claim50 = document.getElementById('claim50');
|
295 |
+
const claim100 = document.getElementById('claim100');
|
296 |
+
const trophiesContainer = document.getElementById('trophies');
|
297 |
+
const celebrationModal = document.getElementById('celebrationModal');
|
298 |
+
const modalMessage = document.getElementById('modalMessage');
|
299 |
+
const modalIcon = document.getElementById('modalIcon');
|
300 |
+
const closeModal = document.getElementById('closeModal');
|
301 |
+
const dhikrOptions = document.querySelectorAll('.dhikr-option');
|
302 |
+
const selectedDhikrContainer = document.getElementById('selectedDhikrContainer');
|
303 |
+
const dhikrArabic = document.getElementById('dhikrArabic');
|
304 |
+
const dhikrTranslation = document.getElementById('dhikrTranslation');
|
305 |
+
|
306 |
+
// Dhikr data
|
307 |
+
const dhikrData = {
|
308 |
+
subhanallah: {
|
309 |
+
arabic: "سُبْحَانَ اللَّهِ",
|
310 |
+
translation: "Gloire à Allah",
|
311 |
+
color: "purple",
|
312 |
+
icon: "fa-sun",
|
313 |
+
dailyGoal: 33
|
314 |
+
},
|
315 |
+
alhamdulillah: {
|
316 |
+
arabic: "الْحَمْدُ لِلَّهِ",
|
317 |
+
translation: "Louange à Allah",
|
318 |
+
color: "green",
|
319 |
+
icon: "fa-hands-praying",
|
320 |
+
dailyGoal: 33
|
321 |
+
},
|
322 |
+
allahuakbar: {
|
323 |
+
arabic: "اللهُ أَكْبَرُ",
|
324 |
+
translation: "Allah est Grand",
|
325 |
+
color: "blue",
|
326 |
+
icon: "fa-mountain",
|
327 |
+
dailyGoal: 34
|
328 |
+
},
|
329 |
+
astaghfirullah: {
|
330 |
+
arabic: "أَسْتَغْفِرُ اللَّهَ",
|
331 |
+
translation: "Je demande pardon à Allah",
|
332 |
+
color: "yellow",
|
333 |
+
icon: "fa-hand-holding-heart",
|
334 |
+
dailyGoal: 25
|
335 |
+
},
|
336 |
+
laillahaillallah: {
|
337 |
+
arabic: "لَا إِلَٰهَ إِلَّا اللَّهُ",
|
338 |
+
translation: "Pas de divinité sauf Allah",
|
339 |
+
color: "red",
|
340 |
+
icon: "fa-star",
|
341 |
+
dailyGoal: 50
|
342 |
+
},
|
343 |
+
salat: {
|
344 |
+
arabic: "اللَّهُمَّ صَلِّ عَلَى مُحَمَّدٍ",
|
345 |
+
translation: "Ô Allah, prie sur Mohammed",
|
346 |
+
color: "indigo",
|
347 |
+
icon: "fa-mosque",
|
348 |
+
dailyGoal: 10
|
349 |
+
}
|
350 |
+
};
|
351 |
+
|
352 |
+
// State
|
353 |
+
let currentDhikr = null;
|
354 |
+
let counts = {
|
355 |
+
subhanallah: localStorage.getItem('subhanallahCount') ? parseInt(localStorage.getItem('subhanallahCount')) : 0,
|
356 |
+
alhamdulillah: localStorage.getItem('alhamdulillahCount') ? parseInt(localStorage.getItem('alhamdulillahCount')) : 0,
|
357 |
+
allahuakbar: localStorage.getItem('allahuakbarCount') ? parseInt(localStorage.getItem('allahuakbarCount')) : 0,
|
358 |
+
astaghfirullah: localStorage.getItem('astaghfirullahCount') ? parseInt(localStorage.getItem('astaghfirullahCount')) : 0,
|
359 |
+
laillahaillallah: localStorage.getItem('laillahaillallahCount') ? parseInt(localStorage.getItem('laillahaillallahCount')) : 0,
|
360 |
+
salat: localStorage.getItem('salatCount') ? parseInt(localStorage.getItem('salatCount')) : 0,
|
361 |
+
today: localStorage.getItem('todayCount') ? parseInt(localStorage.getItem('todayCount')) : 0
|
362 |
+
};
|
363 |
+
let stars = localStorage.getItem('stars') ? parseInt(localStorage.getItem('stars')) : 0;
|
364 |
+
let claimedRewards = localStorage.getItem('claimedRewards') ? JSON.parse(localStorage.getItem('claimedRewards')) : [];
|
365 |
+
|
366 |
+
// Initialize
|
367 |
+
updateStatsDisplay();
|
368 |
+
updateRewardButtons();
|
369 |
+
updateTrophies();
|
370 |
+
|
371 |
+
// Event Listeners
|
372 |
+
dhikrBtn.addEventListener('click', addDhikr);
|
373 |
+
claim10.addEventListener('click', () => claimReward(10));
|
374 |
+
claim50.addEventListener('click', () => claimReward(50));
|
375 |
+
claim100.addEventListener('click', () => claimReward(100));
|
376 |
+
closeModal.addEventListener('click', () => celebrationModal.classList.add('hidden'));
|
377 |
+
|
378 |
+
dhikrOptions.forEach(option => {
|
379 |
+
option.addEventListener('click', function() {
|
380 |
+
const dhikrType = this.getAttribute('data-dhikr');
|
381 |
+
selectDhikr(dhikrType);
|
382 |
+
});
|
383 |
+
});
|
384 |
+
|
385 |
+
// Functions
|
386 |
+
function selectDhikr(dhikrType) {
|
387 |
+
currentDhikr = dhikrType;
|
388 |
+
|
389 |
+
// Update UI
|
390 |
+
dhikrOptions.forEach(option => {
|
391 |
+
option.classList.remove('selected');
|
392 |
+
if (option.getAttribute('data-dhikr') === dhikrType) {
|
393 |
+
option.classList.add('selected');
|
394 |
+
}
|
395 |
+
});
|
396 |
+
|
397 |
+
const dhikr = dhikrData[dhikrType];
|
398 |
+
dhikrArabic.textContent = dhikr.arabic;
|
399 |
+
dhikrTranslation.textContent = `"${dhikr.translation}"`;
|
400 |
+
dailyGoal.textContent = dhikr.dailyGoal;
|
401 |
+
dailyGoalText.textContent = dhikr.dailyGoal;
|
402 |
+
|
403 |
+
// Update counter with today's count
|
404 |
+
counter.textContent = counts.today;
|
405 |
+
dailyCount.textContent = counts.today;
|
406 |
+
dailyProgress.style.width = `${Math.min(100, (counts.today / dhikr.dailyGoal) * 100)}%`;
|
407 |
+
|
408 |
+
// Update progress ring
|
409 |
+
const progressCircle = document.querySelector('.progress-ring__circle');
|
410 |
+
const progress = Math.min(100, (counts.today / dhikr.dailyGoal) * 100);
|
411 |
+
progressCircle.style.setProperty('--progress', progress);
|
412 |
+
|
413 |
+
// Show the dhikr container
|
414 |
+
selectedDhikrContainer.classList.remove('hidden');
|
415 |
+
|
416 |
+
// Change button color based on selected dhikr
|
417 |
+
dhikrBtn.className = `bg-${dhikr.color}-600 hover:bg-${dhikr.color}-700 text-white font-bold py-3 px-8 rounded-full text-lg transition-all transform hover:scale-105 shadow-lg`;
|
418 |
+
}
|
419 |
+
|
420 |
+
function addDhikr() {
|
421 |
+
if (!currentDhikr) return;
|
422 |
+
|
423 |
+
counts[currentDhikr]++;
|
424 |
+
counts.today++;
|
425 |
+
|
426 |
+
// Save to localStorage
|
427 |
+
localStorage.setItem(`${currentDhikr}Count`, counts[currentDhikr]);
|
428 |
+
localStorage.setItem('todayCount', counts.today);
|
429 |
+
|
430 |
+
updateCounter();
|
431 |
+
updateProgressRing();
|
432 |
+
updateRewardButtons();
|
433 |
+
updateStatsDisplay();
|
434 |
+
|
435 |
+
// Animation
|
436 |
+
dhikrBtn.classList.add('animate-pulse');
|
437 |
+
setTimeout(() => {
|
438 |
+
dhikrBtn.classList.remove('animate-pulse');
|
439 |
+
}, 300);
|
440 |
+
|
441 |
+
// Check for rewards
|
442 |
+
checkForRewards();
|
443 |
+
|
444 |
+
// Create floating dhikr text
|
445 |
+
createFloatingDhikr();
|
446 |
+
}
|
447 |
+
|
448 |
+
function createFloatingDhikr() {
|
449 |
+
const dhikr = dhikrData[currentDhikr];
|
450 |
+
const floatingText = document.createElement('div');
|
451 |
+
floatingText.className = `absolute text-${dhikr.color}-600 font-arabic text-xl font-bold opacity-0`;
|
452 |
+
floatingText.textContent = dhikr.arabic;
|
453 |
+
floatingText.style.top = `${Math.random() * 50 + 25}%`;
|
454 |
+
floatingText.style.left = `${Math.random() * 80 + 10}%`;
|
455 |
+
floatingText.style.animation = 'floatUp 2s forwards';
|
456 |
+
|
457 |
+
document.body.appendChild(floatingText);
|
458 |
+
|
459 |
+
setTimeout(() => {
|
460 |
+
floatingText.remove();
|
461 |
+
}, 2000);
|
462 |
+
}
|
463 |
+
|
464 |
+
function updateCounter() {
|
465 |
+
const dhikr = dhikrData[currentDhikr];
|
466 |
+
counter.textContent = counts.today;
|
467 |
+
dailyCount.textContent = counts.today;
|
468 |
+
dailyProgress.style.width = `${Math.min(100, (counts.today / dhikr.dailyGoal) * 100)}%`;
|
469 |
+
}
|
470 |
+
|
471 |
+
function updateProgressRing() {
|
472 |
+
const dhikr = dhikrData[currentDhikr];
|
473 |
+
const progressCircle = document.querySelector('.progress-ring__circle');
|
474 |
+
const progress = Math.min(100, (counts.today / dhikr.dailyGoal) * 100);
|
475 |
+
progressCircle.style.setProperty('--progress', progress);
|
476 |
+
}
|
477 |
+
|
478 |
+
function updateRewardButtons() {
|
479 |
+
const totalCount = Object.values(counts).reduce((a, b) => a + b, 0) - counts.today;
|
480 |
+
|
481 |
+
if (totalCount >= 10 && !claimedRewards.includes(10)) {
|
482 |
+
claim10.disabled = false;
|
483 |
+
claim10.classList.remove('bg-purple-200');
|
484 |
+
claim10.classList.add('bg-yellow-400', 'hover:bg-yellow-500');
|
485 |
+
claim10.textContent = 'Récupérer !';
|
486 |
+
}
|
487 |
+
|
488 |
+
if (totalCount >= 50 && !claimedRewards.includes(50)) {
|
489 |
+
claim50.disabled = false;
|
490 |
+
claim50.classList.remove('bg-purple-200');
|
491 |
+
claim50.classList.add('bg-yellow-400', 'hover:bg-yellow-500');
|
492 |
+
claim50.textContent = 'Récupérer !';
|
493 |
+
}
|
494 |
+
|
495 |
+
if (totalCount >= 100 && !claimedRewards.includes(100)) {
|
496 |
+
claim100.disabled = false;
|
497 |
+
claim100.classList.remove('bg-purple-200');
|
498 |
+
claim100.classList.add('bg-yellow-400', 'hover:bg-yellow-500');
|
499 |
+
claim100.textContent = 'Récupérer !';
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
function checkForRewards() {
|
504 |
+
const dhikr = dhikrData[currentDhikr];
|
505 |
+
|
506 |
+
// Check for daily completion
|
507 |
+
if (counts.today === dhikr.dailyGoal) {
|
508 |
+
showCelebration(`Tu as terminé ton objectif quotidien pour ${dhikr.translation}!`, dhikr.icon);
|
509 |
+
addStars(1);
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
function claimReward(threshold) {
|
514 |
+
const totalCount = Object.values(counts).reduce((a, b) => a + b, 0) - counts.today;
|
515 |
+
|
516 |
+
if (totalCount >= threshold && !claimedRewards.includes(threshold)) {
|
517 |
+
claimedRewards.push(threshold);
|
518 |
+
localStorage.setItem('claimedRewards', JSON.stringify(claimedRewards));
|
519 |
+
|
520 |
+
let starsToAdd = 0;
|
521 |
+
let message = "";
|
522 |
+
let icon = "fa-trophy";
|
523 |
+
|
524 |
+
switch(threshold) {
|
525 |
+
case 10:
|
526 |
+
starsToAdd = 1;
|
527 |
+
message = "Bravo pour tes 10 dhikrs !";
|
528 |
+
icon = "fa-star";
|
529 |
+
break;
|
530 |
+
case 50:
|
531 |
+
starsToAdd = 3;
|
532 |
+
message = "Incroyable ! 50 dhikrs !";
|
533 |
+
icon = "fa-trophy";
|
534 |
+
break;
|
535 |
+
case 100:
|
536 |
+
starsToAdd = 5;
|
537 |
+
message = "100 dhikrs ! Tu es un champion !";
|
538 |
+
icon = "fa-crown";
|
539 |
+
break;
|
540 |
+
}
|
541 |
+
|
542 |
+
addStars(starsToAdd);
|
543 |
+
showCelebration(message, icon);
|
544 |
+
updateRewardButtons();
|
545 |
+
updateTrophies();
|
546 |
+
}
|
547 |
+
}
|
548 |
+
|
549 |
+
function addStars(amount) {
|
550 |
+
stars += amount;
|
551 |
+
localStorage.setItem('stars', stars);
|
552 |
+
totalStars.textContent = stars;
|
553 |
+
|
554 |
+
// Star animation
|
555 |
+
for (let i = 0; i < amount; i++) {
|
556 |
+
setTimeout(() => {
|
557 |
+
const starElement = document.createElement('div');
|
558 |
+
starElement.innerHTML = '<i class="fas fa-star text-yellow-400"></i>';
|
559 |
+
starElement.className = 'absolute text-2xl animate-ping';
|
560 |
+
starElement.style.top = `${Math.random() * 100}%`;
|
561 |
+
starElement.style.left = `${Math.random() * 100}%`;
|
562 |
+
document.body.appendChild(starElement);
|
563 |
+
|
564 |
+
setTimeout(() => {
|
565 |
+
starElement.remove();
|
566 |
+
}, 1000);
|
567 |
+
}, i * 200);
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
function showCelebration(message, icon) {
|
572 |
+
modalMessage.textContent = message;
|
573 |
+
modalIcon.className = `fas ${icon} text-6xl text-yellow-400 mb-4 bounce-animation`;
|
574 |
+
celebrationModal.classList.remove('hidden');
|
575 |
+
|
576 |
+
// Confetti effect
|
577 |
+
for (let i = 0; i < 50; i++) {
|
578 |
+
setTimeout(() => {
|
579 |
+
const confetti = document.createElement('div');
|
580 |
+
confetti.className = 'absolute w-2 h-2 rounded-full fall-animation';
|
581 |
+
confetti.style.backgroundColor = `hsl(${Math.random() * 360}, 100%, 50%)`;
|
582 |
+
confetti.style.left = `${Math.random() * 100}%`;
|
583 |
+
confetti.style.top = `-10px`;
|
584 |
+
confetti.style.transform = `rotate(${Math.random() * 360}deg)`;
|
585 |
+
confetti.style.animationDuration = `${Math.random() * 3 + 2}s`;
|
586 |
+
|
587 |
+
document.getElementById('celebrationModal').appendChild(confetti);
|
588 |
+
|
589 |
+
setTimeout(() => {
|
590 |
+
confetti.remove();
|
591 |
+
}, 3000);
|
592 |
+
}, i * 100);
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
function updateTrophies() {
|
597 |
+
trophiesContainer.innerHTML = '';
|
598 |
+
|
599 |
+
if (claimedRewards.includes(10)) {
|
600 |
+
addTrophy('10 dhikrs', 'fas fa-star', 'bg-yellow-100 text-yellow-600');
|
601 |
+
}
|
602 |
+
|
603 |
+
if (claimedRewards.includes(50)) {
|
604 |
+
addTrophy('50 dhikrs', 'fas fa-trophy', 'bg-purple-100 text-purple-600');
|
605 |
+
}
|
606 |
+
|
607 |
+
if (claimedRewards.includes(100)) {
|
608 |
+
addTrophy('100 dhikrs', 'fas fa-crown', 'bg-green-100 text-green-600');
|
609 |
+
}
|
610 |
+
|
611 |
+
// Add special trophies for completing daily goals
|
612 |
+
Object.entries(counts).forEach(([dhikrType, count]) => {
|
613 |
+
if (dhikrType !== 'today' && count >= dhikrData[dhikrType].dailyGoal) {
|
614 |
+
addTrophy(`${dhikrData[dhikrType].translation}`, `fas ${dhikrData[dhikrType].icon}`, `bg-${dhikrData[dhikrType].color}-100 text-${dhikrData[dhikrType].color}-600`);
|
615 |
+
}
|
616 |
+
});
|
617 |
+
}
|
618 |
+
|
619 |
+
function addTrophy(title, icon, colors) {
|
620 |
+
const trophy = document.createElement('div');
|
621 |
+
trophy.className = 'flex flex-col items-center';
|
622 |
+
trophy.innerHTML = `
|
623 |
+
<div class="w-12 h-12 rounded-full ${colors.split(' ')[0]} flex items-center justify-center mb-1">
|
624 |
+
<i class="${icon} ${colors.split(' ')[1]} text-xl"></i>
|
625 |
+
</div>
|
626 |
+
<span class="text-xs text-center text-gray-700">${title}</span>
|
627 |
+
`;
|
628 |
+
trophiesContainer.appendChild(trophy);
|
629 |
+
}
|
630 |
+
|
631 |
+
function updateStatsDisplay() {
|
632 |
+
document.getElementById('subhanallahCount').textContent = counts.subhanallah;
|
633 |
+
document.getElementById('alhamdulillahCount').textContent = counts.alhamdulillah;
|
634 |
+
document.getElementById('allahuakbarCount').textContent = counts.allahuakbar;
|
635 |
+
document.getElementById('astaghfirullahCount').textContent = counts.astaghfirullah;
|
636 |
+
document.getElementById('laillahaillallahCount').textContent = counts.laillahaillallah;
|
637 |
+
document.getElementById('salatCount').textContent = counts.salat;
|
638 |
+
|
639 |
+
// Update progress bars
|
640 |
+
document.getElementById('subhanallahProgress').style.width = `${Math.min(100, (counts.subhanallah / 100) * 100)}%`;
|
641 |
+
document.getElementById('alhamdulillahProgress').style.width = `${Math.min(100, (counts.alhamdulillah / 100) * 100)}%`;
|
642 |
+
document.getElementById('allahuakbarProgress').style.width = `${Math.min(100, (counts.allahuakbar / 100) * 100)}%`;
|
643 |
+
document.getElementById('astaghfirullahProgress').style.width = `${Math.min(100, (counts.astaghfirullah / 100) * 100)}%`;
|
644 |
+
document.getElementById('laillahaillallahProgress').style.width = `${Math.min(100, (counts.laillahaillallah / 100) * 100)}%`;
|
645 |
+
document.getElementById('salatProgress').style.width = `${Math.min(100, (counts.salat / 100) * 100)}%`;
|
646 |
+
}
|
647 |
+
});
|
648 |
+
</script>
|
649 |
+
<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=Adamchab/dhikr-enfant" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
650 |
+
</html>
|