From 385da3c325744b232081482881bb3b5a96c8d0fe Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Wed, 27 Jul 2022 21:30:39 +0200 Subject: [PATCH] =?UTF-8?q?Corrige=20la=20vista=20completa=20del=20men?= =?UTF-8?q?=C3=BA=20lateral=20mdBook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/doc/theme/book.js | 9 ++++----- website/doc/theme/css/chrome.css | 10 ++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) 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,