new design concurs

This commit is contained in:
2022-02-15 21:00:14 +03:00
parent 00c96d16eb
commit 290ef8db11
14 changed files with 2787 additions and 35 deletions

View File

@@ -28,7 +28,7 @@ if( $posts ):
<?endif?> <?endif?>
<br> <br>
<center class="left_center_block"> <center class="left_center_block">
<a href="https://vetandlife.ru/category/arkhiv/" class="left_button" target="_blank">Архив номеров</a> <a href="https://vetandlife.ru/category/arkhiv/" class="left_button" target="_blank"><?=vij_lang('archives', LANG_VERSION);?></a>
</center> </center>
</div> </div>

View File

@@ -23,7 +23,7 @@ $posts = get_posts( array(
# вывод поста # вывод поста
if( $posts ):?> if( $posts ):?>
<div class="moread_rubric">Read also:</div> <div class="moread_rubric">Related articles:</div>
<div class="moread"> <div class="moread">

View File

@@ -3,7 +3,7 @@
if (LANG_VERSION == 'en'){ if (LANG_VERSION == 'en'){
$left_mob_menu = 'leftenmenu'; $left_mob_menu = 'leftenmenu';
$part_title = 'Parts'; $part_title = 'Topics';
} }
else{ else{

View File

@@ -43,7 +43,7 @@
<a href="<?=get_site_url()?>?s="><li class="btn_search"></li></a> <a href="<?=get_site_url()?>?s="><li class="btn_search"></li></a>
<a href="<?=get_site_url()?>/feed"><li class="btn_rss"></li></a> <a href="<?=get_site_url()?>/feed"><li class="btn_rss"></li></a>
<li class="toggle-nav" id="toggle-nav"></li> <li class="toggle-nav" id="toggle-nav"></li>
<a href="<?=get_site_url().vij_lang('btn_lan_link', LANG_VERSION)?>"><li class="btn_lan"><?=vij_lang('btn_lan', LANG_VERSION)?></li></a> <a href="<?=get_site_url().vij_lang('btn_lan_link', LANG_VERSION)?>"><li class="btn_lan"><nobr><?=vij_lang('btn_lan', LANG_VERSION)?></nobr></li></a>
</ul> </ul>

View File

@@ -1,6 +1,6 @@
<?php if ( $wp_query->max_num_pages > 1 ) : ?><div class="pagination-wrapper"><?php the_posts_pagination( array( <?php if ( $wp_query->max_num_pages > 1 ) : ?><div class="pagination-wrapper"><?php the_posts_pagination( array(
'prev_text' => __( '<&nbsp;&nbsp;Обратно', 'quidus' ), 'prev_text' => __( '<&nbsp;&nbsp;'.vij_lang('prev', LANG_VERSION), 'quidus' ),
'next_text' => __( 'Далее&nbsp;&nbsp;>', 'quidus' ), 'next_text' => __( vij_lang('next', LANG_VERSION).'&nbsp;&nbsp;>', 'quidus' ),
'end_size' => 2, 'end_size' => 2,
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'quidus' ) . ' </span>', 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'quidus' ) . ' </span>',
) ); ) );

View File

@@ -14,12 +14,10 @@
# вывод поста # вывод поста
if( $posts ):?> if( $posts ):?>
<?if (LANG_VERSION == 'en'):?>
<div class="yets_rubric">More on the topic</div>
<?else:?> <div class="yets_rubric"><?=vij_lang('more', LANG_VERSION)?></div>
<div class="yets_rubric">Еще по теме</div>
<?endif?>
<div class="yets"> <div class="yets">
<?php foreach($posts as $post): <?php foreach($posts as $post):

View File

@@ -186,7 +186,7 @@
<div id="footer_info"> <div id="footer_info">
<div id="footer_qr"> <div id="footer_qr">
<img src = "<?=get_stylesheet_directory_uri()?>/pub/qr.png" /> <img id="img_qr" src = "<?=get_stylesheet_directory_uri()?>/pub/icons/qvij.svg" width="100" height="100" />
<p class="vazh"><?=vij_lang('qrtitle', LANG_VERSION);?></p> <p class="vazh"><?=vij_lang('qrtitle', LANG_VERSION);?></p>
</div> </div>
<div id="footer-contact"> <div id="footer-contact">

View File

@@ -4,7 +4,13 @@
<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=145">
<?if (defined('TESTMODE') and TESTMODE == 1):?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=2">
<?else:?>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=154">
<?endif?>
<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/golos.js"></script> <script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/golos.js"></script>
@@ -20,6 +26,16 @@
<?endif?> <?endif?>
<?php wp_head();?> <?php wp_head();?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VGN4NSFMW5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-VGN4NSFMW5');
</script>
</head> </head>
<body> <body>
<!-- Facebook Pixel Code --> <!-- Facebook Pixel Code -->
@@ -28,6 +44,33 @@
&noscript=1"/> &noscript=1"/>
</noscript> </noscript>
<!-- End Facebook Pixel Code --> <!-- End Facebook Pixel Code -->
<?if (defined('TESTMODE') and TESTMODE == 1):?>
<style>
#mainbanner{
width: 100%;
display: block;
padding: 10px;
}
#mainbanner img {
display: block;
width: 100%;
max-width: 1600px;
margin: auto;
border: 1px solid black;
text-align: center;
}
</style>
<div id="mainbanner">
<img src ="https://vetandlife.ru/wp-content/themes/vij/pub/banners/page-banner-1600x100.jpg" />
</div>
<?endif?>
<? $lang_version = lang_version(); <? $lang_version = lang_version();
@@ -38,8 +81,7 @@
} }
else { else {
$mainmenu = 'topmenu'; $mainmenu = 'topmenu';
$mob_main_menu = 'mob_rubrics'; $mob_main_menu = 'mob_rubrics';
} }
define('LANG_VERSION', $lang_version); define('LANG_VERSION', $lang_version);

View File

@@ -24,7 +24,11 @@ function vij_lang($name, $lan){
'your_mail' => 'Ваша почта', 'your_mail' => 'Ваша почта',
'gazeta' => 'Читать газету<br>«Ветеринария и Жизнь»', 'gazeta' => 'Читать газету<br>«Ветеринария и Жизнь»',
'up_bth' => 'наверх', 'up_bth' => 'наверх',
'qrtitle' => 'Важно' 'qrtitle' => 'Важно',
'archives' => 'Архив номеров',
'more' => 'Еще по теме',
'next' => 'Далее',
'prev' => 'Обратно'
]; ];
@@ -51,7 +55,11 @@ function vij_lang($name, $lan){
'your_mail' => 'Your email', 'your_mail' => 'Your email',
'gazeta' => 'Veterinary Medicine and Life newspaper', 'gazeta' => 'Veterinary Medicine and Life newspaper',
'up_bth' => 'UP', 'up_bth' => 'UP',
'qrtitle' => 'important' 'qrtitle' => 'important',
'archives' => 'Archives',
'more' => 'Read more about',
'next' => 'Next',
'prev' => 'Prev'
]; ];

43
page-19009.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
define('TESTMODE', 1);
include 'header.php';?>
<div id="content">
<h1 id="mainpage-title">Тестовая страница</h1>
<style>
.center-banner{
width: 100%;
display: block;
padding: 10px;
}
.center-banner img{
display: block;
width: 100%;
max-width: 768px;
text-align: center;
}
</style>
<div class="center-banner">
<img src="https://vetandlife.ru/wp-content/themes/vij/pub/banners/banner-768-110.jpg" />
</div>
<div class="center-banner">
<img src="https://vetandlife.ru/wp-content/themes/vij/pub/banners/banner-768.jpg" />
</div>
</div>
<?get_footer();

View File

@@ -29,7 +29,18 @@ $posts = get_posts( array(
if( $posts ){ if( $posts ){
include('views/rss/yanews.php');
ob_start();
include('views/rss/yanews.php');
$result = ob_get_contents();
ob_end_clean();
$result = trim($result);
if ($result !== ''){
file_put_contents('/vhosts/beta/rss/yanews.xml', trim($result));
}
} }

90
single-5121.php Normal file
View File

@@ -0,0 +1,90 @@
<?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);
$post_id = get_the_ID();
?>
<ul id="nav_content">
<li><a href="<?=get_site_url()?>">Главная</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">
<?php include get_template_directory().'/blocks/social-share.php';?>
</div>
</div>
<div id="fulltext">
<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="post-img">
<img class="img-fluid rounded" src="<?php echo get_the_post_thumbnail_url(null, 'full');?>" alt="<?the_title();?>">
</div>
<div class="post_img_title"><?the_post_thumbnail_caption()?></div>
<?endif?>
<div class="fulltext">
<?the_content();?>
</div>
<div class="promo-agregators">
<p>Свежие отраслевые новости на нашем канале в <span class="promo-telega"><a href="https://t.me/ViZHuvizh" target="_blank">Telegram</a></span></p>
<p>Добавьте «Ветеринарию и жизнь» в избранное в <a href="https://yandex.ru/news/?favid=254162793" target="_blank"><span style="color:red; font-weight: bold;">Я</span><span style="font-weight: bold; color:black;">НДЕКС.НОВОСТИ</span></a></p>
</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>--> <?php include get_template_directory().'/blocks/social-share.php';?>
</div>
</div>
</div>
<?php include get_template_directory().'/blocks/moread.php';?>
<div class="publ-to-main">
<button class="more_button" onclick="location.href='<?=get_site_url()?>/page/2'" type="button">
На главную</button>
</div>
</div>
<?php get_footer();?>

2548
style-test.css Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -256,11 +256,12 @@ a{
} }
.search-card-box{ .search-card-box{
display: flex; display: grid;
flex-direction: column; /* flex-direction: column; */
} }
.search-card{ .search-card{
display: grid;
width: 100%; width: 100%;
border-bottom: 1px solid #E9EAEB; border-bottom: 1px solid #E9EAEB;
padding-bottom: 22px; padding-bottom: 22px;
@@ -323,6 +324,7 @@ a{
display: flex; display: flex;
align-items: center; align-items: center;
box-shadow: 0px 4px 53px rgba(0, 0, 0, 0.07); box-shadow: 0px 4px 53px rgba(0, 0, 0, 0.07);
margin-right: 12px;
width: 100%; width: 100%;
/* justify-content: space-around; /* justify-content: space-around;
@@ -366,6 +368,11 @@ a{
text-align: center; text-align: center;
} }
#img_qr{
padding: 4px;
background-color: white;
}
#footer-contact{ #footer-contact{
width: 20%; width: 20%;
} }
@@ -897,7 +904,7 @@ a{
#header_icons li{ #header_icons li{
width: 20px; width: 20px;
height: 15px; height: 20px;
margin-left: 6px; margin-left: 6px;
cursor: pointer; cursor: pointer;
} }
@@ -908,12 +915,12 @@ a{
} }
.btn_rss{ .btn_rss{
background: url(/wp-content/themes/vij/pub/icons/header-rss.png) no-repeat; background: url(/wp-content/themes/vij/pub/icons/rss.svg) no-repeat;
} }
.btn_lan{ .btn_lan{
font-weight: bold; font-weight: bold;
margin-top: -4px; margin-top: -2px;
} }
#copy{ #copy{
@@ -929,7 +936,7 @@ a{
} }
.btn_search{ .btn_search{
background: url(/wp-content/themes/vij/pub/icons/union.png) no-repeat; background: url(/wp-content/themes/vij/pub/icons/lupa.svg) no-repeat;
} }
@@ -1083,7 +1090,7 @@ a{
.mini-card-block{ .mini-card-block{
display: grid; display: grid;
grid-gap: 2rem; grid-gap: 2rem;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
} }
@@ -2106,12 +2113,13 @@ span.rub_back_title{
} }
#mainlogo{ #mainlogo{
width: 240px; width: 200px;
margin: 0; margin: 0;
} }
#header_icons{ #header_icons{
margin-left: 0; margin-left: 0;
padding-right: 8px;
} }
.main-card-title{ .main-card-title{
@@ -2128,7 +2136,9 @@ span.rub_back_title{
.toggle-nav { .toggle-nav {
display: inline-block !important; display: inline-block !important;
background: url(/wp-content/themes/vij/pub/icons/burger-15.png) no-repeat; background: url(/wp-content/themes/vij/pub/icons/gumburger.svg) no-repeat;
width: 20px;
height: 20px;
padding-left: 12px; padding-left: 12px;
} }
@@ -2338,8 +2348,8 @@ span.rub_back_title{
} }
#header_icons li{ #header_icons li{
width: 20px; width: 25px;
height: 15px; height: 25px;
margin-left: 8px; margin-left: 8px;
cursor: pointer; cursor: pointer;
} }
@@ -2347,7 +2357,9 @@ span.rub_back_title{
.toggle-nav { .toggle-nav {
display: inline-block !important; display: inline-block !important;
background: url(/wp-content/themes/vij/pub/icons/burger-15.png) no-repeat; background: url(/wp-content/themes/vij/pub/icons/gumburger.svg) no-repeat;
width: 20px;
height: 20px;
padding-left: 12px; padding-left: 12px;
} }
@@ -2357,7 +2369,7 @@ span.rub_back_title{
} }
#mainlogo{ #mainlogo{
max-width: 240px; max-width: 200px;
left: 0; left: 0;
top: 0; top: 0;
margin: 0; margin: 0;
@@ -2461,14 +2473,14 @@ and (max-device-width : 667px) {
} }
#mainlogo{ #mainlogo{
width: 240px; width: 200px;
text-align: left; text-align: left;
margin: 0; margin: 0;
} }
#header_icons li{ #header_icons li{
width: 20px; width: 25px;
height: 15px; height: 25px;
margin-left: 6px; margin-left: 6px;
cursor: pointer; cursor: pointer;
} }