Use preferred version as badge (Community/Enterprise/Both), remove Prefiere: line

This commit is contained in:
Hermes Agent
2026-08-07 17:01:17 +00:00
parent 16bc61420b
commit d4fa069935
+3 -6
View File
@@ -566,7 +566,6 @@
const hasYoutube = ex.youtube && ex.youtube.length > 0;
const hasWebsite = ex.website && ex.website.length > 0;
const prefVersion = ex.preferredVersion || 'community';
const prefLabel = prefVersion === 'enterprise' ? 'Enterprise' : prefVersion === 'both' ? 'Community + Enterprise' : 'Community';
// Gradient color based on id
const gradients = [
@@ -585,13 +584,11 @@
? `<img src="${ex.image}" alt="${ex.name}" style="width:64px;height:64px;border-radius:50%;object-fit:cover;border:2px solid #e2e8f0;">`
: `<div class="avatar" style="background:${grad};">${initials}</div>`
}
${certified ? '<span class="badge-certified" style="font-size:0.6875rem;font-weight:600;padding:4px 10px;border-radius:100px;">Certificado</span>' : '<span class="badge-community" style="font-size:0.6875rem;font-weight:600;padding:4px 10px;border-radius:100px;">Community</span>'}
${certified ? '<span class="badge-certified" style="font-size:0.6875rem;font-weight:600;padding:4px 10px;border-radius:100px;">Certificado</span>' : ''}
${prefVersion === 'enterprise' ? '<span style="background:rgba(59,130,246,0.1);color:#3b82f6;font-size:0.6875rem;font-weight:600;padding:4px 10px;border-radius:100px;">Enterprise</span>' : prefVersion === 'both' ? '<span style="background:rgba(16,185,129,0.1);color:#10b981;font-size:0.6875rem;font-weight:600;padding:4px 10px;border-radius:100px;">Community + Enterprise</span>' : '<span class="badge-community" style="font-size:0.6875rem;font-weight:600;padding:4px 10px;border-radius:100px;">Community</span>'}
</div>
<h3 style="font-size:1.125rem;font-weight:600;color:#0f172a;margin-bottom:4px;">${ex.name || 'Sin nombre'}</h3>
${ex.languages ? `<div style="font-size:0.8125rem;color:#64748b;margin-bottom:8px;">${ex.languages.split(',').map(l => l.trim() === 'spanish' ? 'Español' : l.trim() === 'english' ? 'Inglés' : l.trim()).join(' / ')}</div>` : ''}
<div style="font-size:0.8125rem;color:#64748b;margin-bottom:12px;">
Prefiere: <strong style="color:#4338ca;">${prefLabel}</strong>
</div>
${ex.languages ? `<div style="font-size:0.8125rem;color:#64748b;margin-bottom:12px;">${ex.languages.split(',').map(l => l.trim() === 'spanish' ? 'Español' : l.trim() === 'english' ? 'Inglés' : l.trim()).join(' / ')}</div>` : ''}
<p style="color:#475569;font-size:0.875rem;line-height:1.7;margin-bottom:16px;">${ex.summary || 'Sin descripción disponible.'}</p>
${tags.length > 0 ? `<div style="display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap;">${tags.map(t => `<span style="background:rgba(67,56,202,0.08);color:#4338ca;font-size:0.6875rem;font-weight:500;padding:3px 10px;border-radius:100px;">${t}</span>`).join('')}</div>` : ''}
<div style="border-top:1px solid #e2e8f0;padding-top:16px;display:flex;flex-direction:column;gap:8px;">