sidebar
This commit is contained in:
@@ -14,7 +14,7 @@ import { showCertBannerIfNeeded } from "./cert-banner.js";
|
||||
const host = document.getElementById("top-nav");
|
||||
if (host) {
|
||||
const refs = mountNav(host);
|
||||
showCertBannerIfNeeded(host);
|
||||
showCertBannerIfNeeded(document.getElementById("sb-mobile-bar") || host);
|
||||
const { applyAdaptiveNavLayout } = createAdaptiveNavController(host, refs);
|
||||
|
||||
const path = window.location.pathname;
|
||||
@@ -34,11 +34,7 @@ if (host) {
|
||||
const activeId = activeMap[path];
|
||||
if (activeId) {
|
||||
const el = document.getElementById(activeId);
|
||||
if (el) {
|
||||
el.classList.remove("bg-slate-900/70", "text-slate-300");
|
||||
el.classList.add("bg-slate-800", "text-slate-50");
|
||||
el.classList.add("nav-active");
|
||||
}
|
||||
if (el) el.classList.add("nav-active");
|
||||
}
|
||||
if (refs.logoutBtn && !refs.logoutBtn.dataset.boundLogout) {
|
||||
refs.logoutBtn.dataset.boundLogout = "true";
|
||||
|
||||
Reference in New Issue
Block a user