Skip to content

Commit

Permalink
Merge pull request #196 from openbikesensor/restyle
Browse files Browse the repository at this point in the history
Restyle
  • Loading branch information
opatut authored Feb 17, 2024
2 parents 8cb357b + 33a6e5d commit bf1dcfc
Show file tree
Hide file tree
Showing 95 changed files with 2,225 additions and 1,941 deletions.
15 changes: 15 additions & 0 deletions assets/js/obs.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,18 @@ function initSliders() {
}
}
document.addEventListener('DOMContentLoaded', initSliders)

//////////////////////////////////////////////

function initTocHide() {
// Fix to hide TOC menu when clicking a link inside -- not easy with native HTML
// without making an ugly DOM.

const main = document.getElementById('mobile-menu-main')
for (const item of Array.from(document.querySelectorAll('aside.toc a'))) {
item.addEventListener('click', () => {
main.checked = true
})
}
}
document.addEventListener('DOMContentLoaded', initTocHide)
Loading

0 comments on commit bf1dcfc

Please sign in to comment.