Files
junction/web/public/app.css
T
Hermes 0427e03ff5 dashboard: Konfigurationseditor mit Junction-Syntax, Oberfläche auf Englisch
- Der Konfigurationstext bekommt eine Highlight-Ebene; die Vim-Syntax liegt
  unter syntax/ und wird als /static/junction.vim zum Download ausgeliefert.
- UI-Texte und Kommentare sind auf Englisch (Repo-Konvention).
- Snapshot, Requests, Spend und Config laufen über die vorhandenen
  Kontrollbefehle; /api/stream hält die Anzeige aktuell.
2026-11-15 21:27:42 +00:00

203 lines
5.5 KiB
CSS

:root {
--bg: #0b0e13;
--card: #141922;
--card-2: #1b2230;
--line: #232c3b;
--text: #dde5f2;
--dim: #7d8ba3;
--ok: #45d19a;
--warn: #ffb454;
--bad: #ff6b6b;
--accent: #6aa9ff;
}
@media (prefers-color-scheme: light) {
:root {
--bg: #f4f6fa;
--card: #ffffff;
--card-2: #eef2f8;
--line: #dde3ee;
--text: #17202e;
--dim: #5f6c82;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
header {
display: flex;
flex-wrap: wrap;
gap: 18px;
align-items: center;
justify-content: space-between;
padding: 14px 20px;
border-bottom: 1px solid var(--line);
background: var(--card);
position: sticky;
top: 0;
z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 17px; margin: 0; letter-spacing: .3px; font-weight: 650; }
.brand .sub { color: var(--dim); font-variant-numeric: tabular-nums; }
.dot {
width: 10px; height: 10px; border-radius: 50%;
background: var(--dim); display: inline-block;
}
.dot.live { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.dead { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.numbers { display: flex; gap: 22px; flex-wrap: wrap; }
.n { display: flex; flex-direction: column; align-items: flex-end; }
.n b { font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 600; }
.n span { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
main {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
gap: 14px;
padding: 16px;
max-width: 1500px;
margin: 0 auto;
}
.card {
background: var(--card);
border: 1px solid var(--line);
border-radius: 10px;
padding: 14px 16px 16px;
}
.card.wide { grid-column: 1 / -1; }
.card h2 {
font-size: 12px;
text-transform: uppercase;
letter-spacing: .8px;
color: var(--dim);
margin: 0 0 10px;
font-weight: 600;
display: flex;
justify-content: space-between;
align-items: baseline;
}
.card h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
canvas { width: 100%; display: block; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th {
text-align: left;
font-size: 11px;
text-transform: uppercase;
letter-spacing: .6px;
color: var(--dim);
font-weight: 600;
padding: 4px 8px 8px;
border-bottom: 1px solid var(--line);
}
td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: none; }
.tag {
display: inline-block;
padding: 1px 7px;
border-radius: 999px;
font-size: 11px;
border: 1px solid var(--line);
color: var(--dim);
}
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag.paused { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
button, input, textarea {
font: inherit;
color: var(--text);
background: var(--card-2);
border: 1px solid var(--line);
border-radius: 7px;
padding: 7px 11px;
}
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { border-color: var(--accent); color: var(--accent); }
button.ghost { background: transparent; }
input { flex: 1; }
form { display: flex; gap: 8px; margin-top: 10px; }
textarea {
width: 100%;
min-height: 300px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12.5px;
line-height: 1.5;
resize: vertical;
}
.row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.hint { color: var(--dim); font-size: 12px; margin: 8px 0 0; }
.hint.bad { color: var(--bad); }
.hint.ok { color: var(--ok); }
.muted { color: var(--dim); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tool {
font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
border: 1px solid var(--line);
border-radius: 6px;
padding: 3px 8px;
color: var(--text);
background: var(--card-2);
}
.tool b { color: var(--accent); font-weight: 600; }
.tool span { color: var(--dim); }
/* Config editor with syntax highlighting (overlay) */
.editor-wrap {
position: relative;
min-height: 360px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--card-2);
overflow: hidden;
}
.config-layer {
margin: 0;
padding: 12px;
border: 0;
width: 100%;
min-height: 360px;
font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
tab-size: 2;
white-space: pre;
overflow: auto;
box-sizing: border-box;
}
#config-hl {
position: absolute;
inset: 0;
color: var(--text);
pointer-events: none;
}
#config {
position: relative;
background: transparent;
color: transparent;
caret-color: var(--text);
resize: vertical;
outline: none;
}
#config::selection { background: rgba(106,169,255,0.35); }
.tok-cmt { color: #6b7a90; font-style: italic; }
.tok-str { color: #9bd36b; }
.tok-kw { color: #6aa9ff; font-weight: 600; }
.tok-bool{ color: #ffb454; }
.tok-num { color: #d7a8ff; }
.tok-op { color: #8fa3bf; }
.tok-path,.tok-url { color: #45d19a; }
@media (prefers-color-scheme: light) {
.tok-cmt { color: #6d7684; }
.tok-str { color: #2f7d32; }
.tok-kw { color: #1f5fbf; }
.tok-bool{ color: #a85a00; }
.tok-num { color: #7a3db8; }
.tok-op { color: #5c6f8a; }
.tok-path,.tok-url { color: #0b7a5a; }
}