Skip to content

Commit

Permalink
docs: fix need to double-click navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
soronpo committed May 8, 2024
1 parent 43fffef commit f8415b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/javascripts/nav-workaround.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// workaround issue (or similar) https://github.com/squidfunk/mkdocs-material/issues/6726
document.addEventListener('DOMContentLoaded', function() {
// Select all input elements with both 'md-nav__toggle' and 'md-toggle--indeterminate' classes
const elements = document.querySelectorAll('input.md-nav__toggle.md-toggle--indeterminate');

// Loop through each element and remove the 'md-toggle--indeterminate' class
elements.forEach(function(element) {
element.classList.remove('md-toggle--indeterminate');
});
});
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ markdown_extensions:
emoji_generator: !!python/name:material.extensions.emoji.to_svg

extra_javascript:
- javascripts/nav-workaround.js
- javascripts/config.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js
Expand Down

0 comments on commit f8415b1

Please sign in to comment.