Multi-U device rows get continuous background tint

Rack table rows now carry .device-row class for every unit a device
occupies (not just the start row), giving multi-U devices a continuous
surface-colored background block. A bottom border on the last unit-row
visually separates it from the next device.
master
Joca 2026-06-09 20:14:15 -03:00
parent 0e97029c59
commit 8371ffa1f5
Signed by: jocadbz
GPG Key ID: B1836DCE2F50BDF7
2 changed files with 3 additions and 1 deletions

View File

@ -98,6 +98,8 @@ th { background: var(--surface); font-weight: 600; }
.rack-table .rack-cell { width: 45%; padding: 2px 0.4em; } .rack-table .rack-cell { width: 45%; padding: 2px 0.4em; }
.rack-table tr.device-start td { border-top: 2px solid #444; } .rack-table tr.device-start td { border-top: 2px solid #444; }
.rack-table tr.device-start td.rack-cell { background: var(--surface); } .rack-table tr.device-start td.rack-cell { background: var(--surface); }
.rack-table tr.device-row td.rack-cell { background: var(--surface); }
.rack-table tr.device-row + tr:not(.device-row) td { border-top: 1px solid #555; }
.rack-device { display: flex; flex-direction: column; padding: 0.15em 0; } .rack-device { display: flex; flex-direction: column; padding: 0.15em 0; }
.rack-device strong { font-size: 0.9em; } .rack-device strong { font-size: 0.9em; }
.rack-device small { font-size: 0.75em; } .rack-device small { font-size: 0.75em; }

View File

@ -24,7 +24,7 @@
<thead><tr><th>U</th><th>Front</th><th>U</th><th>Back</th></tr></thead> <thead><tr><th>U</th><th>Front</th><th>U</th><th>Back</th></tr></thead>
<tbody> <tbody>
{{range $i, $fs := .FrontSlots}} {{range $i, $fs := .FrontSlots}}
<tr {{if or $fs.IsStart (index $.BackSlots $i).IsStart}}class="device-start"{{end}}> <tr class="{{if or $fs.IsStart (index $.BackSlots $i).IsStart}}device-start{{end}} {{if or $fs.Device (index $.BackSlots $i).Device}}device-row{{end}}">
<td class="unit-num">{{$fs.Unit}}</td> <td class="unit-num">{{$fs.Unit}}</td>
<td class="rack-cell"> <td class="rack-cell">
{{if $fs.IsStart}} {{if $fs.IsStart}}