diff options
Diffstat (limited to 'static/deck.css')
| -rw-r--r-- | static/deck.css | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/static/deck.css b/static/deck.css index c316ff3..9f44eb1 100644 --- a/static/deck.css +++ b/static/deck.css @@ -813,23 +813,56 @@ select { animation: border-rotate 3s linear infinite; } -/* VMs tab. Destructive buttons are press and hold, filled over --hold. */ -.vm-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; } -.vm-list[hidden], .vm-off[hidden], .vm-use[hidden], .vm-err[hidden] { display: none; } -.vm-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--udt-surface0); } -.vm-card.busy { opacity: .6; pointer-events: none; } -.vm-head { display: flex; align-items: center; gap: 12px; } -.vm-name { font-size: 1.286rem; font-weight: 600; } +/* VMs tab: a tile per VM, its screen on top, a big power button below. + Hold buttons fill red over --hold (hold.js). Controls are 56px or more. */ +.vm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; padding: 4px 2px; } +.vm-grid[hidden], .vm-off[hidden], .vm-err[hidden], .vm-snapacts[hidden], .vm-screen img[hidden] { display: none; } +.vm-grid.empty::before { content: "No VMs defined."; color: var(--udt-subtext0); } +.vm-tile, .vm-sheet { display: flex; flex-direction: column; gap: 10px; } +.vm-tile { padding: 12px; border-radius: 16px; background: var(--udt-surface0); border: 2px solid transparent; } +.vm-tile.on { border-color: var(--udt-border-1); } +.vm-tile.busy, .vm-sheet.busy { opacity: .6; pointer-events: none; } +.vm-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--udt-crust); + display: grid; place-items: center; overflow: hidden; } +.vm-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; } +.vm-glyph { font-size: 4rem; color: var(--udt-surface2); } +.vm-screen .vm-state { position: absolute; top: 8px; left: 8px; } .vm-state { padding: 2px 10px; border-radius: 999px; background: var(--udt-surface2); font-size: 0.857rem; } .vm-state.good { background: var(--udt-green); color: var(--udt-crust); } .vm-state.warn { background: var(--udt-yellow); color: var(--udt-crust); } .vm-state.bad { background: var(--udt-red); color: var(--udt-crust); } -.vm-ip { margin-left: auto; color: var(--udt-subtext0); } -.vm-use { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px; } +.vm-info { display: flex; align-items: baseline; gap: 10px; min-width: 0; } +.vm-name { font-size: 1.286rem; } +.vm-status { color: var(--udt-subtext0); font-size: 0.857rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.vm-trends { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } +.vm-trend { position: relative; height: 54px; border-radius: 10px; background: var(--udt-surface1); overflow: hidden; + display: flex; align-items: flex-end; justify-content: space-between; padding: 4px 8px; } +.vm-trend svg { position: absolute; inset: 0; width: 100%; height: 100%; } +.vm-trend path.hy { fill: url(#vmfill); } +.vm-trend path.hy.ln { fill: none; stroke: url(#vmline); stroke-width: 2; vector-effect: non-scaling-stroke; } +.vm-trend .k, .vm-snaphead .k { position: relative; font-size: 0.714rem; text-transform: uppercase; letter-spacing: .08em; color: var(--udt-overlay0); } +.vm-trend .v { position: relative; font-weight: 600; } .vm-err { color: var(--udt-red); font-size: 0.857rem; } -.vm-acts { margin-bottom: 0; } -.vm-snap { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--udt-surface1); } -.vm-snap > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.vm .hold { position: relative; overflow: hidden; isolation: isolate; border-color: var(--udt-red); touch-action: none; } -.vm .hold::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--udt-red); transform: scaleX(0); transform-origin: left; } -.vm .hold.holding::before { transform: scaleX(1); transition: transform var(--hold, 800ms) linear; } +.vm-bar { display: flex; align-items: center; gap: 12px; } +.vm .ib, .vm-sheet .ib { min-width: 56px; min-height: 56px; font-size: 1.5rem; border-radius: 14px; padding: 0 12px; } +.vm-more { margin-left: auto; } +.vm-power { width: 72px; height: 72px; border-radius: 50%; font-size: 2rem; padding: 0; } +.vm-power.go { background: color-mix(in srgb, var(--udt-green) 30%, transparent); border-color: var(--udt-green); } +.vm-sshb.ready { border-color: var(--udt-accent); color: var(--udt-accent); } +.vm .hold, .vm-sheet .hold { position: relative; overflow: hidden; isolation: isolate; touch-action: none; } +.vm .hold:not(.vm-power), .vm-sheet .hold { border-color: var(--udt-red); } +.vm .hold::before, .vm-sheet .hold::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--udt-red); + transform: scaleX(0); transform-origin: left; } +.vm .hold.holding::before, .vm-sheet .hold.holding::before { transform: scaleX(1); transition: transform var(--hold, 800ms) linear; } +dialog.vm-sheet { margin: auto; width: min(760px, 92vw); max-height: 85vh; overflow-y: auto; overscroll-behavior: contain; + padding: 18px; border: 0; border-radius: 18px; background: var(--udt-base); color: var(--udt-text); } +dialog.vm-sheet:not([open]) { display: none; } +dialog.vm-sheet::backdrop { background: color-mix(in srgb, var(--udt-crust) 55%, transparent); } +.vm-acts, .vm-snapacts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } +.vm-snaphead { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; } +.vm-timeline { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; color: var(--udt-subtext0); } +.vm-snap { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; } +.vm-snap span { font-size: 0.786rem; color: var(--udt-subtext0); } +.vm-snap.current { border-color: var(--udt-accent); } +.vm-snap.on { background: var(--udt-surface2); } +.vm-snapname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; } |
