add vystavki
This commit is contained in:
28
404.php
Normal file
28
404.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The main template file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1 id="title-404">404<br>Страница не найдена</h1>
|
||||||
|
|
||||||
|
<p><br>Посмотрите другие материалы или воспользуйтесь поиском<br><br></p>
|
||||||
|
|
||||||
|
<div id="search-form">
|
||||||
|
<form action="<?php bloginfo( 'url' ); ?>" method="get">
|
||||||
|
<input class="search-text" type="text" name="s" placeholder="<?=$s?>" value=""/>
|
||||||
|
<input class="search_submit" type="submit" value="Найти"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
||||||
58
category-vystavki-i-konferenitsii.php
Normal file
58
category-vystavki-i-konferenitsii.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The main template file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
$nn = 0;?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<ul id="nav_content">
|
||||||
|
<li><a href="http://beta.vetandlife.ru">Главная</li>
|
||||||
|
<li> - <?single_cat_title()?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1 class="my-4"><?=single_cat_title()?></h1>
|
||||||
|
|
||||||
|
<?php if(have_posts()) :?>
|
||||||
|
<div class="search-card-box">
|
||||||
|
|
||||||
|
<?php while(have_posts()) : the_post();?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="search-card">
|
||||||
|
|
||||||
|
<div class="search-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></div>
|
||||||
|
<?if ( has_post_thumbnail() ) :?>
|
||||||
|
<img class="search-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" width="180" alt="<?the_title();?>">
|
||||||
|
<?endif?>
|
||||||
|
<div><?the_excerpt();?></div>
|
||||||
|
<div class="mini-card-body">
|
||||||
|
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php endwhile;?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?get_template_part( '/blocks/paginator');?>
|
||||||
|
|
||||||
|
|
||||||
|
<?else:?>
|
||||||
|
|
||||||
|
Здесь пока нет публикаций
|
||||||
|
|
||||||
|
<?php endif;?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
||||||
@@ -36,6 +36,24 @@ function mob_block($template){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//свой шаблон для категории
|
||||||
|
add_filter( 'single_template', function ( $single_template ) {
|
||||||
|
|
||||||
|
|
||||||
|
foreach( (array) get_the_category() as $cat ) {
|
||||||
|
|
||||||
|
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") )
|
||||||
|
return TEMPLATEPATH . "/single-{$cat->slug}.php";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $single_template;
|
||||||
|
|
||||||
|
|
||||||
|
}, PHP_INT_MAX, 2 );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function kuri_set($name = null, $value = null) {
|
function kuri_set($name = null, $value = null) {
|
||||||
|
|
||||||
static $vars = array();
|
static $vars = array();
|
||||||
|
|||||||
10
header.php
10
header.php
@@ -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');?></title>
|
<title><?php wp_title('|', true, 'right');?></title>
|
||||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=10">
|
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=11">
|
||||||
<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>
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
|
||||||
<div id="mainlogo">
|
<div id="mainlogo">
|
||||||
|
<a href="<?php echo home_url(); ?>"><img src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij-logo-220.png" alt = "Ветеринария и жизнь. Газета и сайт" /></a>
|
||||||
<a href="<?php echo home_url(); ?>"><img src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij-logo-220.png" alt = "Ветеринария и жизнь. Газета и сайт" /></a>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div id="mainmenu">
|
<div id="mainmenu">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
18
search.php
18
search.php
@@ -41,29 +41,29 @@ endif;
|
|||||||
wp_reset_query(); ?></p>
|
wp_reset_query(); ?></p>
|
||||||
|
|
||||||
<?php if(have_posts()) :?>
|
<?php if(have_posts()) :?>
|
||||||
|
<div class="search-card-box">
|
||||||
|
|
||||||
<div class="mini-card-block">
|
|
||||||
<?php while(have_posts()) : the_post();?>
|
<?php while(have_posts()) : the_post();?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="mini-card">
|
<div class="search-card">
|
||||||
<?if ( has_post_thumbnail() ) :?>
|
|
||||||
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
|
<div class="search-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></div>
|
||||||
|
<?if ( has_post_thumbnail() ) :?>
|
||||||
|
<img class="search-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" width="239" alt="<?the_title();?>">
|
||||||
<?endif?>
|
<?endif?>
|
||||||
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
<div><?the_excerpt();?></div>
|
||||||
<div class="mini-card-body">
|
<div class="mini-card-body">
|
||||||
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
<div class="news_date"><?the_time('j F Y, G:i');?></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php endwhile;?>
|
<?php endwhile;?>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?get_template_part( '/blocks/paginator');?>
|
<?get_template_part( '/blocks/paginator');?>
|
||||||
|
|
||||||
|
|||||||
74
single-vystavki-i-konferenitsii.php
Normal file
74
single-vystavki-i-konferenitsii.php
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?php get_header();?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?//while(have_posts()):?>
|
||||||
|
<?the_post();?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php $category = get_the_category();
|
||||||
|
$category_id = $category[0]->term_id;
|
||||||
|
$category_link = get_category_link($category_id);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul id="nav_content">
|
||||||
|
<li><a href="http://beta.vetandlife.ru">Главная</li>
|
||||||
|
<li>-<li>
|
||||||
|
<li><a href="<?=$category_link?>"><?=$category['0']->name;?></a></li>
|
||||||
|
<li>-<li>
|
||||||
|
<li><?=mb_substr(get_the_title(), 0, 50);?>...</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="post_info">
|
||||||
|
<div class="post_info_sub">
|
||||||
|
<span class="post_link_category"><a href="<?=$category_link?>"><?=$category['0']->name;?></a></span>, <?php the_time('j F Y, G:i');?>
|
||||||
|
</div>
|
||||||
|
<div class="post_info_sub post_info_social">
|
||||||
|
<i class="fab fa-vk btn_soc_post"></i> <i class="fab fa-facebook-square btn_soc_post"></i> <i class="fab fa-telegram-plane btn_soc_post"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1 class="post-h1"><?php wp_title('');?></h1>
|
||||||
|
<?$author = get_the_author();
|
||||||
|
if ( ! empty ( $author ) AND $author !== 'vetandlife.ru'):?>
|
||||||
|
<div class="post_author">
|
||||||
|
Автор: <?php the_author(); ?>
|
||||||
|
</div>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<?if ( has_post_thumbnail() ) :?>
|
||||||
|
<div id="event-img">
|
||||||
|
<img class="img-fluid rounded" width="180" src="<?php echo get_the_post_thumbnail_url(null, 'full');?>" alt="<?the_title();?>">
|
||||||
|
</div>
|
||||||
|
<?endif?>
|
||||||
|
<div><?the_content();?></div>
|
||||||
|
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
|
||||||
|
<?//endwhile;?>
|
||||||
|
|
||||||
|
<?php include get_template_directory().'/blocks/yets.php';?>
|
||||||
|
|
||||||
|
<div id="tags">
|
||||||
|
<?php the_tags();?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="post_panel_info">
|
||||||
|
<div class="post_panel_info_sub">
|
||||||
|
<span class="post_link_category"><a href="<?=$category_link?>"><?=$category['0']->name;?></a></span>, <?php the_time('j F Y, G:i');?>
|
||||||
|
</div>
|
||||||
|
<div class="post_panel_info_sub">
|
||||||
|
<!--Поделиться <i class="fas fa-share-square btn_soc_post"></i>--> <i class="fab fa-vk btn_soc_post"></i> <i class="fab fa-facebook-square btn_soc_post"></i> <i class="fab fa-telegram-plane btn_soc_post"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php include get_template_directory().'/blocks/moread.php';?>
|
||||||
|
|
||||||
|
<div class="publ-to-main"><a href="http://beta.vetandlife.ru"> <span class="arrow-go-main"><</span> <span class="go-to-main">На главную</span></a></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php get_footer();?>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="post_img_title"><?the_post_thumbnail_caption()?></div>
|
<div class="post_img_title"><?the_post_thumbnail_caption()?></div>
|
||||||
<?endif?>
|
<?endif?>
|
||||||
<?the_content();?>
|
<div><?the_content();?></div>
|
||||||
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
|
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
|
||||||
<?//endwhile;?>
|
<?//endwhile;?>
|
||||||
|
|
||||||
|
|||||||
80
style.css
80
style.css
@@ -127,21 +127,24 @@ a{
|
|||||||
height: 130px;
|
height: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mainlogo{
|
||||||
|
margin-left: 12px;
|
||||||
|
min-width: 340px;
|
||||||
|
}
|
||||||
|
|
||||||
.wrap{
|
.wrap{
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(0%, 0%);
|
||||||
width: 0px;
|
width: 0px;
|
||||||
height: 55px;
|
|
||||||
line-height: 55px;
|
line-height: 55px;
|
||||||
border-radius: 35px;
|
border-radius: 35px;
|
||||||
background: #F2F2F2;
|
background: #F2F2F2;
|
||||||
/*transition: all 0.5s ease;
|
/*transition: all 0.5s ease;
|
||||||
box-shadow: 0 0 10px rgba(0,0,0,0.5);
|
box-shadow: 0 0 10px rgba(0,0,0,0.5);
|
||||||
transition: all 0.5s ease;*/
|
transition: all 0.5s ease;*/
|
||||||
align-items: center;
|
/* align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 55px;
|
/* margin-top: 55px;
|
||||||
margin-left: 35px;
|
margin-left: 35px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.input{
|
.input{
|
||||||
@@ -152,20 +155,21 @@ a{
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: black;
|
color: black;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
margin-left: 12px;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap .fa{
|
.wrap .fa{
|
||||||
color: black;
|
color: black;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 17px;
|
right: 17px;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap.active{
|
.wrap.active{
|
||||||
width: 200px;
|
width: 220px;
|
||||||
|
padding-left: 25px;
|
||||||
transition: all 0.5s ease;
|
transition: all 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,6 +224,36 @@ a{
|
|||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-card-box{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-card{
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #E9EAEB;
|
||||||
|
padding-bottom: 22px;
|
||||||
|
margin-bottom: 22px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-card-title{
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 22px;
|
||||||
|
line-height: 140%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-card-img{
|
||||||
|
float: right;
|
||||||
|
display: inline;
|
||||||
|
margin-left: 10px;
|
||||||
|
max-width: 239px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** #vert-title div{
|
/** #vert-title div{
|
||||||
|
|
||||||
@@ -246,6 +280,7 @@ a{
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-left: 1px solid #E9EAEB;
|
border-left: 1px solid #E9EAEB;
|
||||||
|
padding-top: 42px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,8 +288,9 @@ a{
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
box-shadow: 0px 4px 53px rgba(0, 0, 0, 0.07);
|
||||||
flex-wrap: wrap;
|
/* justify-content: space-around;
|
||||||
|
flex-wrap: wrap; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -461,7 +497,7 @@ a{
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header, article, nav{
|
article{
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,8 +508,8 @@ a{
|
|||||||
#header-contact{
|
#header-contact{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: 12px;
|
margin-left: 22px;
|
||||||
margin-right: 12px;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* +7 (495) 925 06 34 info@vetandlife.ru */
|
/* +7 (495) 925 06 34 info@vetandlife.ru */
|
||||||
@@ -529,6 +565,12 @@ a{
|
|||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#event-img{
|
||||||
|
float: left;
|
||||||
|
margin-right: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.pagination-wrapper{
|
.pagination-wrapper{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -570,6 +612,11 @@ a{
|
|||||||
margin-top: 42px;
|
margin-top: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#title-404{
|
||||||
|
margin-top: 42px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
site-header .search-form {
|
site-header .search-form {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 200px;
|
right: 200px;
|
||||||
@@ -1159,7 +1206,8 @@ img-fluid{
|
|||||||
|
|
||||||
|
|
||||||
#content{
|
#content{
|
||||||
width: 100%;
|
/*width: 100%;*/
|
||||||
|
min-width: 780px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1315,6 +1363,8 @@ img-fluid{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.post_info_social{
|
.post_info_social{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user