diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 51c8f8b..ac29948 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -2910,4 +2910,44 @@ .handler_curtain_left{ display: none; +} + +/*cookie*/ + +.cookie_block{ + background: #000000; + width: 50%; + position: fixed; + bottom: 5px; + z-index: 100000000000000; + box-sizing: border-box; + display: none; +} + +.cookie_block.show{ + display: block; +} + +.txt_cookie{ + color: #FFFFFF; + font-size: 14px; +} +.a_cookie{ + color: #FFFFFF; + font-size: 14px; +} + +.container_content_cookie_block{ + display: flex; + justify-content: space-between; + padding: 15px; +} + +.cookie_btn{ + background: none; + border: 2px solid white; + color: #FFFFFF; + height: 25px; + width: 95px; + cursor: pointer; } \ No newline at end of file diff --git a/static/js/global_js.js b/static/js/global_js.js index 3cc86ba..e84c88f 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -11,6 +11,7 @@ window.onload = function (){ middleWareJS() openOrCloseCurtainSupportChat() openOverlayOrClose() + checkStateCookie() } // @@ -151,3 +152,17 @@ function scroll_ev (event,el){ } } +function checkStateCookie () { + if (window.document.cookie.includes("allow_cookie=true")){ + document.querySelector(".cookie_block").classList.remove("show") + } +} + +function setCokie () { + let date = new Date(); + let days = 182; + date.setTime(+ date + (days * 86400000)); + window.document.cookie = "allow_cookie=true" + "; expires=" + date.toGMTString() + "; path=/"; + document.querySelector(".cookie_block").classList.remove("show") + return value; +} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 1ea0ba6..56760a6 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -59,6 +59,14 @@
+ {% if page_type != 'routes' %}