diff --git a/index.html b/index.html index 55bf31c..cd7503d 100644 --- a/index.html +++ b/index.html @@ -223,7 +223,7 @@ - +
@@ -231,11 +231,9 @@
-
- - - - +
+ Expertos disponibles: + 0
@@ -562,6 +560,9 @@ } grid.innerHTML = experts.map(ex => { + // Update count + const countEl = document.getElementById('expertCountValue'); + if (countEl) countEl.textContent = experts.length; const initials = ex.name ? ex.name.split(' ').map(w => w[0]).join('').slice(0, 2).toUpperCase() : '??'; const skills = ex.skills ? ex.skills.split(',').map(s => s.trim()) : []; const modules = ex.modules ? ex.modules.split(',').map(s => s.trim()) : []; @@ -595,7 +596,8 @@ ${prefVersion === 'enterprise' ? 'Enterprise' : prefVersion === 'both' ? 'Community + Enterprise' : 'Community'}

${ex.name || 'Sin nombre'}

- ${ex.languages ? `
${ex.languages.split(',').map(l => l.trim() === 'spanish' ? 'Español' : l.trim() === 'english' ? 'Inglés' : l.trim()).join(' / ')}
` : ''} + ${ex.languages ? `
${ex.languages.split(',').map(l => l.trim() === 'spanish' ? 'Español' : l.trim() === 'english' ? 'Inglés' : l.trim()).join(' / ')}
` : ''} + ${ex.location ? `
${ex.location.charAt(0).toUpperCase() + ex.location.slice(1)}
` : ''}

${ex.summary || 'Sin descripción disponible.'}

${tags.length > 0 ? `
${tags.map(t => `${t}`).join('')}
` : ''}
@@ -672,28 +674,22 @@ }); // ===== EXPERT SEARCH ===== - let currentFilter = 'all'; - function searchExperts(query) { const q = query.toLowerCase().trim(); let filtered = allExperts; - // Apply current filter - if (currentFilter === 'certified') { - filtered = filtered.filter(ex => ex.certified === 'yes' || ex.certified === true); - } - - // Apply search query if (q.length > 0) { - filtered = filtered.filter(ex => { + filtered = allExperts.filter(ex => { const name = (ex.name || '').toLowerCase(); const skills = (ex.skills || '').toLowerCase(); const modules = (ex.modules || '').toLowerCase(); const extra = (ex.extra || '').toLowerCase(); const summary = (ex.summary || '').toLowerCase(); const languages = (ex.languages || '').toLowerCase(); + const location = (ex.location || '').toLowerCase(); return name.includes(q) || skills.includes(q) || modules.includes(q) || extra.includes(q) || summary.includes(q) || languages.includes(q) || + location.includes(q) || (ex.certified === 'yes' && 'certificado'.includes(q)); }); } @@ -701,16 +697,6 @@ renderExperts(filtered); } - // Update filterExperts to store current filter and search together - function filterExperts(filter) { - currentFilter = filter; - document.querySelectorAll('.filter-chip').forEach(chip => { - chip.classList.toggle('active', chip.dataset.filter === filter); - }); - const searchInput = document.getElementById('expertSearch'); - if (searchInput) searchExperts(searchInput.value); - } - // Load experts on page load loadExperts();