Docfile commited on
Commit
fc29912
·
verified ·
1 Parent(s): 03eb0e3

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +164 -102
templates/index.html CHANGED
@@ -4,131 +4,193 @@
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</title>
7
- <!-- Inclusion de Tailwind via CDN -->
8
  <script src="https://cdn.tailwindcss.com"></script>
 
 
9
  <style>
10
- /* Animation de fade-in personnalisée */
11
- @keyframes fadeIn {
12
- from { opacity: 0; transform: translateY(20px); }
13
- to { opacity: 1; transform: translateY(0); }
 
14
  }
15
- .fade-in {
16
- animation: fadeIn 0.5s ease-out;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
  </style>
19
  </head>
20
- <body class="bg-gray-50 text-gray-800">
21
- <div class="min-h-screen flex items-center justify-center p-4">
22
- <div class="max-w-xl w-full bg-white shadow-xl rounded-lg p-6 space-y-6 fade-in">
23
- <h1 class="text-2xl font-bold text-center text-blue-600">Générateur d'évaluation gymnique</h1>
24
- <form method="POST" class="space-y-4">
 
 
 
 
 
25
  <!-- Informations d'évaluation -->
26
- <div class="grid grid-cols-1 gap-4">
27
- <div>
28
- <label for="centre_examen" class="block text-sm font-medium text-gray-700">Centre d'examen</label>
29
- <input type="text" id="centre_examen" name="centre_examen" value="Centre d'examen"
30
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
31
- </div>
32
- <div>
33
- <label for="type_examen" class="block text-sm font-medium text-gray-700">Type d'examen</label>
34
- <input type="text" id="type_examen" name="type_examen" value="Bac Général"
35
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
36
- </div>
37
- <div class="grid grid-cols-2 gap-4">
38
  <div>
39
- <label for="serie" class="block text-sm font-medium text-gray-700">Série</label>
40
- <input type="text" id="serie" name="serie" value="Série"
41
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
42
  </div>
 
43
  <div>
44
- <label for="etablissement" class="block text-sm font-medium text-gray-700">Établissement</label>
45
- <input type="text" id="etablissement" name="etablissement" value="Établissement"
46
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
 
 
 
 
 
 
47
  </div>
48
- </div>
49
- <div class="grid grid-cols-2 gap-4">
 
 
 
 
 
 
 
 
 
 
 
50
  <div>
51
- <label for="session" class="block text-sm font-medium text-gray-700">Session</label>
52
- <input type="text" id="session" name="session" value="2025"
53
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
54
  </div>
 
55
  <div>
56
- <label for="nom_candidat" class="block text-sm font-medium text-gray-700">Nom du candidat</label>
57
- <input type="text" id="nom_candidat" name="nom_candidat" value="Candidat"
58
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
59
  </div>
60
  </div>
61
  </div>
62
 
63
  <!-- Éléments techniques -->
64
- <h2 class="text-xl font-semibold text-blue-600 mt-6">Ajouter des éléments techniques</h2>
65
- <div id="elements_container" class="space-y-4">
66
- <div class="p-4 bg-gray-100 rounded-md fade-in">
67
- <div class="grid grid-cols-1 gap-2">
68
- <div>
69
- <label class="block text-sm font-medium text-gray-700">Nom de l'élément</label>
70
- <input type="text" name="new_element_name" placeholder="Ex : Saut groupé"
71
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
72
- </div>
73
- <div class="grid grid-cols-2 gap-2">
74
- <div>
75
- <label class="block text-sm font-medium text-gray-700">Catégorie</label>
76
- <input type="text" name="new_element_categorie" placeholder="Ex : A"
77
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
 
 
 
 
 
78
  </div>
79
- <div>
80
- <label class="block text-sm font-medium text-gray-700">Points</label>
81
- <input type="text" name="new_element_points" placeholder="Ex : 1.5"
82
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  </div>
84
  </div>
85
- </div>
86
  </div>
87
- </div>
88
- <div class="text-center">
89
- <button type="button" onclick="addElement()"
90
- class="inline-block bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded transition duration-300 ease-in-out">
91
- Ajouter un autre élément
92
- </button>
93
- </div>
94
-
95
- <div class="text-center">
96
- <input type="submit" value="Générer le document"
97
- class="w-full bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded transition duration-300 ease-in-out">
98
- </div>
99
- </form>
100
- </div>
101
- </div>
102
-
103
- <script>
104
- // Fonction d'ajout dynamique d'un élément technique
105
- function addElement() {
106
- const container = document.getElementById("elements_container");
107
- const div = document.createElement("div");
108
- div.className = "p-4 bg-gray-100 rounded-md fade-in";
109
- div.innerHTML = `
110
- <div class="grid grid-cols-1 gap-2">
111
- <div>
112
- <label class="block text-sm font-medium text-gray-700">Nom de l'élément</label>
113
- <input type="text" name="new_element_name" placeholder="Ex : Saut groupé"
114
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
115
- </div>
116
- <div class="grid grid-cols-2 gap-2">
117
- <div>
118
- <label class="block text-sm font-medium text-gray-700">Catégorie</label>
119
- <input type="text" name="new_element_categorie" placeholder="Ex : A"
120
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
121
- </div>
122
- <div>
123
- <label class="block text-sm font-medium text-gray-700">Points</label>
124
- <input type="text" name="new_element_points" placeholder="Ex : 1.5"
125
- class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500">
126
- </div>
127
  </div>
128
  </div>
129
- `;
130
- container.appendChild(div);
131
- }
132
- </script>
 
 
 
 
 
 
 
 
 
 
133
  </body>
134
- </html>
 
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</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
+
13
+ body {
14
+ font-family: 'Montserrat', sans-serif;
15
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
16
  }
17
+
18
+ .card-shadow {
19
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
20
+ }
21
+
22
+ .input-focus-effect {
23
+ transition: all 0.3s ease;
24
+ }
25
+
26
+ .input-focus-effect:focus {
27
+ transform: translateY(-2px);
28
+ box-shadow: 0 4px 12px rgba(45, 85, 255, 0.2);
29
+ }
30
+
31
+ .btn-hover-effect {
32
+ transition: all 0.3s ease;
33
+ }
34
+
35
+ .btn-hover-effect:hover {
36
+ transform: translateY(-2px);
37
+ box-shadow: 0 4px 12px rgba(45, 85, 255, 0.2);
38
+ }
39
+
40
+ .element-card {
41
+ transition: all 0.3s ease;
42
+ }
43
+
44
+ .element-card:hover {
45
+ transform: translateY(-3px);
46
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
47
  }
48
  </style>
49
  </head>
50
+ <body class="min-h-screen py-8">
51
+ <div class="container max-w-4xl mx-auto px-4" x-data="{ elements: [{}] }">
52
+ <div class="mb-8 text-center animate__animated animate__fadeInDown">
53
+ <h1 class="text-3xl md:text-4xl font-bold text-indigo-700 mb-2">Générateur d'évaluation gymnique</h1>
54
+ <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>
55
+ </div>
56
+
57
+ <form method="POST" class="space-y-8 animate__animated animate__fadeIn">
58
+ <!-- Card principale -->
59
+ <div class="bg-white rounded-xl card-shadow p-6 md:p-8">
60
  <!-- Informations d'évaluation -->
61
+ <div class="mb-8">
62
+ <h2 class="text-xl font-semibold text-indigo-600 mb-4 flex items-center">
63
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
64
+ <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" />
65
+ </svg>
66
+ Informations générales
67
+ </h2>
68
+
69
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
 
 
 
70
  <div>
71
+ <label for="centre_examen" class="block text-sm font-medium text-gray-700 mb-1">Centre d'examen</label>
72
+ <input type="text" id="centre_examen" name="centre_examen" placeholder="Nom du centre d'examen"
73
+ 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">
74
  </div>
75
+
76
  <div>
77
+ <label for="type_examen" class="block text-sm font-medium text-gray-700 mb-1">Type d'examen</label>
78
+ <select id="type_examen" name="type_examen"
79
+ 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">
80
+ <option value="Bac Général">Bac Général</option>
81
+ <option value="Bac Technologique">Bac Technologique</option>
82
+ <option value="Bac Professionnel">Bac Professionnel</option>
83
+ <option value="Brevet">Brevet</option>
84
+ <option value="Autre">Autre</option>
85
+ </select>
86
  </div>
87
+
88
+ <div>
89
+ <label for="serie" class="block text-sm font-medium text-gray-700 mb-1">Série</label>
90
+ <input type="text" id="serie" name="serie" placeholder="Série de l'examen"
91
+ 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">
92
+ </div>
93
+
94
+ <div>
95
+ <label for="etablissement" class="block text-sm font-medium text-gray-700 mb-1">Établissement</label>
96
+ <input type="text" id="etablissement" name="etablissement" placeholder="Nom de l'établissement"
97
+ 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">
98
+ </div>
99
+
100
  <div>
101
+ <label for="session" class="block text-sm font-medium text-gray-700 mb-1">Session</label>
102
+ <input type="text" id="session" name="session" placeholder="Année de la session"
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
+
106
  <div>
107
+ <label for="nom_candidat" class="block text-sm font-medium text-gray-700 mb-1">Nom du candidat</label>
108
+ <input type="text" id="nom_candidat" name="nom_candidat" placeholder="Nom et prénom du candidat"
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
  </div>
113
 
114
  <!-- Éléments techniques -->
115
+ <div>
116
+ <h2 class="text-xl font-semibold text-indigo-600 mb-4 flex items-center">
117
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
118
+ <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" />
119
+ </svg>
120
+ Éléments techniques
121
+ </h2>
122
+
123
+ <div id="elements_container" class="space-y-4">
124
+ <template x-for="(element, index) in elements" :key="index">
125
+ <div class="p-5 bg-gray-50 border border-gray-200 rounded-lg element-card">
126
+ <div class="flex items-center justify-between mb-3">
127
+ <h3 class="font-medium text-indigo-600">Élément #<span x-text="index + 1"></span></h3>
128
+ <button type="button" x-show="elements.length > 1" @click="elements.splice(index, 1)"
129
+ class="text-red-500 hover:text-red-700 transition-colors duration-200">
130
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
131
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
132
+ </svg>
133
+ </button>
134
  </div>
135
+
136
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
137
+ <div class="md:col-span-2">
138
+ <label class="block text-sm font-medium text-gray-700 mb-1">Nom de l'élément</label>
139
+ <input type="text" name="element_name[]" placeholder="Ex : Saut groupé"
140
+ 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">
141
+ </div>
142
+
143
+ <div>
144
+ <label class="block text-sm font-medium text-gray-700 mb-1">Catégorie</label>
145
+ <select name="element_categorie[]"
146
+ 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">
147
+ <option value="A">A</option>
148
+ <option value="B">B</option>
149
+ <option value="C">C</option>
150
+ <option value="D">D</option>
151
+ <option value="E">E</option>
152
+ </select>
153
+ </div>
154
+
155
+ <div class="md:col-span-2">
156
+ <label class="block text-sm font-medium text-gray-700 mb-1">Description</label>
157
+ <input type="text" name="element_description[]" placeholder="Description de l'élément"
158
+ 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">
159
+ </div>
160
+
161
+ <div>
162
+ <label class="block text-sm font-medium text-gray-700 mb-1">Points</label>
163
+ <input type="number" name="element_points[]" placeholder="Ex : 1.5" step="0.1" min="0"
164
+ 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">
165
+ </div>
166
  </div>
167
  </div>
168
+ </template>
169
  </div>
170
+
171
+ <div class="flex justify-center mt-6">
172
+ <button type="button" @click="elements.push({})"
173
+ class="inline-flex items-center px-4 py-2 bg-indigo-100 text-indigo-700 rounded-lg btn-hover-effect">
174
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
175
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
176
+ </svg>
177
+ Ajouter un autre élément
178
+ </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  </div>
180
  </div>
181
+ </div>
182
+
183
+ <!-- Bouton de génération -->
184
+ <div class="animate__animated animate__fadeInUp">
185
+ <button type="submit"
186
+ 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">
187
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
188
+ <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" />
189
+ </svg>
190
+ Générer le document d'évaluation
191
+ </button>
192
+ </div>
193
+ </form>
194
+ </div>
195
  </body>
196
+ </html>