cl-theme: remove unnecessary javascript for navbar-burger

This commit is contained in:
Jesús 2021-12-05 19:45:16 -05:00
parent 0974483b60
commit a661899ad5
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 0 additions and 26 deletions

View File

@ -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');
});
});
}
});

View File

@ -333,9 +333,6 @@
</div> </div>
</footer> </footer>
<!-- end of 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 %}
{% if article.js %} {% if article.js %}
{% for script in article.js %} {% for script in article.js %}