const menu = document.querySelector("header nav img")
const aside = document.querySelector("aside")
const content = document.querySelector(".content")

let toggle = false;

menu.addEventListener('click', () => {
    toggle = !toggle
        console.log('clic')
    if (toggle) {
        aside.classList.add('show_aside')
        aside.classList.remove('hidden_aside')
    } else {
        aside.classList.add('hidden_aside')
        aside.classList.remove('show_aside')
    }

})

if (content != null) {
    content.addEventListener('click', () => {
        if (toggle) {
            toggle = false
            aside.classList.add('hidden_aside')
            aside.classList.remove('show_aside')
        }

    })
}

