From ee5d7033aedc4970be8430bba995e8fff8ef8aa6 Mon Sep 17 00:00:00 2001 From: SBD Date: Thu, 30 Nov 2023 16:14:10 +0300 Subject: [PATCH] 0.0.51 --- static/aerbimCSSMOBILE.css | 66 ++++++++++++++++++++++++++++- static/aerbimJS.js | 28 +++++++++++- templates/blocks/b_curtain.html | 23 ++++++++++ templates/blocks/static/header.html | 2 +- templates/tb_base.html | 3 ++ 5 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 templates/blocks/b_curtain.html diff --git a/static/aerbimCSSMOBILE.css b/static/aerbimCSSMOBILE.css index b41dc78..f330e96 100644 --- a/static/aerbimCSSMOBILE.css +++ b/static/aerbimCSSMOBILE.css @@ -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%; + } } \ No newline at end of file diff --git a/static/aerbimJS.js b/static/aerbimJS.js index c0a0fb7..4bedad1 100644 --- a/static/aerbimJS.js +++ b/static/aerbimJS.js @@ -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") } \ No newline at end of file diff --git a/templates/blocks/b_curtain.html b/templates/blocks/b_curtain.html new file mode 100644 index 0000000..eb32fa1 --- /dev/null +++ b/templates/blocks/b_curtain.html @@ -0,0 +1,23 @@ +{% load static %} +
+
+
+
+
+
+
RU
+
+ +
+
+
+
+
RU
+
+
EN
+
+
+
+
+
+
\ No newline at end of file diff --git a/templates/blocks/static/header.html b/templates/blocks/static/header.html index d39e972..bc98a6b 100644 --- a/templates/blocks/static/header.html +++ b/templates/blocks/static/header.html @@ -29,7 +29,7 @@ Личный кабинет
- +
\ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 47f5725..83efdfe 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -16,7 +16,10 @@ {% csrf_token %} +
{% include "blocks/static/header.html" %} + {% include "blocks/b_curtain.html" %} +
{% block CONTENT %}