diff --git a/public/css/extra.css b/public/css/extra.css index 96cdac3..9d29cf9 100644 --- a/public/css/extra.css +++ b/public/css/extra.css @@ -130,11 +130,16 @@ padding-right: 10px; max-width: 45vw; width: 25vw; - max-height: 65vh; + max-height: 70vh; overflow: auto; text-align: inherit; } +.ui-toc-dropdown > .toc { + max-height: calc(70vh - 100px); + overflow: auto; +} + .ui-toc-dropdown[dir='rtl'] .nav { padding-right: 0; letter-spacing: 0.0029em; diff --git a/public/js/extra.js b/public/js/extra.js index 4049696..824b78d 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -595,6 +595,7 @@ function generateToc(id) { }); if (target.text() == 'undefined') target.html(''); + var tocMenu = $('
Expand all'); var backtotop = $('Back to top'); var gotobottom = $('Go to bottom'); @@ -619,7 +620,8 @@ function generateToc(id) { scrollToBottom(); removeHash(); }); - target.append(toggle).append(backtotop).append(gotobottom); + tocMenu.append(toggle).append(backtotop).append(gotobottom); + target.append(tocMenu); } //smooth all hash trigger scrolling