diff --git a/webapp/templates/viewer.html b/webapp/templates/viewer.html index ea7c765..c894a82 100644 --- a/webapp/templates/viewer.html +++ b/webapp/templates/viewer.html @@ -251,6 +251,43 @@ .rescan-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; } .rescan-box input[type=file] { font-size: 12px; } .rescan-status { font-family: var(--mono); font-size: 12px; color: var(--muted); min-height: 1.2em; } + + .api-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr); gap: 20px; } + @media (max-width: 900px) { .api-layout { grid-template-columns: 1fr; } } + .api-card { + background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); + padding: 16px 18px; + } + .api-card h3 { + font-family: var(--mono); font-size: 12px; color: var(--muted); + letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; + } + .api-card p { font-size: 13px; color: var(--text); line-height: 1.55; margin-bottom: 10px; } + .api-ep { + border: 1px solid var(--border); border-radius: var(--radius); + padding: 10px 12px; margin-bottom: 8px; background: var(--bg3); + } + .api-ep .method { + font-family: var(--mono); font-size: 11px; font-weight: 600; + color: #1e4a8c; background: #d6e4f7; padding: 2px 7px; border-radius: 4px; + margin-right: 8px; + } + .api-ep .method.post { color: #1a6b45; background: #d8f0e4; } + .api-ep code { font-family: var(--mono); font-size: 12px; } + .api-ep .desc { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; } + .api-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; } + .api-row select, .api-row input[type=text] { + background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); + color: var(--text); font-family: var(--mono); font-size: 12px; padding: 7px 10px; + } + .api-row select { min-width: 160px; } + .api-row input[type=text] { flex: 1; min-width: 180px; } + .api-out { + font-family: var(--mono); font-size: 11px; line-height: 1.45; + background: #1a1a24; color: #d7dde8; border-radius: var(--radius); + padding: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; + } + .api-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
@@ -268,6 +305,7 @@Base URL:
JSON API за четене на help секции, търсене и (опционално) rescan. Готово за връзка с външни системи.
+ +/healthz
+ output_dir_ok, txt_count./api/sections?prefix=RIP
+ prefix./api/search?q=…&prefix=RIP
+ /api/section/{code}
+ text, text_html)./api/keywords/{code}
+ {"keywords":"а, б, в"} — обновява ключови думи./api/rescan
+ file (zip/docx/…), prefix, force. Header опционално: X-Rescan-Token./api/rescan/{job_id}
+ queued / processing / done / error).OpenAPI / Swagger: /docs · ReDoc: /redoc
+Типичен ERP поток: GET /api/search → избор на code → GET /api/section/{code} за съдържание.
Избери endpoint и натисни „Изпълни“.+