From c02c74759811c78d1c669805434ccf1709704529 Mon Sep 17 00:00:00 2001 From: artweb-job Date: Tue, 28 Aug 2018 12:36:38 +0300 Subject: [PATCH] cookies --- common/messages/ru/app.php | 1 + common/messages/ua/app.php | 2 +- frontend/views/layouts/main.php | 16 +++++++++++++++- frontend/web/css/main.css | 46 ++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/img/ico-a-6.png | Bin 0 -> 166 bytes frontend/web/js/script.js | 6 +++++- 6 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 frontend/web/img/ico-a-6.png diff --git a/common/messages/ru/app.php b/common/messages/ru/app.php index 01f8d3b..92da82b 100755 --- a/common/messages/ru/app.php +++ b/common/messages/ru/app.php @@ -333,5 +333,6 @@ return [ 'wrongEmail'=>'Некорректное значение поля «Email» ', 'wrongName'=>'Имя может состоять только из латинских или кириллических символов', 'requiredField'=>'Данное поле является обязательным для заполнения', + 'cookie-text' => 'На нашем сайте используются файлы cookie. Пожалуйста, ознакомьтесь с политикой о конфиденциальности', ]; \ No newline at end of file diff --git a/common/messages/ua/app.php b/common/messages/ua/app.php index 6161de5..36a0409 100755 --- a/common/messages/ua/app.php +++ b/common/messages/ua/app.php @@ -336,6 +336,6 @@ return [ 'wrongName'=>'Ім\'я може складатися тільки з латинських і кириличних символів', 'requiredField'=>'Дане поле є обов\'язковим для заповнення', - + 'cookie-text' => 'На нашому сайті використовуються файли cookie. Будь ласка, ознайомтесь з політикою конфіденційності', ]; \ No newline at end of file diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index eb5fd41..0706d70 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -777,7 +777,21 @@ - + + diff --git a/frontend/web/css/main.css b/frontend/web/css/main.css index 1dcaa89..48ef04b 100755 --- a/frontend/web/css/main.css +++ b/frontend/web/css/main.css @@ -1078,4 +1078,50 @@ p.error-text{ } @media(max-width:275px){ .head_video_buttons .button1, .head_video_buttons .button2{width: 100%!important;} +} + + + +.cookie-modal { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + background: #0080ca; + color: #fff; + padding: 7px 0; + text-align: center; + z-index: 8; +} +.cookie-modal.hide-bl { + display: none; +} +.cokeis-close { + position: absolute; + width: 40px; + height: 40px; + cursor: pointer; + top: -7px; + right: 4px; +} + +.cokeis-close:before { + width: 32px; + height: 32px; + text-align: center; + font-size: 16px; + content: ""; + background: url(../img/ico-a-6.png) 50% 50% no-repeat; + display: block; +} + +.cookie-modal p { + padding: 0 18px; + margin: 0; + font-size: 13px; +} + +.cookie-modal a { + color: inherit; + text-decoration: underline; } \ No newline at end of file diff --git a/frontend/web/img/ico-a-6.png b/frontend/web/img/ico-a-6.png new file mode 100644 index 0000000..4c23e7b Binary files /dev/null and b/frontend/web/img/ico-a-6.png differ diff --git a/frontend/web/js/script.js b/frontend/web/js/script.js index eef1a56..3e10b08 100755 --- a/frontend/web/js/script.js +++ b/frontend/web/js/script.js @@ -170,7 +170,11 @@ $( - + $('body').on('click','.cokeis-close',function () { + $('.cookie-modal').addClass('hide-bl'); + var date = new Date(new Date().getTime() + 48 * 60 * 60 * 1000); + document.cookie = "sowCookieModal=1; path=/; expires=" + date.toUTCString(); + }) } -- libgit2 0.21.4