Skip to content

Commit b29c9e2

Browse files
committed
update js
1 parent 3604953 commit b29c9e2

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

www/build.php

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
]);
88

99
concat(__DIR__ . '/public/js/app.min.js', [
10+
__DIR__ . '/public/js/app.js',
1011
__DIR__ . '/public/js/highlight.min.js',
1112
]);
1213

www/public/js/app.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
document.addEventListener('DOMContentLoaded', function () {
3+
document.querySelectorAll('.navbar-burger').forEach( function (el) {
4+
el.addEventListener('click', function () {
5+
var target = el.dataset.target;
6+
var targetEl = document.getElementById(target);
7+
el.classList.toggle('is-active');
8+
targetEl.classList.toggle('is-active');
9+
});
10+
});
11+
});

www/public/js/app.min.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2+
document.addEventListener('DOMContentLoaded', function () {
3+
document.querySelectorAll('.navbar-burger').forEach( function (el) {
4+
el.addEventListener('click', function () {
5+
var target = el.dataset.target;
6+
var targetEl = document.getElementById(target);
7+
el.classList.toggle('is-active');
8+
targetEl.classList.toggle('is-active');
9+
});
10+
});
11+
});
12+
113
/*!
214
Highlight.js v11.7.0 (git: 82688fad18)
315
(c) 2006-2022 undefined and other contributors

0 commit comments

Comments
 (0)