diff --git a/static/js/global_js.js b/static/js/global_js.js index bb1727e..1dec95b 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -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) { diff --git a/templates/tb_base.html b/templates/tb_base.html index d47fa20..b5fe358 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -10,6 +10,7 @@ {% include "inter/meta_names.html" %} {# #} + @@ -53,50 +54,61 @@ {% block meta %} {% endblock %} -
- -