From 5bc50ec54becec79caca0db9a79faea919d0ab2c Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 16 Jan 2026 20:54:39 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20reposicionar=20dropdown=20del=20usuario?= =?UTF-8?q?=20en=20navbar=20para=20que=20sea=20accesible=20en=20m=C3=B3vil?= =?UTF-8?q?=20y=20desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/style.css | 4 --- templates/footer.php | 62 -------------------------------------------- templates/header.php | 28 ++++++++++---------- 3 files changed, 14 insertions(+), 80 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index c9eb422..d2bc53c 100755 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -114,10 +114,6 @@ body { animation: slideDown 0.2s ease; } -.dropdown-menu.show { - display: block !important; -} - @keyframes slideDown { from { opacity: 0; diff --git a/templates/footer.php b/templates/footer.php index be6f55f..a41401f 100755 --- a/templates/footer.php +++ b/templates/footer.php @@ -15,68 +15,6 @@ if (debugList) { debugList.remove(); } - - // Fix para dropdowns en móvil - const dropdownToggles = document.querySelectorAll('.dropdown-toggle'); - dropdownToggles.forEach(toggle => { - toggle.addEventListener('click', function(e) { - e.preventDefault(); - e.stopPropagation(); - - // Obtener el elemento dropdown - const dropdown = this.closest('.dropdown') || this.parentElement; - const menu = this.nextElementSibling; - - if (menu && menu.classList.contains('dropdown-menu')) { - // Toggle la clase 'show' - if (menu.classList.contains('show')) { - menu.classList.remove('show'); - this.classList.remove('show'); - this.setAttribute('aria-expanded', 'false'); - } else { - // Cerrar otros dropdowns - document.querySelectorAll('.dropdown-menu.show').forEach(m => { - m.classList.remove('show'); - m.previousElementSibling?.classList.remove('show'); - }); - - menu.classList.add('show'); - this.classList.add('show'); - this.setAttribute('aria-expanded', 'true'); - } - } - }); - }); - - // Cerrar dropdowns al hacer clic en un item - const dropdownItems = document.querySelectorAll('.dropdown-item'); - dropdownItems.forEach(item => { - item.addEventListener('click', function() { - // Cerrar todos los dropdowns - document.querySelectorAll('.dropdown-menu.show').forEach(m => { - m.classList.remove('show'); - m.previousElementSibling?.classList.remove('show'); - }); - document.querySelectorAll('.dropdown-toggle.show').forEach(t => { - t.classList.remove('show'); - t.setAttribute('aria-expanded', 'false'); - }); - }); - }); - - // Cerrar dropdowns al hacer clic fuera - document.addEventListener('click', function(e) { - if (!e.target.closest('.dropdown') && !e.target.closest('.nav-item.dropdown')) { - document.querySelectorAll('.dropdown-menu.show').forEach(m => { - m.classList.remove('show'); - m.previousElementSibling?.classList.remove('show'); - }); - document.querySelectorAll('.dropdown-toggle.show').forEach(t => { - t.classList.remove('show'); - t.setAttribute('aria-expanded', 'false'); - }); - } - }); }); diff --git a/templates/header.php b/templates/header.php index 1cea995..b454667 100755 --- a/templates/header.php +++ b/templates/header.php @@ -95,10 +95,22 @@ if (!isset($_SESSION['language'])) { + + + - -
+ +
@@ -121,18 +133,6 @@ if (!isset($_SESSION['language'])) {
- - -