Updated navbar for mobile. Updated shared-bulma-theme.

This commit is contained in:
Chris 2018-01-13 13:39:54 -05:00
parent c70df174c0
commit aeb2ca06e1
3 changed files with 27 additions and 1 deletions

View file

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