mirror of
https://github.com/hansjone/netx.git
synced 2026-10-14 17:20:46 +08:00
- Title bar: floating glass capsule aligned to each page's content edge, new NETX mark (links-as-X), task badge, user menu with sign-out, globe locale. - Console: resource strip on top, module launcher as the main area with fixed-size tiles that fill rows as modules are added, task rail sized to the left column; dropped health pill, refresh button and filler copy. - Glass layer (theme/glass.css, loaded last): black-blue wallpaper with a faint dot grid, clear panels with specular rims, translucent controls and table headers; sidebar pages float their nav and work area on a 16px gutter. - Removed ~280 lines of duplicated header CSS from primitives/theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
211 lines
16 KiB
CSS
211 lines
16 KiB
CSS
/* Desktop console. Top: resource strip. Below, left: the module launcher (it
|
|
takes all leftover height — the main area) over the network panel; right:
|
|
the task list, sized by that column (it scrolls, never stretches empty).
|
|
One spacing rhythm: 16px between panels, 20px inside them. */
|
|
.app--shell .app-main:has(> .workbench) {
|
|
padding: 20px var(--nx-gutter) 32px;
|
|
/* Ambient backdrop comes from theme/glass.css. */
|
|
}
|
|
|
|
.workbench {
|
|
--wb-gap: 16px; --wb-pad: 20px; --wb-tile-h: 112px; --wb-donut: 92px;
|
|
width: 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--wb-gap);
|
|
min-height: calc(100vh - var(--nx-header-h, 48px) - 52px); /* 52px = main padding (top + bottom) */
|
|
}
|
|
.wb-panel:not(.wb-rail) { position: relative; }
|
|
.wb-panel {
|
|
min-width: 0; border: 1px solid var(--nx-glass-rim); border-radius: 16px;
|
|
background: var(--nx-glass-fill);
|
|
-webkit-backdrop-filter: var(--nx-glass-blur); backdrop-filter: var(--nx-glass-blur);
|
|
box-shadow: var(--nx-glass-shadow);
|
|
}
|
|
.wb-panel-title, .wb-rail__title { margin: 0; color: var(--nx-text); font-size: 14px; font-weight: 600; line-height: 1.5; }
|
|
|
|
|
|
.wb-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(min-content, 1fr) auto; gap: var(--wb-gap); }
|
|
.wb-modules { grid-column: 1; grid-row: 1; }
|
|
.wb-side { grid-column: 2; grid-row: 1 / span 2; position: relative; min-width: 0; }
|
|
.wb-fleet { grid-column: 1; grid-row: 2; }
|
|
|
|
/* Modules: one row of primary tiles, then a quiet row of admin links. */
|
|
.wb-modules { padding: var(--wb-pad); display: flex; flex-direction: column; gap: 14px; }
|
|
/* Fixed-size tiles fill rows in order; the panel's spare height is room for new modules. */
|
|
.wb-section--operations { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(88px, 16%), 1fr)); grid-auto-rows: var(--wb-tile-h); gap: 12px; }
|
|
.app--shell .app-main .wb-tile {
|
|
width: 100%; height: auto; min-height: var(--wb-tile-h); padding: 12px 16px; margin: 0;
|
|
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
|
|
border: 1px solid rgb(255 255 255 / .07); border-radius: 12px;
|
|
background: linear-gradient(180deg, rgb(255 255 255 / .06), rgb(255 255 255 / .015));
|
|
color: var(--nx-text); text-align: left; white-space: nowrap;
|
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / .10);
|
|
transition: background .2s, border-color .2s, box-shadow .2s, transform .2s;
|
|
}
|
|
.app--shell .app-main .wb-tile:hover {
|
|
background: linear-gradient(180deg, rgb(255 255 255 / .10), rgb(255 255 255 / .03)), rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .08);
|
|
border-color: rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .35);
|
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 10px 28px rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .14);
|
|
transform: translateY(-2px);
|
|
}
|
|
.app--shell .app-main .wb-tile:focus-visible { box-shadow: var(--nx-ring); }
|
|
.wb-tile__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; color: var(--nx-text-strong); }
|
|
.wb-tile--blue, .wb-card__icon--blue { --wb-tone-rgb: 96 165 250; }
|
|
.wb-tile--green, .wb-card__icon--green { --wb-tone-rgb: 52 211 153; }
|
|
.wb-tile--amber, .wb-card__icon--amber { --wb-tone-rgb: 251 191 36; }
|
|
.wb-tile--slate, .wb-card__icon--slate { --wb-tone-rgb: 148 163 184; }
|
|
.wb-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--nx-radius-lg); color: rgb(var(--wb-tone-rgb, var(--nx-accent-rgb))); background: rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .14); flex-shrink: 0; }
|
|
.wb-card__icon svg { width: 22px; height: 22px; }
|
|
|
|
.wb-section--system { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 12px; border-top: 1px solid var(--nx-line-soft); }
|
|
.app--shell .app-main .wb-section--system .wb-tile { width: auto; min-height: 30px; padding: 0 10px 0 6px; flex-direction: row; gap: 6px; border-color: transparent; background: transparent; }
|
|
.app--shell .app-main .wb-section--system .wb-tile { box-shadow: none; }
|
|
.app--shell .app-main .wb-section--system .wb-tile:hover { background: rgb(255 255 255 / .06); border-color: transparent; box-shadow: none; transform: none; }
|
|
.wb-section--system .wb-card__icon { width: 20px; height: 20px; border-radius: 0; background: transparent; color: var(--nx-text-faint); }
|
|
.wb-section--system .wb-card__icon svg { width: 15px; height: 15px; }
|
|
.wb-section--system .wb-tile__label { font-size: 13px; font-weight: 400; color: var(--nx-text-muted); }
|
|
.app--shell .app-main .wb-section--system .wb-tile:hover .wb-tile__label { color: var(--nx-text); }
|
|
|
|
/* Tasks: sized by the module panel beside it; the list scrolls. */
|
|
.wb-rail { position: absolute; inset: 0; padding: var(--wb-pad) var(--wb-pad) 8px; display: flex; flex-direction: column; min-height: 0; }
|
|
.wb-rail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
.wb-rail__title { display: flex; align-items: center; gap: 8px; }
|
|
.wb-rail__count { min-width: 20px; height: 18px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgb(255 255 255 / .06); font: 600 11px var(--nx-font-mono); color: var(--nx-text-soft); }
|
|
.app--shell .app-main .wb-rail__all { height: 24px; min-height: 0; padding: 0 6px; border: 0; border-radius: var(--nx-radius-sm); background: transparent; color: var(--nx-accent); font-size: 12px; box-shadow: none; }
|
|
.app--shell .app-main .wb-rail__all:hover { background: var(--nx-accent-soft); }
|
|
.wb-rail__list { flex: 1; min-height: 0; list-style: none; padding: 0; margin: 8px -10px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--nx-line) transparent; }
|
|
.app--shell .app-main .wb-rail__item { width: 100%; height: auto; margin: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; border: 0; border-radius: var(--nx-radius); background: transparent; color: var(--nx-text); box-shadow: none; font: inherit; text-align: left; cursor: pointer; }
|
|
.app--shell .app-main .wb-rail__item:hover { background: rgb(255 255 255 / .04); }
|
|
.app--shell .app-main .wb-rail__item:focus-visible { box-shadow: var(--nx-ring); }
|
|
.wb-rail__item-title { grid-column: 1; font-size: 13px; line-height: 1.5; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.app--shell .app-main .wb-rail__item:hover .wb-rail__item-title { color: var(--nx-accent-text); }
|
|
.wb-rail__item-meta { grid-column: 1; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
|
|
.wb-rail__time { grid-column: 2; grid-row: 1 / span 2; font: 11px var(--nx-font-mono); color: var(--nx-text-faint); }
|
|
.wb-rail__status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
|
|
.wb-rail__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
|
.wb-rail__status--running { color: var(--nx-accent); }
|
|
.wb-rail__status--ok { color: var(--nx-ok); }
|
|
.wb-rail__status--paused { color: var(--nx-warn); }
|
|
.wb-rail__status--stopped { color: var(--nx-bad); }
|
|
.wb-rail__status--other, .wb-rail__progress { color: var(--nx-text-muted); }
|
|
.wb-rail__progress { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.wb-rail__empty { flex: 1; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--nx-text-muted); font-size: 12px; text-align: center; }
|
|
.wb-rail__empty strong { font-weight: 500; }
|
|
.wb-rail__empty-icon, .wb-rail__empty-icon svg { display: inline-flex; width: 22px; height: 22px; color: var(--nx-ok); }
|
|
.wb-rail__empty--error > svg { color: var(--nx-warn); }
|
|
|
|
/* Network: three columns separated by rules. */
|
|
.wb-fleet { padding: var(--wb-pad); display: flex; flex-direction: column; }
|
|
.wb-fleet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
.app--shell .app-main .wb-fleet__card {
|
|
width: 100%; max-width: none; height: auto; min-width: 0; margin: 0; padding: 0 28px;
|
|
display: flex; flex-direction: column; gap: 18px;
|
|
border: 0; border-radius: 0; background: transparent; color: var(--nx-text); font: inherit; text-align: left; box-shadow: none;
|
|
}
|
|
.app--shell .app-main .wb-fleet__card:first-child { padding-left: 0; }
|
|
.app--shell .app-main .wb-fleet__card:last-child { padding-right: 0; }
|
|
.app--shell .app-main .wb-fleet__card + .wb-fleet__card { border-left: 1px solid var(--nx-line-soft); }
|
|
.app--shell .app-main button.wb-fleet__card { cursor: pointer; }
|
|
.app--shell .app-main button.wb-fleet__card:hover:enabled .wb-fleet__card-label { color: var(--nx-accent-text); }
|
|
.app--shell .app-main button.wb-fleet__card:focus-visible { border-radius: var(--nx-radius); box-shadow: var(--nx-ring); }
|
|
.app--shell .app-main button.wb-fleet__card:disabled { cursor: default; opacity: .65; }
|
|
.wb-fleet__card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 21px; }
|
|
.wb-fleet__card-label { font-size: 14px; font-weight: 600; color: var(--nx-text); }
|
|
.wb-fleet__card-badge { font: 12px var(--nx-font-mono); color: var(--nx-text-faint); white-space: nowrap; }
|
|
.wb-fleet__card-badge.is-warn { color: var(--nx-warn); font-family: var(--nx-font-sans); }
|
|
.wb-fleet__viz { display: grid; grid-template-columns: var(--wb-donut) minmax(0, 1fr); gap: 28px; align-items: center; }
|
|
/* Ring is masked (not covered by an opaque disc) so the glass shows through the hole. */
|
|
.wb-fleet__donut { position: relative; width: var(--wb-donut); height: var(--wb-donut); border-radius: 50%; }
|
|
.wb-fleet__donut-ring { position: absolute; inset: 0; border-radius: 50%; -webkit-mask: radial-gradient(farthest-side, transparent 85%, #000 calc(85% + 1px)); mask: radial-gradient(farthest-side, transparent 85%, #000 calc(85% + 1px)); }
|
|
.wb-fleet__donut-hole { position: absolute; inset: 13%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%; background: transparent; }
|
|
.wb-fleet__donut-value { font: 600 17px var(--nx-font-mono); color: var(--nx-text-strong); }
|
|
.wb-fleet__donut-unit { font-size: 10px; color: var(--nx-text-faint); }
|
|
.wb-fleet__rows { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
|
|
.wb-fleet__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--nx-text-muted); }
|
|
.wb-fleet__legend { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
|
|
.wb-fleet__legend-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.wb-fleet__swatch { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--nx-text-faint); }
|
|
.wb-fleet__swatch.is-ok { background: var(--nx-ok); }
|
|
.wb-fleet__swatch.is-bad { background: var(--nx-bad); }
|
|
.wb-fleet__swatch.is-mid { background: var(--nx-accent); }
|
|
.wb-fleet__row strong { font: 500 13px var(--nx-font-mono); color: var(--nx-text-soft); }
|
|
.wb-fleet__row strong.is-ok, .wb-fleet__sched-state.is-ok { color: var(--nx-ok); }
|
|
.wb-fleet__row strong.is-bad { color: var(--nx-bad); }
|
|
.wb-fleet__row strong.is-mid { color: var(--nx-accent); }
|
|
.wb-fleet__row strong.is-muted, .wb-fleet__sched-state.is-muted { color: var(--nx-text-faint); }
|
|
.wb-fleet__card--sched .wb-fleet__viz { display: flex; align-items: center; min-height: var(--wb-donut); }
|
|
.wb-fleet__card--sched .wb-fleet__rows { flex: 1; }
|
|
.wb-fleet__card--sched .wb-fleet__rows { gap: 2px; }
|
|
.app--shell .app-main button.wb-fleet__row--sched { width: 100%; min-height: 28px; height: auto; margin: 0; padding: 2px 8px; display: grid; grid-template-columns: minmax(0, 1fr) 36px 44px; gap: 12px; border: 0; border-radius: var(--nx-radius-sm); background: transparent; box-shadow: none; color: var(--nx-text-muted); font: 13px var(--nx-font-sans); text-align: left; cursor: pointer; }
|
|
.wb-fleet__card--sched .wb-fleet__rows { margin: 0 -8px; }
|
|
.app--shell .app-main button.wb-fleet__row--sched:hover { color: var(--nx-text); background: rgb(255 255 255 / .04); }
|
|
.app--shell .app-main button.wb-fleet__row--sched:focus-visible { box-shadow: var(--nx-ring); }
|
|
.wb-fleet__sched-state, .wb-fleet__sched-age { font: 12px var(--nx-font-mono); }
|
|
.wb-fleet__sched-age { color: var(--nx-text-faint); text-align: right; }
|
|
|
|
/* Resources: a single quiet strip. */
|
|
.wb-runtime { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 16px var(--wb-pad); }
|
|
.wb-runtime__head { display: flex; align-items: center; gap: 8px; }
|
|
.wb-runtime__head > svg { width: 16px; height: 16px; color: var(--nx-accent); flex-shrink: 0; }
|
|
.wb-runtime__group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
|
|
.wb-runtime__group--capacity { padding-left: 28px; border-left: 1px solid var(--nx-line-soft); }
|
|
.wb-runtime .wb-stat { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
|
|
.wb-stat__label { font-size: 12px; color: var(--nx-text-muted); white-space: nowrap; }
|
|
.wb-stat__value { font: 12px var(--nx-font-mono); font-variant-numeric: tabular-nums; color: var(--nx-text-soft); white-space: nowrap; }
|
|
.wb-stat__track { grid-column: 1 / -1; width: 100%; height: 4px; overflow: hidden; border-radius: 999px; background: var(--nx-line-soft); }
|
|
.wb-stat__fill { display: block; height: 100%; border-radius: inherit; background: var(--nx-accent); transition: width .4s ease; }
|
|
.wb-stat.is-high .wb-stat__fill { background: var(--nx-warn); }
|
|
.wb-stat.is-muted .wb-stat__value { color: var(--nx-text-faint); }
|
|
.wb-runtime__foot { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--nx-text-faint); }
|
|
.wb-runtime__foot strong { color: var(--nx-text-soft); font: 600 13px var(--nx-font-mono); }
|
|
.wb-runtime__error { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--nx-warn); }
|
|
|
|
@media (min-height: 860px) and (min-width: 1024px) {
|
|
.workbench { --wb-gap: 20px; --wb-pad: 24px; --wb-donut: 104px; }
|
|
.workbench { --wb-tile-h: 124px; }
|
|
.wb-fleet__rows { gap: 12px; }
|
|
.wb-fleet__card--sched .wb-fleet__rows { gap: 6px; }
|
|
.wb-fleet__row { font-size: 14px; }
|
|
.wb-runtime { padding-block: 20px; }
|
|
}
|
|
|
|
@media (min-width: 1800px) {
|
|
.wb-body { grid-template-columns: minmax(0, 1fr) 380px; }
|
|
}
|
|
|
|
@media (max-width: 1279px) {
|
|
.wb-body { grid-template-columns: minmax(0, 1fr) 280px; }
|
|
.app--shell .app-main .wb-fleet__card { padding-inline: 18px; }
|
|
.wb-fleet__viz { gap: 16px; }
|
|
.app--shell .app-main .wb-section--operations .wb-tile { padding-inline: 10px; }
|
|
.wb-section--operations .wb-tile__label { font-size: 14px; }
|
|
.wb-runtime { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; }
|
|
.wb-runtime__head, .wb-runtime__foot { display: none; }
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
.workbench { min-height: 0; }
|
|
.wb-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
|
|
.wb-section--operations { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: auto; }
|
|
.workbench { --wb-tile-h: 96px; }
|
|
.wb-side { grid-column: 1; grid-row: auto; }
|
|
.wb-fleet { grid-row: auto; }
|
|
.wb-rail { position: static; max-height: 360px; }
|
|
.wb-fleet__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
|
|
.app--shell .app-main .wb-fleet__card { padding: 0; }
|
|
.app--shell .app-main .wb-fleet__card + .wb-fleet__card { padding-top: 20px; border-left: 0; border-top: 1px solid var(--nx-line-soft); }
|
|
.wb-runtime { grid-template-columns: minmax(0, 1fr); }
|
|
.wb-runtime__group--capacity { padding-left: 0; border-left: 0; }
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.app--shell .app-main:has(> .workbench) { padding: 16px var(--nx-gutter); }
|
|
.workbench { --wb-pad: 16px; }
|
|
.wb-section--operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
}
|
|
|
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
.wb-panel { background: var(--nx-surface-1); }
|
|
}
|
|
|
|
@media (prefers-reduced-transparency: reduce) {
|
|
.wb-panel { background: var(--nx-surface-1); backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
}
|