add mobile archive
This commit is contained in:
54
blocks/mobile-gazeta.php
Normal file
54
blocks/mobile-gazeta.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$posts = get_posts( array(
|
||||||
|
'numberposts' => 1,
|
||||||
|
'category' => 3, // 19 - архив газеты
|
||||||
|
'orderby' => 'date',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'include' => array(),
|
||||||
|
'exclude' => array(),
|
||||||
|
'meta_key' => '',
|
||||||
|
'meta_value' =>'',
|
||||||
|
'post_type' => 'post',
|
||||||
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||||
|
) );
|
||||||
|
|
||||||
|
# вывод поста
|
||||||
|
if( $posts ):
|
||||||
|
|
||||||
|
foreach($posts as $post):
|
||||||
|
setup_postdata( $post );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="mobile_archive">
|
||||||
|
<a href="<?php the_permalink(); ?>"><img width="91" class="mobile_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a>
|
||||||
|
<div class="mobile_archive_text">
|
||||||
|
<div><strong><a href="<?php the_permalink(); ?>">Читать газету<br>«Ветеринария и Жизнь»</a></strong></div>
|
||||||
|
<div class="mobile_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php endforeach;
|
||||||
|
|
||||||
|
wp_reset_postdata();
|
||||||
|
|
||||||
|
endif;?>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="mob-subscript">
|
||||||
|
|
||||||
|
<div class="mob-block-button">
|
||||||
|
<a class="mob-sub-button" href="https://vetandlife.ru/subscripts">Газета ВиЖ. Оформить подписку</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="right_title">Подпишитесь на нашу рассылку и будьте в курсе всех новостей</div>
|
||||||
|
<div id="subscript-mail">
|
||||||
|
<form class="form-right" action="https://login.sendpulse.com/forms/simple/u/eyJ1c2VyX2lkIjo3NjMwNTYzLCJhZGRyZXNzX2Jvb2tfaWQiOjIyNjM5NCwibGFuZyI6InJ1In0=" method="post">
|
||||||
|
<input сlass="frm_mail" type="email" required="" name="email" placeholder="Ваша почта">
|
||||||
|
<input type="hidden" name="sender" value="info@vetandlife.ru">
|
||||||
|
<button class="frm_submit">Подписаться</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -81,6 +81,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php get_template_part( '/blocks/zakons');?>
|
<?php get_template_part( '/blocks/zakons');?>
|
||||||
<?php //include VIJ_CACHE.'zakons.html';?>
|
<?php //include VIJ_CACHE.'zakons.html';?>
|
||||||
|
|
||||||
@@ -88,6 +90,11 @@
|
|||||||
<?php include VIJ_CACHE.'mosts.html';?>
|
<?php include VIJ_CACHE.'mosts.html';?>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end main -->
|
</div><!-- end main -->
|
||||||
|
|
||||||
|
<?php include get_template_directory().'/blocks/mobile-gazeta.php';?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
|
||||||
<div id="footer_menu">
|
<div id="footer_menu">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
|
<title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
|
||||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=72">
|
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=75">
|
||||||
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
||||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
|
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
|
||||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script>
|
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script>
|
||||||
|
|||||||
115
style.css
115
style.css
@@ -419,16 +419,19 @@ a{
|
|||||||
border-radius: 55px;
|
border-radius: 55px;
|
||||||
border: 1px solid #F18129;
|
border: 1px solid #F18129;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 20px 28px;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: inline-block;
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 110%;
|
line-height: 110%;
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
height: 55px;
|
height: 55px;
|
||||||
|
padding-left: 22px;
|
||||||
|
padding-right: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vazh{
|
.vazh{
|
||||||
@@ -1088,6 +1091,34 @@ a{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mobile_archive{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mobile_archive_img{
|
||||||
|
margin-top: -42px;
|
||||||
|
margin-left: 12px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
width: 91px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile_archive_text{
|
||||||
|
display: block;
|
||||||
|
margin-left: 12px;
|
||||||
|
margin-bottom: 22px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile_archive_link{
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile_archive_link a{
|
||||||
|
color: #909294;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#nav_content{
|
#nav_content{
|
||||||
display: flex;
|
display: flex;
|
||||||
padding:0;
|
padding:0;
|
||||||
@@ -1770,8 +1801,41 @@ img-fluid{
|
|||||||
border-bottom: 3px solid #F18129;
|
border-bottom: 3px solid #F18129;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mob-subscript{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mob-block-button{
|
||||||
|
margin: 12px 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.mob-sub-button{
|
||||||
|
background: #F18129;
|
||||||
|
border-radius: 55px;
|
||||||
|
border: 1px solid #F18129;
|
||||||
|
color: white;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 110%;
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 55px;
|
||||||
|
padding-left: 22px;
|
||||||
|
padding-right: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#mob-footer{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and ( max-width: 580px ) {
|
@media screen and ( max-width: 580px ) {
|
||||||
|
|
||||||
#left{
|
#left{
|
||||||
@@ -2009,6 +2073,28 @@ img-fluid{
|
|||||||
margin-top: 22px;
|
margin-top: 22px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobile_archive{
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
border: 1px solid #F18129;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 12px;
|
||||||
|
margin-right: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mob-subscript{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2068,6 +2154,7 @@ and (max-device-width : 667px) {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.menu-rubrics{
|
.menu-rubrics{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -2076,6 +2163,30 @@ and (max-device-width : 667px) {
|
|||||||
margin-right: 22px;
|
margin-right: 22px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mobile_archive{
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
border: 1px solid #F18129;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 12px;
|
||||||
|
margin-right: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mob-subscript{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user