Commit c02c74759811c78d1c669805434ccf1709704529
1 parent
d7d7bba1
cookies
Showing
6 changed files
with
68 additions
and
3 deletions
Show diff stats
common/messages/ru/app.php
... | ... | @@ -333,5 +333,6 @@ return [ |
333 | 333 | 'wrongEmail'=>'Некорректное значение поля «Email» ', |
334 | 334 | 'wrongName'=>'Имя может состоять только из латинских или кириллических символов', |
335 | 335 | 'requiredField'=>'Данное поле является обязательным для заполнения', |
336 | + 'cookie-text' => 'На нашем сайте используются файлы cookie. Пожалуйста, ознакомьтесь с <a href="#">политикой о конфиденциальности</a>', | |
336 | 337 | |
337 | 338 | ]; |
338 | 339 | \ No newline at end of file | ... | ... |
common/messages/ua/app.php
... | ... | @@ -336,6 +336,6 @@ return [ |
336 | 336 | 'wrongName'=>'Ім\'я може складатися тільки з латинських і кириличних символів', |
337 | 337 | 'requiredField'=>'Дане поле є обов\'язковим для заповнення', |
338 | 338 | |
339 | - | |
339 | + 'cookie-text' => 'На нашому сайті використовуються файли cookie. Будь ласка, ознайомтесь з <a href="#">політикою конфіденційності</a>', | |
340 | 340 | |
341 | 341 | ]; |
342 | 342 | \ No newline at end of file | ... | ... |
frontend/views/layouts/main.php
... | ... | @@ -777,7 +777,21 @@ |
777 | 777 | <!-- *** FOOTER END *** --> |
778 | 778 | |
779 | 779 | <span id="back-to-top" title="<?=\Yii::t('app', 'Back to top')?>"><i class="fa fa-arrow-up"></i></span> |
780 | - | |
780 | + | |
781 | + <div class="cookie-modal"> | |
782 | + <div class="container"> | |
783 | + <div class="row"> | |
784 | + <div class="col-xs-12"> | |
785 | + <div class="cokeis-close"></div> | |
786 | + <p> | |
787 | + <?php | |
788 | + echo \Yii::t('app', 'cookie-text') | |
789 | + ?> | |
790 | + </p> | |
791 | + </div> | |
792 | + </div> | |
793 | + </div> | |
794 | + </div> | |
781 | 795 | </div> |
782 | 796 | <script id="dsq-count-scr" src="//http-t13-artweb-com-ua.disqus.com/count.js" async></script> |
783 | 797 | <!-- <script id="dsq-count-scr" src="//new-kbenergy-test.disqus.com/count.js" async></script>--> | ... | ... |
frontend/web/css/main.css
... | ... | @@ -1078,4 +1078,50 @@ p.error-text{ |
1078 | 1078 | } |
1079 | 1079 | @media(max-width:275px){ |
1080 | 1080 | .head_video_buttons .button1, .head_video_buttons .button2{width: 100%!important;} |
1081 | +} | |
1082 | + | |
1083 | + | |
1084 | + | |
1085 | +.cookie-modal { | |
1086 | + position: fixed; | |
1087 | + left: 0; | |
1088 | + bottom: 0; | |
1089 | + width: 100%; | |
1090 | + background: #0080ca; | |
1091 | + color: #fff; | |
1092 | + padding: 7px 0; | |
1093 | + text-align: center; | |
1094 | + z-index: 8; | |
1095 | +} | |
1096 | +.cookie-modal.hide-bl { | |
1097 | + display: none; | |
1098 | +} | |
1099 | +.cokeis-close { | |
1100 | + position: absolute; | |
1101 | + width: 40px; | |
1102 | + height: 40px; | |
1103 | + cursor: pointer; | |
1104 | + top: -7px; | |
1105 | + right: 4px; | |
1106 | +} | |
1107 | + | |
1108 | +.cokeis-close:before { | |
1109 | + width: 32px; | |
1110 | + height: 32px; | |
1111 | + text-align: center; | |
1112 | + font-size: 16px; | |
1113 | + content: ""; | |
1114 | + background: url(../img/ico-a-6.png) 50% 50% no-repeat; | |
1115 | + display: block; | |
1116 | +} | |
1117 | + | |
1118 | +.cookie-modal p { | |
1119 | + padding: 0 18px; | |
1120 | + margin: 0; | |
1121 | + font-size: 13px; | |
1122 | +} | |
1123 | + | |
1124 | +.cookie-modal a { | |
1125 | + color: inherit; | |
1126 | + text-decoration: underline; | |
1081 | 1127 | } |
1082 | 1128 | \ No newline at end of file | ... | ... |
166 Bytes
frontend/web/js/script.js
... | ... | @@ -170,7 +170,11 @@ $( |
170 | 170 | |
171 | 171 | |
172 | 172 | |
173 | - | |
173 | + $('body').on('click','.cokeis-close',function () { | |
174 | + $('.cookie-modal').addClass('hide-bl'); | |
175 | + var date = new Date(new Date().getTime() + 48 * 60 * 60 * 1000); | |
176 | + document.cookie = "sowCookieModal=1; path=/; expires=" + date.toUTCString(); | |
177 | + }) | |
174 | 178 | |
175 | 179 | } |
176 | 180 | ... | ... |