Showing
1 changed file
with
42 additions
and
13 deletions
| ... | @@ -103,13 +103,14 @@ | ... | @@ -103,13 +103,14 @@ |
| 103 | 103 | ||
| 104 | // Clasificadores unificados (transversales) | 104 | // Clasificadores unificados (transversales) |
| 105 | const CLASIFICADORES = [ | 105 | const CLASIFICADORES = [ |
| 106 | - { id: 'entidad', label: 'Entidades', icon: '🏛️' }, | 106 | + { id: 'entidad', label: '¿Quién gasta?', icon: '🏛️' }, |
| 107 | - { id: 'objeto', label: 'Objetos de gasto', icon: '📦' }, | 107 | + { id: 'objeto', label: '¿En qué se gasta?', icon: '📦' }, |
| 108 | - { id: 'finfun', label: 'Finalidad y función', icon: '🎯' }, | 108 | + { id: 'finfun', label: '¿Para qué se gasta?', icon: '🎯' }, |
| 109 | - { id: 'geografico', label: 'Geográfico', icon: '📍', disabled: true }, | 109 | + { id: 'geografico', label: '¿Dónde se gasta?', icon: '📍' }, |
| 110 | - { id: 'rubro', label: 'Rubro', icon: '💰', disabled: true }, | 110 | + { id: 'sectores', label: '¿En qué sectores se gasta?', icon: '🏢' }, |
| 111 | - { id: 'organismo', label: 'Organismo', icon: '🏦', disabled: true }, | 111 | + { id: 'rubro', label: '¿Con qué recursos?', icon: '💰' }, |
| 112 | - { id: 'fuente', label: 'Fuente', icon: '💵', disabled: true }, | 112 | + { id: 'organismo', label: '¿Quién financia?', icon: '🏦' }, |
| 113 | + { id: 'fuente', label: 'Origen del ingreso', icon: '💵' }, | ||
| 113 | ]; | 114 | ]; |
| 114 | 115 | ||
| 115 | function toggleClassifier(id) { | 116 | function toggleClassifier(id) { |
| ... | @@ -528,6 +529,24 @@ | ... | @@ -528,6 +529,24 @@ |
| 528 | 529 | ||
| 529 | $: stats = allHits.length > 0 ? getStats(allHits, results?.found || allHits.length) : null; | 530 | $: stats = allHits.length > 0 ? getStats(allHits, results?.found || allHits.length) : null; |
| 530 | 531 | ||
| 532 | + // Texto contextual para resultados | ||
| 533 | + $: searchContextText = (() => { | ||
| 534 | + if (searchMode === 'programas') { | ||
| 535 | + return 'Buscando en programas y proyectos'; | ||
| 536 | + } else { | ||
| 537 | + if (selectedClassifiers.length === 0) return ''; | ||
| 538 | + const labels = selectedClassifiers.map(id => { | ||
| 539 | + const clf = CLASIFICADORES.find(c => c.id === id); | ||
| 540 | + return clf ? clf.label.replace('¿', '').replace('?', '').toLowerCase() : id; | ||
| 541 | + }); | ||
| 542 | + if (labels.length === 1) { | ||
| 543 | + return `Buscando por ${labels[0]}`; | ||
| 544 | + } else { | ||
| 545 | + return `Buscando por ${labels.slice(0, -1).join(', ')} y ${labels[labels.length - 1]}`; | ||
| 546 | + } | ||
| 547 | + } | ||
| 548 | + })(); | ||
| 549 | + | ||
| 531 | $: { | 550 | $: { |
| 532 | const _mode = searchMode; | 551 | const _mode = searchMode; |
| 533 | const _classifiers = selectedClassifiers; | 552 | const _classifiers = selectedClassifiers; |
| ... | @@ -664,7 +683,7 @@ | ... | @@ -664,7 +683,7 @@ |
| 664 | <span class="mode-card-title">Programas y Proyectos</span> | 683 | <span class="mode-card-title">Programas y Proyectos</span> |
| 665 | </div> | 684 | </div> |
| 666 | <p class="mode-card-desc"> | 685 | <p class="mode-card-desc"> |
| 667 | - <strong>735k+</strong> proyectos y programas (2016-2025). Para encontrar iniciativas específicas. | 686 | + Explora los gastos de <strong>735k+</strong> proyectos y programas (2016-2025). Esta opción es útil para encontrar iniciativas específicas: una obra, un programa social. Por ejemplo: |
| 668 | </p> | 687 | </p> |
| 669 | <div class="mode-card-pills"> | 688 | <div class="mode-card-pills"> |
| 670 | <span class="pills-hint"><span class="hint-desktop">Ej:</span><span class="hint-mobile">Ej:</span></span> | 689 | <span class="pills-hint"><span class="hint-desktop">Ej:</span><span class="hint-mobile">Ej:</span></span> |
| ... | @@ -705,7 +724,7 @@ | ... | @@ -705,7 +724,7 @@ |
| 705 | <span class="mode-card-title">Clasificadores</span> | 724 | <span class="mode-card-title">Clasificadores</span> |
| 706 | </div> | 725 | </div> |
| 707 | <p class="mode-card-desc"> | 726 | <p class="mode-card-desc"> |
| 708 | - <strong>2500+</strong> categorías de gasto e ingreso (2006-2025). Para comparar y analizar tendencias. | 727 | + Busca en más de <strong>2500</strong> categorías estandarizadas de gasto e ingreso público (2016-2025). Útiles para comparar gestiones, entidades y analizar tendencias históricas. |
| 709 | </p> | 728 | </p> |
| 710 | <div class="mode-card-classifiers"> | 729 | <div class="mode-card-classifiers"> |
| 711 | {#each CLASIFICADORES as clf} | 730 | {#each CLASIFICADORES as clf} |
| ... | @@ -787,6 +806,11 @@ | ... | @@ -787,6 +806,11 @@ |
| 787 | </div> | 806 | </div> |
| 788 | {/if} | 807 | {/if} |
| 789 | 808 | ||
| 809 | + <!-- Título contextual de búsqueda --> | ||
| 810 | + {#if allHits.length > 0 && searchContextText} | ||
| 811 | + <div class="search-context-title">{searchContextText}</div> | ||
| 812 | + {/if} | ||
| 813 | + | ||
| 790 | <!-- Contenedor de resultados (siempre montado para evitar flicker) --> | 814 | <!-- Contenedor de resultados (siempre montado para evitar flicker) --> |
| 791 | <div | 815 | <div |
| 792 | class="results-content results-content-filled" | 816 | class="results-content results-content-filled" |
| ... | @@ -1536,14 +1560,16 @@ | ... | @@ -1536,14 +1560,16 @@ |
| 1536 | .mode-card-active .mode-card-icon{color:#F0C14D} | 1560 | .mode-card-active .mode-card-icon{color:#F0C14D} |
| 1537 | .mode-card-title{font-family:var(--sans);font-size:16px;font-weight:600;color:#F5F0E8;letter-spacing:-0.01em} | 1561 | .mode-card-title{font-family:var(--sans);font-size:16px;font-weight:600;color:#F5F0E8;letter-spacing:-0.01em} |
| 1538 | 1562 | ||
| 1539 | - .mode-card-desc{font-family:var(--sans);font-size:13px;color:#9B9890;line-height:1.5;margin:0} | 1563 | + .mode-card-desc{font-family:var(--sans);font-size:13px;color:#A8A49C;line-height:1.5;margin:0} |
| 1540 | .mode-card-desc strong{color:#D0CCC4;font-weight:600} | 1564 | .mode-card-desc strong{color:#D0CCC4;font-weight:600} |
| 1565 | + .mode-card-active .mode-card-desc{color:#C8C4BC} | ||
| 1566 | + .mode-card-active .mode-card-desc strong{color:#F0C14D} | ||
| 1541 | 1567 | ||
| 1542 | .mode-card-classifiers{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px} | 1568 | .mode-card-classifiers{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px} |
| 1543 | 1569 | ||
| 1544 | - .clf-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);cursor:pointer;transition:all 0.2s;font-family:var(--sans);font-size:12px;color:#8B8880} | 1570 | + .clf-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);cursor:pointer;transition:all 0.2s;font-family:var(--sans);font-size:12px;color:#A8A49C} |
| 1545 | - .clf-chip:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15)} | 1571 | + .clf-chip:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15);color:#D0CCC4} |
| 1546 | - .clf-chip-active{background:rgba(90,175,138,0.15);border-color:rgba(90,175,138,0.4);color:#5AAF8A} | 1572 | + .clf-chip-active{background:rgba(90,175,138,0.15);border-color:rgba(90,175,138,0.4);color:#6BC99E} |
| 1547 | .clf-chip-disabled{opacity:0.35;cursor:not-allowed} | 1573 | .clf-chip-disabled{opacity:0.35;cursor:not-allowed} |
| 1548 | .clf-chip-disabled:hover{background:rgba(255,255,255,0.04);border-color:rgba(255,255,255,0.08)} | 1574 | .clf-chip-disabled:hover{background:rgba(255,255,255,0.04);border-color:rgba(255,255,255,0.08)} |
| 1549 | .clf-check{width:14px;height:14px;border-radius:4px;border:1.5px solid rgba(255,255,255,0.2);display:flex;align-items:center;justify-content:center;transition:all 0.2s;flex-shrink:0} | 1575 | .clf-check{width:14px;height:14px;border-radius:4px;border:1.5px solid rgba(255,255,255,0.2);display:flex;align-items:center;justify-content:center;transition:all 0.2s;flex-shrink:0} |
| ... | @@ -1584,6 +1610,9 @@ | ... | @@ -1584,6 +1610,9 @@ |
| 1584 | .results-error{font-family:var(--sans);font-size:14px;color:#C44B3F} | 1610 | .results-error{font-family:var(--sans);font-size:14px;color:#C44B3F} |
| 1585 | .results-empty{font-family:var(--sans);font-size:14px;color:#8B8880} | 1611 | .results-empty{font-family:var(--sans);font-size:14px;color:#8B8880} |
| 1586 | 1612 | ||
| 1613 | + /* Search Context Title */ | ||
| 1614 | + .search-context-title{font-family:var(--sans);font-size:12px;font-weight:500;color:#9B9890;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:8px;padding-left:4px;text-align:left} | ||
| 1615 | + | ||
| 1587 | /* Results Content */ | 1616 | /* Results Content */ |
| 1588 | .results-content{max-height:0;overflow:hidden;opacity:0;transition:all 0.4s cubic-bezier(0.16,1,0.3,1)} | 1617 | .results-content{max-height:0;overflow:hidden;opacity:0;transition:all 0.4s cubic-bezier(0.16,1,0.3,1)} |
| 1589 | .results-content-visible{max-height:60vh;overflow-y:auto;opacity:1;background:#1C1C1A;border-radius:16px;border:none;padding:14px 10px;text-align:left;position:relative;z-index:10} | 1618 | .results-content-visible{max-height:60vh;overflow-y:auto;opacity:1;background:#1C1C1A;border-radius:16px;border:none;padding:14px 10px;text-align:left;position:relative;z-index:10} | ... | ... |
-
Please register or login to post a comment