fixed scroll images
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?php $curr_id = get_the_id(); ?>
|
||||
|
||||
<?if (!isset($_COOKIE[COOK_GOLOS])):?>
|
||||
<?//if (!isset($_COOKIE[COOK_GOLOS])):?>
|
||||
|
||||
<div id="golos-<?=$curr_id?>">
|
||||
<br><button style="padding: 8px; cursor: pointer;" id="golos" onclick="javascript:add_golos(<?= $curr_id;?>, 'golos-<?= $curr_id;?>');">Проголосовать</button>
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
<?//endif?>
|
||||
|
||||
<div id="golos-<?=$curr_id?>">
|
||||
<?if (isset($_COOKIE["vec_$curr_id"])):?>
|
||||
|
||||
@@ -5,8 +5,8 @@ use PHPMailer\PHPMailer\PHPMailer;
|
||||
//setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian');
|
||||
|
||||
define('IMGURL', 'http://img.vetandlife.ru/');
|
||||
define("COOK_GOLOS", "_ya_id_76543_w");
|
||||
define("COOK_VALUE", "7895");
|
||||
define("COOK_GOLOS", "_ya_id_76577_w");
|
||||
define("COOK_VALUE", "7896");
|
||||
define('VIJ_CACHE', ABSPATH.'wp-content/themes/vij/cache/');
|
||||
define('BASE_VIJ', ABSPATH.'wp-content/themes/vij/');
|
||||
|
||||
@@ -48,6 +48,11 @@ require get_template_directory().'/src/perevod.php';
|
||||
require get_template_directory().'/lang.php';
|
||||
require get_template_directory().'/blocks/card_post_id.php';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//require ABSPATH.'vendor/masterforweb/db_lite/db_lite.php';
|
||||
|
||||
function vij_send_smtp_email( PHPMailer $phpmailer ) {
|
||||
@@ -129,6 +134,14 @@ add_filter('category_template', function (){
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//свой шаблон для категории
|
||||
add_filter( 'single_template', function ( $single_template ) {
|
||||
|
||||
@@ -671,6 +684,16 @@ add_action( 'pre_get_posts', function ($query) {
|
||||
});
|
||||
|
||||
|
||||
function print_menu_shortcode($atts=[], $content = null) {
|
||||
$shortcode_atts = shortcode_atts([ 'name' => '', 'class' => '' ], $atts);
|
||||
$name = $shortcode_atts['name'];
|
||||
$class = $shortcode_atts['class'];
|
||||
return wp_nav_menu( array( 'menu' => $name, 'menu_class' => $class, 'echo' => false ) );
|
||||
}
|
||||
|
||||
add_shortcode('menu', 'print_menu_shortcode');
|
||||
|
||||
|
||||
function add_text_to_the_feed_end( $content ){
|
||||
$content .= '
|
||||
<p>
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
|
||||
|
||||
<?if (defined('TESTMODE') and TESTMODE == 1):?>
|
||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=3">
|
||||
<?else:?>
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=167">
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=267">
|
||||
<?endif?>
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
||||
<!--<link href="<?php echo get_stylesheet_directory_uri()?>/pub/fontawesome.css" rel="stylesheet">-->
|
||||
@@ -62,14 +63,14 @@
|
||||
</style>
|
||||
|
||||
<div id="mainbanner">
|
||||
<img src ="https://vetandlife.ru/wp-content/themes/vij/pub/banners/page-banner-1600x100.jpg" />
|
||||
<img src ="https://vetandlife.ru/wp-content/uploads/2022/04/3200x200-scaled.gif" />
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
|
||||
|
||||
<div id="mainbanner">
|
||||
<img src ="https://vetandlife.ru/wp-content/uploads/2022/04/1600x100.gif" />
|
||||
<a href="https://vetandlife.ru/reklama-na-site/"><img src ="https://vetandlife.ru/wp-content/uploads/2022/04/3200x200_2.gif" /></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -40,14 +40,15 @@ $nn = 0;?>
|
||||
|
||||
<?if ($nn == 10):?>
|
||||
|
||||
<?card_post_id(18170, 'до 31 марта 2022 года')?>
|
||||
<?card_post_id(20427, 'до 13 апреля 2022 года')?>
|
||||
|
||||
<?endif?>
|
||||
|
||||
<div class="mini-card">
|
||||
<?if ( has_post_thumbnail() ) :?>
|
||||
<div class="mini-card-img">
|
||||
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?the_title();?>">
|
||||
<a href="<?the_permalink();?>">
|
||||
<img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'large'); ?>" alt="<?the_title();?>">
|
||||
<?if( has_tag( 'видео' ) ):?>
|
||||
<span class="play-card"></span>
|
||||
<?endif?>
|
||||
|
||||
267
style.css
267
style.css
@@ -500,6 +500,38 @@ a{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.orange_block a{
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.orange_button{
|
||||
|
||||
background: orange;
|
||||
border-radius: 55px;
|
||||
border: 1px solid orange;
|
||||
color: white;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
font-size: 11px;
|
||||
line-height: 110%;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
height: 45px;
|
||||
padding-left: 22px;
|
||||
padding-right: 22px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.left_center_block{
|
||||
margin-top: 8px;
|
||||
margin-bottom: 28px;
|
||||
@@ -604,10 +636,40 @@ a{
|
||||
}
|
||||
|
||||
|
||||
#content iframe{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#content tr {
|
||||
|
||||
border-top: 1px solid #E9EAEB;
|
||||
border-bottom: 1px solid #E9EAEB;
|
||||
|
||||
}
|
||||
|
||||
#content td {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#content h2, #content h3, #content h4{
|
||||
margin-top: 12px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
|
||||
.fulltext{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fulltext a{
|
||||
color: #2D9CDB;
|
||||
}
|
||||
|
||||
|
||||
.fulltext .current-menu-item a{
|
||||
color: black;
|
||||
}
|
||||
|
||||
.fulltext > ul{
|
||||
list-style: square outside;
|
||||
}
|
||||
@@ -636,6 +698,10 @@ a{
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.fulltext {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#fulltext img,
|
||||
.wp-block-image img
|
||||
{
|
||||
@@ -708,6 +774,51 @@ a{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reklama_menu{
|
||||
|
||||
display: flex;
|
||||
margin-left: 0;
|
||||
margin-top: 22px;
|
||||
margin-bottom: 22px;
|
||||
font-size: 18px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.reklama_menu li{
|
||||
|
||||
font-weight: bold;
|
||||
margin-right:15px; /*Добавляем отступ у пунктов меню*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reklama_menu a:hover{
|
||||
color: #2D9CDB;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.reklama_sub_h {
|
||||
|
||||
font-size: 18px;
|
||||
color: #171717;
|
||||
text-align: center;
|
||||
padding: 20px 10px 20px 20px;
|
||||
margin-right: 4px;
|
||||
background-color: #F2F2F2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.lmenu{
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
@@ -978,8 +1089,7 @@ a{
|
||||
}
|
||||
|
||||
#content IMG{
|
||||
max-width: 100%;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#fulltext ul{
|
||||
@@ -2134,6 +2244,30 @@ span.rub_back_title{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
#menu-reklama_menu{
|
||||
padding-bottom: 22px;
|
||||
}
|
||||
|
||||
|
||||
#menu-reklama_menu li a{
|
||||
color: black;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
#menu-reklama_menu li.current-menu-item{
|
||||
color: #2D9CDB;
|
||||
border-bottom: 1px solid #2D9CDB;
|
||||
}
|
||||
|
||||
#menu-reklama_menu li.current-menu-item a{
|
||||
color: #2D9CDB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@media screen and ( max-width: 580px ) {
|
||||
|
||||
#left{
|
||||
@@ -2149,9 +2283,9 @@ span.rub_back_title{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#mainbanner {
|
||||
/** #mainbanner {
|
||||
display: none;
|
||||
}
|
||||
} */
|
||||
|
||||
#header_icons{
|
||||
margin-left: 0;
|
||||
@@ -2164,7 +2298,7 @@ span.rub_back_title{
|
||||
|
||||
|
||||
#content{
|
||||
/*width: 100%;*/
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
@@ -2329,6 +2463,7 @@ span.rub_back_title{
|
||||
body {
|
||||
width: 100%;
|
||||
margin-right: 8px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
@@ -2457,20 +2592,64 @@ span.rub_back_title{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 599px){
|
||||
|
||||
.wp-block-columns {
|
||||
|
||||
.menu-reklama_menu-container{
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 22px;
|
||||
margin-right: 22px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
#menu-reklama_menu{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
|
||||
.reklama_menu {
|
||||
display: flex;
|
||||
overflow-x: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
}
|
||||
|
||||
.reklama_menu li{
|
||||
font-size: 13px;
|
||||
margin-right: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.reklama_menu li a{
|
||||
color: #909294;
|
||||
}
|
||||
|
||||
.reklama_menu li a:hover{
|
||||
color: #F18129;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.reklama_menu li.current-menu-item{
|
||||
color: #171717;
|
||||
font-weight: bold;
|
||||
border-bottom: 3px solid #F18129;
|
||||
}
|
||||
|
||||
|
||||
.mini-card-img{
|
||||
max-width: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** mobile **/
|
||||
@media only screen
|
||||
and (min-device-width : 340px)
|
||||
@@ -2478,6 +2657,11 @@ and (max-device-width : 667px) {
|
||||
|
||||
|
||||
|
||||
#main{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
@@ -2497,9 +2681,9 @@ and (max-device-width : 667px) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mainbanner {
|
||||
/**#mainbanner {
|
||||
display: none;
|
||||
}
|
||||
}*/
|
||||
|
||||
.mini-card{
|
||||
width: 100%;
|
||||
@@ -2507,7 +2691,9 @@ and (max-device-width : 667px) {
|
||||
}
|
||||
|
||||
.mini-card-img{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
#footer-contact{
|
||||
@@ -2578,6 +2764,51 @@ and (max-device-width : 667px) {
|
||||
|
||||
|
||||
|
||||
.menu-reklama_menu-container{
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 22px;
|
||||
margin-right: 22px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
#menu-reklama_menu{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.reklama_menu {
|
||||
display: flex;
|
||||
overflow-x: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
}
|
||||
|
||||
.reklama_menu li{
|
||||
font-size: 13px;
|
||||
color: #909294;
|
||||
margin-right: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.reklama_menu li a{
|
||||
color: #909294;
|
||||
}
|
||||
|
||||
.reklama_menu li a:hover{
|
||||
color: #F18129;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.reklama_menu li.current-menu-item{
|
||||
color: #171717;
|
||||
font-weight: bold;
|
||||
border-bottom: 3px solid #F18129;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user