Corrige la vista completa del menú lateral mdBook

This commit is contained in:
Manuel Cillero 2022-07-27 21:30:39 +02:00
parent b986bfcd13
commit 385da3c325
2 changed files with 14 additions and 5 deletions

View file

@ -544,11 +544,10 @@ function playground_text(playground) {
}
}, { passive: true });
// Scroll sidebar to current active section
var activeSection = document.getElementById("sidebar").querySelector(".active");
if (activeSection) {
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
// activeSection.scrollIntoView({ block: 'center' });
// Try to show the full sidebar
if (html.classList.contains("sidebar-visible")) {
var realHeight = sidebar.querySelector(".sidebar-scrollbox").scrollHeight;
document.getElementById("page-wrapper").style.minHeight = realHeight + 80 + "px";
}
})();

View file

@ -111,6 +111,16 @@
.js #mdbook .menu-title {
cursor: pointer;
}
@media only screen and (max-width: 640px) {
#mdbook .menu-title {
font-size: 1.5rem;
}
}
@media only screen and (max-width: 420px) {
#mdbook .menu-title {
font-size: 1.2rem;
}
}
#mdbook .menu-bar,
#mdbook .menu-bar:visited,