Corrige la vista completa del menú lateral mdBook
This commit is contained in:
parent
b986bfcd13
commit
385da3c325
2 changed files with 14 additions and 5 deletions
9
website/doc/theme/book.js
vendored
9
website/doc/theme/book.js
vendored
|
|
@ -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";
|
||||
}
|
||||
})();
|
||||
|
||||
|
|
|
|||
10
website/doc/theme/css/chrome.css
vendored
10
website/doc/theme/css/chrome.css
vendored
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue