From 9e740cbcbd8ba6491c16473efe5e1f380f4dd04a Mon Sep 17 00:00:00 2001 From: AdrianoDev Date: Mon, 11 May 2026 22:45:18 +0200 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20leggibilit=C3=A0=20code=20blo?= =?UTF-8?q?ck=20JSON=20config=20con=20syntax=20highlighting=20custom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Background code più chiaro (#1A1A24) e font 13.5px line-height 1.6 per leggibilità migliore. Override token highlight.js coordinati con palette neon: - .hljs-attr (chiavi JSON) → cyan #00D9FF - .hljs-string (valori stringa) → green #00E676 - .hljs-number, .hljs-literal (numeri/bool/null) → pink #FF2D87 - .hljs-keyword, .hljs-built_in → amber #FFB800 - .hljs-punctuation, .hljs-meta → muted #7A7A8C Co-Authored-By: Claude Opus 4.7 (1M context) --- src/multi_swarm/dashboard/nicegui_app.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/multi_swarm/dashboard/nicegui_app.py b/src/multi_swarm/dashboard/nicegui_app.py index 4661d57..fd33a0f 100644 --- a/src/multi_swarm/dashboard/nicegui_app.py +++ b/src/multi_swarm/dashboard/nicegui_app.py @@ -229,13 +229,23 @@ body, .q-page-container, .q-page {{ margin-bottom: 8px !important; }} -code, pre {{ - background: #0F0F15 !important; +code, pre, .nicegui-code {{ + background: #1A1A24 !important; color: {COLOR_TEXT} !important; border: 1px solid {COLOR_BORDER}; border-radius: 10px !important; - padding: 14px !important; + padding: 16px !important; + font-size: 13.5px !important; + line-height: 1.6 !important; }} +.hljs {{ background: transparent !important; color: {COLOR_TEXT} !important; }} +.hljs-attr, .hljs-attribute {{ color: {COLOR_SECONDARY} !important; font-weight: 500; }} +.hljs-string {{ color: {COLOR_SUCCESS} !important; }} +.hljs-number, .hljs-literal {{ color: {COLOR_PRIMARY} !important; font-weight: 500; }} +.hljs-keyword, .hljs-built_in {{ color: {COLOR_ACCENT} !important; }} +.hljs-punctuation, .hljs-meta {{ color: {COLOR_TEXT_MUTED} !important; }} +.hljs-comment {{ color: {COLOR_TEXT_MUTED} !important; font-style: italic; }} +.hljs-name, .hljs-title {{ color: {COLOR_PRIMARY} !important; }} .q-badge {{ border-radius: 6px !important; font-weight: 500 !important; padding: 4px 10px !important; font-size: 12px !important; }}