OUAREDAEK commited on
Commit
5a4baf5
·
verified ·
1 Parent(s): d76476c

Upload templates/index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. templates/index.html +129 -51
templates/index.html CHANGED
@@ -305,10 +305,10 @@ button:disabled {
305
  color: #689f38;
306
  }
307
 
308
- /* ================= COMPÉTENCES REGROUPÉES SUR 3 COLONNES ================= */
309
  #competence-bars {
310
  background: white;
311
- padding: 15px;
312
  border-radius: 12px;
313
  border: 1px solid #e0e0e0;
314
  margin: 15px 0;
@@ -316,52 +316,63 @@ button:disabled {
316
 
317
  .compact-competences-grid {
318
  display: grid;
319
- grid-template-columns: repeat(3, 1fr);
320
- gap: 12px;
321
- margin: 10px 0;
 
322
  }
323
 
324
- .compact-competence-item {
325
- padding: 10px;
326
- background: #f8f9fa;
327
- border-radius: 8px;
328
  border-left: 4px solid #1976D2;
329
- transition: transform 0.2s;
330
  height: 100%;
331
- box-sizing: border-box;
 
 
 
332
  }
333
 
334
- .compact-competence-item:hover {
335
- transform: translateY(-2px);
336
- background: #e3f2fd;
 
337
  }
338
 
339
- .compact-competence-label {
340
- font-size: 12px;
341
  font-weight: 600;
342
  color: #333;
343
- margin-bottom: 8px;
344
- display: flex;
345
- justify-content: space-between;
346
  }
347
 
348
- .compact-competence-bar {
349
- height: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
350
  background: #e0e0e0;
351
- border-radius: 5px;
352
  overflow: hidden;
353
- margin: 5px 0;
354
  }
355
 
356
- .compact-competence-fill {
357
  height: 100%;
358
- border-radius: 5px;
359
- color: white;
360
- font-size: 9px;
361
- text-align: right;
362
- padding-right: 5px;
363
- line-height: 10px;
364
- font-weight: bold;
365
  transition: width 0.5s ease;
366
  }
367
 
@@ -1192,6 +1203,11 @@ textarea:focus {
1192
  .tab-btn {
1193
  width: 100%;
1194
  }
 
 
 
 
 
1195
  }
1196
 
1197
  @media (max-width: 768px) {
@@ -1225,7 +1241,22 @@ textarea:focus {
1225
  }
1226
 
1227
  .compact-competences-grid {
1228
- grid-template-columns: repeat(2, 1fr);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1229
  }
1230
 
1231
  .compact-radar-metrics-grid {
@@ -1275,7 +1306,8 @@ textarea:focus {
1275
  }
1276
 
1277
  .compact-competences-grid {
1278
- grid-template-columns: 1fr;
 
1279
  }
1280
 
1281
  .example-metrics-table th,
@@ -1429,8 +1461,11 @@ textarea:focus {
1429
  </div>
1430
  </div>
1431
 
1432
- <h3>📊 Progression par compétence</h3>
1433
  <div id="competence-bars">
 
 
 
1434
  <div id="compact-competences">
1435
  <em>Chargement des compétences...</em>
1436
  </div>
@@ -1957,7 +1992,7 @@ const profileMessages = {
1957
  insights: [
1958
  { icon: "🔄", text: "Démarrage constant (70%)" },
1959
  { icon: "📝", text: "Achèvement régulier (68%)" },
1960
- { icon: "🎨", text: "Trajectoire dapprentissage prometteuse" }
1961
  ]
1962
  },
1963
  "Étudiant en difficulté": {
@@ -1966,7 +2001,7 @@ const profileMessages = {
1966
  insights: [
1967
  { icon: "👥", text: "Interactions élevées (85%)" },
1968
  { icon: "🚀", text: "Démarrage solide (72%)" },
1969
- { icon: "💬", text: "Taux derreurs observées" }
1970
  ]
1971
  },
1972
  "Étudiant évitant l'échec": {
@@ -1975,7 +2010,7 @@ const profileMessages = {
1975
  insights: [
1976
  { icon: "😨", text: "Démarrage faible (35%)" },
1977
  { icon: "⏱️", text: "Achèvement limité (30%)" },
1978
- { icon: "🌱", text: "Niveau dactivité et dengagement limité" }
1979
  ]
1980
  },
1981
  "Étudiant à risque": {
@@ -2274,30 +2309,73 @@ function updateCompactCompetences(competences) {
2274
  return;
2275
  }
2276
 
2277
- competences.forEach(comp => {
 
 
 
 
 
 
 
 
2278
  // Déterminer la couleur selon la valeur
2279
- let color;
2280
- if (comp.value < 50) color = '#E53935';
2281
- else if (comp.value < 70) color = '#FB8C00';
2282
- else color = '#43A047';
 
 
 
 
 
 
 
2283
 
2284
- // Créer l'élément de compétence
2285
  const compItem = document.createElement('div');
2286
- compItem.className = 'compact-competence-item';
2287
  compItem.innerHTML = `
2288
- <div class="compact-competence-label">
2289
- <span>${comp.label}</span>
2290
- <span>${comp.value}%</span>
2291
  </div>
2292
- <div class="compact-competence-bar">
2293
- <div class="compact-competence-fill" style="width: ${comp.value}%; background: ${color};">
2294
- ${comp.value >= 10 ? comp.value + '%' : ''}
 
 
2295
  </div>
2296
  </div>
 
 
 
 
2297
  `;
2298
 
2299
- container.appendChild(compItem);
2300
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2301
  }
2302
 
2303
  // Mettre à jour la grille des métriques radar compacte
 
305
  color: #689f38;
306
  }
307
 
308
+ /* ================= COMPÉTENCES EN MATRICE 3x4 ================= */
309
  #competence-bars {
310
  background: white;
311
+ padding: 20px;
312
  border-radius: 12px;
313
  border: 1px solid #e0e0e0;
314
  margin: 15px 0;
 
316
 
317
  .compact-competences-grid {
318
  display: grid;
319
+ grid-template-columns: repeat(4, 1fr); /* 4 colonnes */
320
+ grid-template-rows: repeat(3, auto); /* 3 lignes */
321
+ gap: 15px;
322
+ margin: 20px 0;
323
  }
324
 
325
+ .compact-competence-matrix-item {
326
+ padding: 15px;
327
+ background: linear-gradient(135deg, #f8f9fa, #e9ecef);
328
+ border-radius: 10px;
329
  border-left: 4px solid #1976D2;
330
+ transition: all 0.3s ease;
331
  height: 100%;
332
+ display: flex;
333
+ flex-direction: column;
334
+ justify-content: space-between;
335
+ min-height: 120px;
336
  }
337
 
338
+ .compact-competence-matrix-item:hover {
339
+ transform: translateY(-3px);
340
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
341
+ background: linear-gradient(135deg, #e3f2fd, #bbdefb);
342
  }
343
 
344
+ .compact-matrix-competence-label {
345
+ font-size: 13px;
346
  font-weight: 600;
347
  color: #333;
348
+ margin-bottom: 10px;
349
+ line-height: 1.4;
350
+ flex-grow: 1;
351
  }
352
 
353
+ .compact-matrix-competence-value {
354
+ font-size: 24px;
355
+ font-weight: bold;
356
+ color: #1976D2;
357
+ text-align: center;
358
+ margin: 10px 0;
359
+ }
360
+
361
+ .compact-matrix-competence-value.high { color: #43A047; }
362
+ .compact-matrix-competence-value.medium { color: #FB8C00; }
363
+ .compact-matrix-competence-value.low { color: #E53935; }
364
+
365
+ .compact-matrix-competence-bar {
366
+ height: 8px;
367
  background: #e0e0e0;
368
+ border-radius: 4px;
369
  overflow: hidden;
370
+ margin: 8px 0;
371
  }
372
 
373
+ .compact-matrix-competence-fill {
374
  height: 100%;
375
+ border-radius: 4px;
 
 
 
 
 
 
376
  transition: width 0.5s ease;
377
  }
378
 
 
1203
  .tab-btn {
1204
  width: 100%;
1205
  }
1206
+
1207
+ .compact-competences-grid {
1208
+ grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
1209
+ grid-template-rows: repeat(5, auto); /* 5 lignes */
1210
+ }
1211
  }
1212
 
1213
  @media (max-width: 768px) {
 
1241
  }
1242
 
1243
  .compact-competences-grid {
1244
+ grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
1245
+ grid-template-rows: repeat(7, auto); /* 7 lignes */
1246
+ gap: 12px;
1247
+ }
1248
+
1249
+ .compact-competence-matrix-item {
1250
+ padding: 12px;
1251
+ min-height: 100px;
1252
+ }
1253
+
1254
+ .compact-matrix-competence-label {
1255
+ font-size: 12px;
1256
+ }
1257
+
1258
+ .compact-matrix-competence-value {
1259
+ font-size: 20px;
1260
  }
1261
 
1262
  .compact-radar-metrics-grid {
 
1306
  }
1307
 
1308
  .compact-competences-grid {
1309
+ grid-template-columns: 1fr; /* 1 colonne */
1310
+ grid-template-rows: repeat(14, auto); /* 14 lignes */
1311
  }
1312
 
1313
  .example-metrics-table th,
 
1461
  </div>
1462
  </div>
1463
 
1464
+ <h3>📊 Progression par compétence (Matrice 3x4)</h3>
1465
  <div id="competence-bars">
1466
+ <p style="font-size: 14px; color: #666; margin-bottom: 15px; font-style: italic;">
1467
+ Affichage matriciel des 14 compétences principales (3 lignes × 4 colonnes)
1468
+ </p>
1469
  <div id="compact-competences">
1470
  <em>Chargement des compétences...</em>
1471
  </div>
 
1992
  insights: [
1993
  { icon: "🔄", text: "Démarrage constant (70%)" },
1994
  { icon: "📝", text: "Achèvement régulier (68%)" },
1995
+ { icon: "🎨", text: "Trajectoire d'apprentissage prometteuse" }
1996
  ]
1997
  },
1998
  "Étudiant en difficulté": {
 
2001
  insights: [
2002
  { icon: "👥", text: "Interactions élevées (85%)" },
2003
  { icon: "🚀", text: "Démarrage solide (72%)" },
2004
+ { icon: "💬", text: "Taux d'erreurs observées" }
2005
  ]
2006
  },
2007
  "Étudiant évitant l'échec": {
 
2010
  insights: [
2011
  { icon: "😨", text: "Démarrage faible (35%)" },
2012
  { icon: "⏱️", text: "Achèvement limité (30%)" },
2013
+ { icon: "🌱", text: "Niveau d'activité et d'engagement limité" }
2014
  ]
2015
  },
2016
  "Étudiant à risque": {
 
2309
  return;
2310
  }
2311
 
2312
+ // Créer un conteneur de grille
2313
+ const gridContainer = document.createElement('div');
2314
+ gridContainer.className = 'compact-competences-grid';
2315
+
2316
+ // Limiter à 14 compétences pour la matrice 3x4 (avec 2 cases vides)
2317
+ const maxCompetences = 14;
2318
+ const displayedCompetences = competences.slice(0, maxCompetences);
2319
+
2320
+ displayedCompetences.forEach(comp => {
2321
  // Déterminer la couleur selon la valeur
2322
+ let color, colorClass;
2323
+ if (comp.value < 50) {
2324
+ color = '#E53935';
2325
+ colorClass = 'low';
2326
+ } else if (comp.value < 70) {
2327
+ color = '#FB8C00';
2328
+ colorClass = 'medium';
2329
+ } else {
2330
+ color = '#43A047';
2331
+ colorClass = 'high';
2332
+ }
2333
 
2334
+ // Créer l'élément de compétence matricielle
2335
  const compItem = document.createElement('div');
2336
+ compItem.className = 'compact-competence-matrix-item';
2337
  compItem.innerHTML = `
2338
+ <div class="compact-matrix-competence-label">
2339
+ ${comp.label}
 
2340
  </div>
2341
+ <div class="compact-matrix-competence-value ${colorClass}">
2342
+ ${comp.value}%
2343
+ </div>
2344
+ <div class="compact-matrix-competence-bar">
2345
+ <div class="compact-matrix-competence-fill" style="width: ${comp.value}%; background: ${color};">
2346
  </div>
2347
  </div>
2348
+ <div style="display: flex; justify-content: space-between; font-size: 11px; color: #666; margin-top: 5px;">
2349
+ <span>0%</span>
2350
+ <span>100%</span>
2351
+ </div>
2352
  `;
2353
 
2354
+ gridContainer.appendChild(compItem);
2355
  });
2356
+
2357
+ // Si nous avons moins de 14 compétences, ajouter des cases vides pour compléter la matrice
2358
+ const emptySlots = maxCompetences - displayedCompetences.length;
2359
+ for (let i = 0; i < emptySlots; i++) {
2360
+ const emptyItem = document.createElement('div');
2361
+ emptyItem.className = 'compact-competence-matrix-item';
2362
+ emptyItem.style.opacity = '0.3';
2363
+ emptyItem.innerHTML = `
2364
+ <div class="compact-matrix-competence-label" style="color: #999;">
2365
+ Compétence non définie
2366
+ </div>
2367
+ <div class="compact-matrix-competence-value" style="color: #999;">
2368
+ --
2369
+ </div>
2370
+ <div class="compact-matrix-competence-bar">
2371
+ <div class="compact-matrix-competence-fill" style="width: 0%; background: #999;">
2372
+ </div>
2373
+ </div>
2374
+ `;
2375
+ gridContainer.appendChild(emptyItem);
2376
+ }
2377
+
2378
+ container.appendChild(gridContainer);
2379
  }
2380
 
2381
  // Mettre à jour la grille des métriques radar compacte