diff --git a/website/doc/theme/book.js b/website/doc/theme/book.js index 16f31323..c4ab6988 100644 --- a/website/doc/theme/book.js +++ b/website/doc/theme/book.js @@ -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"; } })(); diff --git a/website/doc/theme/css/chrome.css b/website/doc/theme/css/chrome.css index 69fbe34d..7f9dc35d 100644 --- a/website/doc/theme/css/chrome.css +++ b/website/doc/theme/css/chrome.css @@ -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,