Spaces:
Running
Running
Download index.html from LoicUX/evaluteo-2: direct link, hf CLI and curl.
- Browser
- Download file 27 kB
-
https://huggingface.co/spaces/LoicUX/evaluteo-2/resolve/main/index.html
- Command line
-
hf download hf://spaces/LoicUX/evaluteo-2/index.html
-
curl -L -o index.html https://huggingface.co/spaces/LoicUX/evaluteo-2/resolve/main/index.html
27 kB
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Moteur de Recherche SaaS - UX Optimisé</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .search-dropdown { | |
| display: none; | |
| position: absolute; | |
| top: 100%; | |
| left: 0; | |
| width: 100%; | |
| max-height: 400px; | |
| overflow-y: auto; | |
| z-index: 1000; | |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); | |
| border-radius: 0.5rem; | |
| } | |
| .search-dropdown.active { | |
| display: block; | |
| } | |
| .search-item:hover { | |
| background-color: #f3f4f6; | |
| } | |
| .highlight { | |
| background-color: #fef08a; | |
| padding: 0.1rem 0.2rem; | |
| border-radius: 0.2rem; | |
| } | |
| .search-loader { | |
| display: none; | |
| } | |
| .search-loader.active { | |
| display: block; | |
| } | |
| @keyframes spin { | |
| 0% { transform: rotate(0deg); } | |
| 100% { transform: rotate(360deg); } | |
| } | |
| .animate-spin { | |
| animation: spin 1s linear infinite; | |
| } | |
| /* Transition pour l'apparition du champ de recherche */ | |
| .search-expand { | |
| transition: all 0.3s ease; | |
| width: 0; | |
| opacity: 0; | |
| } | |
| .search-expand.active { | |
| width: 100%; | |
| opacity: 1; | |
| } | |
| /* Style pour mobile */ | |
| @media (max-width: 768px) { | |
| .search-container { | |
| position: relative; | |
| } | |
| .search-fullscreen { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: white; | |
| z-index: 100; | |
| padding: 1rem; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .search-fullscreen .search-input-container { | |
| width: 100%; | |
| } | |
| .search-fullscreen .search-dropdown { | |
| position: relative; | |
| max-height: calc(100vh - 100px); | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <header class="bg-white shadow-sm sticky top-0 z-50"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between items-center h-16"> | |
| <!-- Logo --> | |
| <div class="flex-shrink-0 flex items-center"> | |
| <a href="#" class="text-indigo-600 font-bold text-xl">SaaSPro</a> | |
| </div> | |
| <!-- Zone de recherche et actions utilisateur --> | |
| <div class="flex items-center"> | |
| <!-- Conteneur de recherche --> | |
| <div class="search-container flex-1 flex items-center justify-center px-4 lg:ml-6 lg:justify-end"> | |
| <div class="w-full max-w-7xl relative"> | |
| <!-- Icône de recherche (mobile) --> | |
| <button id="mobile-search-toggle" class="md:hidden text-gray-500 hover:text-gray-700 focus:outline-none"> | |
| <i class="fas fa-search h-5 w-5"></i> | |
| </button> | |
| <!-- Champ de recherche (desktop) --> | |
| <div class="hidden md:block relative"> | |
| <div class="relative"> | |
| <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | |
| <i class="fas fa-search text-gray-400"></i> | |
| </div> | |
| <input id="search-input" type="text" class="block w-full pl-10 pr-3 py-3 text-base border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500" placeholder="Rechercher projets, tâches, clients..." autocomplete="off"> | |
| <button id="clear-search" class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600 hidden"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <!-- Dropdown des résultats --> | |
| <div id="search-dropdown" class="search-dropdown mt-1 bg-white"> | |
| <div class="px-4 py-2 border-b border-gray-200 flex justify-between items-center"> | |
| <span class="text-xs font-semibold text-gray-500">RÉSULTATS DE RECHERCHE</span> | |
| <span class="text-xs text-gray-500">0 trouvé</span> | |
| </div> | |
| <div class="search-loader py-4 flex justify-center"> | |
| <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-indigo-600"></div> | |
| </div> | |
| <div id="search-results" class="divide-y divide-gray-200"> | |
| <!-- Les résultats seront injectés ici par JavaScript --> | |
| </div> | |
| <div id="no-results" class="px-4 py-6 text-center hidden"> | |
| <i class="fas fa-search text-gray-400 text-3xl mb-2"></i> | |
| <h3 class="text-sm font-medium text-gray-900">Aucun résultat trouvé</h3> | |
| <p class="mt-1 text-sm text-gray-500">Essayez avec d'autres termes de recherche.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Menu utilisateur --> | |
| <div class="ml-4 flex items-center md:ml-6"> | |
| <button type="button" class="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> | |
| <span class="sr-only">Notifications</span> | |
| <i class="fas fa-bell h-6 w-6"></i> | |
| </button> | |
| <!-- Menu déroulant profil --> | |
| <div class="ml-3 relative"> | |
| <div> | |
| <button type="button" class="max-w-xs bg-white flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true"> | |
| <span class="sr-only">Ouvrir le menu utilisateur</span> | |
| <img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt=""> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recherche mobile en plein écran --> | |
| <div id="mobile-search-fullscreen" class="search-fullscreen hidden"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-lg font-medium">Rechercher</h2> | |
| <button id="mobile-search-close" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times text-xl"></i> | |
| </button> | |
| </div> | |
| <div class="search-input-container"> | |
| <div class="relative"> | |
| <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | |
| <i class="fas fa-search text-gray-400"></i> | |
| </div> | |
| <input id="mobile-search-input" type="text" class="block w-full pl-10 pr-3 py-4 text-base border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500" placeholder="Rechercher projets, tâches, clients..." autocomplete="off"> | |
| <button id="mobile-clear-search" class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600 hidden"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <!-- Dropdown des résultats mobile --> | |
| <div id="mobile-search-dropdown" class="search-dropdown mt-2 bg-white"> | |
| <div class="px-4 py-2 border-b border-gray-200 flex justify-between items-center"> | |
| <span class="text-xs font-semibold text-gray-500">RÉSULTATS DE RECHERCHE</span> | |
| <span class="text-xs text-gray-500">0 trouvé</span> | |
| </div> | |
| <div class="mobile-search-loader py-4 flex justify-center"> | |
| <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-indigo-600"></div> | |
| </div> | |
| <div id="mobile-search-results" class="divide-y divide-gray-200"> | |
| <!-- Les résultats seront injectés ici par JavaScript --> | |
| </div> | |
| <div id="mobile-no-results" class="px-4 py-6 text-center hidden"> | |
| <i class="fas fa-search text-gray-400 text-3xl mb-2"></i> | |
| <h3 class="text-sm font-medium text-gray-900">Aucun résultat trouvé</h3> | |
| <p class="mt-1 text-sm text-gray-500">Essayez avec d'autres termes de recherche.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Éléments du DOM | |
| const searchInput = document.getElementById('search-input'); | |
| const clearSearch = document.getElementById('clear-search'); | |
| const searchDropdown = document.getElementById('search-dropdown'); | |
| const searchResults = document.getElementById('search-results'); | |
| const noResults = document.getElementById('no-results'); | |
| const searchLoader = document.querySelector('.search-loader'); | |
| // Éléments mobile | |
| const mobileSearchToggle = document.getElementById('mobile-search-toggle'); | |
| const mobileSearchFullscreen = document.getElementById('mobile-search-fullscreen'); | |
| const mobileSearchClose = document.getElementById('mobile-search-close'); | |
| const mobileSearchInput = document.getElementById('mobile-search-input'); | |
| const mobileClearSearch = document.getElementById('mobile-clear-search'); | |
| const mobileSearchDropdown = document.getElementById('mobile-search-dropdown'); | |
| const mobileSearchResults = document.getElementById('mobile-search-results'); | |
| const mobileNoResults = document.getElementById('mobile-no-results'); | |
| const mobileSearchLoader = document.querySelector('.mobile-search-loader'); | |
| // Données de test pour les résultats de recherche | |
| const mockResults = [ | |
| { | |
| type: 'projet', | |
| icon: 'fas fa-folder', | |
| title: 'Migration vers SaaSPro', | |
| description: 'Projet de migration des données clients vers la nouvelle plateforme SaaSPro', | |
| date: '15/06/2023', | |
| url: '#' | |
| }, | |
| { | |
| type: 'tâche', | |
| icon: 'fas fa-tasks', | |
| title: 'Configurer les permissions', | |
| description: 'Configurer les permissions des utilisateurs pour le module de reporting', | |
| date: '10/06/2023', | |
| url: '#' | |
| }, | |
| { | |
| type: 'client', | |
| icon: 'fas fa-building', | |
| title: 'Acme Corporation', | |
| description: 'Client depuis 2018 - Contrat Premium - 45 utilisateurs', | |
| date: '', | |
| url: '#' | |
| }, | |
| { | |
| type: 'document', | |
| icon: 'fas fa-file-pdf', | |
| title: 'Rapport trimestriel Q2 2023', | |
| description: 'Rapport des performances et indicateurs clés pour le deuxième trimestre 2023', | |
| date: '05/06/2023', | |
| url: '#' | |
| } | |
| ]; | |
| // Gestionnaires d'événements pour la recherche desktop | |
| searchInput.addEventListener('focus', function() { | |
| searchDropdown.classList.add('active'); | |
| if (searchInput.value.trim() !== '') { | |
| showLoader(); | |
| setTimeout(showResults, 800); | |
| } | |
| }); | |
| searchInput.addEventListener('blur', function() { | |
| // On laisse un petit délai pour permettre le clic sur les résultats | |
| setTimeout(() => { | |
| searchDropdown.classList.remove('active'); | |
| }, 200); | |
| }); | |
| searchInput.addEventListener('input', function() { | |
| const query = searchInput.value.trim(); | |
| if (query !== '') { | |
| clearSearch.classList.remove('hidden'); | |
| showLoader(); | |
| setTimeout(showResults, 800); | |
| } else { | |
| clearSearch.classList.add('hidden'); | |
| hideResults(); | |
| } | |
| }); | |
| clearSearch.addEventListener('click', function() { | |
| searchInput.value = ''; | |
| searchInput.focus(); | |
| clearSearch.classList.add('hidden'); | |
| hideResults(); | |
| }); | |
| // Gestionnaires d'événements pour la recherche mobile | |
| mobileSearchToggle.addEventListener('click', function() { | |
| mobileSearchFullscreen.classList.remove('hidden'); | |
| mobileSearchInput.focus(); | |
| }); | |
| mobileSearchClose.addEventListener('click', function() { | |
| mobileSearchFullscreen.classList.add('hidden'); | |
| mobileSearchInput.value = ''; | |
| mobileClearSearch.classList.add('hidden'); | |
| mobileSearchDropdown.classList.remove('active'); | |
| }); | |
| mobileSearchInput.addEventListener('input', function() { | |
| const query = mobileSearchInput.value.trim(); | |
| if (query !== '') { | |
| mobileClearSearch.classList.remove('hidden'); | |
| mobileSearchLoader.classList.add('active'); | |
| mobileSearchDropdown.classList.add('active'); | |
| setTimeout(showMobileResults, 800); | |
| } else { | |
| mobileClearSearch.classList.add('hidden'); | |
| mobileSearchDropdown.classList.remove('active'); | |
| } | |
| }); | |
| mobileClearSearch.addEventListener('click', function() { | |
| mobileSearchInput.value = ''; | |
| mobileSearchInput.focus(); | |
| mobileClearSearch.classList.add('hidden'); | |
| mobileSearchDropdown.classList.remove('active'); | |
| }); | |
| // Raccourci clavier (/) pour focus sur la recherche | |
| document.addEventListener('keydown', function(e) { | |
| if (e.key === '/' && !mobileSearchFullscreen.classList.contains('hidden')) { | |
| e.preventDefault(); | |
| mobileSearchInput.focus(); | |
| } else if (e.key === '/' && document.activeElement !== searchInput) { | |
| e.preventDefault(); | |
| searchInput.focus(); | |
| } else if (e.key === 'Escape' && mobileSearchFullscreen.classList.contains('hidden') === false) { | |
| mobileSearchFullscreen.classList.add('hidden'); | |
| } | |
| }); | |
| // Fonctions utilitaires | |
| function showLoader() { | |
| searchLoader.classList.add('active'); | |
| searchResults.innerHTML = ''; | |
| noResults.classList.add('hidden'); | |
| } | |
| function hideLoader() { | |
| searchLoader.classList.remove('active'); | |
| } | |
| function showResults() { | |
| hideLoader(); | |
| const query = searchInput.value.trim().toLowerCase(); | |
| if (query === '') { | |
| hideResults(); | |
| return; | |
| } | |
| // Filtrage des résultats mock (dans une vraie app, ce serait une requête API) | |
| const filteredResults = mockResults.filter(item => | |
| item.title.toLowerCase().includes(query) || | |
| item.description.toLowerCase().includes(query) | |
| ); | |
| // Mise à jour du compteur de résultats | |
| document.querySelector('#search-dropdown .text-xs:last-child').textContent = | |
| `${filteredResults.length} trouvé${filteredResults.length !== 1 ? 's' : ''}`; | |
| if (filteredResults.length === 0) { | |
| noResults.classList.remove('hidden'); | |
| searchResults.innerHTML = ''; | |
| } else { | |
| noResults.classList.add('hidden'); | |
| searchResults.innerHTML = ''; | |
| // Groupement par type | |
| const groupedResults = {}; | |
| filteredResults.forEach(result => { | |
| if (!groupedResults[result.type]) { | |
| groupedResults[result.type] = []; | |
| } | |
| groupedResults[result.type].push(result); | |
| }); | |
| // Affichage par groupe | |
| for (const type in groupedResults) { | |
| const group = groupedResults[type]; | |
| // En-tête du groupe | |
| const groupHeader = document.createElement('div'); | |
| groupHeader.className = 'px-4 py-2 bg-gray-50 text-xs font-medium text-gray-500 uppercase tracking-wider'; | |
| groupHeader.textContent = type === 'projet' ? 'PROJETS' : | |
| type === 'tâche' ? 'TÂCHES' : | |
| type === 'client' ? 'CLIENTS' : 'DOCUMENTS'; | |
| searchResults.appendChild(groupHeader); | |
| // Items du groupe | |
| group.forEach(result => { | |
| const resultItem = document.createElement('a'); | |
| resultItem.href = result.url; | |
| resultItem.className = 'search-item px-4 py-3 block cursor-pointer'; | |
| // Highlight des termes recherchés | |
| const highlightedTitle = highlightText(result.title, query); | |
| const highlightedDesc = highlightText(result.description, query); | |
| resultItem.innerHTML = ` | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 pt-0.5"> | |
| <i class="${result.icon} text-gray-500"></i> | |
| </div> | |
| <div class="ml-3 flex-1 min-w-0"> | |
| <p class="text-sm font-medium text-gray-900 truncate">${highlightedTitle}</p> | |
| <p class="text-sm text-gray-500 mt-1">${highlightedDesc}</p> | |
| ${result.date ? `<p class="text-xs text-gray-400 mt-1">${result.date}</p>` : ''} | |
| </div> | |
| </div> | |
| `; | |
| searchResults.appendChild(resultItem); | |
| }); | |
| } | |
| } | |
| } | |
| function showMobileResults() { | |
| mobileSearchLoader.classList.remove('active'); | |
| const query = mobileSearchInput.value.trim().toLowerCase(); | |
| if (query === '') { | |
| mobileSearchDropdown.classList.remove('active'); | |
| return; | |
| } | |
| // Filtrage des résultats mock | |
| const filteredResults = mockResults.filter(item => | |
| item.title.toLowerCase().includes(query) || | |
| item.description.toLowerCase().includes(query) | |
| ); | |
| // Mise à jour du compteur de résultats | |
| document.querySelector('#mobile-search-dropdown .text-xs:last-child').textContent = | |
| `${filteredResults.length} trouvé${filteredResults.length !== 1 ? 's' : ''}`; | |
| if (filteredResults.length === 0) { | |
| mobileNoResults.classList.remove('hidden'); | |
| mobileSearchResults.innerHTML = ''; | |
| } else { | |
| mobileNoResults.classList.add('hidden'); | |
| mobileSearchResults.innerHTML = ''; | |
| // Groupement par type | |
| const groupedResults = {}; | |
| filteredResults.forEach(result => { | |
| if (!groupedResults[result.type]) { | |
| groupedResults[result.type] = []; | |
| } | |
| groupedResults[result.type].push(result); | |
| }); | |
| // Affichage par groupe | |
| for (const type in groupedResults) { | |
| const group = groupedResults[type]; | |
| // En-tête du groupe | |
| const groupHeader = document.createElement('div'); | |
| groupHeader.className = 'px-4 py-2 bg-gray-50 text-xs font-medium text-gray-500 uppercase tracking-wider'; | |
| groupHeader.textContent = type === 'projet' ? 'PROJETS' : | |
| type === 'tâche' ? 'TÂCHES' : | |
| type === 'client' ? 'CLIENTS' : 'DOCUMENTS'; | |
| mobileSearchResults.appendChild(groupHeader); | |
| // Items du groupe | |
| group.forEach(result => { | |
| const resultItem = document.createElement('a'); | |
| resultItem.href = result.url; | |
| resultItem.className = 'search-item px-4 py-3 block cursor-pointer'; | |
| // Highlight des termes recherchés | |
| const highlightedTitle = highlightText(result.title, query); | |
| const highlightedDesc = highlightText(result.description, query); | |
| resultItem.innerHTML = ` | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 pt-0.5"> | |
| <i class="${result.icon} text-gray-500"></i> | |
| </div> | |
| <div class="ml-3 flex-1 min-w-0"> | |
| <p class="text-sm font-medium text-gray-900 truncate">${highlightedTitle}</p> | |
| <p class="text-sm text-gray-500 mt-1">${highlightedDesc}</p> | |
| ${result.date ? `<p class="text-xs text-gray-400 mt-1">${result.date}</p>` : ''} | |
| </div> | |
| </div> | |
| `; | |
| mobileSearchResults.appendChild(resultItem); | |
| }); | |
| } | |
| } | |
| } | |
| function hideResults() { | |
| searchDropdown.classList.remove('active'); | |
| searchResults.innerHTML = ''; | |
| noResults.classList.add('hidden'); | |
| } | |
| function highlightText(text, query) { | |
| if (!query) return text; | |
| const regex = new RegExp(query, 'gi'); | |
| return text.replace(regex, match => `<span class="highlight">${match}</span>`); | |
| } | |
| }); | |
| </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=LoicUX/evaluteo-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |