aboutsummaryrefslogtreecommitdiffstats
path: root/static/deck.css
diff options
context:
space:
mode:
Diffstat (limited to 'static/deck.css')
-rw-r--r--static/deck.css12
1 files changed, 9 insertions, 3 deletions
diff --git a/static/deck.css b/static/deck.css
index 9f44eb1..e218f33 100644
--- a/static/deck.css
+++ b/static/deck.css
@@ -813,16 +813,22 @@ select {
animation: border-rotate 3s linear infinite;
}
-/* VMs tab: a tile per VM, its screen on top, a big power button below.
+/* VMs tab: one column. A running VM is a tile as tall as the tab, its
+ screen filling what the rest leaves; with one running it drops the card
+ look and is the whole tab, with more they stack as cards and the tab
+ scrolls. A shut-off VM is a short card below them, no screen or trends.
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 { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
+.vm-tile.on { order: -1; height: calc(100dvh - 120px); }
+.vm-tile:not(.on) .vm-screen, .vm-tile:not(.on) .vm-trends { display: none; }
+.vm-grid.solo .vm-tile.on { background: none; border-color: transparent; padding: 0; }
.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);
+.vm-screen { position: relative; flex: 1; min-height: 0; 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); }