fix: re-add js for mobile-sidebar
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ef5483dd7e
commit
0723137efd
2 changed files with 11 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
|||
<button id="mobile-button" class="menu-button"><svg class="icon icon-bars" alt=""><use xlink:href="#icon-bars"></use></svg> <span class="sr-only">Afficher le menu</span></button>
|
||||
<!-- Footer -->
|
||||
|
||||
<?php echo Theme::js('mobile-sidebar.js'); ?>
|
||||
<!-- Load Bludit Plugins: Site Body End -->
|
||||
<?php Theme::plugins('siteBodyEnd'); ?>
|
||||
</body>
|
||||
|
|
10
js/mobile-sidebar.js
Normal file
10
js/mobile-sidebar.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
document.getElementById('mobile-button').addEventListener('click', function () {
|
||||
const sidebar = document.getElementById('mobile-sidebar');
|
||||
if (sidebar.classList.contains('hidden')) {
|
||||
sidebar.classList.remove('hidden');
|
||||
sidebar.classList.add('shown');
|
||||
} else {
|
||||
sidebar.classList.remove('shown');
|
||||
sidebar.classList.add('hidden');
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue