Skip to content

Commit

Permalink
main.js changed
Browse files Browse the repository at this point in the history
  • Loading branch information
renata-aline committed Jul 22, 2024
1 parent 61a2868 commit a4345d1
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,61 +1 @@
'use strict';
// function toggleMenuClose() {
// var menu = document.getElementById('nav-bar__menu');
// if (menu.style.display === 'flex') {
// menu.style.display = 'none';
// } else {
// menu.style.display = 'flex';
// }
// }



// document.addEventListener("DOMContentLoaded", function() {
// const nav = document.getElementById("menu");
// const openIcon = document.querySelector(".nav__toggle__icon--open");
// const closeIcon = document.querySelector(".nav__toggle__icon--close");

// openIcon.addEventListener("click", function() {
// nav.classList.add("open");
// });

// closeIcon.addEventListener("click", function() {
// nav.classList.remove("open");
// });
// });


// document.addEventListener("DOMContentLoaded", function() {
// const nav = document.getElementById("menu");
// const navToggle = document.getElementById("nav-toggle");
// const openIcon = document.getElementById("open-icon");
// const closeIcon = document.getElementById("close-icon");

// // Verifica se está na tela inicial
// function checkHomePage() {
// if (window.location.hash === "#home" || window.location.hash === "") {
// navToggle.style.display = "block";
// } else {
// navToggle.style.display = "none";
// }
// }

// // Inicialmente verifica a URL
// checkHomePage();

// // Adiciona evento de clique nos ícones de abertura e fechamento do menu
// openIcon.addEventListener("click", function() {
// nav.classList.add("open");
// openIcon.style.display = "none";
// closeIcon.style.display = "block";
// });

// closeIcon.addEventListener("click", function() {
// nav.classList.remove("open");
// openIcon.style.display = "block";
// closeIcon.style.display = "none";
// });

// // Atualiza o ícone do menu ao mudar de página
// window.addEventListener("hashchange", checkHomePage);
// });

0 comments on commit a4345d1

Please sign in to comment.