Move server rack inline styles to CSS classes

Replace the per-element inline positioning in createServerRack()
with rack-*-pos utility classes in style.css. Also stop drawing
a random switch face brand from a list (only Framework ships)
and simplify the hero-click terminal toggle to use the shared
expand/collapse helpers.
This commit is contained in:
2026-09-18 17:23:37 -04:00
parent 3898dc3c5e
commit 010758b3e9
2 changed files with 70 additions and 57 deletions
+54 -1
View File
@@ -1881,4 +1881,57 @@ footer p {
.about-stats {
grid-template-columns: 1fr;
}
}
}
/* Rack decoration placement (moved out of inline styles in script.js) */
.rack-grill-v-pos {
position: absolute;
left: 16px;
top: 50%;
transform: translateY(-50%);
}
.rack-grill-h-pos {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.rack-fans-pos {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
z-index: 1;
}
.rack-leds-pos-top {
position: absolute;
top: 8px;
left: 50%;
transform: translateX(-50%);
}
.rack-leds-pos-right {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
}
.rack-leds-pos-right-tight {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
}
.rack-drives-pos {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: flex;
gap: 8px;
align-items: center;
}