Docfile commited on
Commit
b6167f0
·
verified ·
1 Parent(s): fd0c876

Create index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +256 -0
templates/index.html ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Générateur d'évaluation gymnique - Mariam Eps</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.13.0/cdn.min.js" defer></script>
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
10
+ <style>
11
+ @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
12
+ body {
13
+ font-family: 'Montserrat', sans-serif;
14
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
15
+ }
16
+ .card-shadow {
17
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
18
+ }
19
+ .input-focus-effect {
20
+ transition: all 0.3s ease;
21
+ }
22
+ .input-focus-effect:focus {
23
+ transform: translateY(-2px);
24
+ box-shadow: 0 4px 12px rgba(45, 85, 255, 0.2);
25
+ }
26
+ .btn-hover-effect {
27
+ transition: all 0.3s ease;
28
+ }
29
+ .btn-hover-effect:hover {
30
+ transform: translateY(-2px);
31
+ box-shadow: 0 4px 12px rgba(45, 85, 255, 0.2);
32
+ }
33
+ .element-card {
34
+ transition: all 0.3s ease;
35
+ }
36
+ .element-card:hover {
37
+ transform: translateY(-3px);
38
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
39
+ }
40
+ .navbar-shadow {
41
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
42
+ }
43
+ textarea.element-name {
44
+ resize: vertical;
45
+ min-height: 60px;
46
+ }
47
+ </style>
48
+ </head>
49
+ <body class="min-h-screen">
50
+ <!-- Loader -->
51
+ <div id="loader" class="hidden fixed inset-0 bg-gray-900 bg-opacity-50 flex items-center justify-center z-50">
52
+ <div class="flex flex-col items-center">
53
+ <div class="animate-spin rounded-full h-16 w-16 border-t-4 border-blue-500"></div>
54
+ <p class="mt-4 text-white text-lg">Veuillez patienter...</p>
55
+ </div>
56
+ </div>
57
+
58
+ <!-- Barre de navigation -->
59
+ <header class="bg-indigo-700 text-white navbar-shadow fixed w-full top-0 z-50">
60
+ <div class="container mx-auto px-4 py-3 flex justify-between items-center">
61
+ <div class="flex items-center">
62
+ <span class="font-bold text-xl tracking-wider">Mariam Eps</span>
63
+ </div>
64
+ <div>
65
+ <nav class="hidden md:flex space-x-6">
66
+ <a href="#" class="hover:text-indigo-200 transition-colors duration-200 font-medium">Accueil</a>
67
+ <a href="#" class="hover:text-indigo-200 transition-colors duration-200 font-medium">Évaluations</a>
68
+ <a href="#" class="hover:text-indigo-200 transition-colors duration-200 font-medium">Ressources</a>
69
+ <a href="#" class="hover:text-indigo-200 transition-colors duration-200 font-medium">Contact</a>
70
+ </nav>
71
+ <button class="md:hidden focus:outline-none">
72
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
73
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16m-7 6h7" />
74
+ </svg>
75
+ </button>
76
+ </div>
77
+ </div>
78
+ </header>
79
+
80
+ <!-- Contenu principal -->
81
+ <div class="pt-16 pb-8">
82
+ <div class="container max-w-4xl mx-auto px-4 mt-8">
83
+ <div class="mb-8 text-center animate__animated animate__fadeInDown">
84
+ <h1 class="text-3xl md:text-4xl font-bold text-indigo-700 mb-2">Générateur d'évaluation gymnique</h1>
85
+ <p class="text-gray-600 max-w-2xl mx-auto">Créez facilement des documents d'évaluation personnalisés pour vos examens de gymnastique</p>
86
+ </div>
87
+
88
+ <form method="POST" enctype="multipart/form-data" class="space-y-8 animate__animated animate__fadeIn">
89
+ <!-- Card principale -->
90
+ <div class="bg-white rounded-xl card-shadow p-6 md:p-8">
91
+ <!-- Informations générales -->
92
+ <div class="mb-8">
93
+ <h2 class="text-xl font-semibold text-indigo-600 mb-4 flex items-center">
94
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
95
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
96
+ </svg>
97
+ Informations générales
98
+ </h2>
99
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
100
+ <div>
101
+ <label for="centre_examen" class="block text-sm font-medium text-gray-700 mb-1">Centre d'examen</label>
102
+ <input type="text" id="centre_examen" name="centre_examen" value="Centre d'examen"
103
+ class="w-full px-4 py-2 bg-gray-50 border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
104
+ </div>
105
+ <div>
106
+ <label for="type_examen" class="block text-sm font-medium text-gray-700 mb-1">Type d'examen</label>
107
+ <input type="text" id="type_examen" name="type_examen" value="Bac Général"
108
+ class="w-full px-4 py-2 bg-gray-50 border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
109
+ </div>
110
+ <div>
111
+ <label for="serie" class="block text-sm font-medium text-gray-700 mb-1">Série</label>
112
+ <input type="text" id="serie" name="serie" value="Série"
113
+ class="w-full px-4 py-2 bg-gray-50 border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
114
+ </div>
115
+ <div>
116
+ <label for="etablissement" class="block text-sm font-medium text-gray-700 mb-1">Établissement</label>
117
+ <input type="text" id="etablissement" name="etablissement" value="Établissement"
118
+ class="w-full px-4 py-2 bg-gray-50 border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
119
+ </div>
120
+ <div>
121
+ <label for="session" class="block text-sm font-medium text-gray-700 mb-1">Session</label>
122
+ <input type="text" id="session" name="session" value="2025"
123
+ class="w-full px-4 py-2 bg-gray-50 border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
124
+ </div>
125
+ <div>
126
+ <label for="nom_candidat" class="block text-sm font-medium text-gray-700 mb-1">Nom du candidat</label>
127
+ <input type="text" id="nom_candidat" name="nom_candidat" value="Candidat"
128
+ class="w-full px-4 py-2 bg-gray-50 border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
129
+ </div>
130
+ </div>
131
+ </div>
132
+
133
+ <!-- Upload de l'image d'arrière-plan -->
134
+ <div class="mb-6">
135
+ <label for="background_image" class="block text-sm font-medium text-gray-700 mb-1">Image d'arrière-plan pour le tableau</label>
136
+ <input type="file" id="background_image" name="background_image" accept="image/*"
137
+ class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 focus:outline-none">
138
+ <p class="mt-1 text-xs text-gray-500">Choisissez une image qui sera appliquée en arrière-plan du tableau avec une transparence de 30%.</p>
139
+ </div>
140
+
141
+ <!-- Choix du format de téléchargement -->
142
+ <div class="mb-6">
143
+ <label class="block text-sm font-medium text-gray-700 mb-1">Choisissez le format de téléchargement :</label>
144
+ <div class="flex items-center space-x-4">
145
+ <label class="inline-flex items-center">
146
+ <input type="radio" name="format" value="docx" checked class="form-radio">
147
+ <span class="ml-2">DOCX</span>
148
+ </label>
149
+ <label class="inline-flex items-center">
150
+ <input type="radio" name="format" value="pdf" class="form-radio">
151
+ <span class="ml-2">PDF</span>
152
+ </label>
153
+ </div>
154
+ </div>
155
+
156
+ <!-- Éléments techniques -->
157
+ <div>
158
+ <h2 class="text-xl font-semibold text-indigo-600 mb-4 flex items-center">
159
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
160
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
161
+ </svg>
162
+ Éléments techniques
163
+ </h2>
164
+ <div id="elements_container" class="space-y-4">
165
+ <div class="p-5 bg-gray-50 border border-gray-200 rounded-lg element-card">
166
+ <div class="grid grid-cols-1 gap-2">
167
+ <div>
168
+ <label class="block text-sm font-medium text-gray-700 mb-1">Nom de l'élément</label>
169
+ <textarea name="new_element_name" placeholder="Ex : Saut groupé"
170
+ class="element-name w-full px-4 py-2 bg-white border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></textarea>
171
+ </div>
172
+ <div class="grid grid-cols-2 gap-2">
173
+ <div>
174
+ <label class="block text-sm font-medium text-gray-700 mb-1">Catégorie</label>
175
+ <input type="text" name="new_element_categorie" placeholder="Ex : A"
176
+ class="w-full px-4 py-2 bg-white border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
177
+ </div>
178
+ <div>
179
+ <label class="block text-sm font-medium text-gray-700 mb-1">Points</label>
180
+ <input type="text" inputmode="decimal" pattern="^\d+(\.\d+)?$" name="new_element_points" placeholder="Ex : 1.5"
181
+ class="w-full px-4 py-2 bg-white border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ <div class="flex justify-center mt-6">
188
+ <button type="button" onclick="addElement()"
189
+ class="inline-flex items-center px-4 py-2 bg-indigo-100 text-indigo-700 rounded-lg btn-hover-effect">
190
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
191
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
192
+ </svg>
193
+ Ajouter un autre élément
194
+ </button>
195
+ </div>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- Bouton de génération -->
200
+ <div class="animate__animated animate__fadeInUp">
201
+ <button type="submit" value="Générer le document"
202
+ class="w-full py-3 px-6 bg-gradient-to-r from-indigo-600 to-blue-500 text-white font-medium rounded-lg btn-hover-effect flex items-center justify-center">
203
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
204
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
205
+ </svg>
206
+ Générer le document
207
+ </button>
208
+ </div>
209
+ </form>
210
+ </div>
211
+ </div>
212
+
213
+ <script>
214
+ // Fonction d'ajout dynamique d'un élément technique avec champs "Points" amélioré
215
+ function addElement() {
216
+ const container = document.getElementById("elements_container");
217
+ const div = document.createElement("div");
218
+ div.className = "p-5 bg-gray-50 border border-gray-200 rounded-lg element-card";
219
+ div.innerHTML = `
220
+ <div class="grid grid-cols-1 gap-2">
221
+ <div>
222
+ <label class="block text-sm font-medium text-gray-700 mb-1">Nom de l'élément</label>
223
+ <textarea name="new_element_name" placeholder="Ex : Saut groupé"
224
+ class="element-name w-full px-4 py-2 bg-white border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></textarea>
225
+ </div>
226
+ <div class="grid grid-cols-2 gap-2">
227
+ <div>
228
+ <label class="block text-sm font-medium text-gray-700 mb-1">Catégorie</label>
229
+ <input type="text" name="new_element_categorie" placeholder="Ex : A"
230
+ class="w-full px-4 py-2 bg-white border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
231
+ </div>
232
+ <div>
233
+ <label class="block text-sm font-medium text-gray-700 mb-1">Points</label>
234
+ <input type="text" inputmode="decimal" pattern="^\\d+(\\.\\d+)?$" name="new_element_points" placeholder="Ex : 1.5"
235
+ class="w-full px-4 py-2 bg-white border border-gray-200 rounded-lg input-focus-effect focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
236
+ </div>
237
+ </div>
238
+ </div>
239
+ `;
240
+ container.appendChild(div);
241
+ }
242
+
243
+ // Remplacer automatiquement les virgules par des points dans les champs "Points"
244
+ document.getElementById("elements_container").addEventListener('input', function(event) {
245
+ if (event.target && event.target.name === 'new_element_points') {
246
+ event.target.value = event.target.value.replace(/,/g, '.');
247
+ }
248
+ });
249
+
250
+ // Affichage du loader dès la soumission du formulaire
251
+ document.querySelector('form').addEventListener('submit', function() {
252
+ document.getElementById('loader').classList.remove('hidden');
253
+ });
254
+ </script>
255
+ </body>
256
+ </html>