From a661899ad5946ba94ca3eb158a259aba48f38841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sun, 5 Dec 2021 19:45:16 -0500 Subject: cl-theme: remove unnecessary javascript for navbar-burger --- cl-theme/static/js/navbar-burger.js | 23 ----------------------- cl-theme/templates/base.html | 3 --- 2 files changed, 26 deletions(-) delete mode 100644 cl-theme/static/js/navbar-burger.js 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 @@ - - - {% if article %} {% if article.js %} {% for script in article.js %} -- cgit v1.2.3