feat: add dark mode with light/dark/auto theme setting
Theme preference stored in localStorage (auto follows the OS setting). The chosen data-theme attribute is applied synchronously in <head> to avoid any flash of unstyled content. CSS custom properties handle all surface, text, border and input colours across every page. The Appearance section on the profile page lets each user switch modes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -288,6 +288,31 @@
|
||||
}
|
||||
#ntable a.host-link { color: inherit; text-decoration: none; }
|
||||
#ntable a.host-link:hover { text-decoration: underline; }
|
||||
|
||||
/* ── Dark mode ── */
|
||||
html[data-theme="dark"] h1,
|
||||
html[data-theme="dark"] h2 { color: var(--text); }
|
||||
html[data-theme="dark"] .subtitle { color: var(--text-sec); }
|
||||
html[data-theme="dark"] h2,
|
||||
html[data-theme="dark"] .table-section,
|
||||
html[data-theme="dark"] .log-section,
|
||||
html[data-theme="dark"] .log-section-header { background: var(--surface); }
|
||||
html[data-theme="dark"] .log-section-title { color: var(--text); }
|
||||
html[data-theme="dark"] #ntable td,
|
||||
html[data-theme="dark"] #ntable th { border-color: var(--border); }
|
||||
html[data-theme="dark"] #ntable tr:nth-child(even) { background: var(--surface-2); }
|
||||
html[data-theme="dark"] #ntable tr:hover { background: #1e3a5f; }
|
||||
html[data-theme="dark"] #ntable tbody tr.row-warning { background: #3a2800; }
|
||||
html[data-theme="dark"] #ntable tbody tr.row-critical { background: #3a0a0a; }
|
||||
html[data-theme="dark"] #ntable tbody tr.row-warning:hover { background: #4a3200; }
|
||||
html[data-theme="dark"] #ntable tbody tr.row-critical:hover { background: #4a1010; }
|
||||
html[data-theme="dark"] #messages .log-entry { border-bottom-color: var(--border-3); }
|
||||
html[data-theme="dark"] .log-ts,
|
||||
html[data-theme="dark"] .log-service { color: var(--text-muted); }
|
||||
html[data-theme="dark"] .log-info .log-level { color: var(--text-sec); }
|
||||
html[data-theme="dark"] .log-filter-bar input,
|
||||
html[data-theme="dark"] .log-filter-bar select { color: var(--text); }
|
||||
html[data-theme="dark"] .connection-modal-content { background: var(--surface); color: var(--text); }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var cnt = 0;
|
||||
|
||||
Reference in New Issue
Block a user