diff options
author | Jesús <heckyel@hyperbola.info> | 2021-12-05 19:45:16 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-12-05 19:45:16 -0500 |
commit | a661899ad5946ba94ca3eb158a259aba48f38841 (patch) | |
tree | ff4d87113a5c24c74c16e03e7cd8df8c77bb4192 | |
parent | 0974483b60f30b95ac442ebbc09f2ba453f118a6 (diff) | |
download | cl-a661899ad5946ba94ca3eb158a259aba48f38841.tar.lz cl-a661899ad5946ba94ca3eb158a259aba48f38841.tar.xz cl-a661899ad5946ba94ca3eb158a259aba48f38841.zip |
cl-theme: remove unnecessary javascript for navbar-burger
-rw-r--r-- | cl-theme/static/js/navbar-burger.js | 23 | ||||
-rw-r--r-- | cl-theme/templates/base.html | 3 |
2 files changed, 0 insertions, 26 deletions
diff --git a/cl-theme/static/js/navbar-burger.js b/cl-theme/static/js/navbar-burger.js deleted file mode 100644 index 084f02b..0000000 --- a/cl-theme/static/js/navbar-burger.js +++ /dev/null @@ -1,23 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - // Get all "navbar-burger" elements - const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0); - - // Check if there are any navbar burgers - if ($navbarBurgers.length > 0) { - - // Add a click event on each of them - $navbarBurgers.forEach( el => { - el.addEventListener('click', () => { - - // Get the target from the "data-target" attribute - const target = el.dataset.target; - const $target = document.getElementById(target); - - // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu" - el.classList.toggle('is-active'); - $target.classList.toggle('is-active'); - - }); - }); - } -}); diff --git a/cl-theme/templates/base.html b/cl-theme/templates/base.html index da7ce1d..8785276 100644 --- a/cl-theme/templates/base.html +++ b/cl-theme/templates/base.html @@ -333,9 +333,6 @@ </div> </footer> <!-- end of footer --> - <!-- navbar-burger --> - <script src="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/js/navbar-burger.js"></script> - <!-- end of navbar-burger --> {% if article %} {% if article.js %} {% for script in article.js %} |