add popander
This commit is contained in:
55
blocks/popunder.php
Normal file
55
blocks/popunder.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<div id="parent_subscript_win"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var vij_win_cookie = 'vij_win_cookie';
|
||||
var subscript_win = document.getElementById('parent_subscript_win');
|
||||
|
||||
vijCookie = getWinVijCookie();
|
||||
|
||||
if (vijCookie != 1){
|
||||
getWinVij();
|
||||
}
|
||||
|
||||
|
||||
function getWinVij(){
|
||||
|
||||
var subscript_win = document.getElementById('parent_subscript_win');
|
||||
var delay_popup = 5000;
|
||||
|
||||
subscript_win.innerHTML = '<div id="fixed-overlay" class="fixed-overlay fixed-overlay__modal">\n'+
|
||||
'<div id="close_win" title="Закрыть">X</div>\n'+
|
||||
'<div class="modal">\n'+
|
||||
'<div class="modal_container">\n'+
|
||||
'<a href="https://vetandlife.ru/akcija-dlja-reklamodatelej/">\n'+
|
||||
' <img style="width: 100%" src="https://vetandlife.ru/wp-content/uploads/2022/12/hot_red.gif">\n'+
|
||||
'</a>'+
|
||||
'</div>\n'+
|
||||
'</div>\n'+
|
||||
'</div>';
|
||||
|
||||
subscript_win.style.display='block';
|
||||
document.cookie = vij_win_cookie + " = 1; max-age =" + 7 * 24 * 60 * 60 + "; path=/";
|
||||
|
||||
setTimeout("subscript_win.style.display='none'", delay_popup);
|
||||
|
||||
document.getElementById('close_win').addEventListener("click", function(){
|
||||
subscript_win.style.display='none';
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getWinVijCookie() {
|
||||
|
||||
var matches = document.cookie.match(new RegExp(
|
||||
"(?:^|; )" + vij_win_cookie.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
|
||||
));
|
||||
return matches ? decodeURIComponent(matches[1]) : undefined;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
12
blocks/top.php
Normal file
12
blocks/top.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?if(isset($items)):?>
|
||||
|
||||
<div class="mosts<?if ($subclass !== '') echo ' '.$subclass;?>">
|
||||
<h3 class="most_title">Самое читаемое</h3>
|
||||
|
||||
<?php foreach($items as $item):?>
|
||||
<div class="most"><a href="<?=$item['link']; ?>"><?=$item['title']?></a></div>
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
Reference in New Issue
Block a user