diff options
author | sptaule <lecas83@gmail.com> | 2022-01-29 14:42:09 +0100 |
---|---|---|
committer | sptaule <lecas83@gmail.com> | 2022-01-29 14:42:09 +0100 |
commit | e6f8f43b6ca5ff00d33b3a539e67eb2255fa1dd0 (patch) | |
tree | 1c08c3482e3ac79de1b040d77e3ca3d4f37b8fad /templates/partials/doc | |
parent | e958d4a1d06878100170cd96ce548966e3d5222a (diff) | |
download | garagehq.deuxfleurs.fr-e6f8f43b6ca5ff00d33b3a539e67eb2255fa1dd0.tar.gz garagehq.deuxfleurs.fr-e6f8f43b6ca5ff00d33b3a539e67eb2255fa1dd0.zip |
Improve responsive, icons, refactor search, update readme
Diffstat (limited to 'templates/partials/doc')
-rw-r--r-- | templates/partials/doc/toc_script.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/templates/partials/doc/toc_script.html b/templates/partials/doc/toc_script.html index df115b0..1453a69 100644 --- a/templates/partials/doc/toc_script.html +++ b/templates/partials/doc/toc_script.html @@ -11,11 +11,13 @@ const navSections = new Array(tocItems.length); */ window.addEventListener('scroll', function() { - if (window.scrollY >= menuBarHeight) { - document.getElementById('main-toc-menu').classList.add('fixed', 'top-0', 'left-0'); - document.getElementById('main-toc-menu').style.width = mainTocMenuWidth + 'px'; - } else { - document.getElementById('main-toc-menu').classList.remove('fixed', 'top-0', 'left-0'); + if (window.screen.width >= 1280) { + if (window.scrollY >= menuBarHeight) { + document.getElementById('main-toc-menu').classList.add('fixed', 'top-0', 'left-0'); + document.getElementById('main-toc-menu').style.width = mainTocMenuWidth + 'px'; + } else { + document.getElementById('main-toc-menu').classList.remove('fixed', 'top-0', 'left-0'); + } } }); |