Fix mispositioned mobile menu icon

fixes #11099
This commit is contained in:
Florian Strohmaier 2016-03-09 13:45:26 +01:00 committed by Eric Lippmann
parent f8891a96ce
commit 9e0bee5006
2 changed files with 26 additions and 12 deletions

View File

@ -76,7 +76,6 @@
@gutter: 1em;
// x-column-layout
#main {
.clearfix();
@ -109,6 +108,22 @@
}
}
// Mobile menu
#mobile-menu-toggle {
text-align: right;
> button {
background: none;
border: none;
height: 2.5em;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
}
}
#sidebar {
background-color: @gray-lighter;
}

View File

@ -587,7 +587,7 @@
});
if ($layout.hasClass('minimal-layout')) {
if (! this.mobileMenu) {
if (! this.mobileMenu && $sidebar.length) {
$header.css({
top: $sidebar.outerHeight() + 'px'
});
@ -599,19 +599,18 @@
zIndex: 2
});
$sidebar
.on(
'click',
this.toggleMobileMenu
)
.prepend(
$('<div id="mobile-menu-toggle"><button><i class="icon-menu"></i></button></div>')
)
.css({
paddingBottom: 32,
paddingBottom: $('#mobile-menu-toggle').height(),
top: 0,
zIndex: 3
})
.on('click', this.toggleMobileMenu)
.prepend(
$('<i id="mobile-menu-toggle" class="icon-menu"></i>').css({
cursor: 'pointer',
display: 'block',
height: '32px'
})
);
});
$search.on('keypress', this.closeMobileMenu);
this.mobileMenu = true;