This commit is contained in:
SBD
2023-12-05 22:17:49 +03:00
parent 885e4722af
commit d7ace77de8
2 changed files with 67 additions and 43 deletions

View File

@@ -7,8 +7,11 @@
// }
window.onload = function (){
changeTopStrMobile()
middleWareJS()
}
//
function middleWareJS(){
let footer = document.querySelector("footer")
@@ -24,13 +27,22 @@ function middleWareJS(){
body.style.overflow = ""
}
}
if (!window.location.href.includes("mobile") && !window.location.href.includes("route_search_results")){
window.location.href = window.location.href + `?mobile=${getInfoAboutUser() === 'mobile'}`
} else if (window.location.href.includes("route_search_results")){
window.location.href = window.location.href + `&mobile=${getInfoAboutUser() === 'mobile'}`
}
function changeTopStrMobile (){
let body = document.querySelector("body")
if (!window.location.href.includes("mobile")){
if (!window.location.href.includes("mobile") && !window.location.href.includes("route_search_results")){
window.location.href = window.location.href + `?mobile=${getInfoAboutUser() === 'mobile'}`
}
body.style.opacity = ''
body.style.transition = '500ms'
} else {
body.style.display = ''
body.style.transition = '500ms'
}
}
function getTypeOfData (data) {

View File

@@ -10,6 +10,7 @@
{% include "inter/meta_names.html" %}
{# <script src='{% static "js/jquery_v3_6_4.js" %}'> </script>#}
<script type="text/javascript" src="{% static "js/jquery_3_2_1.js" %}"></script>
<script type="text/javascript" src="{% static "js/moment_js.js" %}"></script>
<script type="text/javascript" src="{% static "js/moment-with-locales.js" %}"></script>
@@ -53,50 +54,61 @@
{% block meta %}
{% endblock %}
</head>
<body {% if page_type == 'routes' %}onscroll="scroll_ev(event,this)" {% endif %}>
<div class="block_overlay {% if page_type == 'profile' %}hidden{% elif page_type == 'routes' %} routes n_profile hidden{% else %}hidden n_profile{% endif %}" onclick="close_open_curtain()"></div>
<div class="wrapper_main">
{% include 'blocks/b_header.html' %}
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right" onclick="reAdressClickOnbackrground(event,this)">
<div class="menu_buttons curtain right {% if page_type == 'profile' %}{% if not mobile %}open{% else %}close{% endif %}{% else %} n_profile close{% endif %}" data-name="<img style='width: 25px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'>">
{% include "blocks/profile/b_buttons_menu_profile.html" %}
<div class="handler_menu close" onclick="open_curtain_w_btn_profile()">
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="text_f_curtain left"><img style='width: 25px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'></div>
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="clear_both"></div>
</div>
</div>
</div>
{% if page_type == 'routes' %}
<div class="cut_width_f_curtain{% if page_type == 'profile' %}{% else %} n_profile{% endif %} left ">
<div class="menu_buttons curtain left open first filters" data-name="<img style='width: 20px;display: block;position: relative;bottom: 2;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'>">
{% include "forms/f_find_route_filters_form.html" %}
<div class="handler_menu close" onclick="open_curtain_w_contacts()">
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="text_f_curtain left"><img style='width: 20px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'></div>
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="clear_both"></div>
</div>
</div>
</div>
<body{% if page_type == 'routes' %} onscroll="scroll_ev(event,this)"{% endif %}>
{% if page_type != 'routes' %}
<script>
let body = document.querySelector("body")
body.style.display = 'none'
body.style.transition = '1000ms'
</script>
{% endif %}
<div class="wrapper_content {% if page.url == 'customer_service'%} m_h_0 {% elif page.url == 'contacts' %}m_h_0{% endif %}">
{% if mobile == 'false' or mobile %}
{% endif %}
<div class="block_overlay {% if page_type == 'profile' %}hidden{% elif page_type == 'routes' %} routes n_profile hidden{% else %}hidden n_profile{% endif %}" onclick="close_open_curtain()"></div>
<div class="wrapper_main">
{% block content %}
{% endblock %}
{% include 'blocks/b_header.html' %}
<div class="clear_both"></div>
</div>
<div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right" onclick="reAdressClickOnbackrground(event,this)">
<div class="menu_buttons curtain right {% if page_type == 'profile' %}{% if not mobile %}open{% else %}close{% endif %}{% else %} n_profile close{% endif %}" data-name="<img style='width: 25px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'>">
</div>
{% include "blocks/profile/b_buttons_menu_profile.html" %}
<div class="handler_menu close" onclick="open_curtain_w_btn_profile()">
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="text_f_curtain left"><img style='width: 25px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'></div>
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="clear_both"></div>
</div>
</div>
</div>
{% if page_type == 'routes' %}
<div class="cut_width_f_curtain{% if page_type == 'profile' %}{% else %} n_profile{% endif %} left ">
<div class="menu_buttons curtain left open first filters" data-name="<img style='width: 20px;display: block;position: relative;bottom: 2;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'>">
{% include 'blocks/b_footer.html' %}
{% include "forms/f_find_route_filters_form.html" %}
<div class="handler_menu close" onclick="open_curtain_w_contacts()">
<img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="text_f_curtain left"><img style='width: 20px;display: block;position: relative;bottom: 2px;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'></div>
<img class="btns_f_curtain close right" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
<div class="clear_both"></div>
</div>
</div>
</div>
{% endif %}
<div class="wrapper_content {% if page.url == 'customer_service'%} m_h_0 {% elif page.url == 'contacts' %}m_h_0{% endif %}">
{% block content %}
{% endblock %}
<div class="clear_both"></div>
</div>
</div>
{% include 'blocks/b_footer.html' %}
</body>
</html>