Josh
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
1 deletions
-
docs/_static/custom.js
-
docs/_static/style.css
|
|
@ -7,6 +7,11 @@ let settingsModal; |
|
|
|
let hamburgerToggle; |
|
|
|
let sidebar; |
|
|
|
|
|
|
|
function resizeSidebar() { |
|
|
|
let rect = sidebar.getBoundingClientRect(); |
|
|
|
sidebar.style.height = `calc(100vh - 1em - ${rect.top + document.body.offsetTop}px)`; |
|
|
|
} |
|
|
|
|
|
|
|
function closeModal(modal) { |
|
|
|
activeModal = null; |
|
|
|
modal.hidden = true; |
|
|
@ -66,6 +71,8 @@ document.addEventListener('DOMContentLoaded', () => { |
|
|
|
hamburgerToggle = document.getElementById("hamburger-toggle"); |
|
|
|
sidebar = document.getElementById("sidebar"); |
|
|
|
|
|
|
|
resizeSidebar(); |
|
|
|
|
|
|
|
sidebar.addEventListener("click", (e) => { |
|
|
|
// If we click a navigation, close the hamburger menu
|
|
|
|
if (e.target.tagName == "A" && sidebar.classList.contains("sidebar-toggle")) { |
|
|
@ -136,6 +143,8 @@ window.addEventListener('scroll', () => { |
|
|
|
activeLink.parentElement.classList.add('active'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
resizeSidebar(); |
|
|
|
}); |
|
|
|
|
|
|
|
document.addEventListener('keydown', (event) => { |
|
|
|
|
|
@ -1093,7 +1093,7 @@ div.code-block-caption { |
|
|
|
display: inline-block; |
|
|
|
position: sticky; |
|
|
|
top: 1em; |
|
|
|
max-height: calc(100vh - 1em); |
|
|
|
max-height: calc(100vh - 2em); |
|
|
|
overflow-y: auto; |
|
|
|
margin: 1em; |
|
|
|
} |
|
|
|