Skip to content

Commit 32aabfd

Browse files
fhirschmannclaude
andcommitted
feat: lay the settings sub-tabs out as a vertical UniFi-style sidebar
The Settings sub-navigation (General / Buttons / RFID / LEDs / Power / WiFi / MQTT / FTP / Sync / Bluetooth) was a centered horizontal tab row. Turn it into a vertical left-hand sidebar with the content panel beside it, like UniFi: the active item gets a cyan left-border indicator instead of a bottom underline. The labels are already hidden below the md breakpoint, so on mobile this collapses to a narrow icon-only rail next to the content (as before, just vertical). Pure layout/CSS change driven off #settings-subnav + a flex on the active Settings pane. Verified in a browser (Playwright) at desktop + mobile widths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5c3dd45 commit 32aabfd

1 file changed

Lines changed: 81 additions & 1 deletion

File tree

html/management.html

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,86 @@
416416
text-shadow: 0 0 10px rgba(255, 42, 109, .7) !important;
417417
}
418418

419+
/* ---------- settings sub-navigation: vertical UniFi-style sidebar ---------- */
420+
/* lay the Settings tab out as [vertical nav | content], like UniFi. The sub-nav
421+
labels are hidden < md (d-md-inline), so on mobile this collapses to a narrow
422+
icon-only rail next to the content. */
423+
#nav-general.active {
424+
display: flex;
425+
align-items: flex-start;
426+
gap: 1.1rem;
427+
}
428+
429+
#nav-general>nav {
430+
flex: 0 0 auto;
431+
margin-top: 0 !important;
432+
}
433+
434+
#settings-subnav.nav-tabs {
435+
flex-direction: column;
436+
flex-wrap: nowrap;
437+
border-bottom: none;
438+
border-right: 1px solid var(--cp-border);
439+
padding-right: 2px;
440+
position: sticky;
441+
top: 1rem;
442+
}
443+
444+
#settings-subnav .nav-link {
445+
border: 1px solid transparent;
446+
border-left: 2px solid transparent;
447+
text-align: left;
448+
white-space: nowrap;
449+
}
450+
451+
#settings-subnav .nav-link i {
452+
width: 1.25em;
453+
text-align: center;
454+
}
455+
456+
#settings-subnav .nav-link:hover {
457+
border-bottom-color: transparent;
458+
border-left-color: rgba(0, 240, 255, .4);
459+
}
460+
461+
#settings-subnav .nav-link.active {
462+
border: 1px solid var(--cp-border);
463+
border-left: 2px solid var(--cp-cyan);
464+
border-right-color: transparent;
465+
background: linear-gradient(90deg, rgba(0, 240, 255, .12), transparent);
466+
}
467+
468+
#settings-subnav .nav-link.ftp-active.active {
469+
border-left: 2px solid var(--cp-yellow) !important;
470+
border-bottom-color: var(--cp-border) !important;
471+
background: linear-gradient(90deg, rgba(252, 238, 10, .12), transparent) !important;
472+
}
473+
474+
#settings-subnav .nav-link.bt-active.active {
475+
border-left: 2px solid var(--cp-magenta) !important;
476+
border-bottom-color: var(--cp-border) !important;
477+
background: linear-gradient(90deg, rgba(255, 42, 109, .12), transparent) !important;
478+
}
479+
480+
#nav-general>.tab-content {
481+
flex: 1 1 auto;
482+
min-width: 0;
483+
}
484+
485+
@media (max-width: 767.98px) {
486+
#nav-general.active {
487+
gap: .55rem;
488+
}
489+
490+
#settings-subnav .nav-link {
491+
padding: .55rem .65rem;
492+
}
493+
494+
#settings-subnav .nav-link i {
495+
width: auto;
496+
}
497+
}
498+
419499
/* ---------- content panels ---------- */
420500
.main-tab-pane.active>.container {
421501
animation: cp-boot .35s ease-out both;
@@ -2143,7 +2223,7 @@ <h5 class="modal-title" data-i18n="tools.nvs.erase.title"></h5>
21432223
<div class="tab-pane main-tab-pane fade mb-4" id="nav-general" role="tabpanel"
21442224
aria-labelledby="nav-general-tab">
21452225
<nav class="mb-3" style="margin-top: -1.25rem;">
2146-
<div class="nav nav-tabs justify-content-center" id="settings-subnav" role="tablist">
2226+
<div class="nav nav-tabs flex-column" id="settings-subnav" role="tablist">
21472227
<a class="nav-item nav-link active" id="settings-general-subtab" data-bs-toggle="tab" data-bs-target="#settings-general" href="#settings-general" role="tab" aria-controls="settings-general" aria-selected="true"><i class="fas fa-sliders-h"></i> <span class="d-none d-md-inline" data-i18n="nav.general"></span></a>
21482228
<a class="nav-item nav-link" id="settings-buttons-subtab" data-bs-toggle="tab" data-bs-target="#settings-buttons" href="#settings-buttons" role="tab" aria-controls="settings-buttons"><i class="fas fa-keyboard"></i> <span class="d-none d-md-inline" data-i18n="nav.buttons"></span></a>
21492229
<a class="nav-item nav-link" id="settings-rfid-subtab" data-bs-toggle="tab" data-bs-target="#settings-rfid" href="#settings-rfid" role="tab" aria-controls="settings-rfid"><i class="fas fa-id-card"></i> <span class="d-none d-md-inline" data-i18n="nav.rfidcards"></span></a>

0 commit comments

Comments
 (0)