Spaces:
Running
Running
undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +588 -19
- prompts.txt +0 -0
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: diabagate
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: pink
|
| 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,588 @@
|
|
| 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>MathAventure - Apprends les maths en t'amusant!</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 |
+
.math-bg {
|
| 11 |
+
background: linear-gradient(135deg, #6b73ff 0%, #000dff 100%);
|
| 12 |
+
}
|
| 13 |
+
.progress-bar {
|
| 14 |
+
height: 10px;
|
| 15 |
+
transition: width 0.3s ease;
|
| 16 |
+
}
|
| 17 |
+
.card-hover:hover {
|
| 18 |
+
transform: translateY(-5px);
|
| 19 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
| 20 |
+
}
|
| 21 |
+
.floating {
|
| 22 |
+
animation: floating 3s ease-in-out infinite;
|
| 23 |
+
}
|
| 24 |
+
@keyframes floating {
|
| 25 |
+
0% { transform: translateY(0px); }
|
| 26 |
+
50% { transform: translateY(-10px); }
|
| 27 |
+
100% { transform: translateY(0px); }
|
| 28 |
+
}
|
| 29 |
+
.confetti {
|
| 30 |
+
position: absolute;
|
| 31 |
+
width: 10px;
|
| 32 |
+
height: 10px;
|
| 33 |
+
background-color: #f00;
|
| 34 |
+
opacity: 0;
|
| 35 |
+
}
|
| 36 |
+
</style>
|
| 37 |
+
</head>
|
| 38 |
+
<body class="math-bg min-h-screen font-sans text-gray-800">
|
| 39 |
+
<div class="container mx-auto px-4 py-8">
|
| 40 |
+
<!-- Header -->
|
| 41 |
+
<header class="flex flex-col md:flex-row items-center justify-between mb-8">
|
| 42 |
+
<div class="flex items-center mb-4 md:mb-0">
|
| 43 |
+
<i class="fas fa-square-root-alt text-4xl text-yellow-300 mr-3"></i>
|
| 44 |
+
<h1 class="text-3xl font-bold text-white">Math<span class="text-yellow-300">Aventure</span></h1>
|
| 45 |
+
</div>
|
| 46 |
+
<div class="flex items-center space-x-4">
|
| 47 |
+
<div class="flex items-center">
|
| 48 |
+
<span class="text-white mr-2">Niveau:</span>
|
| 49 |
+
<span id="level" class="bg-yellow-400 text-gray-800 font-bold px-3 py-1 rounded-full">1</span>
|
| 50 |
+
</div>
|
| 51 |
+
<div class="flex items-center">
|
| 52 |
+
<span class="text-white mr-2">Points:</span>
|
| 53 |
+
<span id="points" class="bg-green-500 text-white font-bold px-3 py-1 rounded-full">0</span>
|
| 54 |
+
</div>
|
| 55 |
+
<div class="flex items-center">
|
| 56 |
+
<i class="fas fa-heart text-red-500 mr-1"></i>
|
| 57 |
+
<span id="lives" class="text-white">3</span>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
</header>
|
| 61 |
+
|
| 62 |
+
<!-- Progress Bar -->
|
| 63 |
+
<div class="bg-white bg-opacity-30 rounded-full mb-8 overflow-hidden">
|
| 64 |
+
<div id="progress" class="progress-bar bg-green-400" style="width: 0%"></div>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<!-- Main Content -->
|
| 68 |
+
<main class="bg-white rounded-2xl shadow-xl overflow-hidden">
|
| 69 |
+
<!-- Dashboard View -->
|
| 70 |
+
<div id="dashboard-view" class="p-6">
|
| 71 |
+
<div class="text-center mb-10">
|
| 72 |
+
<h2 class="text-2xl md:text-3xl font-bold text-gray-800 mb-4">Bienvenue DIABAGATE sionga Kenza dans ton aventure mathématique!</h2>
|
| 73 |
+
<p class="text-gray-600 max-w-2xl mx-auto">Choisis un thème pour commencer à apprendre et à relever des défis.</p>
|
| 74 |
+
</div>
|
| 75 |
+
|
| 76 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
| 77 |
+
<div class="bg-blue-50 rounded-xl p-6 text-center cursor-pointer transition-all duration-300 card-hover challenge-card" data-topic="algebra">
|
| 78 |
+
<div class="bg-blue-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 79 |
+
<i class="fas fa-xmark text-blue-600 text-2xl"></i>
|
| 80 |
+
</div>
|
| 81 |
+
<h3 class="font-bold text-lg mb-2">Algèbre</h3>
|
| 82 |
+
<p class="text-sm text-gray-600 mb-3">Équations, expressions et plus encore</p>
|
| 83 |
+
<span class="text-xs bg-blue-200 text-blue-800 px-2 py-1 rounded-full">12 défis</span>
|
| 84 |
+
</div>
|
| 85 |
+
|
| 86 |
+
<div class="bg-green-50 rounded-xl p-6 text-center cursor-pointer transition-all duration-300 card-hover challenge-card" data-topic="geometry">
|
| 87 |
+
<div class="bg-green-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 88 |
+
<i class="fas fa-shapes text-green-600 text-2xl"></i>
|
| 89 |
+
</div>
|
| 90 |
+
<h3 class="font-bold text-lg mb-2">Géométrie</h3>
|
| 91 |
+
<p class="text-sm text-gray-600 mb-3">Formes, angles et calculs</p>
|
| 92 |
+
<span class="text-xs bg-green-200 text-green-800 px-2 py-1 rounded-full">8 défis</span>
|
| 93 |
+
</div>
|
| 94 |
+
|
| 95 |
+
<div class="bg-yellow-50 rounded-xl p-6 text-center cursor-pointer transition-all duration-300 card-hover challenge-card" data-topic="arithmetic">
|
| 96 |
+
<div class="bg-yellow-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 97 |
+
<i class="fas fa-calculator text-yellow-600 text-2xl"></i>
|
| 98 |
+
</div>
|
| 99 |
+
<h3 class="font-bold text-lg mb-2">Arithmétique</h3>
|
| 100 |
+
<p class="text-sm text-gray-600 mb-3">Nombres, fractions et pourcentages</p>
|
| 101 |
+
<span class="text-xs bg-yellow-200 text-yellow-800 px-2 py-1 rounded-full">15 défis</span>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<div class="bg-purple-50 rounded-xl p-6 text-center cursor-pointer transition-all duration-300 card-hover challenge-card" data-topic="probability">
|
| 105 |
+
<div class="bg-purple-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 106 |
+
<i class="fas fa-dice text-purple-600 text-2xl"></i>
|
| 107 |
+
</div>
|
| 108 |
+
<h3 class="font-bold text-lg mb-2">Probabilités</h3>
|
| 109 |
+
<p class="text-sm text-gray-600 mb-3">Chances, statistiques et analyse</p>
|
| 110 |
+
<span class="text-xs bg-purple-200 text-purple-800 px-2 py-1 rounded-full">6 défis</span>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
<div class="mt-10 text-center">
|
| 115 |
+
<button id="daily-challenge" class="bg-gradient-to-r from-pink-500 to-orange-500 text-white px-6 py-3 rounded-full font-bold hover:shadow-lg transition-all duration-300 floating">
|
| 116 |
+
<i class="fas fa-bolt mr-2"></i>Défi du jour
|
| 117 |
+
</button>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
<!-- Quiz View -->
|
| 122 |
+
<div id="quiz-view" class="hidden p-6">
|
| 123 |
+
<div class="flex justify-between items-center mb-6">
|
| 124 |
+
<button id="back-to-dashboard" class="text-gray-600 hover:text-gray-800">
|
| 125 |
+
<i class="fas fa-arrow-left mr-1"></i> Retour
|
| 126 |
+
</button>
|
| 127 |
+
<span id="current-topic" class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full font-medium"></span>
|
| 128 |
+
</div>
|
| 129 |
+
|
| 130 |
+
<div class="max-w-2xl mx-auto">
|
| 131 |
+
<div class="mb-8 text-center">
|
| 132 |
+
<h2 id="question" class="text-2xl font-bold mb-4"></h2>
|
| 133 |
+
<div id="question-image" class="hidden mx-auto mb-6 max-w-xs">
|
| 134 |
+
<!-- Image will be inserted here if available -->
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
|
| 138 |
+
<div id="options-container" class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-8">
|
| 139 |
+
<!-- Options will be inserted here -->
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<div id="answer-feedback" class="hidden bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6">
|
| 143 |
+
<p id="feedback-text"></p>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<div class="text-center">
|
| 147 |
+
<button id="submit-answer" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-bold transition-all">
|
| 148 |
+
Valider
|
| 149 |
+
</button>
|
| 150 |
+
<button id="next-question" class="hidden bg-green-600 hover:bg-green-700 text-white px-6 py-3 rounded-lg font-bold transition-all">
|
| 151 |
+
<i class="fas fa-forward mr-1"></i>Question suivante
|
| 152 |
+
</button>
|
| 153 |
+
</div>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
<!-- Results View -->
|
| 158 |
+
<div id="results-view" class="hidden p-6">
|
| 159 |
+
<div class="max-w-md mx-auto text-center py-10">
|
| 160 |
+
<div id="success-icon" class="hidden">
|
| 161 |
+
<div class="w-24 h-24 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6">
|
| 162 |
+
<i class="fas fa-trophy text-5xl text-yellow-500"></i>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
<div id="failure-icon" class="hidden">
|
| 166 |
+
<div class="w-24 h-24 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6">
|
| 167 |
+
<i class="fas fa-heart-broken text-5xl text-red-500"></i>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<h2 id="result-title" class="text-3xl font-bold mb-4"></h2>
|
| 172 |
+
<p id="result-message" class="text-gray-600 mb-6"></p>
|
| 173 |
+
|
| 174 |
+
<div class="bg-gray-100 rounded-lg p-4 mb-6">
|
| 175 |
+
<div class="flex justify-between items-center mb-2">
|
| 176 |
+
<span>Questions répondues:</span>
|
| 177 |
+
<span id="questions-answered"></span>
|
| 178 |
+
</div>
|
| 179 |
+
<div class="flex justify-between items-center mb-2">
|
| 180 |
+
<span>Bonnes réponses:</span>
|
| 181 |
+
<span id="correct-answers"></span>
|
| 182 |
+
</div>
|
| 183 |
+
<div class="flex justify-between items-center font-bold">
|
| 184 |
+
<span>Points gagnés:</span>
|
| 185 |
+
<span id="points-earned" class="text-green-600"></span>
|
| 186 |
+
</div>
|
| 187 |
+
</div>
|
| 188 |
+
|
| 189 |
+
<button id="return-to-dashboard" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-bold transition-all">
|
| 190 |
+
<i class="fas fa-home mr-2"></i>Retour à l'accueil
|
| 191 |
+
</button>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
</main>
|
| 195 |
+
|
| 196 |
+
<!-- Badges Section -->
|
| 197 |
+
<div id="badges-section" class="hidden mt-8 bg-white rounded-2xl shadow-xl p-6">
|
| 198 |
+
<h2 class="text-2xl font-bold mb-6 text-center">Tes badges</h2>
|
| 199 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-4">
|
| 200 |
+
<div class="text-center">
|
| 201 |
+
<div class="w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center mx-auto mb-2">
|
| 202 |
+
<i class="fas fa-lock text-gray-500"></i>
|
| 203 |
+
</div>
|
| 204 |
+
<span class="text-sm">Algèbre</span>
|
| 205 |
+
</div>
|
| 206 |
+
<div class="text-center">
|
| 207 |
+
<div class="w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center mx-auto mb-2">
|
| 208 |
+
<i class="fas fa-lock text-gray-500"></i>
|
| 209 |
+
</div>
|
| 210 |
+
<span class="text-sm">Géométrie</span>
|
| 211 |
+
</div>
|
| 212 |
+
<div class="text-center">
|
| 213 |
+
<div class="w-16 h-16 rounded-full bg-yellow-100 flex items-center justify-center mx-auto mb-2">
|
| 214 |
+
<i class="fas fa-star text-yellow-500"></i>
|
| 215 |
+
</div>
|
| 216 |
+
<span class="text-sm">Starter</span>
|
| 217 |
+
</div>
|
| 218 |
+
<div class="text-center">
|
| 219 |
+
<div class="w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center mx-auto mb-2">
|
| 220 |
+
<i class="fas fa-lock text-gray-500"></i>
|
| 221 |
+
</div>
|
| 222 |
+
<span class="text-sm">50 points</span>
|
| 223 |
+
</div>
|
| 224 |
+
<div class="text-center">
|
| 225 |
+
<div class="w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center mx-auto mb-2">
|
| 226 |
+
<i class="fas fa-lock text-gray-500"></i>
|
| 227 |
+
</div>
|
| 228 |
+
<span class="text-sm">Arithmétique</span>
|
| 229 |
+
</div>
|
| 230 |
+
<div class="text-center">
|
| 231 |
+
<div class="w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center mx-auto mb-2">
|
| 232 |
+
<i class="fas fa-lock text-gray-500"></i>
|
| 233 |
+
</div>
|
| 234 |
+
<span class="text-sm">Étoile montante</span>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
</div>
|
| 238 |
+
</div>
|
| 239 |
+
|
| 240 |
+
<script>
|
| 241 |
+
// Game Data
|
| 242 |
+
const gameData = {
|
| 243 |
+
level: 1,
|
| 244 |
+
points: 0,
|
| 245 |
+
lives: 3,
|
| 246 |
+
progress: 0,
|
| 247 |
+
currentTopic: null,
|
| 248 |
+
currentQuestion: 0,
|
| 249 |
+
correctAnswers: 0,
|
| 250 |
+
totalQuestions: 0,
|
| 251 |
+
|
| 252 |
+
topics: {
|
| 253 |
+
algebra: {
|
| 254 |
+
name: "Algèbre",
|
| 255 |
+
questions: [
|
| 256 |
+
{
|
| 257 |
+
question: "Résous l'équation: 3x + 5 = 20",
|
| 258 |
+
options: ["x = 5", "x = 6", "x = 4", "x = 5.5"],
|
| 259 |
+
correct: 0,
|
| 260 |
+
explanation: "Soustrais 5 des deux côtés: 3x = 15, puis divise par 3: x = 5"
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
question: "Simplifie l'expression: 2(3x + 4) - 5",
|
| 264 |
+
options: ["6x + 3", "6x - 3", "6x + 8", "6x - 1"],
|
| 265 |
+
correct: 0,
|
| 266 |
+
explanation: "D'abord distribuer: 6x + 8 - 5, puis simplifier: 6x + 3"
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
question: "Quelle est la solution de l'équation x² = 16?",
|
| 270 |
+
options: ["4", "8", "4 et -4", "2"],
|
| 271 |
+
correct: 2,
|
| 272 |
+
explanation: "Une équation du second degré peut avoir deux solutions: 4 et -4"
|
| 273 |
+
}
|
| 274 |
+
]
|
| 275 |
+
},
|
| 276 |
+
geometry: {
|
| 277 |
+
name: "Géométrie",
|
| 278 |
+
questions: [
|
| 279 |
+
{
|
| 280 |
+
question: "Quelle est l'aire d'un rectangle de largeur 5 cm et longueur 8 cm?",
|
| 281 |
+
options: ["13 cm²", "40 cm²", "20 cm²", "26 cm²"],
|
| 282 |
+
correct: 1,
|
| 283 |
+
explanation: "L'aire d'un rectangle = longueur × largeur = 8 × 5 = 40 cm²"
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
question: "Quelle est la formule pour le périmètre d'un cercle?",
|
| 287 |
+
options: ["πr²", "2πr", "4πr", "πd²"],
|
| 288 |
+
correct: 1,
|
| 289 |
+
explanation: "Le périmètre (circonférence) d'un cercle est donné par la formule 2πr"
|
| 290 |
+
}
|
| 291 |
+
]
|
| 292 |
+
},
|
| 293 |
+
arithmetic: {
|
| 294 |
+
name: "Arithmétique",
|
| 295 |
+
questions: [
|
| 296 |
+
{
|
| 297 |
+
question: "Quel est le résultat de 7 + 3 × 2?",
|
| 298 |
+
options: ["20", "13", "17", "16"],
|
| 299 |
+
correct: 1,
|
| 300 |
+
explanation: "Selon les règles d'ordre des opérations, on fait d'abord la multiplication: 3 × 2 = 6, puis 7 + 6 = 13"
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
question: "Convertis 3/5 en pourcentage",
|
| 304 |
+
options: ["30%", "60%", "35%", "50%"],
|
| 305 |
+
correct: 1,
|
| 306 |
+
explanation: "3/5 = 0.6 = 60%"
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
question: "Quel est le PGCD de 12 et 18?",
|
| 310 |
+
options: ["3", "6", "2", "9"],
|
| 311 |
+
correct: 1,
|
| 312 |
+
explanation: "Les diviseurs de 12 sont 1, 2, 3, 4, 6, 12 et ceux de 18 sont 1, 2, 3, 6, 9, 18. Le plus grand commun est 6"
|
| 313 |
+
}
|
| 314 |
+
]
|
| 315 |
+
},
|
| 316 |
+
probability: {
|
| 317 |
+
name: "Probabilités",
|
| 318 |
+
questions: [
|
| 319 |
+
{
|
| 320 |
+
question: "Quelle est la probabilité d'obtenir un 6 en lançant un dé standard?",
|
| 321 |
+
options: ["1/6", "1/2", "1/3", "1"],
|
| 322 |
+
correct: 0,
|
| 323 |
+
explanation: "Un dé a 6 faces équiprobables, donc P(6) = 1/6"
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
question: "Si P(A) = 0.3 et P(B) = 0.4, et que les événements sont indépendants, quelle est P(A et B)?",
|
| 327 |
+
options: ["0.7", "0.12", "0.1", "0.5"],
|
| 328 |
+
correct: 1,
|
| 329 |
+
explanation: "Pour des événements indépendants, P(A et B) = P(A) × P(B) = 0.3 × 0.4 = 0.12"
|
| 330 |
+
}
|
| 331 |
+
]
|
| 332 |
+
}
|
| 333 |
+
},
|
| 334 |
+
|
| 335 |
+
// Update the UI elements with current game state
|
| 336 |
+
updateUI: function() {
|
| 337 |
+
document.getElementById('level').textContent = this.level;
|
| 338 |
+
document.getElementById('points').textContent = this.points;
|
| 339 |
+
document.getElementById('lives').textContent = this.lives;
|
| 340 |
+
document.getElementById('progress').style.width = this.progress + '%';
|
| 341 |
+
|
| 342 |
+
// Show badges if at least 10 points
|
| 343 |
+
if (this.points >= 10) {
|
| 344 |
+
document.getElementById('badges-section').classList.remove('hidden');
|
| 345 |
+
}
|
| 346 |
+
},
|
| 347 |
+
|
| 348 |
+
// Start a new quiz on a given topic
|
| 349 |
+
startQuiz: function(topic) {
|
| 350 |
+
this.currentTopic = topic;
|
| 351 |
+
this.currentQuestion = 0;
|
| 352 |
+
this.correctAnswers = 0;
|
| 353 |
+
this.totalQuestions = this.topics[topic].questions.length;
|
| 354 |
+
|
| 355 |
+
// Update UI
|
| 356 |
+
document.getElementById('current-topic').textContent = this.topics[topic].name;
|
| 357 |
+
document.getElementById('dashboard-view').classList.add('hidden');
|
| 358 |
+
document.getElementById('quiz-view').classList.remove('hidden');
|
| 359 |
+
document.getElementById('results-view').classList.add('hidden');
|
| 360 |
+
|
| 361 |
+
// Show first question
|
| 362 |
+
this.showQuestion();
|
| 363 |
+
},
|
| 364 |
+
|
| 365 |
+
// Display the current question
|
| 366 |
+
showQuestion: function() {
|
| 367 |
+
const questionData = this.topics[this.currentTopic].questions[this.currentQuestion];
|
| 368 |
+
document.getElementById('question').textContent = `Question ${this.currentQuestion + 1}/${this.totalQuestions}: ${questionData.question}`;
|
| 369 |
+
|
| 370 |
+
// Clear any previous feedback
|
| 371 |
+
document.getElementById('answer-feedback').classList.add('hidden');
|
| 372 |
+
|
| 373 |
+
// Clear question image if exists
|
| 374 |
+
const questionImageDiv = document.getElementById('question-image');
|
| 375 |
+
questionImageDiv.innerHTML = '';
|
| 376 |
+
questionImageDiv.classList.add('hidden');
|
| 377 |
+
|
| 378 |
+
// Create options buttons
|
| 379 |
+
const optionsContainer = document.getElementById('options-container');
|
| 380 |
+
optionsContainer.innerHTML = '';
|
| 381 |
+
|
| 382 |
+
questionData.options.forEach((option, index) => {
|
| 383 |
+
const optionButton = document.createElement('button');
|
| 384 |
+
optionButton.className = 'bg-gray-100 hover:bg-gray-200 p-4 rounded-lg text-left transition-all option-btn';
|
| 385 |
+
optionButton.textContent = option;
|
| 386 |
+
optionButton.dataset.index = index;
|
| 387 |
+
optionsContainer.appendChild(optionButton);
|
| 388 |
+
});
|
| 389 |
+
|
| 390 |
+
// Reset buttons
|
| 391 |
+
document.getElementById('submit-answer').classList.remove('hidden');
|
| 392 |
+
document.getElementById('next-question').classList.add('hidden');
|
| 393 |
+
|
| 394 |
+
// Reset selected option
|
| 395 |
+
document.querySelectorAll('.option-btn').forEach(btn => {
|
| 396 |
+
btn.classList.remove('bg-blue-200', 'border-2', 'border-blue-500');
|
| 397 |
+
});
|
| 398 |
+
},
|
| 399 |
+
|
| 400 |
+
// Check the selected answer
|
| 401 |
+
checkAnswer: function(selectedIndex) {
|
| 402 |
+
const questionData = this.topics[this.currentTopic].questions[this.currentQuestion];
|
| 403 |
+
const feedbackDiv = document.getElementById('answer-feedback');
|
| 404 |
+
|
| 405 |
+
if (selectedIndex == questionData.correct) {
|
| 406 |
+
// Correct answer
|
| 407 |
+
this.correctAnswers++;
|
| 408 |
+
this.points += 5;
|
| 409 |
+
this.progress += Math.floor(100 / this.totalQuestions);
|
| 410 |
+
|
| 411 |
+
feedbackDiv.className = 'bg-green-100 border-l-4 border-green-500 text-green-700 p-4 mb-6';
|
| 412 |
+
document.getElementById('feedback-text').textContent = 'Correct! ' + questionData.explanation;
|
| 413 |
+
|
| 414 |
+
// Create confetti effect
|
| 415 |
+
this.createConfetti(20);
|
| 416 |
+
} else {
|
| 417 |
+
// Wrong answer
|
| 418 |
+
this.lives--;
|
| 419 |
+
|
| 420 |
+
feedbackDiv.className = 'bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6';
|
| 421 |
+
document.getElementById('feedback-text').textContent = `Incorrect. La bonne réponse était: ${questionData.options[questionData.correct]}. ${questionData.explanation}`;
|
| 422 |
+
|
| 423 |
+
if (this.lives <= 0) {
|
| 424 |
+
this.endQuiz(false);
|
| 425 |
+
return;
|
| 426 |
+
}
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
feedbackDiv.classList.remove('hidden');
|
| 430 |
+
document.getElementById('submit-answer').classList.add('hidden');
|
| 431 |
+
document.getElementById('next-question').classList.remove('hidden');
|
| 432 |
+
|
| 433 |
+
this.updateUI();
|
| 434 |
+
},
|
| 435 |
+
|
| 436 |
+
// Move to next question or end quiz
|
| 437 |
+
nextQuestion: function() {
|
| 438 |
+
this.currentQuestion++;
|
| 439 |
+
|
| 440 |
+
if (this.currentQuestion < this.totalQuestions) {
|
| 441 |
+
this.showQuestion();
|
| 442 |
+
} else {
|
| 443 |
+
this.endQuiz(true);
|
| 444 |
+
}
|
| 445 |
+
},
|
| 446 |
+
|
| 447 |
+
// End the quiz and show results
|
| 448 |
+
endQuiz: function(completed) {
|
| 449 |
+
document.getElementById('quiz-view').classList.add('hidden');
|
| 450 |
+
document.getElementById('results-view').classList.remove('hidden');
|
| 451 |
+
|
| 452 |
+
const resultTitle = document.getElementById('result-title');
|
| 453 |
+
const resultMessage = document.getElementById('result-message');
|
| 454 |
+
const successIcon = document.getElementById('success-icon');
|
| 455 |
+
const failureIcon = document.getElementById('failure-icon');
|
| 456 |
+
|
| 457 |
+
if (completed) {
|
| 458 |
+
successIcon.classList.remove('hidden');
|
| 459 |
+
failureIcon.classList.add('hidden');
|
| 460 |
+
resultTitle.textContent = 'Quiz complété!';
|
| 461 |
+
|
| 462 |
+
const percentage = Math.floor((this.correctAnswers / this.totalQuestions) * 100);
|
| 463 |
+
if (percentage >= 80) {
|
| 464 |
+
resultMessage.textContent = `Excellent travail! Tu as maîtrisé ${this.topics[this.currentTopic].name} avec ${percentage}% de bonnes réponses.`;
|
| 465 |
+
this.points += 20; // Bonus for high score
|
| 466 |
+
} else if (percentage >= 50) {
|
| 467 |
+
resultMessage.textContent = `Bon effort! Tu as obtenu ${percentage}% de bonnes réponses. Continue comme ça!`;
|
| 468 |
+
this.points += 10;
|
| 469 |
+
} else {
|
| 470 |
+
resultMessage.textContent = `Tu as obtenu ${percentage}% de bonnes réponses. Continue à pratiquer pour t'améliorer!`;
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
// Check for level up
|
| 474 |
+
if (this.points >= this.level * 50) {
|
| 475 |
+
this.level++;
|
| 476 |
+
resultMessage.textContent += ` Félicitations! Tu passes au niveau ${this.level}!`;
|
| 477 |
+
}
|
| 478 |
+
} else {
|
| 479 |
+
successIcon.classList.add('hidden');
|
| 480 |
+
failureIcon.classList.remove('hidden');
|
| 481 |
+
resultTitle.textContent = 'Plus de vies!';
|
| 482 |
+
resultMessage.textContent = `Tu as épuisé toutes tes vies. Ne t'inquiète pas, tu peux réessayer!`;
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
// Update stats
|
| 486 |
+
document.getElementById('questions-answered').textContent = `${this.totalQuestions} / ${this.totalQuestions}`;
|
| 487 |
+
document.getElementById('correct-answers').textContent = `${this.correctAnswers} (${Math.floor((this.correctAnswers / this.totalQuestions) * 100)}%)`;
|
| 488 |
+
document.getElementById('points-earned').textContent = completed ? '+20 points bonus' : '0 (quiz incomplet)';
|
| 489 |
+
|
| 490 |
+
this.updateUI();
|
| 491 |
+
},
|
| 492 |
+
|
| 493 |
+
// Create confetti effect
|
| 494 |
+
createConfetti: function(count) {
|
| 495 |
+
const colors = ['#f00', '#0f0', '#00f', '#ff0', '#f0f', '#0ff'];
|
| 496 |
+
|
| 497 |
+
for (let i = 0; i < count; i++) {
|
| 498 |
+
const confetti = document.createElement('div');
|
| 499 |
+
confetti.className = 'confetti';
|
| 500 |
+
confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
|
| 501 |
+
confetti.style.left = Math.random() * 100 + 'vw';
|
| 502 |
+
confetti.style.top = -10 + 'px';
|
| 503 |
+
confetti.style.transform = `rotate(${Math.random() * 360}deg)`;
|
| 504 |
+
|
| 505 |
+
document.body.appendChild(confetti);
|
| 506 |
+
|
| 507 |
+
setTimeout(() => {
|
| 508 |
+
confetti.style.transition = 'top 2s ease-out, opacity 2s';
|
| 509 |
+
confetti.style.top = Math.random() * 100 + 'vh';
|
| 510 |
+
confetti.style.opacity = '0';
|
| 511 |
+
|
| 512 |
+
setTimeout(() => {
|
| 513 |
+
confetti.remove();
|
| 514 |
+
}, 2000);
|
| 515 |
+
}, 10);
|
| 516 |
+
}
|
| 517 |
+
}
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
// Event Listeners
|
| 521 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 522 |
+
// Initialize UI
|
| 523 |
+
gameData.updateUI();
|
| 524 |
+
|
| 525 |
+
// Topic selection
|
| 526 |
+
document.querySelectorAll('.challenge-card').forEach(card => {
|
| 527 |
+
card.addEventListener('click', function() {
|
| 528 |
+
gameData.startQuiz(this.dataset.topic);
|
| 529 |
+
});
|
| 530 |
+
});
|
| 531 |
+
|
| 532 |
+
// Daily challenge
|
| 533 |
+
document.getElementById('daily-challenge').addEventListener('click', function() {
|
| 534 |
+
// Pick a random topic for daily challenge
|
| 535 |
+
const topics = Object.keys(gameData.topics);
|
| 536 |
+
const randomTopic = topics[Math.floor(Math.random() * topics.length)];
|
| 537 |
+
gameData.startQuiz(randomTopic);
|
| 538 |
+
});
|
| 539 |
+
|
| 540 |
+
// Option selection
|
| 541 |
+
document.getElementById('options-container').addEventListener('click', function(e) {
|
| 542 |
+
if (e.target.classList.contains('option-btn')) {
|
| 543 |
+
// Remove selection from all buttons
|
| 544 |
+
document.querySelectorAll('.option-btn').forEach(btn => {
|
| 545 |
+
btn.classList.remove('bg-blue-200', 'border-2', 'border-blue-500');
|
| 546 |
+
});
|
| 547 |
+
|
| 548 |
+
// Add selection to clicked button
|
| 549 |
+
e.target.classList.add('bg-blue-200', 'border-2', 'border-blue-500');
|
| 550 |
+
}
|
| 551 |
+
});
|
| 552 |
+
|
| 553 |
+
// Submit answer
|
| 554 |
+
document.getElementById('submit-answer').addEventListener('click', function() {
|
| 555 |
+
const selectedBtn = document.querySelector('.option-btn.bg-blue-200');
|
| 556 |
+
if (selectedBtn) {
|
| 557 |
+
gameData.checkAnswer(parseInt(selectedBtn.dataset.index));
|
| 558 |
+
} else {
|
| 559 |
+
document.getElementById('answer-feedback').className = 'bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4 mb-6';
|
| 560 |
+
document.getElementById('feedback-text').textContent = 'Veuillez sélectionner une réponse avant de valider';
|
| 561 |
+
document.getElementById('answer-feedback').classList.remove('hidden');
|
| 562 |
+
}
|
| 563 |
+
});
|
| 564 |
+
|
| 565 |
+
// Next question
|
| 566 |
+
document.getElementById('next-question').addEventListener('click', function() {
|
| 567 |
+
gameData.nextQuestion();
|
| 568 |
+
});
|
| 569 |
+
|
| 570 |
+
// Back to dashboard
|
| 571 |
+
document.getElementById('back-to-dashboard').addEventListener('click', function() {
|
| 572 |
+
if (confirm('Veux-tu vraiment quitter? Ta progression actuelle sera perdue.')) {
|
| 573 |
+
document.getElementById('quiz-view').classList.add('hidden');
|
| 574 |
+
document.getElementById('dashboard-view').classList.remove('hidden');
|
| 575 |
+
document.getElementById('results-view').classList.add('hidden');
|
| 576 |
+
}
|
| 577 |
+
});
|
| 578 |
+
|
| 579 |
+
// Return to dashboard from results
|
| 580 |
+
document.getElementById('return-to-dashboard').addEventListener('click', function() {
|
| 581 |
+
document.getElementById('quiz-view').classList.add('hidden');
|
| 582 |
+
document.getElementById('dashboard-view').classList.remove('hidden');
|
| 583 |
+
document.getElementById('results-view').classList.add('hidden');
|
| 584 |
+
});
|
| 585 |
+
});
|
| 586 |
+
</script>
|
| 587 |
+
<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=MORYDIABAGATE/diabagate" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 588 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|