From 877a3f55db9ed0eb62581ad5b137592d7be96d02 Mon Sep 17 00:00:00 2001 From: sabo Date: Wed, 26 Aug 2026 12:57:36 +0300 Subject: [PATCH] Polish search labels CSS and drop non-HTML generate paths. Co-authored-by: Cursor --- webapp/templates/viewer.html | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/webapp/templates/viewer.html b/webapp/templates/viewer.html index 05ed87b..ed679a2 100644 --- a/webapp/templates/viewer.html +++ b/webapp/templates/viewer.html @@ -142,6 +142,10 @@ .card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; } .card-text { font-size: 12px; color: var(--muted); line-height: 1.6; max-height: 280px; overflow: hidden; } .card-text img { max-width: 100%; max-height: 200px; display: block; margin: 6px 0; border-radius: 4px; border: 1px solid var(--border); } + .card-section-label { + font-family: var(--mono); font-size: 10px; color: var(--muted); + letter-spacing: .06em; text-transform: uppercase; margin: 10px 0 6px; + } .card-actions { display: flex; gap: 8px; margin-top: 10px; } .card-actions button { font-size: 11px; padding: 5px 10px; } .modal-backdrop { @@ -755,21 +759,16 @@ function dragDrop(e, idx) { function generateDoc(fmt) { if (genOrder.length === 0) { toast('Избери секции първо'); return; } const sections = genOrder.map(code => ALL.find(r => r.code === code)).filter(Boolean); - - if (fmt === 'html') { - const html = buildHtmlDoc(sections); - const blob = new Blob([html], {type: 'text/html;charset=utf-8'}); - const url = URL.createObjectURL(blob); - const win = window.open(url, '_blank'); - if (!win) { - toast('Браузърът блокира new tab — позволи pop-ups', true); - download('help_document.html', html, 'text/html'); - } else { - toast('HTML документът е отворен в нов tab'); - } - return; + const html = buildHtmlDoc(sections); + const blob = new Blob([html], {type: 'text/html;charset=utf-8'}); + const url = URL.createObjectURL(blob); + const win = window.open(url, '_blank'); + if (!win) { + toast('Браузърът блокира new tab — позволи pop-ups', true); + download('help_document.html', html, 'text/html'); + } else { + toast('HTML документът е отворен в нов tab'); } - toast('Word / PDF — TODO', true); } function buildHtmlDoc(sections) {