diff --git a/assets/js/theme/nav/responsive.js b/assets/js/theme/nav/responsive.js index 0c1ca3998722bee7f648387a39c5f5fae3e95f33..d1643a791e082403fac60da3079901491bd9049e 100644 --- a/assets/js/theme/nav/responsive.js +++ b/assets/js/theme/nav/responsive.js @@ -1,6 +1,5 @@ const events = ['load', 'resize']; -let header = document.querySelector('header[role="banner"]'), - navBtn = document.querySelector('nav[role="navigation"] button'), +let navBtn = document.querySelector('nav[role="navigation"] button'), menuHeader = document.querySelector('.menu'), dropdownBtns = document.querySelectorAll('.has-children a[role="button"]'), breckpointMd = 768, @@ -22,8 +21,9 @@ events.forEach((event) => { }); dropdownBtns.forEach((dropdownBtn) => { - dropdownBtn.addEventListener("click", function(){ + dropdownBtn.addEventListener("click", function(e){ this.href = "javascript:void(0)" + // e.stopPropagation() if(this.getAttribute('aria-expanded') == "true") { this.setAttribute('aria-expanded', 'false') diff --git a/assets/sass/_theme/design-system/header.sass b/assets/sass/_theme/design-system/header.sass index 21118dee65a3b9c5abfd425e32c0552932d7b19e..37c58cdd6702005f5e270ac94f9de352c6c9dc65 100644 --- a/assets/sass/_theme/design-system/header.sass +++ b/assets/sass/_theme/design-system/header.sass @@ -11,6 +11,8 @@ header[role="banner"] &.is-sticky position: sticky + @include media-breakpoint-down(md) + padding: 1rem 0 nav[role="navigation"] .container