Crée une application web pour gérer et analyser le classement hebdomadaire des blocs du Kip-Pic suisse. Blocs fixes à classer chaque semaine : • Primo info • Langue • Interprétariat • Employabilité • Petite enfance • Vivre-ensemble Fonctionnalités demandées : 1. Chaque semaine, l’utilisateur doit pouvoir classer/ordonner ces blocs (par glisser-déposer). 2. Un bouton Valider enregistre le classement dans une base de données (SQLite ou équivalent). 3. L’application conserve l’historique des classements pour chaque semaine. 4. Onglet Historique : navigation simple pour revoir les semaines passées. 5. Onglet Évolution : • Un diagramme en barres montrant la position de chaque bloc par semaine (axe X = semaines, axe Y = rang). • Une liste de tendances affichant les blocs avec une flèche indiquant leur direction de tendance (⬆️ amélioration, ⬇️ baisse, ➡️ stable) par rapport à la semaine précédente. 6. Possibilité d’exporter les résultats (CSV ou PDF). 7. Interface claire et minimaliste : une page principale avec classement, un bouton valider, et des onglets pour Historique et Évolution. - Follow Up Deployment
Browse files2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238242 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Suivi PIC Valais</title><script src="https://cdn.tailwindcss.com"></script><script src="https://cdn.jsdelivr.net/npm/chart.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>.fade-in {animation: fadeIn 0.3s ease-in-out;}@keyframes fadeIn {from { opacity: 0; transform: translateY(10px); }to { opacity: 1; transform: translateY(0); }}.custom-scrollbar::-webkit-scrollbar {width: 6px;}.custom-scrollbar::-webkit-scrollbar-track {background: #f1f1f1;}.custom-scrollbar::-webkit-scrollbar-thumb {background: #888;border-radius: 3px;}.custom-scrollbar::-webkit-scrollbar-thumb:hover {background: #555;}th[data-sort]::after {content: '↓';margin-left: 4px;opacity: 0;transition: opacity 0.2s;}th[data-sort]:hover::after {opacity: 0.5;}th[data-sort].sorted-asc::after {content: '↑';opacity: 1;}th[data-sort].sorted-desc::after {content: '↓';opacity: 1;}</style></head><body class="bg-gray-50 min-h-screen"><div class="container mx-auto px-4 py-8"><!-- Header --><header class="mb-10 text-center"><div class="flex flex-col items-center space-y-6"><div class="flex items-center space-x-6"><img src="https://www.vs.ch/documents/2055992/2056157/Logo_Valais.png" alt="Logo Valais" class="h-20"><div class="text-center"><h1 class="text-4xl md:text-5xl font-bold text-blue-800 leading-tight">Suivi du Programme d'Intégration Cantonal</h1></div></div><p class="text-xl text-gray-600 font-medium">Canton du Valais - Suivi des interactions avec les bénéficiaires</p></div></header><!-- Main Content --><div class="space-y-6"><!-- Top Section - Form and Charts --><div class="grid grid-cols-1 lg:grid-cols-3 gap-6"><!-- Left Column - Form --><div class="lg:col-span-1 bg-white rounded-xl shadow-md p-6 h-fit sticky top-6"><h2 class="text-xl font-semibold text-gray-800 mb-4">Nouvelle interaction</h2><form id="interactionForm" class="space-y-4"><div><label class="block text-sm font-medium text-gray-700 mb-2">Type d'interaction</label><div class="flex space-x-2"><button type="button" data-type="entretien" class="type-btn flex-1 py-2 px-4 border rounded-lg bg-white hover:bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center justify-center space-x-2"><i class="fas fa-user-tie"></i><span>Entretien</span></button><button type="button" data-type="appel" class="type-btn flex-1 py-2 px-4 border rounded-lg bg-white hover:bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center justify-center space-x-2"><i class="fas fa-phone"></i><span>Appel</span></button><button type="button" data-type="email" class="type-btn flex-1 py-2 px-4 border rounded-lg bg-white hover:bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center justify-center space-x-2"><i class="fas fa-envelope"></i><span>Email</span></button></div><input type="hidden" id="type" name="type" value=""></div><div id="sousCategorieContainer"><label for="sousCategorie" class="block text-sm font-medium text-gray-700 mb-1">Sous-catégorie</label><select id="sousCategorie" name="sousCategorie" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><!-- Options will be populated by JavaScript --></select><input type="hidden" id="pilier" name="pilier" value=""></div><div><label for="date" class="block text-sm font-medium text-gray-700 mb-1">Date</label><input type="date" id="date" name="date" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"></div><div><label for="beneficiaire" class="block text-sm font-medium text-gray-700 mb-1">Bénéficiaire</label><input type="text" id="beneficiaire" name="beneficiaire" placeholder="Nom du bénéficiaire" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"></div><div><label for="notes" class="block text-sm font-medium text-gray-700 mb-1">Notes</label><textarea id="notes" name="notes" rows="3" placeholder="Détails de l'interaction..." class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"></textarea></div><div class="flex space-x-2"><button type="submit" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center justify-center space-x-2"><i class="fas fa-save"></i><span>Enregistrer</span></button></div></form></div><!-- Middle and Right Columns - Dashboard Charts --><div class="lg:col-span-2 space-y-6"><div class="bg-white rounded-xl shadow-md p-6"><h2 class="text-xl font-semibold text-gray-800 mb-4">Tableau de bord</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-6"><div><h3 class="text-sm font-medium text-gray-700 mb-2">Répartition par pilier</h3><canvas id="pilierChart" height="200"></canvas></div><div><h3 class="text-sm font-medium text-gray-700 mb-2">Répartition par type</h3><canvas id="typeChart" height="200"></canvas></div><div><h3 class="text-sm font-medium text-gray-700 mb-2">Répartition globale</h3><canvas id="pieChart" height="200"></canvas></div><div><h3 class="text-sm font-medium text-gray-700 mb-2">Historique (7 derniers jours)</h3><canvas id="historyChart" height="200"></canvas></div></div></div></div></div><!-- Bottom Section - Interactions List --><div class="space-y-6"><!-- Stats --><div class="grid grid-cols-1 md:grid-cols-3 gap-4"><div class="bg-blue-50 rounded-xl shadow p-4"><div class="flex items-center justify-between"><div><p class="text-sm text-blue-800 font-medium">Arriver avec</p><p class="text-2xl font-bold text-blue-900" id="arriverCount">0</p></div><div class="p-3 rounded-full bg-blue-100 text-blue-800"><i class="fas fa-sign-in-alt text-xl"></i></div></div></div><div class="bg-green-50 rounded-xl shadow p-4"><div class="flex items-center justify-between"><div><p class="text-sm text-green-800 font-medium">Vivre</p><p class="text-2xl font-bold text-green-900" id="vivreCount">0</p></div><div class="p-3 rounded-full bg-green-100 text-green-800"><i class="fas fa-home text-xl"></i></div></div></div><div class="bg-purple-50 rounded-xl shadow p-4"><div class="flex items-center justify-between"><div><p class="text-sm text-purple-800 font-medium">Rencontrer</p><p class="text-2xl font-bold text-purple-900" id="rencontrerCount">0</p></div><div class="p-3 rounded-full bg-purple-100 text-purple-800"><i class="fas fa-handshake text-xl"></i></div></div></div></div><!-- Interactions List --><div class="bg-white rounded-xl shadow-md overflow-hidden"><div class="p-6 border-b border-gray-200 flex justify-between items-center"><h2 class="text-xl font-semibold text-gray-800">Historique des interactions</h2><button id="exportBtn" class="bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center justify-center space-x-2"><i class="fas fa-file-export"></i><span>Exporter en CSV</span></button></div><div class="overflow-y-auto max-h-[500px] custom-scrollbar"><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50 sticky top-0"><tr><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" data-sort="date">Date</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" data-sort="beneficiaire">Bénéficiaire</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" data-sort="pilier">Pilier</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" data-sort="type">Type</th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th></tr></thead><tbody id="interactionsList" class="bg-white divide-y divide-gray-200"><!-- Interactions will be populated by JavaScript --><tr id="noInteractions"><td colspan="5" class="px-6 py-4 text-center text-gray-500">Aucune interaction enregistrée</td></tr></tbody></table></div></div></div></div></div><!-- Success Modal --><div id="successModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden"><div class="bg-white rounded-xl shadow-xl w-full max-w-md fade-in"><div class="p-6 text-center"><div class="flex justify-center mb-4"><div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center"><i class="fas fa-check text-green-600 text-3xl"></i></div></div><h3 class="text-xl font-bold text-gray-800 mb-2">Enregistrement réussi</h3><p class="text-gray-600 mb-6">L'interaction a bien été enregistrée.</p><button onclick="closeSuccessModal()" class="w-full bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200">Fermer</button></div></div></div><!-- Interaction Details Modal --><div id="detailsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden"><div class="bg-white rounded-xl shadow-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto fade-in"><div class="p-6"><div class="flex justify-between items-center mb-4"><h3 class="text-xl font-bold text-gray-800" id="modalTitle">Détails de l'interaction</h3><button id="closeModal" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><div class="space-y-4"><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><p class="text-sm text-gray-500">Date</p><p class="font-medium" id="modalDate"></p></div><div><p class="text-sm text-gray-500">Bénéficiaire</p><p class="font-medium" id="modalBeneficiaire"></p></div><div><p class="text-sm text-gray-500">Pilier</p><p class="font-medium" id="modalPilier"></p></div><div><p class="text-sm text-gray-500">Sous-catégorie</p><p class="font-medium" id="modalSousCategorie"></p></div><div><p class="text-sm text-gray-500">Type</p><p class="font-medium" id="modalType"></p></div></div><div><p class="text-sm text-gray-500">Notes</p><p class="font-medium whitespace-pre-line" id="modalNotes"></p></div></div><div class="mt-6 flex justify-end space-x-3"><button id="deleteInteraction" class="px-4 py-2 bg-red-100 text-red-700 rounded-lg hover:bg-red-200 transition"><i class="fas fa-trash mr-2"></i>Supprimer</button><button class="px-4 py-2 bg-blue-100 text-blue-700 rounded-lg hover:bg-blue-200 transition" onclick="closeModal()"><i class="fas fa-times mr-2"></i>Fermer</button></div></div></div></div><script>// Toutes les sous-catégories regroupéesconst sousCategories = [{ value: "primo-info", label: "Primo-info (Arriver avec)", pilier: "arriver" },{ value: "conseil", label: "Conseil (Arriver avec)", pilier: "arriver" },{ value: "protection", label: "Protection contre la discrimination (Arriver avec)", pilier: "arriver" },{ value: "langue", label: "Langue (Vivre)", pilier: "vivre" },{ value: "petite-enfance", label: "Petite enfance (Vivre)", pilier: "vivre" },{ value: "employabilite", label: "Employabilité (Vivre)", pilier: "vivre" },{ value: "interpretariat", label: "Interprétariat (Rencontrer)", pilier: "rencontrer" },{ value: "vivre-ensemble", label: "Vivre-ensemble (Rencontrer)", pilier: "rencontrer" }];// Pilier labelsconst pilierLabels = {arriver: "Arriver avec",vivre: "Vivre",rencontrer: "Rencontrer"};// Type labelsconst typeLabels = {entretien: "Entretien",appel: "Appel téléphonique",email: "Email"};// Sous-catégorie labelsconst sousCategorieLabels = {"primo-info": "Primo-info","conseil": "Conseil","protection": "Protection contre la discrimination","langue": "Langue","petite-enfance": "Petite enfance","employabilite": "Employabilité","interpretariat": "Interprétariat","vivre-ensemble": "Vivre-ensemble"};// Initialize interactions array from localStorage or empty arraylet interactions = JSON.parse(localStorage.getItem('interactions')) || [];// DOM elementsconst pilierSelect = document.getElementById('pilier');const sousCategorieContainer = document.getElementById('sousCategorieContainer');const sousCategorieSelect = document.getElementById('sousCategorie');const interactionForm = document.getElementById('interactionForm');const interactionsList = document.getElementById('interactionsList');const noInteractions = document.getElementById('noInteractions');const filterPilier = document.getElementById('filterPilier');const filterType = document.getElementById('filterType');const filterDate = document.getElementById('filterDate');const arriverCount = document.getElementById('arriverCount');const vivreCount = document.getElementById('vivreCount');const rencontrerCount = document.getElementById('rencontrerCount');const detailsModal = document.getElementById('detailsModal');const closeModalBtn = document.getElementById('closeModal');const deleteInteractionBtn = document.getElementById('deleteInteraction');// Current interaction being viewed in modallet currentInteractionId = null;// Chart instanceslet pilierChart, typeChart, historyChart, pieChart;// Sorting statelet currentSort = {field: 'date',direction: 'desc'};// Event listenersdocument.addEventListener('DOMContentLoaded', () => {// Add click handlers to sortable headersdocument.querySelectorAll('th[data-sort]').forEach(header => {header.addEventListener('click', () => {const field = header.dataset.sort;if (currentSort.field === field) {currentSort.direction = currentSort.direction === 'asc' ? 'desc' : 'asc';} else {currentSort.field = field;currentSort.direction = 'asc';}renderInteractions();});});// Set today's date as defaultconst today = new Date().toISOString().split('T')[0];document.getElementById('date').value = today;// Initialize sous-categoriesinitSousCategories();// Update counts, render interactions and chartsupdateCounts();renderInteractions();updateCharts();});// Handle type button selectiondocument.querySelectorAll('.type-btn').forEach(btn => {btn.addEventListener('click', () => {document.querySelectorAll('.type-btn').forEach(b => {b.classList.remove('bg-blue-100', 'border-blue-500');});btn.classList.add('bg-blue-100', 'border-blue-500');document.getElementById('type').value = btn.dataset.type;});});interactionForm.addEventListener('submit', (e) => {e.preventDefault();const formData = new FormData(interactionForm);const interaction = {id: Date.now().toString(),date: formData.get('date'),beneficiaire: formData.get('beneficiaire'),pilier: formData.get('pilier'),sousCategorie: formData.get('sousCategorie'),type: formData.get('type'),notes: formData.get('notes')};interactions.unshift(interaction); // Add to beginning of arraysaveInteractions();renderInteractions();updateCounts();updateCharts();showSuccessModal();// Reset form completelyinteractionForm.reset();document.getElementById('date').value = new Date().toISOString().split('T')[0];document.getElementById('type').value = '';document.getElementById('pilier').value = '';document.querySelectorAll('.type-btn').forEach(btn => {btn.classList.remove('bg-blue-100', 'border-blue-500');});});closeModalBtn.addEventListener('click', closeModal);deleteInteractionBtn.addEventListener('click', deleteCurrentInteraction);// Functionsfunction initSousCategories() {sousCategorieSelect.innerHTML = '<option value="">Sélectionnez une catégorie</option>';sousCategories.forEach(cat => {const option = document.createElement('option');option.value = cat.value;option.textContent = cat.label;option.dataset.pilier = cat.pilier;sousCategorieSelect.appendChild(option);});// Add event listener to update pilier when sous-categorie changessousCategorieSelect.addEventListener('change', () => {const selectedOption = sousCategorieSelect.options[sousCategorieSelect.selectedIndex];document.getElementById('pilier').value = selectedOption.dataset.pilier || '';});}function saveInteractions() {localStorage.setItem('interactions', JSON.stringify(interactions));}function renderInteractions() {let filteredInteractions = [...interactions];// Update sort indicatorsdocument.querySelectorAll('th[data-sort]').forEach(header => {header.classList.remove('sorted-asc', 'sorted-desc');if (header.dataset.sort === currentSort.field) {header.classList.add(currentSort.direction === 'asc' ? 'sorted-asc' : 'sorted-desc');}});// Apply sortingfilteredInteractions.sort((a, b) => {let valueA, valueB;if (currentSort.field === 'date') {valueA = new Date(a.date);valueB = new Date(b.date);} else {valueA = a[currentSort.field] || '';valueB = b[currentSort.field] || '';}if (valueA < valueB) {return currentSort.direction === 'asc' ? -1 : 1;}if (valueA > valueB) {return currentSort.direction === 'asc' ? 1 : -1;}return 0;});if (filteredInteractions.length === 0) {noInteractions.classList.remove('hidden');interactionsList.innerHTML = '';interactionsList.appendChild(noInteractions);} else {noInteractions.classList.add('hidden');interactionsList.innerHTML = '';filteredInteractions.forEach(interaction => {const row = document.createElement('tr');row.className = 'hover:bg-gray-50 cursor-pointer';row.dataset.id = interaction.id;// Format date (DD.MM.YYYY)const dateParts = interaction.date.split('-');const formattedDate = `${dateParts[2]}.${dateParts[1]}.${dateParts[0]}`;// Determine badge color based on pilierlet badgeClass = '';if (interaction.pilier === 'arriver') badgeClass = 'bg-blue-100 text-blue-800';else if (interaction.pilier === 'vivre') badgeClass = 'bg-green-100 text-green-800';else badgeClass = 'bg-purple-100 text-purple-800';// Determine icon based on typelet icon = '';if (interaction.type === 'entretien') icon = '<i class="fas fa-user-tie mr-1"></i>';else if (interaction.type === 'appel') icon = '<i class="fas fa-phone mr-1"></i>';else icon = '<i class="fas fa-envelope mr-1"></i>';row.innerHTML = `<td class="px-6 py-4 whitespace-nowrap">${formattedDate}</td><td class="px-6 py-4 whitespace-nowrap">${interaction.beneficiaire || '-'}</td><td class="px-6 py-4 whitespace-nowrap"><span class="px-2 py-1 text-xs rounded-full ${badgeClass}">${pilierLabels[interaction.pilier]}</span></td><td class="px-6 py-4 whitespace-nowrap"><span class="flex items-center">${icon} ${typeLabels[interaction.type]}</span></td><td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium"><button class="text-blue-600 hover:text-blue-900 mr-3 view-btn" data-id="${interaction.id}"><i class="fas fa-eye"></i></button><button class="text-red-600 hover:text-red-900 delete-btn" data-id="${interaction.id}"><i class="fas fa-trash"></i></button></td>`;interactionsList.appendChild(row);});// Add event listeners to view and delete buttonsdocument.querySelectorAll('.view-btn').forEach(btn => {btn.addEventListener('click', (e) => {e.stopPropagation();showInteractionDetails(btn.dataset.id);});});document.querySelectorAll('.delete-btn').forEach(btn => {btn.addEventListener('click', (e) => {e.stopPropagation();deleteInteraction(btn.dataset.id);});});// Add click event to rowsdocument.querySelectorAll('tr[data-id]').forEach(row => {row.addEventListener('click', () => {showInteractionDetails(row.dataset.id);});});}}function updateCounts() {const arriver = interactions.filter(i => i.pilier === 'arriver').length;const vivre = interactions.filter(i => i.pilier === 'vivre').length;const rencontrer = interactions.filter(i => i.pilier === 'rencontrer').length;arriverCount.textContent = arriver;vivreCount.textContent = vivre;rencontrerCount.textContent = rencontrer;}function showInteractionDetails(id) {const interaction = interactions.find(i => i.id === id);if (!interaction) return;currentInteractionId = id;// Format date (DD.MM.YYYY)const dateParts = interaction.date.split('-');const formattedDate = `${dateParts[2]}.${dateParts[1]}.${dateParts[0]}`;// Update modal contentdocument.getElementById('modalTitle').textContent = `Interaction du ${formattedDate}`;document.getElementById('modalDate').textContent = formattedDate;document.getElementById('modalBeneficiaire').textContent = interaction.beneficiaire || '-';document.getElementById('modalPilier').textContent = pilierLabels[interaction.pilier];document.getElementById('modalSousCategorie').textContent = sousCategorieLabels[interaction.sousCategorie] || '-';document.getElementById('modalType').textContent = typeLabels[interaction.type];document.getElementById('modalNotes').textContent = interaction.notes || 'Aucune note';// Show modaldetailsModal.classList.remove('hidden');}function closeModal() {detailsModal.classList.add('hidden');currentInteractionId = null;}function deleteCurrentInteraction() {if (currentInteractionId) {deleteInteraction(currentInteractionId);closeModal();}}function showSuccessModal() {const modal = document.getElementById('successModal');modal.classList.remove('hidden');// Auto-close after 3 secondssetTimeout(() => {closeSuccessModal();}, 3000);}function closeSuccessModal() {document.getElementById('successModal').classList.add('hidden');}function deleteInteraction(id) {if (confirm('Êtes-vous sûr de vouloir supprimer cette interaction ?')) {interactions = interactions.filter(i => i.id !== id);saveInteractions();renderInteractions();updateCounts();updateCharts();}}function updateCharts() {// Destroy existing charts if they existif (document.getElementById('pilierChart')) {if (pilierChart) pilierChart.destroy();}if (document.getElementById('typeChart')) {if (typeChart) typeChart.destroy();}if (document.getElementById('historyChart')) {if (historyChart) historyChart.destroy();}if (document.getElementById('pieChart')) {if (pieChart) pieChart.destroy();}// Pilier Chartconst pilierData = {'Arriver avec': interactions.filter(i => i.pilier === 'arriver').length,'Vivre': interactions.filter(i => i.pilier === 'vivre').length,'Rencontrer': interactions.filter(i => i.pilier === 'rencontrer').length};const pilierCtx = document.getElementById('pilierChart').getContext('2d');pilierChart = new Chart(pilierCtx, {type: 'doughnut',data: {labels: Object.keys(pilierData),datasets: [{data: Object.values(pilierData),backgroundColor: ['#3b82f6', '#10b981', '#8b5cf6'],borderWidth: 1}]},options: {responsive: true,plugins: {legend: {position: 'bottom'}}}});// Type Chartconst typeData = {entretien: interactions.filter(i => i.type === 'entretien').length,appel: interactions.filter(i => i.type === 'appel').length,email: interactions.filter(i => i.type === 'email').length};const typeCtx = document.getElementById('typeChart').getContext('2d');typeChart = new Chart(typeCtx, {type: 'bar',data: {labels: ['Entretien', 'Appel', 'Email'],datasets: [{label: 'Nombre',data: [typeData.entretien, typeData.appel, typeData.email],backgroundColor: ['#6366f1', '#ec4899', '#f59e0b'],borderWidth: 1}]},options: {responsive: true,scales: {y: {beginAtZero: true}}}});// Global Distribution Chart (Pie)const pieData = {'Arriver avec': interactions.filter(i => i.pilier === 'arriver').length,'Vivre': interactions.filter(i => i.pilier === 'vivre').length,'Rencontrer': interactions.filter(i => i.pilier === 'rencontrer').length};const pieCtx = document.getElementById('pieChart').getContext('2d');pieChart = new Chart(pieCtx, {type: 'pie',data: {labels: Object.keys(pieData),datasets: [{data: Object.values(pieData),backgroundColor: ['#3b82f6', '#10b981', '#8b5cf6'],borderWidth: 1}]},options: {responsive: true,plugins: {legend: {position: 'bottom'}}}});// History Chart (last 7 days)const dates = [];const today = new Date();for (let i = 6; i >= 0; i--) {const date = new Date(today);date.setDate(date.getDate() - i);dates.push(date.toISOString().split('T')[0]);}const historyData = dates.map(date => {return interactions.filter(i => i.date === date).length;});const historyCtx = document.getElementById('historyChart').getContext('2d');historyChart = new Chart(historyCtx, {type: 'line',data: {labels: dates.map(date => {const [year, month, day] = date.split('-');return `${day}/${month}`;}),datasets: [{label: 'Interactions',data: historyData,borderColor: '#3b82f6',backgroundColor: 'rgba(59, 130, 246, 0.1)',borderWidth: 2,tension: 0.1,fill: true}]},options: {responsive: true,scales: {y: {beginAtZero: true}}}});}// Export to CSVdocument.getElementById('exportBtn').addEventListener('click', () => {if (interactions.length === 0) {alert('Aucune donnée à exporter');return;}// Create CSV headerlet csv = 'Date,Bénéficiaire,Pilier,Sous-catégorie,Type,Notes\n';// Add data rowsinteractions.forEach(interaction => {const row = [interaction.date,`"${interaction.beneficiaire || ''}"`,pilierLabels[interaction.pilier],sousCategorieLabels[interaction.sousCategorie] || '',typeLabels[interaction.type],`"${interaction.notes || ''}"`];csv += row.join(',') + '\n';});// Create download linkconst blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });const url = URL.createObjectURL(blob);const link = document.createElement('a');link.setAttribute('href', url);link.setAttribute('download', `interactions_pic_${new Date().toISOString().split('T')[0]}.csv`);link.style.visibility = 'hidden';document.body.appendChild(link);link.click();document.body.removeChild(link);});// Initialize charts on loadupdateCharts();</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=masterseb/pic2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746752 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Classement Kip-Pic Suisse</title><script src="https://cdn.tailwindcss.com"></script><script src="https://cdn.jsdelivr.net/npm/chart.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script><style>.drag-item {transition: transform 0.2s ease;}.drag-item.dragging {opacity: 0.5;transform: scale(1.05);}.tab-content {display: none;}.tab-content.active {display: block;animation: fadeIn 0.3s ease;}@keyframes fadeIn {from { opacity: 0; }to { opacity: 1; }}.trend-up {color: #10B981;}.trend-down {color: #EF4444;}.trend-stable {color: #6B7280;}</style></head><body class="bg-gray-50 min-h-screen"><div class="container mx-auto px-4 py-8 max-w-4xl"><header class="mb-8 text-center"><h1 class="text-3xl font-bold text-indigo-700">Classement Hebdomadaire Kip-Pic</h1><p class="text-gray-600 mt-2">Analyse et suivi des blocs prioritaires</p></header><div class="bg-white rounded-lg shadow-md overflow-hidden"><!-- Tabs Navigation --><div class="flex border-b border-gray-200"><button class="tab-btn py-4 px-6 font-medium text-indigo-600 border-b-2 border-indigo-600" data-tab="ranking">Classement</button><button class="tab-btn py-4 px-6 font-medium text-gray-500 hover:text-indigo-500" data-tab="history">Historique</button><button class="tab-btn py-4 px-6 font-medium text-gray-500 hover:text-indigo-500" data-tab="evolution">Évolution</button></div><!-- Tab Contents --><div class="p-6"><!-- Ranking Tab --><div id="ranking" class="tab-content active"><div class="mb-6 flex justify-between items-center"><h2 class="text-xl font-semibold text-gray-800">Classement de la semaine</h2><div class="flex items-center space-x-2"><select id="week-select" class="border rounded-md px-3 py-2 text-sm"><!-- Options will be added by JS --></select><button id="new-week-btn" class="bg-indigo-100 text-indigo-700 px-3 py-2 rounded-md text-sm font-medium hover:bg-indigo-200">Nouvelle semaine</button></div></div><div id="blocks-container" class="space-y-3"><!-- Blocks will be added by JS --></div><div class="mt-8 flex justify-end"><button id="validate-btn" class="bg-indigo-600 text-white px-6 py-3 rounded-md font-medium hover:bg-indigo-700 transition">Valider le classement</button></div></div><!-- History Tab --><div id="history" class="tab-content"><div class="mb-6 flex justify-between items-center"><h2 class="text-xl font-semibold text-gray-800">Historique des classements</h2><select id="history-week-select" class="border rounded-md px-3 py-2 text-sm"><!-- Options will be added by JS --></select></div><div id="history-content" class="space-y-4"><!-- History will be loaded by JS --></div></div><!-- Evolution Tab --><div id="evolution" class="tab-content"><div class="mb-6"><h2 class="text-xl font-semibold text-gray-800">Évolution des classements</h2><p class="text-gray-600 text-sm mt-1">Analyse des tendances sur plusieurs semaines</p></div><div class="grid grid-cols-1 lg:grid-cols-3 gap-6"><div class="lg:col-span-2 bg-white p-4 rounded-lg border border-gray-200"><canvas id="evolution-chart"></canvas></div><div class="bg-white p-4 rounded-lg border border-gray-200"><h3 class="font-medium text-gray-800 mb-3">Tendances récentes</h3><div id="trends-list" class="space-y-3"><!-- Trends will be added by JS --></div></div></div><div class="mt-6 flex justify-end space-x-3"><button id="export-csv-btn" class="bg-gray-100 text-gray-700 px-4 py-2 rounded-md text-sm font-medium hover:bg-gray-200 border border-gray-300">Exporter CSV</button><button id="export-pdf-btn" class="bg-indigo-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-indigo-700">Exporter PDF</button></div></div></div></div></div><script>// Database simulation using localStorageconst DB_NAME = 'kip_pic_rankings';// Initialize database if not existsif (!localStorage.getItem(DB_NAME)) {localStorage.setItem(DB_NAME, JSON.stringify({weeks: [],rankings: {}}));}// Get databasefunction getDB() {return JSON.parse(localStorage.getItem(DB_NAME));}// Update databasefunction updateDB(data) {localStorage.setItem(DB_NAME, JSON.stringify(data));}// Blocks definitionconst BLOCKS = [{ id: 'primo', name: 'Primo info', color: 'bg-blue-100', text: 'text-blue-800' },{ id: 'langue', name: 'Langue', color: 'bg-green-100', text: 'text-green-800' },{ id: 'interpretariat', name: 'Interprétariat', color: 'bg-yellow-100', text: 'text-yellow-800' },{ id: 'employabilite', name: 'Employabilité', color: 'bg-red-100', text: 'text-red-800' },{ id: 'enfance', name: 'Petite enfance', color: 'bg-purple-100', text: 'text-purple-800' },{ id: 'vivre', name: 'Vivre-ensemble', color: 'bg-pink-100', text: 'text-pink-800' }];// Current statelet currentWeek = '';let currentRanking = [];let isDragging = false;let draggedItem = null;// DOM Elementsconst tabBtns = document.querySelectorAll('.tab-btn');const tabContents = document.querySelectorAll('.tab-content');const blocksContainer = document.getElementById('blocks-container');const validateBtn = document.getElementById('validate-btn');const weekSelect = document.getElementById('week-select');const newWeekBtn = document.getElementById('new-week-btn');const historyWeekSelect = document.getElementById('history-week-select');const historyContent = document.getElementById('history-content');const trendsList = document.getElementById('trends-list');const exportCsvBtn = document.getElementById('export-csv-btn');const exportPdfBtn = document.getElementById('export-pdf-btn');// Initialize the appfunction initApp() {loadWeeks();setupTabs();setupDragAndDrop();setupEventListeners();showCurrentWeekRanking();}// Setup tab navigationfunction setupTabs() {tabBtns.forEach(btn => {btn.addEventListener('click', () => {// Remove active class from all tabstabBtns.forEach(b => {b.classList.remove('text-indigo-600', 'border-indigo-600');b.classList.add('text-gray-500');});// Add active class to clicked tabbtn.classList.add('text-indigo-600', 'border-indigo-600');btn.classList.remove('text-gray-500');// Hide all tab contentstabContents.forEach(content => content.classList.remove('active'));// Show selected tab contentconst tabId = btn.getAttribute('data-tab');document.getElementById(tabId).classList.add('active');// Load data if neededif (tabId === 'history') {loadHistoryWeek();} else if (tabId === 'evolution') {renderEvolutionChart();renderTrends();}});});}// Load available weeksfunction loadWeeks() {const db = getDB();weekSelect.innerHTML = '';historyWeekSelect.innerHTML = '';if (db.weeks.length === 0) {weekSelect.innerHTML = '<option value="">Aucune semaine disponible</option>';historyWeekSelect.innerHTML = '<option value="">Aucune semaine disponible</option>';currentWeek = '';return;}db.weeks.forEach(week => {const option = document.createElement('option');option.value = week;option.textContent = `Semaine ${week}`;weekSelect.appendChild(option.cloneNode(true));historyWeekSelect.appendChild(option);});currentWeek = db.weeks[db.weeks.length - 1];weekSelect.value = currentWeek;historyWeekSelect.value = currentWeek;}// Show current week rankingfunction showCurrentWeekRanking() {const db = getDB();if (db.weeks.length === 0) {blocksContainer.innerHTML = '<p class="text-gray-500 text-center py-8">Aucun classement disponible. Créez une nouvelle semaine.</p>';return;}currentWeek = db.weeks[db.weeks.length - 1];weekSelect.value = currentWeek;if (db.rankings[currentWeek]) {currentRanking = db.rankings[currentWeek];renderBlocks(currentRanking);} else {// New week, initialize with default ordercurrentRanking = BLOCKS.map(block => block.id);renderBlocks(currentRanking);}}// Render blocks in the containerfunction renderBlocks(order) {blocksContainer.innerHTML = '';order.forEach((blockId, index) => {const block = BLOCKS.find(b => b.id === blockId);if (block) {const blockElement = document.createElement('div');blockElement.className = `drag-item flex items-center p-4 rounded-lg cursor-move ${block.color} ${block.text} border border-transparent hover:border-gray-300`;blockElement.setAttribute('draggable', 'true');blockElement.setAttribute('data-id', block.id);blockElement.innerHTML = `<div class="w-8 h-8 flex items-center justify-center bg-white rounded-full mr-4 font-medium">${index + 1}</div><div class="flex-1 font-medium">${block.name}</div><svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h16M4 16h16"></path></svg>`;blocksContainer.appendChild(blockElement);}});}// Setup drag and drop functionalityfunction setupDragAndDrop() {blocksContainer.addEventListener('dragstart', (e) => {if (e.target.classList.contains('drag-item')) {isDragging = true;draggedItem = e.target;e.target.classList.add('dragging');e.dataTransfer.effectAllowed = 'move';e.dataTransfer.setData('text/html', e.target.innerHTML);}});blocksContainer.addEventListener('dragend', (e) => {if (e.target.classList.contains('drag-item')) {isDragging = false;e.target.classList.remove('dragging');}});blocksContainer.addEventListener('dragover', (e) => {if (isDragging) {e.preventDefault();const afterElement = getDragAfterElement(blocksContainer, e.clientY);const draggable = document.querySelector('.dragging');if (afterElement == null) {blocksContainer.appendChild(draggable);} else {blocksContainer.insertBefore(draggable, afterElement);}// Update current ranking orderupdateCurrentRankingOrder();}});}// Get the element after which the dragged item should be placedfunction getDragAfterElement(container, y) {const draggableElements = [...container.querySelectorAll('.drag-item:not(.dragging)')];return draggableElements.reduce((closest, child) => {const box = child.getBoundingClientRect();const offset = y - box.top - box.height / 2;if (offset < 0 && offset > closest.offset) {return { offset: offset, element: child };} else {return closest;}}, { offset: Number.NEGATIVE_INFINITY }).element;}// Update current ranking order based on DOMfunction updateCurrentRankingOrder() {const blockElements = blocksContainer.querySelectorAll('.drag-item');currentRanking = Array.from(blockElements).map(el => el.getAttribute('data-id'));}// Setup event listenersfunction setupEventListeners() {// Validate rankingvalidateBtn.addEventListener('click', () => {if (currentWeek === '') {alert('Veuillez sélectionner ou créer une semaine');return;}const db = getDB();db.rankings[currentWeek] = currentRanking;updateDB(db);alert(`Classement de la semaine ${currentWeek} enregistré avec succès !`);});// Week selection changeweekSelect.addEventListener('change', (e) => {currentWeek = e.target.value;const db = getDB();if (db.rankings[currentWeek]) {currentRanking = db.rankings[currentWeek];renderBlocks(currentRanking);} else {currentRanking = BLOCKS.map(block => block.id);renderBlocks(currentRanking);}});// New week buttonnewWeekBtn.addEventListener('click', () => {const db = getDB();let weekNumber = 1;if (db.weeks.length > 0) {const lastWeek = db.weeks[db.weeks.length - 1];weekNumber = parseInt(lastWeek) + 1;}const newWeek = weekNumber.toString();db.weeks.push(newWeek);db.rankings[newWeek] = BLOCKS.map(block => block.id);updateDB(db);loadWeeks();currentWeek = newWeek;weekSelect.value = newWeek;currentRanking = db.rankings[newWeek];renderBlocks(currentRanking);// Switch to ranking tabtabBtns[0].click();});// History week selection changehistoryWeekSelect.addEventListener('change', loadHistoryWeek);// Export buttonsexportCsvBtn.addEventListener('click', exportToCsv);exportPdfBtn.addEventListener('click', exportToPdf);}// Load history for selected weekfunction loadHistoryWeek() {const week = historyWeekSelect.value;const db = getDB();if (!week || !db.rankings[week]) {historyContent.innerHTML = '<p class="text-gray-500 text-center py-8">Aucun classement disponible pour cette semaine.</p>';return;}const ranking = db.rankings[week];let html = `<h3 class="text-lg font-medium text-gray-800 mb-4">Classement de la semaine ${week}</h3><div class="space-y-3">`;ranking.forEach((blockId, index) => {const block = BLOCKS.find(b => b.id === blockId);if (block) {html += `<div class="flex items-center p-3 rounded-lg ${block.color} ${block.text}"><div class="w-8 h-8 flex items-center justify-center bg-white rounded-full mr-4 font-medium">${index + 1}</div><div class="flex-1 font-medium">${block.name}</div></div>`;}});html += '</div>';historyContent.innerHTML = html;}// Render evolution chartfunction renderEvolutionChart() {const db = getDB();const ctx = document.getElementById('evolution-chart').getContext('2d');if (db.weeks.length < 2) {document.getElementById('evolution-chart').innerHTML = `<p class="text-gray-500 text-center py-8">Pas assez de données pour afficher l'évolution (minimum 2 semaines)</p>`;return;}// Prepare data for Chart.jsconst labels = db.weeks.map(w => `Semaine ${w}`);const datasets = BLOCKS.map(block => {const data = db.weeks.map(week => {if (db.rankings[week]) {const position = db.rankings[week].indexOf(block.id) + 1;return position;}return null;});return {label: block.name,data: data,backgroundColor: block.text.replace('text-', 'bg-').replace('-800', '-500') + '80',borderColor: block.text.replace('text-', 'bg-').replace('-800', '-500'),borderWidth: 2,tension: 0.1,fill: false};});// Destroy previous chart if existsif (window.evolutionChart) {window.evolutionChart.destroy();}window.evolutionChart = new Chart(ctx, {type: 'line',data: {labels: labels,datasets: datasets},options: {responsive: true,scales: {y: {reverse: true,beginAtZero: false,min: 1,max: BLOCKS.length,ticks: {stepSize: 1},title: {display: true,text: 'Position'}},x: {title: {display: true,text: 'Semaines'}}},plugins: {tooltip: {callbacks: {label: function(context) {return `${context.dataset.label}: ${context.parsed.y}ème position`;}}}}}});}// Render trends listfunction renderTrends() {const db = getDB();if (db.weeks.length < 2) {trendsList.innerHTML = `<p class="text-gray-500 text-sm">Pas assez de données pour afficher les tendances (minimum 2 semaines)</p>`;return;}const currentWeek = db.weeks[db.weeks.length - 1];const previousWeek = db.weeks[db.weeks.length - 2];if (!db.rankings[currentWeek] || !db.rankings[previousWeek]) {trendsList.innerHTML = `<p class="text-gray-500 text-sm">Données manquantes pour calculer les tendances</p>`;return;}let html = '';BLOCKS.forEach(block => {const currentPos = db.rankings[currentWeek].indexOf(block.id) + 1;const previousPos = db.rankings[previousWeek].indexOf(block.id) + 1;const diff = previousPos - currentPos;let trendIcon, trendClass, trendText;if (diff > 0) {trendIcon = '⬆️';trendClass = 'trend-up';trendText = `+${diff} (amélioration)`;} else if (diff < 0) {trendIcon = '⬇️';trendClass = 'trend-down';trendText = `${diff} (baisse)`;} else {trendIcon = '➡️';trendClass = 'trend-stable';trendText = 'stable';}html += `<div class="flex items-center justify-between"><div class="font-medium ${block.text}">${block.name}</div><div class="flex items-center space-x-2"><span class="text-sm ${trendClass}">${trendText}</span><span class="${trendClass}">${trendIcon}</span></div></div>`;});trendsList.innerHTML = html;}// Export to CSVfunction exportToCsv() {const db = getDB();if (db.weeks.length === 0) {alert('Aucune donnée à exporter');return;}let csv = 'Semaine,' + BLOCKS.map(b => b.name).join(',') + '\n';db.weeks.forEach(week => {if (db.rankings[week]) {const positions = BLOCKS.map(block => {return db.rankings[week].indexOf(block.id) + 1;});csv += `Semaine ${week},${positions.join(',')}\n`;}});const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });const url = URL.createObjectURL(blob);const link = document.createElement('a');link.setAttribute('href', url);link.setAttribute('download', `classement_kip_pic_${new Date().toISOString().slice(0, 10)}.csv`);link.style.visibility = 'hidden';document.body.appendChild(link);link.click();document.body.removeChild(link);}// Export to PDFfunction exportToPdf() {const { jsPDF } = window.jspdf;const doc = new jsPDF();// Add titledoc.setFontSize(18);doc.text('Classement Kip-Pic Suisse', 105, 15, { align: 'center' });// Add datedoc.setFontSize(10);doc.text(`Export du ${new Date().toLocaleDateString()}`, 105, 22, { align: 'center' });// Add evolution chart if availableconst db = getDB();if (db.weeks.length >= 2) {doc.setFontSize(14);doc.text('Évolution des positions', 105, 35, { align: 'center' });// Get chart canvasconst canvas = document.getElementById('evolution-chart');if (canvas) {const canvasImage = canvas.toDataURL('image/png', 1.0);doc.addImage(canvasImage, 'PNG', 15, 45, 180, 100);}}// Add current rankingdoc.setFontSize(14);doc.text('Classement actuel', 105, 160, { align: 'center' });if (currentWeek && db.rankings[currentWeek]) {const ranking = db.rankings[currentWeek];ranking.forEach((blockId, index) => {const block = BLOCKS.find(b => b.id === blockId);if (block) {doc.setFontSize(12);doc.text(`${index + 1}. ${block.name}`, 20, 170 + (index * 7));}});}// Save the PDFdoc.save(`classement_kip_pic_${new Date().toISOString().slice(0, 10)}.pdf`);}// Initialize the app when DOM is loadeddocument.addEventListener('DOMContentLoaded', initApp);</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=masterseb/pic2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
index.html+547-696