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'; ?>
<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>

View File

@@ -13,13 +13,14 @@
<?php get_template_part( '/blocks/leftmenu');?>
<?if (LANG_VERSION == 'ru'):?>
<?php get_template_part( '/blocks/opinion', null, ['subclass' => '']);?>
<?php get_template_part( '/blocks/citats')?>
<?php //include VIJ_CACHE.'opinion.html';?>
<?php //get_template_part( '/blocks/citata', null, ['subclass' => '']);?>
<?php get_template_part( '/blocks/events');?>
<?php //include VIJ_CACHE.'events.html';?>
<?endif?>
<div class="right-info">
<a href="https://vetandlife.ru/vetspetsialist-sportsmenka-i-prosto-kras/">
@@ -33,6 +34,8 @@
</a>
</div>
<?endif?>
@@ -73,6 +76,7 @@
</div>
</div>
<?if (LANG_VERSION == 'ru'):?>
<div class="right-info">
<a href="https://vetandlife.ru/category/sdelano-chestno/?utm_medium=banner&utm_campaign=mainpage&utm_source=site">
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/chestno-240x400-1.jpg" width="240" height="400" alt="Сделано честно"/>
@@ -84,6 +88,7 @@
<img src="https://vetandlife.ru/wp-content/uploads/2021/12/vgnki_dec_240x400-1.jpg" width="240" height="400" />
</a>
</div>
<?endif?>
@@ -148,7 +153,7 @@
<div id="head_mail"><a href="mailto:info@vetandlife.ru">info@vetandlife.ru</a></div>
</div>
<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 id="footer_subscript">
<button class="sub_button" onclick="location.href='https://vetandlife.ru/subscripts'" type="button">

View File

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

View File

@@ -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');?><?=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">
<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>

View File

@@ -4,6 +4,9 @@ function vij_lang($name, $lan){
static $lang_ru = [
'link_version' => '/',
'path_logo' => '/pub/logo/vij_logo.svg',
'alt_logo' => 'Ветеринария и жизнь. Информационный портал и газета',
'conf_politic' => 'Политика конфиденциальности',
'copyright' => 'Ветеринария и жизнь',
'subscript_btn' => 'Газета ВиЖ. Оформить подписку',
@@ -15,11 +18,15 @@ function vij_lang($name, $lan){
'gazeta' => 'Читать газету<br>«Ветеринария и Жизнь»',
'up_bth' => 'наверх',
'qrtitle' => 'Важно'
];
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',
'copyright' => 'Veterinary Medicine and Life',
'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',
'up_bth' => 'UP',
'qrtitle' => 'important'
];
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;
}
.page-title{
font-weight: 24px;
margin-top: 48px;
}
.img-fluid{
width: 100%;
}