add files

This commit is contained in:
2021-09-16 12:14:35 +03:00
commit 5a50fb1a94
34 changed files with 386 additions and 0 deletions

0
comments.php Normal file
View File

21
content.php Normal file
View File

@@ -0,0 +1,21 @@
<div id="content">
<h1 class="my-4">Главное</h1>
<?php if (have_posts()): while(have_posts()): the_post();?>
<h2 class="card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="card mb-4">
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
<div class="card-body">
<p class="card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></p>
<div class="news_date"><?the_time('j F Y, G:i');?></div>
</div>
</div>
<?php endwhile; else:?>
<p>Записей не найдено.</p>
<?php endif;?>
<?php /**the_posts_pagination(array(
'mid_size' => 4,
'end_size' => 2,
));*/?>
</div>

41
footer.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
/**
* The template for displaying the footer.
*/
?>
<div id="left">
<?php wp_nav_menu( array(
'menu_class'=>'menu_left',
'theme_location'=>'left'
));?>
</div>
<aside>
<div id="socials">
<div class="soc_btn soc_vk"></div>
<div class="soc_btn soc_fb"></div>
<div class="soc_btn soc_telegram"></div>
<div class="soc_btn soc_youtube"></div>
<div class="soc_btn soc_instagram"></div>
</div>
</aside>
</div><!-- end main -->
<footer>
<?php wp_footer(); ?>
<?php wp_nav_menu( array(
'menu_class'=>'menu_footer',
'theme_location'=>'top'
));?>
<div id="footer_info">
<div id="header-contact">
<div id="head_tel"><a href="tel:79250634">+7 (495) 925 06 34</a></div>
<div id="head_mail"><a href="mailto:info@vetandlife.ru">info@vetandlife.ru</a></div>
</div>
</div>
<div id="copy">© Ветеринария и жизнь 2021</div>
<div id="pere"><span id="rating">12+</span> При перепечатке и использовании информации с сайта «Ветеринария и жизнь» активная ссылка на использованный материал обязательна. При использовании материалов в печатных СМИ указывать источник — «Ветеринария и жизнь»</div>
</footer>
</body>
</html>

11
functions.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
# регистрируем меню
register_nav_menus(array(
'top' => 'Верхнее меню',
'bottom' => 'Нижнее меню',
'left' => 'Левое меню'
));
add_theme_support('post-thumbnails');

31
header.php Normal file
View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<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(); ?>">
<?php wp_head();?>
</head>
<body>
<header>
<?php if( has_custom_logo() ): the_custom_logo(); ?>
<?php else: ?>
<a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
<?php
wp_nav_menu( array(
'menu_class'=>'menu_main',
'theme_location'=>'top'
) );
?>
<?php endif; ?>
<div id="header-contact">
<div id="head_tel"><a href="tel:79250634">+7 (495) 925 06 34</a></div>
<div id="head_mail"><a href="mailto:info@vetandlife.ru">info@vetandlife.ru</a></div>
</div>
</header>
<div id="main">

14
index.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
/**
* The main template file.
*
*/
get_header(); ?>
<div id="main">
<?php get_template_part('content') ?>
</div>
<?php get_footer(); ?>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
pub/icons/facebook-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

BIN
pub/icons/telegram-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

BIN
pub/icons/vk-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

BIN
pub/icons/youtube-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

10
single.php Normal file
View File

@@ -0,0 +1,10 @@
<?php get_header();?>
<?while(have_posts()):
the_post();?>
<h1 class="my-4 page-title"><?wp_title();?></h1>
<img class="img-fluid rounded" src="<?php echo get_the_post_thumbnail_url(null, 'full');?>" alt="<?the_title();?>">
<p><small class="text-muted"><?the_time('j F Y');?> <?php the_tags('');?></small></p>
<?the_content();?>
<?php comments_template(); ?>
<?endwhile;?>
<?php get_footer();?>

258
style.css Normal file
View File

@@ -0,0 +1,258 @@
/*
Theme Name: vij
Theme URI: https://vetandlife.ru
Description: Ветеринария и жизнь
Version: 0.1
Author: AK Delfin
Author URI: masterforweb@hotmail.com
*/
/**
* Reset CSS
*/
/**
a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{font-size:62.5%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{background:#fff}article,aside,details,figcaption,figure,footer,header,main,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}
img, embed, iframe, object {
max-width: 100%;
}
*/
/**
fonts
*/
/* Обычный */
@font-face {
font-family: 'GrtskPeta';
font-style: normal;
font-weight: normal;
src: url(/wp-content/themes/vij/pub/fonts/GrtskPeta-Regular.ttf);
}
/* Жирный */
@font-face {
font-family: 'GrtskPeta';
font-style: normal;
font-weight: bold;
src: url(/wp-content/themes/vij/pub/fonts/GrtskPeta-Bold.ttf);
}
/* Убираем внешние отступы */
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
figure,
figcaption,
blockquote,
dl,
dd {
margin: 0;
}
ul, ol {
list-style: none;
}
a{
color: black;
text-decoration: none;
}
* {
box-sizing: border-box;
}
body {
display: flex;
min-height: 100vh;
font-family: 'GrtskPeta';
flex-direction: column;
margin: 0;
background-color: #FFFFFF;
}
#main {
display: flex;
flex: 1;
}
#main > article {
flex: 1;
}
#main > #left,
#main > aside {
flex: 0 0 20vw;
background: beige;
}
#main > #left {
order: -1;
}
header{
background-color: white;
display: flex;
flex-direction:
justify-content: space-between;
}
/** - menus -- */
ul.menu_main{
display: flex;
padding: 5px;
}
ul.menu_main li{
margin: 5px;
padding: 15px;
font-weight: bold;
font-size: 15px;
}
ul.menu_left{
display: flex;
flex-direction: column;
}
ul.menu_left li{
font-weight: bold;
font-size: 12px;
line-height: 150%;
text-transform: uppercase;
}
ul.menu_footer{
display: flex;
padding: 5px;
}
ul.menu_footer li{
margin: 5px;
padding: 15px;
font-weight: bold;
font-size: 15px;
}
footer {
background: #E2E2E2;
height: 20vh;
}
header, footer, article, nav, aside {
padding: 1em;
}
#main{
padding: 24px;
}
#header-contact{
display: flex;
flex-direction: column;
}
/* +7 (495) 925 06 34 info@vetandlife.ru */
#head_tel{
font-weight: bold;
}
#head_mail a{
color: blue;
text-decoration: underline;
}
h1{
margin: 18px 0 18px 0;
font-family: 'GrtskPeta';
font-size: 36px;
font-weight: bold;
}
.card{
margin: 8px 0 8px 0;
}
.card-title{
font-family: 'GrtskPeta';
font-size: 36px;
}
.card-text{
font-family: 'GrtskPeta';
font-size: 18px;
line-height: 140%;
padding: 8px;
}
.news_date{
color: #909294;
font-family: 'GrtskPeta';
font-size: 13px;
padding: 8px 0 8px 0;
}
/** socials */
#socials{
display: flex;
}
.soc_btn{
height: 24px;
width: 24px;
border-radius: 10px;
border: 1px solid #E9EAEB;
}
.soc_telegram{
background: url(/wp-content/themes/vij/pub/icons/telegram-icon.png) no-repeat;
}
.soc_youtube{
background: url(/wp-content/themes/vij/pub/icons/youtube-icon.png) no-repeat;
}
.soc_vk{
background: url(/wp-content/themes/vij/pub/icons/vk-icon.png) no-repeat;
}
.soc_fb{
background: url(/wp-content/themes/vij/pub/icons/facebook-icon.png) no-repeat;
}
.soc_instagram{
background: url(/wp-content/themes/vij/pub/icons/instagram-icon.png) no-repeat;
}