Spaces:
Sleeping
Sleeping
Upload templates/index.html with huggingface_hub
Browse files- templates/index.html +15 -3
templates/index.html
CHANGED
|
@@ -1065,6 +1065,18 @@
|
|
| 1065 |
<div class="form-group"><label class="form-label">J'étudie pour obtenir de bonnes notes et faire plaisir à mes parents/professeurs</label><div class="motivation-rating" data-motivation="introjected"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1066 |
<div style="margin-top:16px;font-size:0.8rem;background:var(--gray-50);padding:12px;border-radius:8px;">Section complétée - Motivation introjectée: <span id="introjectedScore">4.0</span> (pression interne modérée)</div>
|
| 1067 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1068 |
<div class="profile-summary-cards"><div class="profile-mini-card"><h4>Big Five Traits</h4><div class="value" id="summaryExtraversion">3.0</div><div>Extraversion</div></div><div class="profile-mini-card"><div class="value" id="summaryOpenness">3.0</div><div>Ouverture</div></div><div class="profile-mini-card"><div class="value" id="summaryConscientiousness">4.0</div><div>Conscience</div></div><div class="profile-mini-card"><h4>Motivation</h4><div class="value" id="summaryIntrinsic">3.0</div><div>Intrinsèque</div></div><div class="profile-mini-card"><div class="value" id="summaryIntrojected">4.0</div><div>Introjectée</div></div></div>
|
| 1069 |
<div class="profile-recommendations" style="background: transparent; border-left: none;"><h4>Recommandations Personnalisées</h4><div id="recommendationsContainer"><p>Qualité du sommeil: Maintenez 7-8 heures de sommeil de qualité.</p><p>Planification: Renforcez votre organisation avec des rappels.</p></div></div>
|
| 1070 |
<button class="btn btn-primary btn-large" onclick="finalizeProfile()" style="width:100%;"><i class="fas fa-check-circle"></i> Finaliser et Générer le Profil Personnalisé</button>
|
|
@@ -1199,7 +1211,7 @@
|
|
| 1199 |
{ "id": "T-REP", "label": "Effets de style", "category": "Texte" }
|
| 1200 |
];
|
| 1201 |
let eventsList = [], currentSessions = [], spacedChart = null, symmetryChart = null, radarChart = null;
|
| 1202 |
-
let profileData = { extraversion: 3, openness: 3, conscientiousness: 4, agreeableness: 3, neuroticism: 3, intrinsic: 3, introjected: 4 };
|
| 1203 |
const eventTemplates = [{ type: "Rappel d'étude", title: "Session de révision", message: "Votre session est prévue aujourd'hui.", priority: "high" },{ type: "Conseil IA", title: "Optimisation", message: "Révisez les conjugaisons.", priority: "medium" },{ type: "Encouragement", title: "Progression", message: "80% des objectifs atteints.", priority: "low" }];
|
| 1204 |
let journalEntries = [];
|
| 1205 |
const radarIndicators = ["Démarrage des activités", "Achèvement des activités","Taux d'erreur", "Tentatives de réponses","Éléments des connaissances validées", "Interactions avec les ressources","Score", "Niveau moyen des compétences"];
|
|
@@ -1302,8 +1314,8 @@
|
|
| 1302 |
function showToast(msg) { let div = document.createElement('div'); div.style.cssText = `position:fixed; bottom:20px; right:20px; background:#1e293b; color:white; padding:12px 20px; border-radius:8px; z-index:1000;`; div.innerHTML = msg; document.body.appendChild(div); setTimeout(()=>div.remove(), 2500); }
|
| 1303 |
function setupRatingListeners() { document.querySelectorAll('.big5-rating .rating-btn, .motivation-rating .rating-btn').forEach(btn => btn.addEventListener('click', function() { const container = this.closest('.big5-rating, .motivation-rating'); const trait = container.dataset.trait || container.dataset.motivation; const value = parseInt(this.dataset.value); profileData[trait] = value; updateRatingUI(container, value); updateProfileUI(); saveProfileToStorage(); })); }
|
| 1304 |
function updateRatingUI(container, value) { container.querySelectorAll('.rating-btn').forEach(btn => { btn.classList.remove('active'); if(parseInt(btn.dataset.value) === value) btn.classList.add('active'); }); }
|
| 1305 |
-
function updateProfileUI() { document.getElementById('summaryExtraversion').innerText = profileData.extraversion; document.getElementById('summaryOpenness').innerText = profileData.openness; document.getElementById('summaryConscientiousness').innerText = profileData.conscientiousness; document.getElementById('summaryIntrinsic').innerText = profileData.intrinsic; document.getElementById('summaryIntrojected').innerText = profileData.introjected; document.getElementById('neuroticismScore').innerText = profileData.neuroticism; document.getElementById('introjectedScore').innerText = profileData.introjected; let completed = Object.values(profileData).filter(v => v).length; const percent = Math.round((completed /
|
| 1306 |
-
function autoFillProfile() { profileData = { extraversion: 4, openness: 4, conscientiousness: 5, agreeableness: 4, neuroticism: 2, intrinsic: 5, introjected: 3 }; document.querySelectorAll('.big5-rating, .motivation-rating').forEach(container => { const key = container.dataset.trait || container.dataset.motivation; if(profileData[key]) updateRatingUI(container, profileData[key]); }); updateProfileUI(); saveProfileToStorage(); showToast("Profil auto-rempli"); }
|
| 1307 |
function saveProfileData() { saveProfileToStorage(); showToast("Profil sauvegardé"); }
|
| 1308 |
function finalizeProfile() { saveProfileToStorage(); showToast("Profil finalisé"); }
|
| 1309 |
function saveProfileToStorage() { localStorage.setItem('perseverAI_profile', JSON.stringify(profileData)); }
|
|
|
|
| 1065 |
<div class="form-group"><label class="form-label">J'étudie pour obtenir de bonnes notes et faire plaisir à mes parents/professeurs</label><div class="motivation-rating" data-motivation="introjected"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1066 |
<div style="margin-top:16px;font-size:0.8rem;background:var(--gray-50);padding:12px;border-radius:8px;">Section complétée - Motivation introjectée: <span id="introjectedScore">4.0</span> (pression interne modérée)</div>
|
| 1067 |
</div>
|
| 1068 |
+
<!-- Nouvelle section : Importance des raisons d'étudier (multi-choix) -->
|
| 1069 |
+
<div class="card" style="margin-bottom:20px;padding:20px;">
|
| 1070 |
+
<h4 style="margin-bottom:16px;">Importance des raisons dans votre décision d’étudier</h4>
|
| 1071 |
+
<p style="font-size:0.8rem;color:var(--gray-600);margin-bottom:20px;">(1 = Pas du tout important ; 5 = Très important)</p>
|
| 1072 |
+
<div class="form-group"><label class="form-label">Obtenir une éducation</label><div class="big5-rating" data-trait="reason_education"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1073 |
+
<div class="form-group"><label class="form-label">Acquérir davantage de diplômes</label><div class="big5-rating" data-trait="reason_degrees"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1074 |
+
<div class="form-group"><label class="form-label">Gagner plus d’argent</label><div class="big5-rating" data-trait="reason_money"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1075 |
+
<div class="form-group"><label class="form-label">Prouver que quelqu’un a tort</label><div class="big5-rating" data-trait="reason_prove_wrong"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1076 |
+
<div class="form-group"><label class="form-label">Se prouver à soi-même que l’on a tort</label><div class="big5-rating" data-trait="reason_self_prove"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1077 |
+
<div class="form-group"><label class="form-label">Devenir indépendant</label><div class="big5-rating" data-trait="reason_independent"><button type="button" class="rating-btn" data-value="1">1</button><button type="button" class="rating-btn" data-value="2">2</button><button type="button" class="rating-btn" data-value="3">3</button><button type="button" class="rating-btn" data-value="4">4</button><button type="button" class="rating-btn" data-value="5">5</button></div></div>
|
| 1078 |
+
<div style="margin-top:16px;font-size:0.8rem;background:var(--gray-50);padding:12px;border-radius:8px;">Section complétée - Ces raisons influencent votre engagement et votre persévérance.</div>
|
| 1079 |
+
</div>
|
| 1080 |
<div class="profile-summary-cards"><div class="profile-mini-card"><h4>Big Five Traits</h4><div class="value" id="summaryExtraversion">3.0</div><div>Extraversion</div></div><div class="profile-mini-card"><div class="value" id="summaryOpenness">3.0</div><div>Ouverture</div></div><div class="profile-mini-card"><div class="value" id="summaryConscientiousness">4.0</div><div>Conscience</div></div><div class="profile-mini-card"><h4>Motivation</h4><div class="value" id="summaryIntrinsic">3.0</div><div>Intrinsèque</div></div><div class="profile-mini-card"><div class="value" id="summaryIntrojected">4.0</div><div>Introjectée</div></div></div>
|
| 1081 |
<div class="profile-recommendations" style="background: transparent; border-left: none;"><h4>Recommandations Personnalisées</h4><div id="recommendationsContainer"><p>Qualité du sommeil: Maintenez 7-8 heures de sommeil de qualité.</p><p>Planification: Renforcez votre organisation avec des rappels.</p></div></div>
|
| 1082 |
<button class="btn btn-primary btn-large" onclick="finalizeProfile()" style="width:100%;"><i class="fas fa-check-circle"></i> Finaliser et Générer le Profil Personnalisé</button>
|
|
|
|
| 1211 |
{ "id": "T-REP", "label": "Effets de style", "category": "Texte" }
|
| 1212 |
];
|
| 1213 |
let eventsList = [], currentSessions = [], spacedChart = null, symmetryChart = null, radarChart = null;
|
| 1214 |
+
let profileData = { extraversion: 3, openness: 3, conscientiousness: 4, agreeableness: 3, neuroticism: 3, intrinsic: 3, introjected: 4, reason_education: 3, reason_degrees: 3, reason_money: 3, reason_prove_wrong: 2, reason_self_prove: 2, reason_independent: 3 };
|
| 1215 |
const eventTemplates = [{ type: "Rappel d'étude", title: "Session de révision", message: "Votre session est prévue aujourd'hui.", priority: "high" },{ type: "Conseil IA", title: "Optimisation", message: "Révisez les conjugaisons.", priority: "medium" },{ type: "Encouragement", title: "Progression", message: "80% des objectifs atteints.", priority: "low" }];
|
| 1216 |
let journalEntries = [];
|
| 1217 |
const radarIndicators = ["Démarrage des activités", "Achèvement des activités","Taux d'erreur", "Tentatives de réponses","Éléments des connaissances validées", "Interactions avec les ressources","Score", "Niveau moyen des compétences"];
|
|
|
|
| 1314 |
function showToast(msg) { let div = document.createElement('div'); div.style.cssText = `position:fixed; bottom:20px; right:20px; background:#1e293b; color:white; padding:12px 20px; border-radius:8px; z-index:1000;`; div.innerHTML = msg; document.body.appendChild(div); setTimeout(()=>div.remove(), 2500); }
|
| 1315 |
function setupRatingListeners() { document.querySelectorAll('.big5-rating .rating-btn, .motivation-rating .rating-btn').forEach(btn => btn.addEventListener('click', function() { const container = this.closest('.big5-rating, .motivation-rating'); const trait = container.dataset.trait || container.dataset.motivation; const value = parseInt(this.dataset.value); profileData[trait] = value; updateRatingUI(container, value); updateProfileUI(); saveProfileToStorage(); })); }
|
| 1316 |
function updateRatingUI(container, value) { container.querySelectorAll('.rating-btn').forEach(btn => { btn.classList.remove('active'); if(parseInt(btn.dataset.value) === value) btn.classList.add('active'); }); }
|
| 1317 |
+
function updateProfileUI() { document.getElementById('summaryExtraversion').innerText = profileData.extraversion; document.getElementById('summaryOpenness').innerText = profileData.openness; document.getElementById('summaryConscientiousness').innerText = profileData.conscientiousness; document.getElementById('summaryIntrinsic').innerText = profileData.intrinsic; document.getElementById('summaryIntrojected').innerText = profileData.introjected; document.getElementById('neuroticismScore').innerText = profileData.neuroticism; document.getElementById('introjectedScore').innerText = profileData.introjected; let completed = Object.values(profileData).filter(v => v).length; const percent = Math.round((completed / 12) * 100); document.getElementById('profileCompletionPercent').innerText = percent + '%'; document.getElementById('profileProgressFill').style.width = percent + '%'; document.getElementById('completedCount').innerText = Math.min(completed, 5); let level = "Débutant"; if(profileData.conscientiousness >= 4 && profileData.intrinsic >= 4) level = "Avancé"; else if(profileData.conscientiousness >= 3) level = "Intermédiaire"; document.getElementById('profileLevel').innerText = level; document.getElementById('recommendationsContainer').innerHTML = ["◼ Qualité du sommeil: Maintenez 7-8 heures.", "◼ Planification: Renforcez votre organisation."].map(r => `<p>${r}</p>`).join(''); }
|
| 1318 |
+
function autoFillProfile() { profileData = { extraversion: 4, openness: 4, conscientiousness: 5, agreeableness: 4, neuroticism: 2, intrinsic: 5, introjected: 3, reason_education: 5, reason_degrees: 4, reason_money: 4, reason_prove_wrong: 2, reason_self_prove: 3, reason_independent: 5 }; document.querySelectorAll('.big5-rating, .motivation-rating').forEach(container => { const key = container.dataset.trait || container.dataset.motivation; if(profileData[key]) updateRatingUI(container, profileData[key]); }); updateProfileUI(); saveProfileToStorage(); showToast("Profil auto-rempli"); }
|
| 1319 |
function saveProfileData() { saveProfileToStorage(); showToast("Profil sauvegardé"); }
|
| 1320 |
function finalizeProfile() { saveProfileToStorage(); showToast("Profil finalisé"); }
|
| 1321 |
function saveProfileToStorage() { localStorage.setItem('perseverAI_profile', JSON.stringify(profileData)); }
|