mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
fix menu responsive layout
This commit is contained in:
parent
da11416b39
commit
84576f2c29
4 changed files with 94 additions and 58 deletions
|
@ -27,13 +27,14 @@ function onAuxClick(selector, callback, noPreventDefault) {
|
|||
|
||||
// Show and hide the main menu on mobile devices.
|
||||
function toggleMainMenu() {
|
||||
console.log("clc")
|
||||
let menu = document.querySelector(".header nav ul");
|
||||
let menuToggleButton = document.querySelector(".header .logo a");
|
||||
if (DomHelper.isVisible(menu)) {
|
||||
menu.style.display = "none";
|
||||
let menuToggleButton = document.querySelector(".header button[aria-controls='header-menu']");
|
||||
if (menu.classList.contains("js-menu-show")) {
|
||||
menu.classList.remove("js-menu-show")
|
||||
menuToggleButton.setAttribute("aria-expanded", false)
|
||||
} else {
|
||||
menu.style.display = "block";
|
||||
menu.classList.add("js-menu-show")
|
||||
menuToggleButton.setAttribute("aria-expanded", true)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue