Update templates/index.html
Browse files- templates/index.html +110 -241
templates/index.html
CHANGED
@@ -1,249 +1,118 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="fr">
|
3 |
<head>
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
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 |
-
/* Style pour les textarea de noms d'éléments */
|
44 |
-
textarea.element-name {
|
45 |
-
resize: vertical;
|
46 |
-
min-height: 60px;
|
47 |
-
}
|
48 |
-
</style>
|
49 |
</head>
|
50 |
-
<body
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
<
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
</div>
|
88 |
-
|
89 |
-
<form method="POST" class="space-y-8 animate__animated animate__fadeIn">
|
90 |
-
<!-- Card principale -->
|
91 |
-
<div class="bg-white rounded-xl card-shadow p-6 md:p-8">
|
92 |
-
<!-- Informations générales -->
|
93 |
-
<div class="mb-8">
|
94 |
-
<h2 class="text-xl font-semibold text-indigo-600 mb-4 flex items-center">
|
95 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
96 |
-
<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" />
|
97 |
-
</svg>
|
98 |
-
Informations générales
|
99 |
-
</h2>
|
100 |
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
101 |
-
<div>
|
102 |
-
<label for="centre_examen" class="block text-sm font-medium text-gray-700 mb-1">Centre d'examen</label>
|
103 |
-
<input type="text" id="centre_examen" name="centre_examen" value="Centre d'examen"
|
104 |
-
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">
|
105 |
-
</div>
|
106 |
-
<div>
|
107 |
-
<label for="type_examen" class="block text-sm font-medium text-gray-700 mb-1">Type d'examen</label>
|
108 |
-
<input type="text" id="type_examen" name="type_examen" value="Bac Général"
|
109 |
-
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">
|
110 |
-
</div>
|
111 |
-
<div>
|
112 |
-
<label for="serie" class="block text-sm font-medium text-gray-700 mb-1">Série</label>
|
113 |
-
<input type="text" id="serie" name="serie" value="Série"
|
114 |
-
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">
|
115 |
-
</div>
|
116 |
-
<div>
|
117 |
-
<label for="etablissement" class="block text-sm font-medium text-gray-700 mb-1">Établissement</label>
|
118 |
-
<input type="text" id="etablissement" name="etablissement" value="Établissement"
|
119 |
-
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">
|
120 |
-
</div>
|
121 |
-
<div>
|
122 |
-
<label for="session" class="block text-sm font-medium text-gray-700 mb-1">Session</label>
|
123 |
-
<input type="text" id="session" name="session" value="2025"
|
124 |
-
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">
|
125 |
-
</div>
|
126 |
-
<div>
|
127 |
-
<label for="nom_candidat" class="block text-sm font-medium text-gray-700 mb-1">Nom du candidat</label>
|
128 |
-
<input type="text" id="nom_candidat" name="nom_candidat" value="Candidat"
|
129 |
-
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">
|
130 |
-
</div>
|
131 |
-
</div>
|
132 |
-
</div>
|
133 |
-
|
134 |
-
<!-- Choix du format de téléchargement -->
|
135 |
-
<div class="mb-6">
|
136 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Choisissez le format de téléchargement :</label>
|
137 |
-
<div class="flex items-center space-x-4">
|
138 |
-
<label class="inline-flex items-center">
|
139 |
-
<input type="radio" name="format" value="docx" checked class="form-radio">
|
140 |
-
<span class="ml-2">DOCX</span>
|
141 |
-
</label>
|
142 |
-
<label class="inline-flex items-center">
|
143 |
-
<input type="radio" name="format" value="pdf" class="form-radio">
|
144 |
-
<span class="ml-2">PDF</span>
|
145 |
-
</label>
|
146 |
-
</div>
|
147 |
-
</div>
|
148 |
-
|
149 |
-
<!-- Éléments techniques -->
|
150 |
-
<div>
|
151 |
-
<h2 class="text-xl font-semibold text-indigo-600 mb-4 flex items-center">
|
152 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
153 |
-
<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" />
|
154 |
-
</svg>
|
155 |
-
Éléments techniques
|
156 |
-
</h2>
|
157 |
-
<div id="elements_container" class="space-y-4">
|
158 |
-
<div class="p-5 bg-gray-50 border border-gray-200 rounded-lg element-card">
|
159 |
-
<div class="grid grid-cols-1 gap-2">
|
160 |
-
<div>
|
161 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Nom de l'élément</label>
|
162 |
-
<textarea name="new_element_name" placeholder="Ex : Saut groupé"
|
163 |
-
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>
|
164 |
-
</div>
|
165 |
-
<div class="grid grid-cols-2 gap-2">
|
166 |
-
<div>
|
167 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Catégorie</label>
|
168 |
-
<input type="text" name="new_element_categorie" placeholder="Ex : A"
|
169 |
-
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">
|
170 |
-
</div>
|
171 |
-
<div>
|
172 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Points</label>
|
173 |
-
<input type="text" inputmode="decimal" pattern="^\d+(\.\d+)?$" name="new_element_points" placeholder="Ex : 1.5"
|
174 |
-
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">
|
175 |
-
</div>
|
176 |
-
</div>
|
177 |
-
</div>
|
178 |
-
</div>
|
179 |
-
</div>
|
180 |
-
<div class="flex justify-center mt-6">
|
181 |
-
<button type="button" onclick="addElement()"
|
182 |
-
class="inline-flex items-center px-4 py-2 bg-indigo-100 text-indigo-700 rounded-lg btn-hover-effect">
|
183 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
184 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
|
185 |
-
</svg>
|
186 |
-
Ajouter un autre élément
|
187 |
-
</button>
|
188 |
-
</div>
|
189 |
-
</div>
|
190 |
-
</div>
|
191 |
-
|
192 |
-
<!-- Bouton de génération -->
|
193 |
-
<div class="animate__animated animate__fadeInUp">
|
194 |
-
<button type="submit" value="Générer le document"
|
195 |
-
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">
|
196 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
197 |
-
<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" />
|
198 |
-
</svg>
|
199 |
-
Générer le document
|
200 |
-
</button>
|
201 |
-
</div>
|
202 |
-
</form>
|
203 |
-
</div>
|
204 |
-
</div>
|
205 |
-
|
206 |
-
<script>
|
207 |
-
// Fonction d'ajout dynamique d'un élément technique avec champs "Points" amélioré
|
208 |
-
function addElement() {
|
209 |
-
const container = document.getElementById("elements_container");
|
210 |
-
const div = document.createElement("div");
|
211 |
-
div.className = "p-5 bg-gray-50 border border-gray-200 rounded-lg element-card";
|
212 |
-
div.innerHTML = `
|
213 |
-
<div class="grid grid-cols-1 gap-2">
|
214 |
-
<div>
|
215 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Nom de l'élément</label>
|
216 |
-
<textarea name="new_element_name" placeholder="Ex : Saut groupé"
|
217 |
-
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>
|
218 |
-
</div>
|
219 |
-
<div class="grid grid-cols-2 gap-2">
|
220 |
-
<div>
|
221 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">Catégorie</label>
|
222 |
-
<input type="text" name="new_element_categorie" placeholder="Ex : A"
|
223 |
-
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">
|
224 |
</div>
|
225 |
-
<
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
</div>
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
</body>
|
249 |
</html>
|
|
|
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 Fiche Évaluation Gym</title>
|
7 |
+
<style>
|
8 |
+
body { font-family: sans-serif; margin: 20px; }
|
9 |
+
label { display: block; margin-top: 10px; font-weight: bold; }
|
10 |
+
input[type=text], input[type=number] { width: 95%; padding: 8px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; }
|
11 |
+
.element-row { display: flex; align-items: center; margin-bottom: 10px; border: 1px solid #eee; padding: 10px; border-radius: 5px;}
|
12 |
+
.element-row input { margin-right: 10px; }
|
13 |
+
.element-row input[name="new_element_name"] { flex-grow: 3; } /* More space for name */
|
14 |
+
.element-row input[name="new_element_categorie"] { flex-grow: 1; }
|
15 |
+
.element-row input[name="new_element_points"] { flex-grow: 1; }
|
16 |
+
button { padding: 10px 15px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 5px; }
|
17 |
+
button:hover { background-color: #0056b3; }
|
18 |
+
.remove-btn { background-color: #dc3545; margin-left: 10px; }
|
19 |
+
.remove-btn:hover { background-color: #c82333; }
|
20 |
+
#elements-container { margin-top: 15px; padding-top: 10px; border-top: 1px dashed #ccc; }
|
21 |
+
fieldset { border: 1px solid #ddd; padding: 15px; margin-bottom: 20px; border-radius: 5px; }
|
22 |
+
legend { font-weight: bold; padding: 0 10px; }
|
23 |
+
.format-options label { display: inline-block; margin-right: 15px; font-weight: normal;}
|
24 |
+
.format-options input[type=radio] { margin-right: 5px; }
|
25 |
+
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
</head>
|
27 |
+
<body>
|
28 |
+
|
29 |
+
<h1>Générateur de Fiche d'Évaluation Gymnastique</h1>
|
30 |
+
|
31 |
+
<form method="post">
|
32 |
+
|
33 |
+
<fieldset>
|
34 |
+
<legend>Informations Générales</legend>
|
35 |
+
<label for="centre_examen">Centre d'examen:</label>
|
36 |
+
<input type="text" id="centre_examen" name="centre_examen" value="Centre d'examen">
|
37 |
+
|
38 |
+
<label for="type_examen">Type d'examen:</label>
|
39 |
+
<input type="text" id="type_examen" name="type_examen" value="Bac Général">
|
40 |
+
|
41 |
+
<label for="serie">Série:</label>
|
42 |
+
<input type="text" id="serie" name="serie" value="Série">
|
43 |
+
|
44 |
+
<label for="etablissement">Établissement:</label>
|
45 |
+
<input type="text" id="etablissement" name="etablissement" value="Établissement">
|
46 |
+
|
47 |
+
<label for="session">Session:</label>
|
48 |
+
<input type="number" id="session" name="session" value="2025">
|
49 |
+
|
50 |
+
<label for="nom_candidat">Nom du Candidat:</label>
|
51 |
+
<input type="text" id="nom_candidat" name="nom_candidat" value="Nom Prénom">
|
52 |
+
</fieldset>
|
53 |
+
|
54 |
+
<fieldset>
|
55 |
+
<legend>Éléments Techniques</legend>
|
56 |
+
<div id="elements-container">
|
57 |
+
<!-- Element rows will be added here by JavaScript -->
|
58 |
+
<div class="element-row">
|
59 |
+
<input type="text" name="new_element_name" placeholder="Nom de l'élément" required>
|
60 |
+
<input type="text" name="new_element_categorie" placeholder="Catégorie (A, B...)" required>
|
61 |
+
<input type="number" step="0.1" name="new_element_points" placeholder="Points max" required>
|
62 |
+
<button type="button" class="remove-btn" onclick="removeElement(this)">Supprimer</button>
|
63 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
</div>
|
65 |
+
<button type="button" id="add-element-btn">Ajouter un élément</button>
|
66 |
+
</fieldset>
|
67 |
+
|
68 |
+
<fieldset>
|
69 |
+
<legend>Format de Sortie</legend>
|
70 |
+
<div class="format-options">
|
71 |
+
<label>
|
72 |
+
<input type="radio" name="format" value="docx" checked> DOCX
|
73 |
+
</label>
|
74 |
+
<label>
|
75 |
+
<input type="radio" name="format" value="pdf"> PDF (Nécessite ConvertAPI)
|
76 |
+
</label>
|
77 |
</div>
|
78 |
+
</fieldset>
|
79 |
+
|
80 |
+
<button type="submit">Générer le Document</button>
|
81 |
+
|
82 |
+
</form>
|
83 |
+
|
84 |
+
<script>
|
85 |
+
const container = document.getElementById('elements-container');
|
86 |
+
const addButton = document.getElementById('add-element-btn');
|
87 |
+
|
88 |
+
function createEmptyElementRow() {
|
89 |
+
const newRow = document.createElement('div');
|
90 |
+
newRow.classList.add('element-row');
|
91 |
+
newRow.innerHTML = `
|
92 |
+
<input type="text" name="new_element_name" placeholder="Nom de l'élément" required>
|
93 |
+
<input type="text" name="new_element_categorie" placeholder="Catégorie (A, B...)" required>
|
94 |
+
<input type="number" step="0.1" name="new_element_points" placeholder="Points max" required>
|
95 |
+
<button type="button" class="remove-btn" onclick="removeElement(this)">Supprimer</button>
|
96 |
+
`;
|
97 |
+
container.appendChild(newRow);
|
98 |
+
}
|
99 |
+
|
100 |
+
function removeElement(button) {
|
101 |
+
// Prevent removing the last row if you want at least one always present
|
102 |
+
if (container.children.length > 1) {
|
103 |
+
button.parentElement.remove();
|
104 |
+
} else {
|
105 |
+
alert("Vous devez avoir au moins un élément.");
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
addButton.addEventListener('click', createEmptyElementRow);
|
110 |
+
|
111 |
+
// Optional: Add a few empty rows initially if needed
|
112 |
+
// createEmptyElementRow();
|
113 |
+
// createEmptyElementRow();
|
114 |
+
|
115 |
+
</script>
|
116 |
+
|
117 |
</body>
|
118 |
</html>
|