This commit is contained in:
2023-11-05 14:20:43 +03:00
parent cd748dc371
commit 93401402ca
6 changed files with 86 additions and 27 deletions

View File

@@ -634,14 +634,42 @@ function show_header_list () {
}
}
function open_curtain (left,right){
let curtain = ''
if (left){
curtain = document.querySelector(".menu_buttons")
} else if (right) {
curtain = ''
function open_curtain (left=null,right=null,overlay=null){
let body = document.querySelector('body')
let curtain = ''
if (overlay){
overlay.classList.toggle("hidden")
} else {
let overlay = document.querySelector(".block_overlay")
if (overlay){
overlay.classList.toggle("hidden")
}
}
if (left || right){
if (left){
curtain = document.querySelector(".menu_buttons")
} else if (right) {
curtain = ''
}
} else {
let curtains = document.querySelectorAll(".curtain")
let i = 0
curtains.forEach(function (){
let el = curtains[i]
if (el.classList.contains('open')){
curtain = el
}
i++
})
}
curtain.classList.toggle("close")
curtain.classList.toggle("open")
}
if (body.style.overflow === 'hidden'){
body.style.overflow = ''
} else {
body.style.overflow = 'hidden'
}
}