Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-07-19 16:37:06 +0300
committerHanzei <hanzei@mailbox.org>2018-07-19 16:37:06 +0300
commite375687f26896f38a15e61bd00a8a50fe7e78f8c (patch)
treef41c7132456c95b63f3cb5e9fe1d540c2b96926f /layouts
parent9125225a21e426ccf7392ff0d86b2b37c6b005ee (diff)
Bundle nav script in index.js
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/nav.html27
1 files changed, 0 insertions, 27 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 15f156c..3caa861 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -102,31 +102,4 @@
</nav>
<hr>
</div>
-<script>
-document.addEventListener('DOMContentLoaded', function () {
-
- // Get all "navbar-burger" elements
- var $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(function ($el) {
- $el.addEventListener('click', function () {
-
- // Get the target from the "data-target" attribute
- var target = $el.dataset.target;
- var $target = document.getElementById(target);
-
- // Toggle the class on both the "navbar-burger" and the "navbar-menu"
- $el.classList.toggle('is-active');
- $target.classList.toggle('is-active');
-
- });
- });
- }
-
-});
-</script>
<!-- End Nav bar -->