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 });
|
}, { passive: true });
|
||||||
|
|
||||||
// Scroll sidebar to current active section
|
// Try to show the full sidebar
|
||||||
var activeSection = document.getElementById("sidebar").querySelector(".active");
|
if (html.classList.contains("sidebar-visible")) {
|
||||||
if (activeSection) {
|
var realHeight = sidebar.querySelector(".sidebar-scrollbox").scrollHeight;
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
document.getElementById("page-wrapper").style.minHeight = realHeight + 80 + "px";
|
||||||
// activeSection.scrollIntoView({ block: 'center' });
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
||||||
10
website/doc/theme/css/chrome.css
vendored
10
website/doc/theme/css/chrome.css
vendored
|
|
@ -111,6 +111,16 @@
|
||||||
.js #mdbook .menu-title {
|
.js #mdbook .menu-title {
|
||||||
cursor: pointer;
|
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,
|
||||||
#mdbook .menu-bar:visited,
|
#mdbook .menu-bar:visited,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue