fix bug on menu script

+ ajust top of result page on mobile
+ build
This commit is contained in:
MatthieuBarbu 2023-09-04 17:49:32 +02:00
parent 17048c5137
commit 87d3112265
6 changed files with 23 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ function toggleMobileMenu(event) {
let hidenUL = document.querySelector('#mobile_menu'); let hidenUL = document.querySelector('#mobile_menu');
console.log('click event => toggleMobileMenu called') //console.log('click event => toggleMobileMenu called')
if (hidenUL && isHidenUL) { if (hidenUL && isHidenUL) {
hidenUL.style.display = 'block'; hidenUL.style.display = 'block';
@ -18,12 +18,27 @@ function toggleMobileMenu(event) {
return false; return false;
} }
function hideMobileMenu(event) {
event.stopPropagation();
let hidenUL = document.querySelector('#mobile_menu');
//console.log('click event => toggleMobileMenu called')
if (hidenUL && !isHidenUL) {
hidenUL.style.display = 'none';
isHidenUL = true;
}
return false;
}
let elEvent = document.querySelector('#et_mobile_nav_menu'); let elEvent = document.querySelector('#et_mobile_nav_menu');
console.log(elEvent) //console.log(elEvent)
if (elEvent) { if (elEvent) {
document.querySelector('#mobile_menu').style.display = 'none'; document.querySelector('#mobile_menu').style.display = 'none';
elEvent.addEventListener("click", toggleMobileMenu); elEvent.addEventListener("click", toggleMobileMenu);
document.querySelector("body").addEventListener("click", toggleMobileMenu); document.querySelector("body").addEventListener("click", hideMobileMenu);
} }

View File

@ -1027,7 +1027,7 @@ summary.title {
#main_index, #main_index,
#main_results { #main_results {
margin-top: 9rem; margin-top: 12.2rem;
} }
#main_preferences, #main_preferences,