1
0
Fork 0
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:
krvpb024 2024-01-25 16:36:10 +08:00 committed by Frédéric Guillot
parent da11416b39
commit 84576f2c29
4 changed files with 94 additions and 58 deletions

View file

@ -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)
}
}