I hope this time it's ok, the sidebar works as intended

This commit is contained in:
Silversthorn 2022-10-04 23:58:31 +02:00
parent 27d33f79c6
commit 002d89934e
2 changed files with 20 additions and 2 deletions

View File

@ -8,6 +8,26 @@
color: var(--base-text)
}
nav.sidebar {
position: fixed;
}
@media (min-width: 992px) {
nav.sidebar {
position: fixed;
max-height: auto;
}
.main-panel {
margin-left: 270px;
}
.sidebar-icon-only .main-panel {
margin-left: 70px;
}
}
.sidebar>.nav>.nav-item:not(.nav-profile)>.nav-link:before {
content: none;

View File

@ -56,11 +56,9 @@
if (isExtraLargeBreakpoint()) {
let value = localStorage.getItem('crafty-sidebar-expanded') !== 'false';
$('body').toggleClass('sidebar-icon-only', !value);
$('body').toggleClass('sidebar-fixed', true);
localStorage.setItem('crafty-sidebar-expanded', value);
} else if (isLargeBreakpoint()) {
$('body').toggleClass('sidebar-icon-only', true);
$('body').toggleClass('sidebar-fixed', true);
}
}
</script>