[refactor] hide menu until js is loaded

This commit is contained in:
zombieFox 2019-12-01 15:15:29 +00:00
parent 30468250a7
commit b38bf8f199
3 changed files with 6 additions and 6 deletions

View File

@ -9,11 +9,6 @@
transition: transform var(--layout-timing-extra-fast);
z-index: var(--z-index-menu);
pointer-events: none;
display: none;
}
.is-menu .menu {
display: block;
}
.menu:focus {

View File

@ -132,7 +132,7 @@
</main>
<section class="menu" tabindex="-1">
<section class="menu" tabindex="-1" style="display:none;">
<div class="menu-area">
<div class="menu-nav">

View File

@ -70,6 +70,10 @@ var menu = (function() {
helper.removeClass(helper.e("html"), "is-menu-open");
};
render.removeStyle = function() {
helper.e(".menu").removeAttribute("style");
};
var nav = function(button, area) {
render.nav(button, area);
render.scrollToTop();
@ -108,6 +112,7 @@ var menu = (function() {
var init = function() {
mod.close();
render.close();
render.removeStyle();
};
return {