OUAREDAEK commited on
Commit
14a3951
·
verified ·
1 Parent(s): 43de97d

Upload templates/index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. templates/index.html +132 -100
templates/index.html CHANGED
@@ -638,20 +638,20 @@ button:disabled {
638
  /* ================= LÉGENDE HEATMAP COMPACTE (RÉDUITE) ================= */
639
  .compact-enriched-legend {
640
  background: white;
641
- padding: 10px 15px; /* Réduit de 15px à 10px en haut/bas */
642
  border-radius: 10px;
643
  border: 1px solid #e0e0e0;
644
- margin: 10px 0; /* Réduit de 15px à 10px */
645
- height: 50px; /* Réduit de 60px à 50px */
646
  display: flex;
647
- align-items: center;
648
  justify-content: space-between;
649
  }
650
 
651
  .compact-legend-section h5 {
652
  color: #1976D2;
653
- margin: 0; /* Supprimé margin-bottom et margin-top */
654
- font-size: 12px; /* Réduit de 14px à 12px */
655
  display: flex;
656
  align-items: center;
657
  gap: 6px;
@@ -662,30 +662,34 @@ button:disabled {
662
  padding: 0;
663
  display: flex;
664
  flex-direction: column;
665
- gap: 5px; /* Espacement réduit */
 
666
  }
667
 
668
  /* Grille de légende compacte sur une seule ligne */
669
  .compact-legend-grid {
670
- display: flex; /* Changé de grid à flex pour une seule ligne */
671
- gap: 5px; /* Réduit de 8px à 5px */
672
- flex-wrap: nowrap;
673
  }
674
 
675
  .compact-legend-item-small {
676
  display: flex;
677
  align-items: center;
678
- gap: 3px; /* Réduit de 6px à 3px */
679
- font-size: 9px; /* Réduit de 11px à 9px */
680
  white-space: nowrap;
 
 
 
681
  }
682
 
683
  .compact-legend-color-small {
684
- width: 12px; /* Réduit de 16px à 12px */
685
- height: 12px; /* Réduit de 16px à 12px */
686
- border-radius: 3px; /* Réduit de 4px à 3px */
687
- border: 1px solid white; /* Réduit de 2px à 1px */
688
- box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Ombre plus légère */
689
  }
690
 
691
  /* ================= INDICATEURS DE PERSÉVÉRANCE COMPACTS ================= */
@@ -702,7 +706,6 @@ button:disabled {
702
  flex-direction: column;
703
  gap: 8px;
704
  margin-bottom: 10px;
705
- margin-top: 1px; /* ou 0 si tu veux coller */
706
  }
707
 
708
  .compact-indicator {
@@ -1689,7 +1692,7 @@ textarea:focus {
1689
  </div>
1690
  </div>
1691
 
1692
- <!-- HEATMAP COMPACTE -->
1693
  <div class="compact-heatmap-and-indicators">
1694
  <h3>🔥 Heatmap d'activité - Analyse de la persistance et du management de l'effort (persévérance)</h3>
1695
 
@@ -1708,33 +1711,35 @@ textarea:focus {
1708
  </div>
1709
 
1710
  <!-- Canvas pour le heatmap -->
1711
- <canvas id="heatmap" width="800" height="250" style="max-width: 100%; height: auto;"></canvas>
1712
 
1713
  <!-- Légende des niveaux d'activité compacte -->
1714
  <div class="compact-enriched-legend">
1715
  <div class="compact-legend-section">
1716
- <h5>📈 Niveaux d'activité</h5>
1717
- </div>
1718
- <div class="compact-legend-grid">
1719
- <div class="compact-legend-item-small">
1720
- <div class="compact-legend-color-small" style="background:#EBEDF0;"></div>
1721
- <span>Aucune</span>
1722
- </div>
1723
- <div class="compact-legend-item-small">
1724
- <div class="compact-legend-color-small" style="background:#C6E48B;"></div>
1725
- <span>Faible</span>
1726
- </div>
1727
- <div class="compact-legend-item-small">
1728
- <div class="compact-legend-color-small" style="background:#7BC96F;"></div>
1729
- <span>Moyenne</span>
1730
- </div>
1731
- <div class="compact-legend-item-small">
1732
- <div class="compact-legend-color-small" style="background:#239A3B;"></div>
1733
- <span>Élevée</span>
1734
- </div>
1735
- <div class="compact-legend-item-small">
1736
- <div class="compact-legend-color-small" style="background:#196127;"></div>
1737
- <span>Intense</span>
 
 
1738
  </div>
1739
  </div>
1740
  </div>
@@ -1744,60 +1749,47 @@ textarea:focus {
1744
  <!-- Colonne droite : Indicateurs de la persistance et du management de l'effort -->
1745
  <div class="compact-heatmap-right">
1746
  <div class="compact-persistence-analysis" id="compact-persistenceAnalysis">
1747
- <h5>🧭 Indicateurs de la gestion du temps et régularité</h5>
 
 
1748
  <div class="compact-persistence-indicators">
1749
  <div class="compact-indicator">
1750
- <span class="compact-indicator-dot" style="background:#FF6B6B;"></span>
1751
- <span>
1752
- Régularité du travail :
1753
- <strong id="compact-regularityScore">-</strong>
1754
- </span>
1755
- </div>
1756
 
1757
- <div style="margin-left: 18px; margin-top: 0; font-size: 12px; color: #888;">
1758
- La constance de lactivité de lapprenant dans le temps.
1759
- </div>
1760
 
1761
-
1762
-
1763
- <div class="compact-indicator">
1764
- <span class="compact-indicator-dot" style="background:#FFD166;"></span>
1765
- <span>Gestion échéances : <strong id="compact-deadlineScore">-</strong></span>
1766
- </div>
1767
 
1768
- <div style="margin-left: 18px; margin-top: 0; font-size: 12px; color: #888;">
1769
- La capacité de l'apprenant à respecter les délais pédagogiques.
1770
- </div>
1771
 
1772
-
1773
-
1774
-
1775
-
1776
- <div class="compact-indicator" style="margin-top: 10px;">
1777
- <span class="compact-indicator-dot" style="background:#4ECDC4;"></span>
1778
- <span>
1779
- <strong>Schéma d'effort :</strong>
1780
- <span id="compact-effortPattern">- </span>
1781
- </span>
1782
- </div>
1783
 
1784
- <div style="margin-left: 18px; margin-top: 0; font-size: 12px; color: #888;">
1785
- La dynamique temporelle de l'effort.
1786
  </div>
1787
-
1788
-
1789
  </div>
1790
 
1791
-
1792
-
1793
- <div style="text-align: center;">
1794
- <strong>Persistance et gestion des efforts :</strong>
1795
- <span id="compact-regularityText">Analyse en cours...</span>
1796
- </div>
1797
-
1798
-
1799
-
1800
-
1801
  </div>
1802
  </div>
1803
  </div>
@@ -2536,7 +2528,7 @@ function generateReflAgentMessage(profileTitle) {
2536
  "Étudiant acceptant l'échec": "Ton attitude face à l'échec est constructive. Utilise ces expériences pour identifier tes points d'amélioration.",
2537
  "Étudiant inactif": "Le premier pas est le plus difficile. Choisis une seule activité simple pour commencer, sans pression.",
2538
  "Étudiant non engagé": "Il est normal de manquer d'intérêt parfois. Cherche un aspect du cours qui pourrait te motiver davantage.",
2539
- "Étudiant persévérant": "Tes compétences sont solides. Fais confiance à ton potentiel et ose tinvestir pleinement.",
2540
  "Étudiant actif": "Il est normal de manquer d'intérêt parfois. Cherche un aspect du cours qui pourrait te motiver davantage."
2541
  };
2542
 
@@ -2646,8 +2638,8 @@ function loadScenario(index) {
2646
  // Mettre à jour le message bot radar compact
2647
  updateCompactRadarBotMessage(s);
2648
 
2649
- // Mettre à jour la heatmap enrichie compacte
2650
- drawCompactEnrichedHeatmap(s);
2651
 
2652
  // Mettre à jour la persévérance spécifique au profil
2653
  updatePerseveranceProfile(s.title);
@@ -2770,7 +2762,6 @@ function updateCompactRadarMetricsGrid() {
2770
  radarMetrics.forEach(metric => {
2771
  // Déterminer la classe de couleur selon la valeur
2772
  let colorClass = "";
2773
- ;
2774
  if (metric.value >= 70) colorClass = "high";
2775
  else if (metric.value >= 40) colorClass = "medium";
2776
  else colorClass = "low";
@@ -2842,8 +2833,8 @@ function updateCompactRadarBotMessage(scenario) {
2842
  });
2843
  }
2844
 
2845
- // Dessiner la heatmap enrichie compacte
2846
- function drawCompactEnrichedHeatmap(scenario) {
2847
  const canvas = document.getElementById("heatmap");
2848
  if (!canvas) return;
2849
 
@@ -2940,24 +2931,66 @@ function drawCompactEnrichedHeatmap(scenario) {
2940
  ctx.font = "bold 14px Arial";
2941
  ctx.fillStyle = "#1976D2";
2942
  ctx.textAlign = "center";
2943
- ctx.fillText(`${scenarioInfo.emoji} ${scenarioInfo.title}`, canvas.width / 2, 20);
2944
 
2945
  ctx.font = "12px Arial";
2946
  ctx.fillStyle = "#666";
2947
- ctx.fillText(`${scenarioInfo.pattern}`, canvas.width / 2, 40);
2948
 
2949
  // Générer les données d'activité selon le scénario
2950
  const activityData = generateCompactPersistenceData(scenario.id, totalDays);
2951
 
2952
- // Dessiner la heatmap
2953
  const colors = ["#EBEDF0", "#C6E48B", "#7BC96F", "#239A3B", "#196127"];
2954
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2955
  for (let day = 0; day < totalDays; day++) {
2956
  const week = Math.floor(day / 7);
2957
  const weekday = day % 7;
2958
 
2959
- const x = 30 + week * (cellSize * 7 + padding * 7) + weekday * (cellSize + padding);
2960
- const y = 60 + weekday * (cellSize + padding);
2961
 
2962
  const intensity = activityData[day];
2963
 
@@ -3571,7 +3604,6 @@ function initTrustSave(){
3571
 
3572
  // Récupérer les informations conditionnelles
3573
  let evaluatorName = "";
3574
- ;
3575
  let evaluatorRole = "";
3576
  let expertiseLevel = "";
3577
  let messageMastery = "";
@@ -3877,7 +3909,7 @@ function changePersistenceAnalysis() {
3877
  if (!currentScenario) return;
3878
 
3879
  // Redessiner la heatmap avec le mode sélectionné
3880
- drawCompactEnrichedHeatmap(currentScenario);
3881
 
3882
  // Ajouter une annotation selon le mode
3883
  const canvas = document.getElementById("heatmap");
@@ -3941,4 +3973,4 @@ window.loadScenario = loadScenario;
3941
  </div>
3942
 
3943
  </body>
3944
- </html>
 
638
  /* ================= LÉGENDE HEATMAP COMPACTE (RÉDUITE) ================= */
639
  .compact-enriched-legend {
640
  background: white;
641
+ padding: 15px;
642
  border-radius: 10px;
643
  border: 1px solid #e0e0e0;
644
+ margin: 10px 0;
645
+ height: auto;
646
  display: flex;
647
+ align-items: flex-start;
648
  justify-content: space-between;
649
  }
650
 
651
  .compact-legend-section h5 {
652
  color: #1976D2;
653
+ margin: 0 0 10px 0;
654
+ font-size: 14px;
655
  display: flex;
656
  align-items: center;
657
  gap: 6px;
 
662
  padding: 0;
663
  display: flex;
664
  flex-direction: column;
665
+ gap: 5px;
666
+ width: 100%;
667
  }
668
 
669
  /* Grille de légende compacte sur une seule ligne */
670
  .compact-legend-grid {
671
+ display: flex;
672
+ gap: 10px;
673
+ flex-wrap: wrap;
674
  }
675
 
676
  .compact-legend-item-small {
677
  display: flex;
678
  align-items: center;
679
+ gap: 5px;
680
+ font-size: 11px;
681
  white-space: nowrap;
682
+ padding: 4px 8px;
683
+ background: #f8f9fa;
684
+ border-radius: 4px;
685
  }
686
 
687
  .compact-legend-color-small {
688
+ width: 14px;
689
+ height: 14px;
690
+ border-radius: 3px;
691
+ border: 1px solid white;
692
+ box-shadow: 0 1px 2px rgba(0,0,0,0.1);
693
  }
694
 
695
  /* ================= INDICATEURS DE PERSÉVÉRANCE COMPACTS ================= */
 
706
  flex-direction: column;
707
  gap: 8px;
708
  margin-bottom: 10px;
 
709
  }
710
 
711
  .compact-indicator {
 
1692
  </div>
1693
  </div>
1694
 
1695
+ <!-- HEATMAP COMPACTE AVEC TITRES ALIGNÉS -->
1696
  <div class="compact-heatmap-and-indicators">
1697
  <h3>🔥 Heatmap d'activité - Analyse de la persistance et du management de l'effort (persévérance)</h3>
1698
 
 
1711
  </div>
1712
 
1713
  <!-- Canvas pour le heatmap -->
1714
+ <canvas id="heatmap" width="800" height="350" style="max-width: 100%; height: auto;"></canvas>
1715
 
1716
  <!-- Légende des niveaux d'activité compacte -->
1717
  <div class="compact-enriched-legend">
1718
  <div class="compact-legend-section">
1719
+ <h5 style="margin: 0 0 10px 0; font-size: 14px; color: #1976D2; display: flex; align-items: center; gap: 6px;">
1720
+ <span>📈</span> Niveaux d'activité
1721
+ </h5>
1722
+ <div class="compact-legend-grid">
1723
+ <div class="compact-legend-item-small">
1724
+ <div class="compact-legend-color-small" style="background:#EBEDF0;"></div>
1725
+ <span>Aucune</span>
1726
+ </div>
1727
+ <div class="compact-legend-item-small">
1728
+ <div class="compact-legend-color-small" style="background:#C6E48B;"></div>
1729
+ <span>Faible</span>
1730
+ </div>
1731
+ <div class="compact-legend-item-small">
1732
+ <div class="compact-legend-color-small" style="background:#7BC96F;"></div>
1733
+ <span>Moyenne</span>
1734
+ </div>
1735
+ <div class="compact-legend-item-small">
1736
+ <div class="compact-legend-color-small" style="background:#239A3B;"></div>
1737
+ <span>Élevée</span>
1738
+ </div>
1739
+ <div class="compact-legend-item-small">
1740
+ <div class="compact-legend-color-small" style="background:#196127;"></div>
1741
+ <span>Intense</span>
1742
+ </div>
1743
  </div>
1744
  </div>
1745
  </div>
 
1749
  <!-- Colonne droite : Indicateurs de la persistance et du management de l'effort -->
1750
  <div class="compact-heatmap-right">
1751
  <div class="compact-persistence-analysis" id="compact-persistenceAnalysis">
1752
+ <h5 style="margin: 0 0 15px 0; font-size: 14px; color: #1976D2; display: flex; align-items: center; gap: 6px;">
1753
+ <span>🧭</span> Indicateurs de la gestion du temps et régularité
1754
+ </h5>
1755
  <div class="compact-persistence-indicators">
1756
  <div class="compact-indicator">
1757
+ <span class="compact-indicator-dot" style="background:#FF6B6B;"></span>
1758
+ <span>
1759
+ Régularité du travail :
1760
+ <strong id="compact-regularityScore">-</strong>
1761
+ </span>
1762
+ </div>
1763
 
1764
+ <div style="margin-left: 18px; margin-top: 0; font-size: 12px; color: #888;">
1765
+ La constance de l'activité de l'apprenant dans le temps.
1766
+ </div>
1767
 
1768
+ <div class="compact-indicator">
1769
+ <span class="compact-indicator-dot" style="background:#FFD166;"></span>
1770
+ <span>Gestion échéances : <strong id="compact-deadlineScore">-</strong></span>
1771
+ </div>
 
 
1772
 
1773
+ <div style="margin-left: 18px; margin-top: 0; font-size: 12px; color: #888;">
1774
+ La capacité de l'apprenant à respecter les délais pédagogiques.
1775
+ </div>
1776
 
1777
+ <div class="compact-indicator" style="margin-top: 10px;">
1778
+ <span class="compact-indicator-dot" style="background:#4ECDC4;"></span>
1779
+ <span>
1780
+ <strong>Schéma d'effort :</strong>
1781
+ <span id="compact-effortPattern">- </span>
1782
+ </span>
1783
+ </div>
 
 
 
 
1784
 
1785
+ <div style="margin-left: 18px; margin-top: 0; font-size: 12px; color: #888;">
1786
+ La dynamique temporelle de l'effort.
1787
  </div>
 
 
1788
  </div>
1789
 
1790
+ <div style="text-align: center; margin-top: 15px;">
1791
+ <strong>Persistance et gestion des efforts :</strong>
1792
+ <span id="compact-regularityText">Analyse en cours...</span>
 
 
 
 
 
 
 
1793
  </div>
1794
  </div>
1795
  </div>
 
2528
  "Étudiant acceptant l'échec": "Ton attitude face à l'échec est constructive. Utilise ces expériences pour identifier tes points d'amélioration.",
2529
  "Étudiant inactif": "Le premier pas est le plus difficile. Choisis une seule activité simple pour commencer, sans pression.",
2530
  "Étudiant non engagé": "Il est normal de manquer d'intérêt parfois. Cherche un aspect du cours qui pourrait te motiver davantage.",
2531
+ "Étudiant persévérant": "Tes compétences sont solides. Fais confiance à ton potentiel et ose t'investir pleinement.",
2532
  "Étudiant actif": "Il est normal de manquer d'intérêt parfois. Cherche un aspect du cours qui pourrait te motiver davantage."
2533
  };
2534
 
 
2638
  // Mettre à jour le message bot radar compact
2639
  updateCompactRadarBotMessage(s);
2640
 
2641
+ // Mettre à jour la heatmap enrichie compacte avec les axes
2642
+ drawCompactEnrichedHeatmapWithAxes(s);
2643
 
2644
  // Mettre à jour la persévérance spécifique au profil
2645
  updatePerseveranceProfile(s.title);
 
2762
  radarMetrics.forEach(metric => {
2763
  // Déterminer la classe de couleur selon la valeur
2764
  let colorClass = "";
 
2765
  if (metric.value >= 70) colorClass = "high";
2766
  else if (metric.value >= 40) colorClass = "medium";
2767
  else colorClass = "low";
 
2833
  });
2834
  }
2835
 
2836
+ // Dessiner la heatmap enrichie compacte avec axes
2837
+ function drawCompactEnrichedHeatmapWithAxes(scenario) {
2838
  const canvas = document.getElementById("heatmap");
2839
  if (!canvas) return;
2840
 
 
2931
  ctx.font = "bold 14px Arial";
2932
  ctx.fillStyle = "#1976D2";
2933
  ctx.textAlign = "center";
2934
+ ctx.fillText(`${scenarioInfo.emoji} ${scenarioInfo.title}`, canvas.width / 2, 25);
2935
 
2936
  ctx.font = "12px Arial";
2937
  ctx.fillStyle = "#666";
2938
+ ctx.fillText(`${scenarioInfo.pattern}`, canvas.width / 2, 45);
2939
 
2940
  // Générer les données d'activité selon le scénario
2941
  const activityData = generateCompactPersistenceData(scenario.id, totalDays);
2942
 
2943
+ // Dessiner la heatmap avec axes
2944
  const colors = ["#EBEDF0", "#C6E48B", "#7BC96F", "#239A3B", "#196127"];
2945
 
2946
+ // Position de départ de la grille
2947
+ const startX = 60;
2948
+ const startY = 80;
2949
+
2950
+ // Ajouter les labels des jours (à gauche)
2951
+ ctx.font = "11px Arial";
2952
+ ctx.fillStyle = "#555";
2953
+ ctx.textAlign = "right";
2954
+ ctx.textBaseline = "middle";
2955
+
2956
+ for (let weekday = 0; weekday < 7; weekday++) {
2957
+ const y = startY + weekday * (cellSize + padding) + cellSize / 2;
2958
+ ctx.fillText(days[weekday], startX - 10, y);
2959
+ }
2960
+
2961
+ // Ajouter les numéros des semaines (en haut)
2962
+ ctx.font = "11px Arial";
2963
+ ctx.fillStyle = "#555";
2964
+ ctx.textAlign = "center";
2965
+ ctx.textBaseline = "bottom";
2966
+
2967
+ for (let week = 0; week < weeks; week++) {
2968
+ const x = startX + week * (cellSize * 7 + padding * 7) + (cellSize * 7) / 2;
2969
+ ctx.fillText(`S${week + 1}`, x, startY - 5);
2970
+ }
2971
+
2972
+ // Ajouter un titre pour les axes
2973
+ ctx.font = "10px Arial";
2974
+ ctx.fillStyle = "#777";
2975
+ ctx.textAlign = "center";
2976
+
2977
+ // Titre pour les semaines
2978
+ ctx.fillText("Semaines", canvas.width / 2, startY - 15);
2979
+
2980
+ // Titre pour les jours
2981
+ ctx.save();
2982
+ ctx.translate(startX - 25, startY + (cellSize * 7) / 2);
2983
+ ctx.rotate(-Math.PI / 2);
2984
+ ctx.fillText("Jours", 0, 0);
2985
+ ctx.restore();
2986
+
2987
+ // Dessiner les cellules
2988
  for (let day = 0; day < totalDays; day++) {
2989
  const week = Math.floor(day / 7);
2990
  const weekday = day % 7;
2991
 
2992
+ const x = startX + week * (cellSize * 7 + padding * 7) + weekday * (cellSize + padding);
2993
+ const y = startY + weekday * (cellSize + padding);
2994
 
2995
  const intensity = activityData[day];
2996
 
 
3604
 
3605
  // Récupérer les informations conditionnelles
3606
  let evaluatorName = "";
 
3607
  let evaluatorRole = "";
3608
  let expertiseLevel = "";
3609
  let messageMastery = "";
 
3909
  if (!currentScenario) return;
3910
 
3911
  // Redessiner la heatmap avec le mode sélectionné
3912
+ drawCompactEnrichedHeatmapWithAxes(currentScenario);
3913
 
3914
  // Ajouter une annotation selon le mode
3915
  const canvas = document.getElementById("heatmap");
 
3973
  </div>
3974
 
3975
  </body>
3976
+ </html>