diff options
Diffstat (limited to 'src/zenserver/frontend/html/zen.css')
| -rw-r--r-- | src/zenserver/frontend/html/zen.css | 421 |
1 files changed, 307 insertions, 114 deletions
diff --git a/src/zenserver/frontend/html/zen.css b/src/zenserver/frontend/html/zen.css index d3c6c9036..46714a83d 100644 --- a/src/zenserver/frontend/html/zen.css +++ b/src/zenserver/frontend/html/zen.css @@ -2,64 +2,12 @@ /* theme -------------------------------------------------------------------- */ -/* system preference (default) */ -@media (prefers-color-scheme: light) { - :root { - --theme_g0: #1f2328; - --theme_g1: #656d76; - --theme_g2: #d0d7de; - --theme_g3: #f6f8fa; - --theme_g4: #ffffff; - - --theme_p0: #0969da; - --theme_p4: #ddf4ff; - --theme_p1: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 35%); - --theme_p2: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 60%); - --theme_p3: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 85%); - - --theme_ln: var(--theme_p0); - --theme_er: #ffebe9; - - --theme_ok: #1a7f37; - --theme_warn: #9a6700; - --theme_fail: #cf222e; - - --theme_bright: #1f2328; - --theme_faint: #6e7781; - --theme_border_subtle: #d8dee4; - --theme_highlight: #b8860b44; - } -} - -@media (prefers-color-scheme: dark) { - :root { - --theme_g0: #c9d1d9; - --theme_g1: #8b949e; - --theme_g2: #30363d; - --theme_g3: #161b22; - --theme_g4: #0d1117; - - --theme_p0: #58a6ff; - --theme_p4: #1c2128; - --theme_p1: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 35%); - --theme_p2: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 60%); - --theme_p3: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 85%); - - --theme_ln: #58a6ff; - --theme_er: #1c1c1c; - - --theme_ok: #3fb950; - --theme_warn: #d29922; - --theme_fail: #f85149; - - --theme_bright: #f0f6fc; - --theme_faint: #6e7681; - --theme_border_subtle: #21262d; - --theme_highlight: #e3b341aa; - } -} - -/* manual overrides (higher specificity than media queries) */ +/* Light tokens apply to the explicit data-theme="light" override and as the + default when no system preference matches the dark @media query below. + Dark tokens apply to data-theme="dark" and (when no explicit preference is + set) to dark system preference. Selector lists keep each token list defined + exactly once. */ +:root, :root[data-theme="light"] { --theme_g0: #1f2328; --theme_g1: #656d76; @@ -67,6 +15,10 @@ --theme_g3: #f6f8fa; --theme_g4: #ffffff; + /* surface backgrounds: bg0 matches the body, bg1 is one step raised */ + --theme_bg0: var(--theme_g4); + --theme_bg1: var(--theme_g3); + --theme_p0: #0969da; --theme_p4: #ddf4ff; --theme_p1: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 35%); @@ -86,6 +38,32 @@ --theme_highlight: #b8860b44; } +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + --theme_g0: #c9d1d9; + --theme_g1: #8b949e; + --theme_g2: #30363d; + --theme_g3: #161b22; + --theme_g4: #0d1117; + + --theme_p0: #58a6ff; + --theme_p4: #1c2128; + + --theme_ln: #58a6ff; + --theme_er: #1c1c1c; + + --theme_ok: #3fb950; + --theme_warn: #d29922; + --theme_fail: #f85149; + + --theme_bright: #f0f6fc; + --theme_faint: #6e7681; + --theme_border_subtle: #21262d; + --theme_highlight: #e3b341aa; + } +} + +/* Manual data-theme="dark" wins over system preference. */ :root[data-theme="dark"] { --theme_g0: #c9d1d9; --theme_g1: #8b949e; @@ -95,9 +73,6 @@ --theme_p0: #58a6ff; --theme_p4: #1c2128; - --theme_p1: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 35%); - --theme_p2: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 60%); - --theme_p3: color-mix(in oklab, var(--theme_p0), var(--theme_p4) 85%); --theme_ln: #58a6ff; --theme_er: #1c1c1c; @@ -114,10 +89,12 @@ /* theme toggle ------------------------------------------------------------- */ -#zen_ws_toggle { +/* Shared shape for the fixed top-right utility buttons (theme, wide, ws-pause). + Per-button rules below add only the `right` offset and any glyph-specific + typography (font-size for emoji buttons, padding-zero for SVG buttons). */ +.zen-floating-toggle { position: fixed; top: 16px; - right: 60px; z-index: 10; width: 36px; height: 36px; @@ -129,43 +106,48 @@ display: flex; align-items: center; justify-content: center; - font-size: 18px; - line-height: 1; transition: color 0.15s, background 0.15s, border-color 0.15s; user-select: none; } -#zen_ws_toggle:hover { +.zen-floating-toggle:hover { color: var(--theme_g0); background: var(--theme_p4); border-color: var(--theme_g1); } #zen_theme_toggle { - position: fixed; - top: 16px; right: 16px; - z-index: 10; - width: 36px; - height: 36px; - border-radius: 6px; - border: 1px solid var(--theme_g2); - background: var(--theme_g3); - color: var(--theme_g1); - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; font-size: 18px; line-height: 1; - transition: color 0.15s, background 0.15s, border-color 0.15s; - user-select: none; } -#zen_theme_toggle:hover { - color: var(--theme_g0); - background: var(--theme_p4); - border-color: var(--theme_g1); +#zen_ws_toggle { + right: 60px; + font-size: 18px; + line-height: 1; +} + +#zen_wide_toggle { + right: 104px; + padding: 0; +} + +#zen_wide_toggle svg { + width: 18px; + height: 18px; + display: block; +} + +/* Wide mode: lift the 1400px cap on the main container and drop the body's + horizontal padding so content fills the viewport edge-to-edge. Vertical + body padding stays so content doesn't touch the top of the viewport. */ +html[data-wide="true"] body { + padding-left: 0; + padding-right: 0; +} +html[data-wide="true"] #container { + max-width: none; } /* page --------------------------------------------------------------------- */ @@ -342,15 +324,39 @@ a { height: calc(100vh - 80px); } -.sessions-layout { +.sessions-header-row { display: flex; - gap: 1.5em; - align-items: flex-start; - flex-shrink: 0; + align-items: center; + gap: 12px; + margin-bottom: 8px; + flex-wrap: wrap; +} + +.sessions-list-filter { + padding: 6px 12px; + font-size: 14px; + font-family: inherit; + border: 1px solid var(--theme_g2); + border-radius: 6px; + background: var(--theme_bg1); + color: var(--theme_bright); + outline: none; + width: 240px; + max-width: 100%; +} +.sessions-list-filter:focus { + border-color: var(--theme_ln); + background: var(--theme_bg0); +} +.sessions-list-filter::placeholder { + color: var(--theme_g1); } .sessions-table { - flex: 1; + /* Natural height so the bottom panel sits right below the last row. The + section's column-flex lets .sessions-log-panel (flex: 1) absorb the + remaining vertical space for log viewing. */ + flex-shrink: 0; min-width: 0; } @@ -358,31 +364,157 @@ a { text-align: right; } -.sessions-table .zen_table > div > div:nth-child(2) { +/* appname (col 1), mode (col 2), platform (col 3) read better left-aligned */ +.sessions-table .zen_table > div > div:nth-child(1), +.sessions-table .zen_table > div > div:nth-child(2), +.sessions-table .zen_table > div > div:nth-child(3) { + text-align: left; +} + +/* id (col 4) is a hex string — monospace */ +.sessions-table .zen_table > div > div:nth-child(4) { font-family: 'SF Mono', 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace; } -.sessions-detail { - width: 600px; - flex-shrink: 0; - font-size: 13px; +/* Platform-column icon: sized to the table row height, picks up theme color + via currentColor. Unknown platforms fall back to a plain text label. */ +.platform-icon { + display: inline-flex; + align-items: center; + color: var(--theme_g0); + opacity: 0.85; +} +.platform-icon svg { + width: 16px; + height: 16px; + fill: currentColor; } -.sessions-detail h3 { - margin: 0 0 0.6em 0; - font-size: 13px; - text-transform: uppercase; - letter-spacing: 0.5px; +/* Clickable column headers: the first row gets hover affordance. */ +.sessions-table .zen_table > div:first-child > div:hover { + color: var(--theme_g0); +} +.sessions-table .zen_table > div:first-child > div.sessions-sort-active { + color: var(--theme_ln); +} + +.sessions-group-toggle, +.sessions-group-toggle-spacer, +.sessions-group-child-spacer { + display: inline-flex; + align-items: center; + justify-content: center; + width: 18px; + margin-right: 4px; color: var(--theme_g1); + font-family: 'SF Mono', 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace; } -.sessions-detail .zen_table { - margin-bottom: 1em; +.sessions-group-toggle { + border: 0; + padding: 0; + background: transparent; + cursor: pointer; +} + +.sessions-group-toggle:hover { + color: var(--theme_ln); +} + +.sessions-child-row { + background-color: color-mix(in srgb, var(--theme_bg1) 75%, transparent); +} + +.sessions-child-row:first-child { + padding-left: 14px; } -.sessions-detail-placeholder { +/* Bottom-panel tab strip (Log / Metadata). Lives inside + .sessions-log-header alongside the log-view controls. */ +.sessions-panel-tabs { + display: flex; + gap: 2px; +} +.sessions-panel-tab { + background: transparent; + border: none; + border-bottom: 2px solid transparent; + padding: 4px 10px; color: var(--theme_g1); - font-style: italic; + font: inherit; + font-size: 12px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + cursor: pointer; +} +.sessions-panel-tab:hover { + color: var(--theme_g0); +} +.sessions-panel-tab.active { + color: var(--theme_ln); + border-bottom-color: var(--theme_ln); +} + +/* Log-only controls (filter, newest-first, follow). Wrapped so we can hide + them as a group when the Metadata tab is active. Natural width — the + sibling .sessions-log-spacer does the pushing. */ +.sessions-log-controls { + display: flex; + align-items: center; + gap: 8px; +} + +/* Flex spacer between the tab strip and the right-hand controls. Keeps the + Expand button flush right even when log_controls is hidden. */ +.sessions-log-spacer { + flex: 1; +} + +.sessions-metadata-body { + padding: 10px 12px; + overflow-y: auto; + flex: 1; + min-height: 0; +} + +.sessions-metadata-layout { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(280px, max-content); + gap: 16px; + align-items: start; +} + +.sessions-metadata-panel { + min-width: 0; +} + +.sessions-metadata-core-panel { + border-left: 1px solid var(--theme_g3); + padding-left: 16px; +} + +.sessions-metadata-heading { + margin: 10px 0 6px; + color: var(--theme_ln); + font-weight: 600; +} + +.sessions-metadata-heading:first-child { + margin-top: 0; +} + +@media (max-width: 900px) { + .sessions-metadata-layout { + grid-template-columns: 1fr; + } + + .sessions-metadata-core-panel { + border-left: 0; + border-top: 1px solid var(--theme_g3); + padding-left: 0; + padding-top: 10px; + } } .sessions-selected { @@ -415,7 +547,6 @@ a { color: var(--theme_g1); } .sessions-log-filter { - margin-left: 12px; padding: 6px 12px; font-size: 14px; font-family: inherit; @@ -433,6 +564,37 @@ a { .sessions-log-filter::placeholder { color: var(--theme_g1); } +.sessions-log-level-filter { + padding: 4px 8px; + font-size: 12px; + font-family: inherit; + border: 1px solid var(--theme_g2); + border-radius: 6px; + background: var(--theme_bg1); + color: var(--theme_bright); + outline: none; + cursor: pointer; +} +.sessions-log-level-filter:focus { + border-color: var(--theme_ln); +} + +/* Chevron-icon variant of .history-tab for the log-panel expand toggle. + Overrides the text-button padding/letterspacing so the icon sits in a + roughly square pill. Double-chevron up when collapsed, down when + expanded — see ICON_CHEVRON_* in sessions.js. */ +.sessions-panel-toggle { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 4px 8px; + letter-spacing: 0; +} +.sessions-panel-toggle svg { + width: 14px; + height: 14px; + display: block; +} .sessions-log-body { flex: 1; min-height: 0; @@ -474,29 +636,49 @@ a { font-weight: 600; } .sessions-log-level-info { color: var(--theme_ln); } -.sessions-log-level-warn { color: #d29922; } -.sessions-log-level-error { color: #f85149; } +.sessions-log-level-warn { color: var(--theme_warn); } +.sessions-log-level-error { color: var(--theme_fail); } .sessions-log-level-debug { color: var(--theme_g1); } +.sessions-log-logger { + flex-shrink: 0; + width: 12em; + color: var(--theme_ln); + opacity: 0.75; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} .sessions-log-msg { white-space: pre-wrap; word-break: break-all; } -.sessions-log-data { - color: var(--theme_g1); - white-space: pre-wrap; - word-break: break-all; +.sessions-log-fmt-marker { + flex-shrink: 0; + color: var(--theme_ln); + opacity: 0.6; + font-weight: 600; + cursor: help; + font-family: 'SF Mono', 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace; } -.sessions-self-pill { +.sessions-pill { display: inline-block; font-size: 0.7em; font-weight: 600; padding: 1px 6px; - margin-right: 6px; + margin-left: 6px; border-radius: 8px; + vertical-align: middle; + text-transform: uppercase; + letter-spacing: 0.3px; +} +.sessions-self-pill { background-color: var(--theme_p4); color: var(--theme_g0); - vertical-align: middle; +} +.sessions-log-indicator-pill { + background-color: var(--theme_g2); + color: var(--theme_g0); } .objectstore-bucket-detail { @@ -535,6 +717,17 @@ a { opacity: 0.7; } +/* Pager lives in the header row, to the right of the filter input. No + top margin since it's on the same baseline as tabs/filter. */ +.sessions-header-pager { + display: flex; + align-items: center; + gap: 6px; +} +.sessions-header-pager:empty { + display: none; +} + /* expandable cell ---------------------------------------------------------- */ .zen_expand_icon { |