add popander

This commit is contained in:
2022-12-29 07:23:18 +03:00
parent c022dc341d
commit f44ba2d6c7
6 changed files with 177 additions and 17 deletions

55
blocks/popunder.php Normal file
View 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
View 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?>

View File

@@ -70,17 +70,15 @@
<?if (LANG_VERSION == 'ru'):?>
<div class="right-info">
<a href=https://vetandlife.ru/sobytiya/obyavlyaetsya-konkurs-sredi-specialistov-press-sluzhb-tu-i-fgbu-rosselhoznadzora/">
<img src="https://vetandlife.ru/wp-content/uploads/2022/08/press_compete_240x400.jpg" width="240" height="400" />
<a href="https://vetandlife.ru/tag/конкурс-пресс-служб/">
<img src="https://vetandlife.ru/wp-content/uploads/2022/12/press_compete_240x400_3.jpg" width="240" height="400" />
</a>
</div>
<div class="right-info">
<a href="https://vetandlife.ru/parthers/fgbu-vgnki-provodit-obuchajushhie-meropriyatiya-dlya-razlichnyh-kategorij-specialistov-agropromyshlennogo-kompleksa/">
<img src="https://vetandlife.ru/wp-content/uploads/2022/11/vgnki_240x400_november.jpg" width="240" height="400" />
<a href=" https://vetandlife.ru/parthers/fgbu-vgnki-okazyvaet-uslugi-po-issledovaniju-kormov-i-kormovyh-dobavok/">
<img src="https://vetandlife.ru/wp-content/uploads/2022/12/vgnki_240x400_december.jpg" width="240" height="400" />
</a>
</div>
@@ -104,8 +102,10 @@
<?get_template_part( '/blocks/enmosts', null, ['subclass' => '']);?>
<?get_template_part( '/blocks/enmosts', null, ['subclass' => 'mob-lite']);?>
<?else:?>
<?get_template_part( '/blocks/mosts', null, ['subclass' => '']);?>
<?get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
<?//get_template_part( '/blocks/mosts', null, ['subclass' => '']);?>
<?//get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
<?include VIJ_CACHE.'top.html'?>
<?//include VIJ_CACHE.'top_mob.html'?>
<?endif?>
@@ -130,13 +130,15 @@
</a>
</div>
<?get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
<div class="mobile-info">
<a href="https://vetandlife.ru/sobytiya/obyavlyaetsya-konkurs-sredi-specialistov-press-sluzhb-tu-i-fgbu-rosselhoznadzora/" target="_blank">
<img src="https://vetandlife.ru/wp-content/uploads/2022/08/press_compete_240x200.jpg" width="240" height="200" />
</a>
</div>
<a href="https://vetandlife.ru/tag/конкурс-пресс-служб/">
<img src="https://vetandlife.ru/wp-content/uploads/2022/12/press_compete_240x200_3.jpg" width="240" height="200" />
</a>
</div>
<?//get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
<?include VIJ_CACHE.'top_mob.html'?>
<?get_template_part( '/blocks/enmosts', null, ['subclass' => 'mob-lite']);?>
<?endif?>
@@ -144,9 +146,12 @@
<?if (LANG_VERSION == 'ru'):?>
<div class="mobile-info">
<a href="https://vetandlife.ru/parthers/fgbu-vgnki-provodit-obuchajushhie-meropriyatiya-dlya-razlichnyh-kategorij-specialistov-agropromyshlennogo-kompleksa/" target="_blank">
<img src="https://vetandlife.ru/wp-content/uploads/2022/11/vgnki_240x200_november.jpg" width="240" height="200" />
<a href=" https://vetandlife.ru/parthers/fgbu-vgnki-okazyvaet-uslugi-po-issledovaniju-kormov-i-kormovyh-dobavok/" target="_blank">
<img src="https://vetandlife.ru/wp-content/uploads/2022/12/vgnki_240x200_december.jpg" width="240" height="200" />
</a>
</div>

View File

@@ -10,7 +10,7 @@
<?if (defined('TESTMODE') and TESTMODE == 1):?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=3">
<?else:?>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=328">
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=352">
<?endif?>
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
<!--<link href="<?php echo get_stylesheet_directory_uri()?>/pub/fontawesome.css" rel="stylesheet">-->

View File

@@ -74,6 +74,8 @@
<?php include get_template_directory().'/blocks/yets.php';?>
<?php include get_template_directory().'/blocks/popunder.php';?>
<div id="tags">
<?php the_tags();?>
</div>
@@ -95,4 +97,6 @@
<?php get_footer();?>

View File

@@ -2345,6 +2345,90 @@ span.rub_back_title{
}
#parent_subscript_win {
background-color: rgba(0, 0, 0, 0.8);
display: none;
position: fixed;
z-index: 99999;
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: center;
white-space: nowrap;
}
#subscript_win {
width: 90%;
max-width: 640px;
margin: 10% auto;
/* border: 1px solid #ff6900; */
position: relative;
/* -webkit-box-shadow: 0px 0px 20px #000; */
/* -moz-box-shadow: 0px 0px 20px #000; */
/* box-shadow: 0px 0px 20px #000; */
/* -webkit-border-radius: 15px; */
/* -moz-border-radius: 15px; */
/* border-radius: 15px; */
}
#close_win {
background-color: rgba(0, 0, 0, 0.8);
height: 32px;
line-height: 32px;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
font-weight: bold;
text-align: center;
text-decoration: none;
color: rgba(255, 255, 255, 0.9);
font-size: 18px;
text-shadow: 0 -1px rgba(0, 0, 0, 0.9);
width: 32px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.fixed-overlay {
position: fixed;
overflow: auto;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.fixed-overlay__modal {
text-align: center;
white-space: nowrap;
}
.fixed-overlay__modal::after {
display: inline-block;
vertical-align: middle;
width: 0;
height: 100%;
content: '';
}
.modal {
display: inline-block;
vertical-align: middle;
}
.modal_container {
margin: 50px;
text-align: left;
white-space: normal;
color: #000;
}
@media screen and ( max-width: 580px ) {
#left{