Skip to content

Commit

Permalink
refatorando código: abrindo menu
Browse files Browse the repository at this point in the history
  • Loading branch information
eytorsousa committed Apr 16, 2024
1 parent b47a92a commit f860675
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions assets/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const audio2 = new Audio('assets/media/reset.mp3');

const body = document.querySelector("body");
const bg2 = document.querySelector(".bg2");
const bg1 = document.querySelector(".bg1");
const mode = document.querySelector(".mode");
const credits = document.querySelector("#credits");
const link = document.querySelector("#link");
Expand Down Expand Up @@ -101,28 +100,18 @@ function buttonContinue() {
const settings = document.querySelector(".settings");
const back = document.querySelector(".back");
const menu = document.querySelector(".menu");
const itens = document.getElementById("itens");
const label = document.getElementById("label");
const inputs = document.getElementById("inputs");

settings.addEventListener("click", openMenu);
back.addEventListener("click", closeMenu);
back.addEventListener("click", openMenu);

function openMenu(){
menu.classList.add("open");
menu.classList.remove("closed");
}

function closeMenu(){
menu.classList.add("closed");
menu.classList.remove("open");
menu.classList.toggle("open");
menu.classList.toggle("closed");
}

/* ---------------------------------------- Cores do Botão ----------------------------------------*/

const colors = Array.from(document.querySelectorAll(".color"));

console.log(colors);
const bg1 = document.querySelector(".bg1");

const presets = [
{
Expand Down

0 comments on commit f860675

Please sign in to comment.