mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
Closes #988
This commit is contained in:
parent
9e07c7eb60
commit
414532bf37
2 changed files with 22 additions and 8 deletions
|
@ -193,19 +193,26 @@
|
||||||
<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();
|
||||||
|
|
||||||
const body = document.querySelector("body");
|
if (window.innerWidth < 951) {
|
||||||
const navigation = document.querySelector("drawer-navigation");
|
console.log("yep");
|
||||||
|
const body = document.querySelector("body");
|
||||||
|
const navigation = document.querySelector("drawer-navigation");
|
||||||
|
|
||||||
navigation.classList.toggle("active");
|
navigation.classList.toggle("active");
|
||||||
|
|
||||||
// Get rid of double scrollbars
|
// Get rid of double scrollbars
|
||||||
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() ?>
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue