Fix mobile burger menu

This commit is contained in:
Robbie Antenesse 2018-12-27 17:10:50 -07:00
parent 373aa81421
commit 8750dcafb2
2 changed files with 14 additions and 2 deletions

View File

@ -8,6 +8,18 @@ $(document).ready(function() {
$(downloadButton).replaceWith('<a download href="' + url + '" class="button is-success is-large">Download</a>');
});
$('.navbar-burger').click(function() {
if ($(this).hasClass('is-active')) {
$(this).removeClass('is-active');
$(this).attr('aria-expanded', 'false');
$('.navbar-menu').removeClass('is-active');
} else {
$(this).addClass('is-active');
$(this).attr('aria-expanded', 'true');
$('.navbar-menu').addClass('is-active');
}
});
$('.modal-background, .modal-close, .modal-card-head .delete, .modal .close').click(function() {
$(this).closest('.modal').removeClass('is-active');
downloadButton = undefined;

View File

@ -23,14 +23,14 @@
<h1 class="title">{{siteTitle}}</h1>
</a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="/">
View