add pets test

This commit is contained in:
2023-12-22 22:28:05 +03:00
parent 44ef31d4eb
commit e7fa783a51
7 changed files with 634 additions and 4 deletions

99
blocks/header-pets.php Normal file

File diff suppressed because one or more lines are too long

331
footer-pets.php Normal file

File diff suppressed because one or more lines are too long

View File

@@ -23,6 +23,12 @@ require ABSPATH.'/vendor/autoload.php';
//wp_clear_scheduled_hook( 'wp_update_plugins' ); //wp_clear_scheduled_hook( 'wp_update_plugins' );
add_action( 'after_setup_theme', function(){
if ( !is_admin() )
show_admin_bar( false );
});
#отключаем эмодзи #отключаем эмодзи
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );

85
page-test.php Normal file
View File

@@ -0,0 +1,85 @@
<?php
/**
* The main template file.
*
*/
define('TESTMODE', 1);
get_header('pets');
$nn = 0;?>
<div id="content">
<ul id="nav_content">
<li><a href="<?=get_home_url()?>">Главная</a></li>
<li> - <?single_cat_title()?></li>
</ul>
<h1 class="my-4"><?single_cat_title()?></h1>
<?php if(have_posts()) : while(have_posts()) : the_post();?>
<?$nn++;?>
<?if ($nn == 1):?>
<div class="main-card">
<?if ( has_post_thumbnail() ) :?>
<div class="card-img-top">
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>">
<?if( has_tag( 'видео' ) ):?>
<span class="play-card"></span>
<?endif?>
</a>
</div>
<?endif?>
<h2 class="main-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="main-card-body">
<div class="main-card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></div>
<div class="news_date"><?the_time('j F Y, G:i');?></div>
</div>
</div>
<?elseif ($nn == 2):?>
<div class="mini-card-block">
<?endif?>
<?if ($nn > 1):?>
<div class="mini-card">
<?if ( has_post_thumbnail() ) :?>
<div class="mini-card-img">
<?$imgurl = IMGSERVER.'news/512x340/'.str_replace('https://vetandlife.ru/wp-content/uploads/', '', get_the_post_thumbnail_url(null, 'full'))?>
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo $imgurl; ?>" alt="<?the_title();?>">
<?if( has_tag( 'видео' ) ):?>
<span class="play-card"></span>
<?endif?>
</a>
</div>
<?endif?>
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="mini-card-body">
<div class="news_date"><?the_time('j F Y, G:i');?></div>
</div>
</div>
<?endif?>
<?php endwhile;?>
</div> <!--//end minicard block -->
<?else:?>
Здесь пока нет публикаций
<?php endif;?>
<?get_template_part( '/blocks/paginator');?>
</div>
<?php get_footer( 'pets' ); ?>

104
pub/css/pets.css Normal file
View File

@@ -0,0 +1,104 @@
.header-pets{
background-color: #000;
display: flex;
align-items: center;
gap: 15px;
box-shadow: 0px 4px 53px rgba(0, 0, 0, 0.07);
margin-right: 12px;
width: 100%;
height: 100px;
}
#petslogo{
max-width: 200px;
left: 0;
top: 0;
margin: 0 0 0 22px;
padding: 0;
}
.pets-dog{
width: 163px;
height: 125px;
flex-shrink: 0;
margin-top: -24px;
}
ul.menu_main_pets{
display: flex;
padding: 5px;
}
ul.menu_main_pets li{
margin: 5px;
padding: 15px;
font-weight: bold;
font-size: 15px;
}
ul.menu_main_pets li a{
color: #FFF;
}
ul.menu_main_pets li a:hover{
color: #FFF;
}
.head-tel-pets a{
color: #FFF;
}
.head-mail-pets a{
color: #F57825;
}
.btn-search-pets{
background: url(/wp-content/themes/vij/pub/icons/lupa-pets.svg) no-repeat;
}
.btn-rss-pets{
background: url(/wp-content/themes/vij/pub/icons/rss-pets.svg) no-repeat;
}
.header-social-pets{
display: flex;
align-items: center;
padding: 5px;
gap: 40px;
}
.footer-info-pets{
display: flex;
margin-bottom: 8px;
border-top: 1px solid #D5D5D6;
border-bottom: 1px solid #D5D5D6;
margin-bottom: 28px;
padding-top: 28px;
padding-bottom: 28px;
padding-left: 12px;
align-items: center;
justify-content: center;
gap: 60px;
}
.footer-mail a{
color: #F57825;
}
.socials-footer-pets{
display: inline-flex;
align-items: flex-start;
gap: 40px;
}

View File

@@ -51,7 +51,7 @@
<?the_content();?> <?the_content();?>
</div> </div>
<div class="promo-agregators"> <div class="promo-agregators" style="text-align: center;">
<p>Читайте нас в <span class="promo-telega"><a href="https://t.me/ViZHuvizh" target="_blank">Telegram</a></span></p> <p>Читайте нас в <span class="promo-telega"><a href="https://t.me/ViZHuvizh" target="_blank">Telegram</a></span></p>
</div> </div>

View File

@@ -106,7 +106,6 @@ a{
order: -1; order: -1;
} }
#mainbanner{ #mainbanner{
width: 100%; width: 100%;
display: block; display: block;
@@ -405,6 +404,8 @@ a{
} }
#footer_menu{ #footer_menu{
display: flex; display: flex;
align-items: center; align-items: center;
@@ -838,6 +839,10 @@ a{
} }
ul.menu_main{ ul.menu_main{
display: flex; display: flex;
padding: 5px; padding: 5px;
@@ -1075,11 +1080,11 @@ a{
/*fill: #3B83B5;*/ /*fill: #3B83B5;*/
} }
a svg:hover, /* a svg:hover,
a svg:focus a svg:focus
{ {
stroke: #F18129; stroke: #F18129;
} } */
ul.menu_footer{ ul.menu_footer{