This commit is contained in:
SBD
2023-11-30 16:14:10 +03:00
parent 377786df87
commit ee5d7033ae
5 changed files with 118 additions and 4 deletions

View File

@@ -87,6 +87,44 @@
.cut-width{
margin: 0 20px;
}
/* curtain*/
.curtain_main{
height: calc(100vh - 20px);
padding-top: 20px;
background: #10212B;
width: 320px;
position: fixed;
top: 40px;
right: 0;
z-index: 101;
transition: 200ms;
}
.curtain_main.open{
right: 0;
transition: 200ms;
}
.curtain_main.close{
right: -320px;
transition: 200ms;
}
.container_first_line_curtain{
padding-bottom: 20px;
border-bottom: 1px solid #888;
width: 100%;
}
.block_overlay{
height: 100vh;
width: 100vw;
position: absolute;
z-index: 100;
}
.block_overlay.hide{
display: none;
}
.block_overlay.show{
display: block;
}
}
@media (max-width: 850px) {
@@ -104,6 +142,11 @@
.text_header{
padding-right: 20px;
}
.section_btn:hover {
height: unset;
position: unset;
bottom: unset;
}
.text_header.last_left {
padding-right: 20px;
}
@@ -129,6 +172,9 @@
}
.section_btn.open{
height: unset;
bottom: unset;
position: unset;
border-radius: 0;
}
.section_btn.close{
height: unset;
@@ -151,6 +197,7 @@
}
.section_btn:hover{
height: unset;
border-radius: 0;
}
.img_go_to_section{
width: 8px;
@@ -171,7 +218,22 @@
}
}
@media (max-width: 675px) {
@media (max-width: 700px) {
.flex_container_footer{
flex-wrap: wrap;
justify-content: right;
}
.footer_els_container{
width: 100%;
}
.right_part_footer{
width: calc(100% - 100px);
text-align: -webkit-right;
float: right;
margin-top: 60px;
}
.footer_el{
width: 100%;
}
}

View File

@@ -1,10 +1,11 @@
$(document).ready(function (){
if (document.querySelector(".header").dataset['page'] === 'True'){
if (document.querySelector(".header").dataset['page'] === 'True' && getInfoAboutUser()[0] === 'mobile'){
renderContent()
} else {
let el = document.querySelector(".container_sections_buttons")
if (el){
replaceHrefOnOnclick()
replace_select_language()
}
}
})
@@ -69,6 +70,10 @@ function renderContent (el=null) {
function replace_select_language () {
let select = document.querySelector(".name_language")
if (getInfoAboutUser()[0] === 'mobile' || getInfoAboutUser()[0] === 'laptop'){
select = document.querySelector(".name_language.curtain")
}
let lang_f_replace = ''
if (window.location.href.includes('ru')){
lang_f_replace = 'ru'
@@ -104,6 +109,9 @@ function faq_open_close () {
function open_select_language () {
let el = document.querySelector(".language_select")
if (getInfoAboutUser()[0] === 'mobile' || getInfoAboutUser()[0] === 'laptop'){
el = document.querySelector(".language_select.curtain")
}
el.classList.toggle("open")
el.classList.toggle("close")
}
@@ -111,6 +119,9 @@ function open_select_language () {
function select_language (el) {
let txt = el.innerHTML
let select = document.querySelector(".name_language")
if (getInfoAboutUser()[0] === 'mobile' || getInfoAboutUser()[0] === 'laptop'){
select = document.querySelector(".name_language.curtain")
}
select.innerHTML = txt
let lang_f_replace = ''
if (window.location.href.includes('ru')){
@@ -120,4 +131,19 @@ function select_language (el) {
}
window.location.href = window.location.href.replace(`${lang_f_replace}`,txt.toLowerCase())
open_select_language()
}
// curtain
function openCurtain (el) {
let curtain = document.querySelector(".curtain")
curtain.classList.toggle("open")
curtain.classList.toggle("close")
openOverlay()
}
function openOverlay () {
let overlay = document.querySelector(".block_overlay")
overlay.classList.toggle("show")
overlay.classList.toggle("hide")
}