forked from zaclys/searxng
fix bug on menu script
+ ajust top of result page on mobile + build
This commit is contained in:
parent
17048c5137
commit
87d3112265
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
|
@ -5,7 +5,7 @@ function toggleMobileMenu(event) {
|
|||
|
||||
let hidenUL = document.querySelector('#mobile_menu');
|
||||
|
||||
console.log('click event => toggleMobileMenu called')
|
||||
//console.log('click event => toggleMobileMenu called')
|
||||
|
||||
if (hidenUL && isHidenUL) {
|
||||
hidenUL.style.display = 'block';
|
||||
|
@ -18,12 +18,27 @@ function toggleMobileMenu(event) {
|
|||
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');
|
||||
|
||||
console.log(elEvent)
|
||||
//console.log(elEvent)
|
||||
|
||||
if (elEvent) {
|
||||
document.querySelector('#mobile_menu').style.display = 'none';
|
||||
elEvent.addEventListener("click", toggleMobileMenu);
|
||||
document.querySelector("body").addEventListener("click", toggleMobileMenu);
|
||||
document.querySelector("body").addEventListener("click", hideMobileMenu);
|
||||
}
|
|
@ -1027,7 +1027,7 @@ summary.title {
|
|||
|
||||
#main_index,
|
||||
#main_results {
|
||||
margin-top: 9rem;
|
||||
margin-top: 12.2rem;
|
||||
}
|
||||
|
||||
#main_preferences,
|
||||
|
|
Loading…
Reference in New Issue