add interview styles
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
if ($current_category->name !== 'РФО') {
|
||||
get_template_part( 'rfo/breadcrumbs-rfo' );
|
||||
}
|
||||
|
||||
$has_video = ($current_category->slug === 'opinion') ? true : false;
|
||||
|
||||
?>
|
||||
|
||||
<div class="rfo__rubric"><?=$current_category->name; ?></div>
|
||||
@@ -47,7 +50,7 @@ if ($current_category->name !== 'РФО') {
|
||||
|
||||
$query = new WP_Query($args);
|
||||
?>
|
||||
<?php get_template_part('rfo/post-list', null, ['query' => $query]); ?>
|
||||
<?php get_template_part('rfo/post-list', null, ['query' => $query , 'has_video' => $has_video]); ?>
|
||||
</div>
|
||||
<?php custom_pagination( null, 'pagination pagination__rfo' ); ?>
|
||||
</div>
|
||||
|
||||
@@ -1,27 +1,38 @@
|
||||
<?php
|
||||
$formatted_date = format_event_date();
|
||||
$full_width = $args['full_width'] ?? false;
|
||||
|
||||
$short = $args['short'] ?? false;
|
||||
//$class = $full_width ? 'article-item-main__rfo' : 'article-item-rfo';
|
||||
$class = isset($args['class']) ? $args['class'] : 'article-item-rfo';
|
||||
$title = isset($args['title']) ? $args['title'] : '';
|
||||
$has_video = isset($args['has_video']) ? $args['has_video'] : false;
|
||||
|
||||
|
||||
?>
|
||||
<div class="article-item-wrapper__rfo">
|
||||
<div class="<?=$class; ?>">
|
||||
<a href="<?php the_permalink(); ?>" class="article-item__image-container">
|
||||
<?if ( $title !== ''):?>
|
||||
<div class="land-cart-title">
|
||||
<div class="land-cart-title__text"><?php echo esc_html($title); ?></div>
|
||||
<div class="land-cart-title__arrow"></div>
|
||||
</div>
|
||||
<?endif?>
|
||||
<div class="<?=$class; ?><?=$has_video === true ? ' has-video' : ''; ?>">
|
||||
<a href="<?php the_permalink(); ?>" class="article-item__image-container<">
|
||||
<?=render_webp_picture_by_post( null, 'news-list-picture'); ?>
|
||||
</a>
|
||||
<?if (! $short ):?>
|
||||
<div class="article-item__text">
|
||||
<div class="article-time">
|
||||
<img src="<?= get_asset('/icons/time.svg'); ?>" alt="" /><?php echo $formatted_date; ?>
|
||||
</div>
|
||||
<a href="<?php the_permalink(); ?>" class="subtitle-16 article-item__link"><?php the_title(); ?></a>
|
||||
<? if ($full_width) : ?>
|
||||
<p class="article-item__descr text-13"><?php the_excerpt(); ?></p>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<div class="article-rfo-details">
|
||||
<div class="article-rfo-details-text"><a href="<?php the_permalink();?>">Подробнее</a></div><div class="article-rfo-details-icon"><svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.57157 16.4283H16.4287M16.4287 16.4283V8.5712M16.4287 16.4283L8.57157 8.5712" stroke="#006842" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg></div></div>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<?endif?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,29 +19,28 @@
|
||||
.article-item-wrapper__rfo{
|
||||
/* flex: 0 0 auto; Запрещаем растягивание и сжатие */
|
||||
background-color: white;
|
||||
border: 6px solid white;
|
||||
border-width: 4px 4px 4px 4px; /* top right bottom left */
|
||||
border-style: solid; /* Общий стиль для всех сторон */
|
||||
border-color: white; /* Общий цвет */
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.article-interview-wrapper__rfo{
|
||||
.article-short-wrapper__rfo{
|
||||
/* flex: 0 0 auto; Запрещаем растягивание и сжатие */
|
||||
background-color: white;
|
||||
border: 6px solid white;
|
||||
padding-top: 22px;
|
||||
border-width: 6px 6px 6px 6px; /* top right bottom left */
|
||||
border-style: solid; /* Общий стиль для всех сторон */
|
||||
border-color: white; /* Общий цвет */
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.article-item-rfo{
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
|
||||
height: 409px;
|
||||
width: 397px;
|
||||
background: #f1f3eb; /* пример фона */
|
||||
|
||||
|
||||
/* МАСКА через встроенный data URI */
|
||||
/* clip-path: path('M8.79428 0L378.205 0C383.042 0 386.999 3.9499 386.999 8.77793V34.6476V374.353V400.222C386.999 405.05 383.042 409 378.205 409H225.707C219.54 409 218.385 405.144 215.499 400.222L209.392 389.805C207.382 386.378 203.127 383.509 199.559 383.13H8.79426C3.95665 383.13 0 379.181 0 374.352V8.77756C0 3.94952 3.95667 0 8.79428 0Z');*/
|
||||
-webkit-mask-image: var(--article-item-mask);
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-size: cover;
|
||||
@@ -50,6 +49,22 @@
|
||||
mask-size: cover;
|
||||
}
|
||||
|
||||
.article-short-rfo{
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
height: 205px;
|
||||
width: 373px;
|
||||
background: #D4D4D4; /* пример фона */
|
||||
-webkit-mask-image: var(--article-short-mask);
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-size: cover;
|
||||
mask-image: var(--article-short-mask);
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: cover;
|
||||
/*clip-path: path('M0 0H373V180H0V0Z'); /* Простой прямоугольник с скруглёнными углами
|
||||
clip-path: inset(0 round 10px); Скругление углов (поддержка хуже) */
|
||||
}
|
||||
|
||||
.item-rfo-zh{
|
||||
fill: var(--zheltyy);
|
||||
background: var(--zheltyy);
|
||||
@@ -164,6 +179,28 @@
|
||||
border-top: none!important;
|
||||
}
|
||||
|
||||
.has-video {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.has-video::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
background-image: var(--video-play-icon);
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
transform: translate(-50%, -50%);
|
||||
pointer-events: none; /* не блокирует клик по ссылке */
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Мобильные (1 в ряд) */
|
||||
@media (max-width: 768px) {
|
||||
|
||||
@@ -179,6 +216,8 @@
|
||||
aspect-ratio: 277/339; /* сохраняем пропорции оригинальной маски */
|
||||
background: #f1f3eb;
|
||||
|
||||
|
||||
|
||||
/* Маска с сохранением пропорций */
|
||||
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 277 339" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79427 0L268.205 0C273.042 0 276.999 3.94988 276.999 8.77791V34.6476V304.353V330.222C276.999 335.05 273.042 339 268.205 339H115.707C109.54 339 108.385 335.144 105.499 330.222L99.3918 319.805C97.3825 316.378 93.1269 313.509 89.5588 313.13H8.79425C3.95664 313.13 0 309.181 0 304.352V8.77756C0 3.94952 3.95665 0 8.79427 0Z" fill="black"/></svg>');
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
@@ -197,16 +236,40 @@
|
||||
aspect-ratio: 277/339; /* сохраняем пропорции оригинальной маски */
|
||||
background: #f1f3eb;
|
||||
|
||||
clip-path: none;
|
||||
|
||||
/* Маска с сохранением пропорций */
|
||||
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 277 339" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79427 0L268.205 0C273.042 0 276.999 3.94988 276.999 8.77791V34.6476V304.353V330.222C276.999 335.05 273.042 339 268.205 339H115.707C109.54 339 108.385 335.144 105.499 330.222L99.3918 319.805C97.3825 316.378 93.1269 313.509 89.5588 313.13H8.79425C3.95664 313.13 0 309.181 0 304.352V8.77756C0 3.94952 3.95665 0 8.79427 0Z" fill="black"/></svg>');
|
||||
-webkit-mask-image: var(--article-mob-mask);
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-size: 100% 100%;
|
||||
|
||||
mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 277 339" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79427 0L268.205 0C273.042 0 276.999 3.94988 276.999 8.77791V34.6476V304.353V330.222C276.999 335.05 273.042 339 268.205 339H115.707C109.54 339 108.385 335.144 105.499 330.222L99.3918 319.805C97.3825 316.378 93.1269 313.509 89.5588 313.13H8.79425C3.95664 313.13 0 309.181 0 304.352V8.77756C0 3.94952 3.95665 0 8.79427 0Z" fill="black"/></svg>');
|
||||
mask-image: var(--article-mob-mask);
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 100% 100%;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.article-short-rfo{
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background: #D4D4D4; /* пример фона */
|
||||
aspect-ratio: 257 / 141;
|
||||
-webkit-mask-image: var(--article-short-mob-mask);
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-size: cover;
|
||||
mask-image: var(--article-short-mob-mask);
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 100% 100%;
|
||||
/*clip-path: path('M0 0H373V180H0V0Z'); /* Простой прямоугольник с скруглёнными углами
|
||||
clip-path: inset(0 round 10px); Скругление углов (поддержка хуже) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.article-single--rfo{
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.header-rfo__landing{
|
||||
width: 100%;
|
||||
height: 728px;
|
||||
background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/rfo-landing.png');
|
||||
background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/fumigation.png');
|
||||
background-size: cover; /* Заполняет весь блок, обрезая края */
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -103,9 +103,23 @@
|
||||
margin-left: 28px;
|
||||
}
|
||||
|
||||
.fumigation-botton {
|
||||
position: absolute;
|
||||
right: 15%;
|
||||
top: -250px;
|
||||
transform: translateY(-50%);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (min-width: 768px) and (max-width: 1024px) {
|
||||
|
||||
.fumigation-botton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@@ -130,4 +144,8 @@
|
||||
width: 100%; /* На всякий случай */
|
||||
}
|
||||
|
||||
.fumigation-botton{
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
--2: #f1f3eb;
|
||||
--tekst: #2f2f2f;
|
||||
--article-item-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 387 409"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79428 0L378.205 0C383.042 0 386.999 3.9499 386.999 8.77793V34.6476V374.353V400.222C386.999 405.05 383.042 409 378.205 409H225.707C219.54 409 218.385 405.144 215.499 400.222L209.392 389.805C207.382 386.378 203.127 383.509 199.559 383.13H8.79426C3.95665 383.13 0 379.181 0 374.352V8.77756C0 3.94952 3.95667 0 8.79428 0Z" fill="black"/></svg>');
|
||||
--article-mob-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 277 339" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79427 0L268.205 0C273.042 0 276.999 3.94988 276.999 8.77791V34.6476V304.353V330.222C276.999 335.05 273.042 339 268.205 339H115.707C109.54 339 108.385 335.144 105.499 330.222L99.3918 319.805C97.3825 316.378 93.1269 313.509 89.5588 313.13H8.79425C3.95664 313.13 0 309.181 0 304.352V8.77756C0 3.94952 3.95665 0 8.79427 0Z" fill="black"/></svg>');
|
||||
--article-short-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 373 205'><rect x='354.893' y='205' width='336.786' height='162' rx='10' transform='rotate(-180 354.893 205)' fill='black' fill-opacity='0.3'/><rect x='362.136' y='193' width='351.272' height='170' rx='10' transform='rotate(-180 362.136 193)' fill='black' fill-opacity='0.3'/><rect x='373' y='180' width='373' height='180' rx='10' transform='rotate(-180 373 180)' fill='black' fill-opacity='0.3'/></svg>");
|
||||
--article-short-mob-mask: url("data:image/svg+xml,%3Csvg width='257' height='141' viewBox='0 0 257 141' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='244.097' y='141' width='231.643' height='111.424' rx='10' transform='rotate(-180 244.097 141)' fill='black' fill-opacity='0.3' /%3E%3Crect x='249.079' y='132.746' width='241.606' height='116.927' rx='10' transform='rotate(-180 249.079 132.746)' fill='black' fill-opacity='0.3' /%3E%3Crect x='256.551' y='123.805' width='256.551' height='123.805' rx='10' transform='rotate(-180 256.551 123.805)' fill='black' fill-opacity='0.3' /%3E%3C/svg%3E");
|
||||
--video-play-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><circle cx='32' cy='32.0001' r='32' fill='white' fill-opacity='0.5'/><path d='M26 22L44 32L26 42V22Z' fill='black'/></svg>");
|
||||
}
|
||||
|
||||
.header-rfo {
|
||||
@@ -69,9 +73,10 @@
|
||||
}
|
||||
|
||||
.content-rfo-land{
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: -22px;
|
||||
margin-top: -62px;
|
||||
padding-bottom: 42px;
|
||||
/**width: 1200px;
|
||||
max-width: 1200px;**/
|
||||
@@ -167,7 +172,6 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
||||
.content-rfo-land{
|
||||
|
||||
@@ -11,9 +11,26 @@
|
||||
|
||||
// Извлекаем параметры
|
||||
$category = isset($args['category']) ? $args['category'] : 'rfo';
|
||||
$title = isset($args['title']) ? $args['title'] : 'РФО';
|
||||
$title = isset($args['title']) ? $args['title'] : '';
|
||||
$wrapper = isset($args['wrapper']) ? $args['wrapper'] : 'article-item-wrapper__rfo';
|
||||
$style = isset($args['style']) ? $args['style'] : 0;
|
||||
$style = isset($args['style']) ? $args['style'] : '';
|
||||
$has_video = isset($args['has_video']) ? $args['has_video'] : false;
|
||||
|
||||
if ( $style == 'short' ){
|
||||
$wrapper = 'article-short-wrapper__rfo';
|
||||
$color_style = 'article-short-rfo';
|
||||
$short = true;
|
||||
} else {
|
||||
$short = false;
|
||||
$wrapper = 'article-item-wrapper__rfo';
|
||||
if ($style == '') {
|
||||
$color_style = 'article-item-rfo';
|
||||
} else {
|
||||
$color_style = 'article-item-rfo '.$style;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posts_count = isset($args['posts_count']) ? $args['posts_count'] : 1;
|
||||
?>
|
||||
<div class="custom-category-block" data-category="<?php echo esc_attr($category); ?>">
|
||||
@@ -29,18 +46,14 @@ $posts_count = isset($args['posts_count']) ? $args['posts_count'] : 1;
|
||||
|
||||
if ($query->have_posts()) : ?>
|
||||
|
||||
<div class="<?=$wrapper?>">
|
||||
<div class="land-cart-title">
|
||||
<div class="land-cart-title__text"><?php echo esc_html($title); ?></div>
|
||||
<div class="land-cart-title__arrow"></div>
|
||||
</div>
|
||||
|
||||
<div class="article-item-rfo">
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<?get_template_part( 'content', 'post-rfo', [ 'class'=>'article-item-rfo '.$style ] );?>
|
||||
<?get_template_part( 'content', 'post-rfo',
|
||||
[
|
||||
'class'=>$color_style,
|
||||
'title' => $title,
|
||||
'has_video' => $has_video
|
||||
]);?>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
global $wp_query;
|
||||
$large_first_image = $args['large_first_image'] ?? true;
|
||||
$has_video = $args['has_video'] ?? false;
|
||||
$post_counter = 0;
|
||||
$query = $args['query'] ?? $wp_query;
|
||||
if ($query->have_posts()) {
|
||||
@@ -10,11 +11,11 @@ if ($query->have_posts()) {
|
||||
$query->the_post();
|
||||
|
||||
if ( $post_counter == 1 ) :
|
||||
get_template_part('content', 'post-main-rfo', ['full_width' => $post_count === 1 ]);
|
||||
get_template_part('content', 'post-main-rfo', ['full_width' => $post_count === 1, 'has_video' => $has_video ]);
|
||||
elseif ( $post_counter == 2) :
|
||||
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1 && $large_first_image]);
|
||||
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1 && $large_first_image, 'has_video' => $has_video]);
|
||||
else:?>
|
||||
<?get_template_part('content', 'post-rfo', ['full_width' => false]);?>
|
||||
<?get_template_part('content', 'post-rfo', ['full_width' => false, 'has_video' => $has_video]);?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?wp_reset_postdata();
|
||||
|
||||
Reference in New Issue
Block a user