HTML
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HZC | Home</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="header">
<button class="menu_header" aria-label="Menu"><i></i></button>
<img src="img/logo.svg" alt="Logotipo HZC" class="logo_mobile">
<button class="notificacao_header" aria-label="Notificação"><i></i></button>
</header>
<nav class="menu_lateral">
<img src="img/logo.svg" alt="Logotipo HZC" class="logo_menu_lateral">
<a href="#" class="menu_lateral_link menu_lateral_link_inicio menu_lateral_link_active">Início</a>
<a href="#" class="menu_lateral_link menu_lateral_link_videos">Vídeos</a>
<a href="#" class="menu_lateral_link menu_lateral_link_picos">Picos</a>
<a href="#" class="menu_lateral_link menu_lateral_link_integrantes">Integrantes</a>
<a href="#" class="menu_lateral_link menu_lateral_link_camisas">Camisas</a>
<a href="#" class="menu_lateral_link menu_lateral_link_pinturas">Pinturas</a>
</nav>
<script src="/main.js"></script>
</body>
</html>
CSS
@font-face {
font-family: 'icones';
src: url(../font/icones.ttf);
}
body{
background-color: #1D232A;
font-family: 'Open-sans',sans-serif ,'icones';
color:#fff;
}
.header{
background-color:#15191C;
display: flex;
justify-content: space-between;
align-items: stretch;
padding: 8px 16px;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.16);
}
.logo_mobile{
width: 40px;
}
.menu_header i::before{
content: "\e904";
font-size: 24px;
}
.notificacao_header i::before{
content:"\e906";
font-size: 24px;
}
.menu_lateral{
display: flex;
flex-direction: column;
background-color: #15191C;
height: 100vh;
width: 75%;
padding: 16px;
position: absolute;
left: -100vh ;
}
.menu_lateral--ativo{
left:0;
}
.logo_menu_lateral{
width: 118px;
align-self: center;
padding: 16px;
}
.menu_lateral_link{
height: 64px;
color: #95999C;
padding-left: 64px;
display: flex;
align-items: center;
}
.menu_lateral_link::before{
width: 24px;
height: 24px;
font-size: 24px;
position: absolute;
left: 24px;
}
.menu_lateral_link_inicio::before{
content: "\e902";
}
.menu_lateral_link_videos::before{
content: "\e90e";
}
.menu_lateral_link_picos::before{
content: "\e909";
}
.menu_lateral_link_integrantes::before{
content: "\e903";
}
.menu_lateral_link_camisas::before{
content: "\e900";
}
.menu_lateral_link_pinturas::before{
content: "\e90a";
}
.menu_lateral_link_active{
color:#fff;
padding-left: 56px;
border-left: 8px solid #fff ;
}
JS
const botaoMenu = document.querySelector('.menu_header')
const menu = document.querySelector('.menu_lateral')
botaoMenu.addEventListener('click', () => {
menu.classList.toggle('.menu_lateral--ativo')
})
Ao clicar no bar menu nada acontece, onde errei?