mirror of
https://github.com/yuzu-emu/yuzu-emu.github.io.git
synced 2025-06-29 06:20:35 +00:00
Updated navbar for mobile. Updated shared-bulma-theme.
This commit is contained in:
parent
c70df174c0
commit
aeb2ca06e1
|
@ -32,6 +32,7 @@ paginate = 10
|
|||
GithubURL = "https://github.com/yuzu-emu/yuzu"
|
||||
GoogleAdsenseClient = "ca-pub-4126545610079023"
|
||||
GoogleAdsenseSlot = "5525580072"
|
||||
GoogleAnalyticsTrackingId = "UA-112443698-1"
|
||||
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 12fc52e060b4f068f63b49a1df77882e61ed3c71
|
||||
Subproject commit d085c0413edb617cc8cc2a970ec5ff5945dc1cdd
|
25
src/js/navbar.js
Normal file
25
src/js/navbar.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
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');
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
});
|
Loading…
Reference in a new issue