This commit is contained in:
ポール ウェッブ 2019-03-19 17:33:21 -05:00
parent 9e07c7eb60
commit 414532bf37
2 changed files with 22 additions and 8 deletions

View file

@ -193,9 +193,15 @@
<a href="#" class="header__toggle" id="menuToggle">Menu</a> <a href="#" class="header__toggle" id="menuToggle">Menu</a>
<?php js_start() ?> <?php js_start() ?>
if (window.innerWidth < 951) {
console.log("yep");
}
document.getElementById("menuToggle").addEventListener("click", event => { document.getElementById("menuToggle").addEventListener("click", event => {
event.preventDefault(); event.preventDefault();
if (window.innerWidth < 951) {
console.log("yep");
const body = document.querySelector("body"); const body = document.querySelector("body");
const navigation = document.querySelector("drawer-navigation"); const navigation = document.querySelector("drawer-navigation");
@ -205,7 +211,8 @@
if (navigation.classList.contains("active")) if (navigation.classList.contains("active"))
body.style["overflow-y"] = "hidden"; body.style["overflow-y"] = "hidden";
else else
body.style["overflow-y"] = "auto"; body.style["overflow-y"] = "initial";
}
}); });
<?php js_end() ?> <?php js_end() ?>

View file

@ -246,6 +246,13 @@ drawer-title {
} }
drawer-wrap { drawer-wrap {
&::after {
// TODO: Update component with this code
// and remove `width` and `height`
left: 0; bottom: 0; right: 0;
position: fixed;
}
@media (max-width: 950px) { @media (max-width: 950px) {
top: initial; left: initial; top: initial; left: initial;