Skip to content

Commit bf1dcfc

Browse files
authored
Merge pull request #196 from openbikesensor/restyle
Restyle
2 parents 8cb357b + 33a6e5d commit bf1dcfc

95 files changed

Lines changed: 2225 additions & 1941 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/js/obs.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,18 @@ function initSliders() {
6262
}
6363
}
6464
document.addEventListener('DOMContentLoaded', initSliders)
65+
66+
//////////////////////////////////////////////
67+
68+
function initTocHide() {
69+
// Fix to hide TOC menu when clicking a link inside -- not easy with native HTML
70+
// without making an ugly DOM.
71+
72+
const main = document.getElementById('mobile-menu-main')
73+
for (const item of Array.from(document.querySelectorAll('aside.toc a'))) {
74+
item.addEventListener('click', () => {
75+
main.checked = true
76+
})
77+
}
78+
}
79+
document.addEventListener('DOMContentLoaded', initTocHide)

0 commit comments

Comments
 (0)