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

View File

@@ -10,6 +10,7 @@
{% include "inter/meta_names.html" %} {% include "inter/meta_names.html" %}
{# <script src='{% static "js/jquery_v3_6_4.js" %}'> </script>#} {# <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/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_js.js" %}"></script>
<script type="text/javascript" src="{% static "js/moment-with-locales.js" %}"></script> <script type="text/javascript" src="{% static "js/moment-with-locales.js" %}"></script>
@@ -53,9 +54,19 @@
{% block meta %} {% block meta %}
{% endblock %} {% endblock %}
</head> </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> <body{% if page_type == 'routes' %} onscroll="scroll_ev(event,this)"{% endif %}>
<div class="wrapper_main"> {% if page_type != 'routes' %}
<script>
let body = document.querySelector("body")
body.style.display = 'none'
body.style.transition = '1000ms'
</script>
{% 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">
{% include 'blocks/b_header.html' %} {% include 'blocks/b_header.html' %}
@@ -93,10 +104,11 @@
<div class="clear_both"></div> <div class="clear_both"></div>
</div> </div>
</div> </div>
{% include 'blocks/b_footer.html' %} {% include 'blocks/b_footer.html' %}
</body> </body>
</html> </html>