Перейдите в шаблон HTML и найдите код открывающегося тега <body>.
Сразу после него добавьте код:
<noindex> <div id="check" style="display:none;"> <div class="checkContent"> <div class="checkWrp"> <div class="checkHeader">Заголовок</div> <div class="checkText active"> Содержание</div> <div class="checkButtonsContainer"> <div class="checkButton button">Спасибо!</div> </div> </div> </div> </div> </noindex>
Где задайте заголовок и требуемый для вывода текст.
Найдите в шаблоне main.css (или style.css) код начала адаптивности:
/****************************************************************************** Адаптивная часть *******************************************************************************/
И добавьте перед ним код:
/*Всплывающее окно*/ #check{width:100%;height:100%;position:fixed;left:0;top:0;flex-wrap:wrap;display:flex;align-items:center;background:rgba(138,164,193,0.9);z-index:10000;overflow-y:auto;} #check .checkContent{background: #fff;width:90%;max-height:80%;margin:0 auto;overflow:hidden;max-width:810px;padding:40px;position:relative;text-align:center;} #check .checkContent .checkWrp{max-height:500px;overflow:hidden;overflow-y:auto;} #check .checkContent .checkWrp .checkHeader{font-size:30px;color:#2e0041;line-height:64px;margin-bottom:20px;} #check .checkContent .checkWrp .checkText{font-size:14px;color:#2e0041;margin-bottom:40px;line-height:24px;display:none;} #check .checkContent .checkWrp .checkText.active{display:block;} #check .checkContent .checkWrp .checkButtonsContainer{display:flex;flex-wrap:wrap;justify-content:center;}
В шаблоне main.js добавьте в самом конце код:
$(function(){ $('.checkButton').on('click',function(){ $('#check').remove(); }) }) // Баннер уведомления $(function(){ function сounter() { // Если в куках нет записи if(!$.cookie('check')){ var check = $('#check'); // Показываем баннер check.show(); $('.checkButton').on('click', function(){ // Скрываем баннер check.hide() // Запоминаем в куках, что посетитель уже заходил $.cookie('check', true, { // Время хранения cookie в днях expires: 1, path: '/' }); }) } } сounter(); })
Так же проверьте, чтобы в шаблоне forall.js у Вас был код библиотеки jQuery Cookie, если его там нет, то добавьте в самом конце:
/* * name: jQuery Cookie * version: 1.0 * file: jquery.cookie.min.js * site: https://webcareer.ru/jquery-cookies-rabota-s-kukami-na-jquery.html */ jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};