full eng version

This commit is contained in:
arlemp@selectel.ru
2021-12-13 13:11:04 +03:00
parent 1500b493c9
commit ab771b9679
7 changed files with 93 additions and 35 deletions

View File

@@ -4,7 +4,7 @@
<?php include TEMPLATEPATH.'/blocks/gamburger.php'; ?> <?php include TEMPLATEPATH.'/blocks/gamburger.php'; ?>
<div id="mainlogo"> <div id="mainlogo">
<a href="<?php echo home_url(); ?>"><img width="240" src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij_logo.svg" alt = "Ветеринария и жизнь. Газета и сайт" /></a> <a href="<?php echo home_url().vij_lang('link_version', LANG_VERSION);?>"><img width="240" src = "<?=get_stylesheet_directory_uri().vij_lang('path_logo', LANG_VERSION);?>" alt = "<?=vij_lang('alt_logo', LANG_VERSION);?>" /></a>
</div> </div>

View File

@@ -13,26 +13,29 @@
<?php get_template_part( '/blocks/leftmenu');?> <?php get_template_part( '/blocks/leftmenu');?>
<?if (LANG_VERSION == 'ru'):?> <?if (LANG_VERSION == 'ru'):?>
<?php get_template_part( '/blocks/opinion', null, ['subclass' => '']);?> <?php get_template_part( '/blocks/opinion', null, ['subclass' => '']);?>
<?php get_template_part( '/blocks/citats')?> <?php get_template_part( '/blocks/citats')?>
<?php //include VIJ_CACHE.'opinion.html';?> <?php //include VIJ_CACHE.'opinion.html';?>
<?php //get_template_part( '/blocks/citata', null, ['subclass' => '']);?> <?php //get_template_part( '/blocks/citata', null, ['subclass' => '']);?>
<?php get_template_part( '/blocks/events');?> <?php get_template_part( '/blocks/events');?>
<?php //include VIJ_CACHE.'events.html';?> <?php //include VIJ_CACHE.'events.html';?>
<div class="right-info">
<a href="https://vetandlife.ru/vetspetsialist-sportsmenka-i-prosto-kras/">
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/konkurs_240x200.jpg" width="240" height="200" />
</a>
</div>
<div class="right-info">
<a href="https://www.youtube.com/channel/UCOXOjXmMNl8eVO4ldrv5c5Q" target="_blank">
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/melano-live.png" width="240" height="200" />
</a>
</div>
<?endif?> <?endif?>
<div class="right-info">
<a href="https://vetandlife.ru/vetspetsialist-sportsmenka-i-prosto-kras/">
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/konkurs_240x200.jpg" width="240" height="200" />
</a>
</div>
<div class="right-info">
<a href="https://www.youtube.com/channel/UCOXOjXmMNl8eVO4ldrv5c5Q" target="_blank">
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/melano-live.png" width="240" height="200" />
</a>
</div>
@@ -73,17 +76,19 @@
</div> </div>
</div> </div>
<div class="right-info"> <?if (LANG_VERSION == 'ru'):?>
<a href="https://vetandlife.ru/category/sdelano-chestno/?utm_medium=banner&utm_campaign=mainpage&utm_source=site"> <div class="right-info">
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/chestno-240x400-1.jpg" width="240" height="400" alt="Сделано честно"/> <a href="https://vetandlife.ru/category/sdelano-chestno/?utm_medium=banner&utm_campaign=mainpage&utm_source=site">
</a> <img src="https://vetandlife.ru/wp-content/uploads/2021/10/chestno-240x400-1.jpg" width="240" height="400" alt="Сделано честно"/>
</div> </a>
</div>
<div class="right-info"> <div class="right-info">
<a href="https://vetandlife.ru/parthers/v-fgbu-vgnki-razrabotan-metod-odnovremennogo-opredeleniya-v-kormah-bolee-120-lekarstvennyh-sredstv-primenyaemyh-v-zhivotnovodstve-antibiotikov-i-antiprotozojnyh-preparatov/"> <a href="https://vetandlife.ru/parthers/v-fgbu-vgnki-razrabotan-metod-odnovremennogo-opredeleniya-v-kormah-bolee-120-lekarstvennyh-sredstv-primenyaemyh-v-zhivotnovodstve-antibiotikov-i-antiprotozojnyh-preparatov/">
<img src="https://vetandlife.ru/wp-content/uploads/2021/12/vgnki_dec_240x400-1.jpg" width="240" height="400" /> <img src="https://vetandlife.ru/wp-content/uploads/2021/12/vgnki_dec_240x400-1.jpg" width="240" height="400" />
</a> </a>
</div> </div>
<?endif?>
@@ -148,7 +153,7 @@
<div id="head_mail"><a href="mailto:info@vetandlife.ru">info@vetandlife.ru</a></div> <div id="head_mail"><a href="mailto:info@vetandlife.ru">info@vetandlife.ru</a></div>
</div> </div>
<div id="footer_logo"> <div id="footer_logo">
<a href="<?php echo home_url(); ?>"><img src = "<?=get_stylesheet_directory_uri()?>/pub/logo/vij-148-1.png" alt = "Ветеринария и жизнь. Газета и сайт" /></a> <a href="<?php echo vij_lang('link_version', LANG_VERSION); ?>"><img src = "<?=get_stylesheet_directory_uri().vij_lang('path_logo', LANG_VERSION);?>" alt = "<?=vij_lang('alt_logo', LANG_VERSION);?>" width="180"/></a>
</div> </div>
<div id="footer_subscript"> <div id="footer_subscript">
<button class="sub_button" onclick="location.href='https://vetandlife.ru/subscripts'" type="button"> <button class="sub_button" onclick="location.href='https://vetandlife.ru/subscripts'" type="button">

View File

@@ -441,15 +441,7 @@ function filter_nav_menu_item_title( $title, $item, $args, $depth ) {
function lang_version(){ function lang_version(){
if (is_category()){ if (is_single()){
$category = get_queried_object();
if ($category->parent == 4782 or $category->term_id == 4782 ){
return 'en';
}
}
elseif (is_single()){
$current_cat = get_the_category( get_the_ID() )[0]; $current_cat = get_the_category( get_the_ID() )[0];
@@ -457,7 +449,21 @@ function lang_version(){
return 'en'; return 'en';
} }
} }
elseif (is_category()){
$category = get_queried_object();
if ($category->parent == 4782 or $category->term_id == 4782 ){
return 'en';
}
}
elseif (is_page([17462, 17463, 17464])){
return 'en';
}
return 'ru'; return 'ru';

View File

@@ -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');?><?=get_bloginfo('name')?></title> <title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=96"> <link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=98">
<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>

View File

@@ -4,6 +4,9 @@ function vij_lang($name, $lan){
static $lang_ru = [ static $lang_ru = [
'link_version' => '/',
'path_logo' => '/pub/logo/vij_logo.svg',
'alt_logo' => 'Ветеринария и жизнь. Информационный портал и газета',
'conf_politic' => 'Политика конфиденциальности', 'conf_politic' => 'Политика конфиденциальности',
'copyright' => 'Ветеринария и жизнь', 'copyright' => 'Ветеринария и жизнь',
'subscript_btn' => 'Газета ВиЖ. Оформить подписку', 'subscript_btn' => 'Газета ВиЖ. Оформить подписку',
@@ -15,11 +18,15 @@ function vij_lang($name, $lan){
'gazeta' => 'Читать газету<br>«Ветеринария и Жизнь»', 'gazeta' => 'Читать газету<br>«Ветеринария и Жизнь»',
'up_bth' => 'наверх', 'up_bth' => 'наверх',
'qrtitle' => 'Важно' 'qrtitle' => 'Важно'
]; ];
static $lang_en = [ static $lang_en = [
'link_version' => '/en/',
'path_logo' => '/pub/logo/vl_logo.svg',
'alt_logo' => 'Veterinary Medicine and Life. Online news outlet and newspaper',
'conf_politic' => 'Privacy Policy', 'conf_politic' => 'Privacy Policy',
'copyright' => 'Veterinary Medicine and Life', 'copyright' => 'Veterinary Medicine and Life',
'subscript_btn' => 'Subscription to the Veterinary Medicine and Life newspaper', 'subscript_btn' => 'Subscription to the Veterinary Medicine and Life newspaper',
@@ -31,6 +38,7 @@ function vij_lang($name, $lan){
'gazeta' => 'Veterinary Medicine and Life newspaper', 'gazeta' => 'Veterinary Medicine and Life newspaper',
'up_bth' => 'UP', 'up_bth' => 'UP',
'qrtitle' => 'important' 'qrtitle' => 'important'
]; ];
if ($lan == 'ru' and isset($lang_ru[$name])){ if ($lan == 'ru' and isset($lang_ru[$name])){

34
page.php Normal file
View File

@@ -0,0 +1,34 @@
<?php get_header();?>
<div id="content">
<?//while(have_posts()):?>
<?the_post();?>
<h1 class="post-h1" style="margin-top: 38px;"><?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>
<?php get_footer();?>

View File

@@ -2040,6 +2040,11 @@ span.rub_back_title{
font-weight: 24px; font-weight: 24px;
} }
.page-title{
font-weight: 24px;
margin-top: 48px;
}
.img-fluid{ .img-fluid{
width: 100%; width: 100%;
} }