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) {
|
||||
|
||||
static $vars = array();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
@@ -12,11 +12,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
|
||||
<div id="mainlogo">
|
||||
|
||||
<a href="<?php echo home_url(); ?>"><img src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij-logo-220.png" alt = "Ветеринария и жизнь. Газета и сайт" /></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="mainmenu">
|
||||
|
||||
<?php
|
||||
|
||||
16
search.php
16
search.php
@@ -41,29 +41,29 @@ endif;
|
||||
wp_reset_query(); ?></p>
|
||||
|
||||
<?php if(have_posts()) :?>
|
||||
<div class="search-card-box">
|
||||
|
||||
<div class="mini-card-block">
|
||||
<?php while(have_posts()) : the_post();?>
|
||||
|
||||
|
||||
|
||||
<div class="mini-card">
|
||||
<div class="search-card">
|
||||
|
||||
<div class="search-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></div>
|
||||
<?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>
|
||||
<img class="search-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" width="239" alt="<?the_title();?>">
|
||||
<?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="news_date"><?the_time('j F Y, G:i');?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php endwhile;?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?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 class="post_img_title"><?the_post_thumbnail_caption()?></div>
|
||||
<?endif?>
|
||||
<?the_content();?>
|
||||
<div><?the_content();?></div>
|
||||
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
|
||||
<?//endwhile;?>
|
||||
|
||||
|
||||
76
style.css
76
style.css
@@ -127,21 +127,24 @@ a{
|
||||
height: 130px;
|
||||
}
|
||||
|
||||
#mainlogo{
|
||||
margin-left: 12px;
|
||||
min-width: 340px;
|
||||
}
|
||||
|
||||
.wrap{
|
||||
transform: translate(-50%, -50%);
|
||||
transform: translate(0%, 0%);
|
||||
width: 0px;
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
border-radius: 35px;
|
||||
background: #F2F2F2;
|
||||
/*transition: all 0.5s ease;
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.5);
|
||||
transition: all 0.5s ease;*/
|
||||
align-items: center;
|
||||
/* align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 55px;
|
||||
margin-left: 35px;
|
||||
/* margin-top: 55px;
|
||||
margin-left: 35px;*/
|
||||
}
|
||||
|
||||
.input{
|
||||
@@ -152,7 +155,7 @@ a{
|
||||
font-size: 18px;
|
||||
color: black;
|
||||
transition: all 0.3s ease;
|
||||
margin-left: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wrap .fa{
|
||||
@@ -165,7 +168,8 @@ a{
|
||||
}
|
||||
|
||||
.wrap.active{
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
padding-left: 25px;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
@@ -220,6 +224,36 @@ a{
|
||||
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{
|
||||
|
||||
@@ -246,6 +280,7 @@ a{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-left: 1px solid #E9EAEB;
|
||||
padding-top: 42px;
|
||||
|
||||
}
|
||||
|
||||
@@ -253,8 +288,9 @@ a{
|
||||
background-color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
box-shadow: 0px 4px 53px rgba(0, 0, 0, 0.07);
|
||||
/* justify-content: space-around;
|
||||
flex-wrap: wrap; */
|
||||
|
||||
}
|
||||
|
||||
@@ -461,7 +497,7 @@ a{
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
header, article, nav{
|
||||
article{
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
@@ -472,8 +508,8 @@ a{
|
||||
#header-contact{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 12px;
|
||||
margin-right: 12px;
|
||||
margin-left: 22px;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/* +7 (495) 925 06 34 info@vetandlife.ru */
|
||||
@@ -529,6 +565,12 @@ a{
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
#event-img{
|
||||
float: left;
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.pagination-wrapper{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
@@ -570,6 +612,11 @@ a{
|
||||
margin-top: 42px;
|
||||
}
|
||||
|
||||
#title-404{
|
||||
margin-top: 42px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
site-header .search-form {
|
||||
position: absolute;
|
||||
right: 200px;
|
||||
@@ -1159,7 +1206,8 @@ img-fluid{
|
||||
|
||||
|
||||
#content{
|
||||
width: 100%;
|
||||
/*width: 100%;*/
|
||||
min-width: 780px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1315,6 +1363,8 @@ img-fluid{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.post_info_social{
|
||||
display: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user