add beta rfo
This commit is contained in:
@@ -1,23 +1,53 @@
|
|||||||
<?php get_header( 'rfo' ); ?>
|
<?php get_header( 'rfo' ); ?>
|
||||||
<div class="content-middle articles-wrapper">
|
|
||||||
<?php get_template_part('partials/rubrics-mobile'); ?>
|
<div class="content-rfo">
|
||||||
<div class="section-title desktop">
|
|
||||||
<?php if (is_category()) : ?>
|
<? $current_category = get_queried_object();
|
||||||
<h1 class="section-title__title"><?= get_queried_object()->name ?></h1>
|
|
||||||
<?php endif; ?>
|
if ($current_category->name !== 'РФО') {
|
||||||
</div>
|
get_template_part( 'rfo/breadcrumbs-rfo' );
|
||||||
<div class="articles-preview">
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="rfo__rubric"><?=$current_category->name; ?></div>
|
||||||
|
<div class="articles-columns-rfo">
|
||||||
<?php
|
<?php
|
||||||
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
||||||
|
|
||||||
|
|
||||||
|
// Проверяем, есть ли у текущей рубрики родительская рубрика
|
||||||
|
if ($current_category->parent == 0) {
|
||||||
|
// Это родительская рубрика - получаем все её подрубрики
|
||||||
|
$child_categories = get_categories(array(
|
||||||
|
'child_of' => $current_category->term_id,
|
||||||
|
'hide_empty' => false
|
||||||
|
));
|
||||||
|
|
||||||
|
// Собираем ID всех подрубрик + ID текущей родительской
|
||||||
|
$category_ids = array($current_category->term_id);
|
||||||
|
foreach ($child_categories as $child) {
|
||||||
|
$category_ids[] = $child->term_id;
|
||||||
|
}
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'posts_per_page' => 13,
|
'posts_per_page' => 14,
|
||||||
'paged' => $paged,
|
'paged' => $paged,
|
||||||
'category__in' => get_queried_object_id()
|
'category__in' => $category_ids
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
// Это подрубрика - выводим только её посты
|
||||||
|
$args = array(
|
||||||
|
'post_type' => 'post',
|
||||||
|
'posts_per_page' => 14,
|
||||||
|
'paged' => $paged,
|
||||||
|
'category__in' => array($current_category->term_id)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$query = new WP_Query($args);
|
$query = new WP_Query($args);
|
||||||
?>
|
?>
|
||||||
<?php get_template_part('partials/post-list', null, ['query' => $query]); ?>
|
<?php get_template_part('rfo/post-list', null, ['query' => $query]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php custom_pagination(); ?>
|
<?php custom_pagination(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
24
content-post-main-rfo.php
Normal file
24
content-post-main-rfo.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
$formatted_date = format_event_date();
|
||||||
|
$full_width = $args['full_width'] ?? false;
|
||||||
|
?>
|
||||||
|
<div class="article-item-wrapper__rfo">
|
||||||
|
<div class="article-item-main__rfo">
|
||||||
|
<a href="<?php the_permalink(); ?>" class="article-item__image-container">
|
||||||
|
<?=render_webp_picture_by_post( null, 'news-list-picture'); ?>
|
||||||
|
</a>
|
||||||
|
<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">Подробнее</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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$formatted_date = format_event_date();
|
$formatted_date = format_event_date();
|
||||||
$full_width = $args['full_width'] ?? false;
|
$full_width = $args['full_width'] ?? false;
|
||||||
$class = $full_width ? 'article-item article-item--lg' : 'article-item-rfo';
|
$class = $full_width ? 'article-item-main__rfo' : 'article-item-rfo';
|
||||||
?>
|
?>
|
||||||
<div class="article-item-wrapper__rfo">
|
<div class="article-item-wrapper__rfo">
|
||||||
<div class="<?= $class; ?>">
|
<div class="<?= $class; ?>">
|
||||||
|
|||||||
@@ -1,27 +1,17 @@
|
|||||||
|
|
||||||
</main>
|
</main>
|
||||||
<footer itemscope itemtype="https://schema.org/WPFooter" class="footer">
|
<footer itemscope itemtype="https://schema.org/WPFooter" class="footer footer__rfo">
|
||||||
<meta itemprop="copyrightYear" content="<?=date('Y');?>">
|
<meta itemprop="copyrightYear" content="<?=date('Y');?>">
|
||||||
<meta itemprop="copyrightHolder" content="Агроэксперт">
|
<meta itemprop="copyrightHolder" content="Агроэксперт">
|
||||||
<div class="footer-top">
|
<div class="footer-top">
|
||||||
<div class="container footer__conatiner">
|
<div class="container footer__conatiner">
|
||||||
<div class="footer-top__inner">
|
<div class="footer-top__inner footer-top__rfo">
|
||||||
<?php $site_logo = get_field('site_logo', 'option'); ?>
|
<div class="footer-logoline__rfo">
|
||||||
<a href="<?php echo home_url(); ?>" class="logo footer__logo">
|
<?php get_template_part('rfo/logoline'); ?>
|
||||||
<img src="<?php echo esc_url($site_logo); ?>" alt="" />
|
|
||||||
</a>
|
|
||||||
<nav class="nav footer__nav">
|
|
||||||
<?php get_template_part('partials/menu-primary'); ?>
|
|
||||||
</nav>
|
|
||||||
<div class="footer-top__right">
|
|
||||||
<a href="#" class="to-top">
|
|
||||||
<span>Наверх</span>
|
|
||||||
<svg width="9" height="6" viewBox="0 0 9 6" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect x="3.69409" y="1.05029" width="1" height="5.22423" transform="rotate(45 3.69409 1.05029)" fill="black" />
|
|
||||||
<rect width="1" height="6" transform="matrix(-0.707107 0.707107 0.707107 0.707107 4.1333 0.525146)" fill="black" />
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<nav class="nav footer__nav">
|
||||||
|
<?php get_template_part('rfo/menu-rfo'); ?>
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
.featured-post {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 1200px; /* Ограничиваем максимальную ширину */
|
|
||||||
margin: 0 auto; /* Центрируем */
|
|
||||||
overflow: visible;
|
|
||||||
background: white;
|
|
||||||
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 641"><path fill="black" d="M8.79432 0L1191.2 0.000208277C1196.04 0.000209123 1200 3.94998 1200 8.77804L1200 632.222C1200 637.05 1196.04 641 1191.2 641L888.707 641C882.54 641 881.385 637.144 878.499 632.222L872.392 621.805C870.382 618.378 866.127 615.509 862.559 615.131L8.79431 615.13C3.95669 615.13 0 611.181 0 606.352L0 8.77759C0 3.94952 3.95671 0 8.79432 0Z"/></svg>');
|
|
||||||
mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 641"><path fill="black" d="M8.79432 0L1191.2 0.000208277C1196.04 0.000209123 1200 3.94998 1200 8.77804L1200 632.222C1200 637.05 1196.04 641 1191.2 641L888.707 641C882.54 641 881.385 637.144 878.499 632.222L872.392 621.805C870.382 618.378 866.127 615.509 862.559 615.131L8.79431 615.13C3.95669 615.13 0 611.181 0 606.352L0 8.77759C0 3.94952 3.95671 0 8.79432 0Z"/></svg>');
|
|
||||||
-webkit-mask-size: 100% 100%;
|
|
||||||
mask-size: 100% 100%;
|
|
||||||
padding-bottom: 53.42%; /* Сохраняем пропорции 641/1200 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.featured-image-wrapper {
|
|
||||||
position: absolute;
|
|
||||||
top: 6px; /* Отступ сверху */
|
|
||||||
left: 6px; /* Отступ слева */
|
|
||||||
right: 6px; /* Отступ справа */
|
|
||||||
bottom: 33px; /* Оставляем место внизу для photo-credit-tag */
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.featured-image {
|
|
||||||
border-radius: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.featured-image img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover; /* Заполняем область с сохранением пропорций */
|
|
||||||
display: block;
|
|
||||||
opacity: 0.9;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
filter: brightness(0.85);
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-overlay {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 40px; /* Учитываем место для photo-credit-tag */
|
|
||||||
left: 20px;
|
|
||||||
right: 20px;
|
|
||||||
padding: 30px 20px 20px;
|
|
||||||
color: white;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ярлык автора */
|
|
||||||
.photo-credit-tag {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0; /* Прижимаем к нижней границе маски */
|
|
||||||
right: 20px; /* Отступ справа */
|
|
||||||
background: white;
|
|
||||||
padding: 6px 20px 6px 16px;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
z-index: 3;
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,33 @@
|
|||||||
.articles-preview-rfo{
|
.articles-preview-rfo{
|
||||||
display: flex; /* Активируем Flexbox */
|
display: flex; /* Активируем Flexbox */
|
||||||
justify-content: space-between; /* Равномерное распределение пространства между колонками */
|
/* Равномерное распределение пространства между колонками */
|
||||||
/* или можно использовать justify-content: space-around; */
|
/* или можно использовать justify-content: space-around; */
|
||||||
gap: 10px; /* Расстояние между колонками */
|
gap: 10px; /* Расстояние между колонками */
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-item-wrapper__rfo{
|
.articles-columns-rfo{
|
||||||
flex: 1;
|
display: flex; /* Активируем Flexbox */
|
||||||
background-color: white;
|
/* Равномерное распределение пространства между колонками */
|
||||||
|
/* или можно использовать justify-content: space-around; */
|
||||||
|
gap: 10px; /* Расстояние между колонками */
|
||||||
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.article-item-wrapper__rfo{
|
||||||
|
/* flex: 0 0 auto; Запрещаем растягивание и сжатие */
|
||||||
|
background-color: white;
|
||||||
border: 6px solid white;
|
border: 6px solid white;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-item-rfo{
|
.article-item-rfo{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
height: 409px;
|
height: 409px;
|
||||||
|
width: 397px;
|
||||||
background: #f1f3eb; /* пример фона */
|
background: #f1f3eb; /* пример фона */
|
||||||
|
|
||||||
/* МАСКА через встроенный data URI */
|
/* МАСКА через встроенный data URI */
|
||||||
@@ -28,6 +40,38 @@
|
|||||||
mask-size: cover;
|
mask-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-title__rfo{
|
||||||
|
font-family: var(--second-family);
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 2.2rem;
|
||||||
|
line-height: 150%;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-excerpt__rfo{
|
||||||
|
font-family: var(--font-family);
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
line-height: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-item-main__rfo {
|
||||||
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
|
height: 409px;
|
||||||
|
width: 816px; /* Новый размер по ширине SVG */
|
||||||
|
background: #f1f3eb; /* пример фона */
|
||||||
|
|
||||||
|
/* Новая МАСКА через встроенный data URI */
|
||||||
|
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 789 409"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79428 0.00442659L780.206 0.000136415C785.043 0.000137261 789 3.94997 789 8.778L789 34.6477L789 374.353L789 400.222C789 405.05 785.043 409 780.206 409L627.708 409C621.541 409 620.386 405.144 617.5 400.222L611.393 389.805C609.383 386.378 605.128 383.509 601.56 383.13L8.79426 383.135C3.95665 383.135 6.00491e-05 379.185 6.08933e-05 374.357L6.99763e-05 8.78198C7.08205e-05 3.95395 3.95667 0.00442574 8.79428 0.00442659Z" fill="black"/></svg>');
|
||||||
|
-webkit-mask-repeat: no-repeat;
|
||||||
|
-webkit-mask-size: cover;
|
||||||
|
|
||||||
|
mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 789 409"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79428 0.00442659L780.206 0.000136415C785.043 0.000137261 789 3.94997 789 8.778L789 34.6477L789 374.353L789 400.222C789 405.05 785.043 409 780.206 409L627.708 409C621.541 409 620.386 405.144 617.5 400.222L611.393 389.805C609.383 386.378 605.128 383.509 601.56 383.13L8.79426 383.135C3.95665 383.135 6.00491e-05 379.185 6.08933e-05 374.357L6.99763e-05 8.78198C7.08205e-05 3.95395 3.95667 0.00442574 8.79428 0.00442659Z" fill="black"/></svg>');
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
.article-section-title__rfo{
|
.article-section-title__rfo{
|
||||||
font-family: var(--second-family);
|
font-family: var(--second-family);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@@ -35,6 +79,7 @@
|
|||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-rfo-details{
|
.article-rfo-details{
|
||||||
@@ -59,6 +104,106 @@
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobile-title-rfo{
|
||||||
|
|
||||||
|
padding: 22px 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mobile-excerpt__rfo{
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.related-posts{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center; /* центрирование по горизонтали */
|
||||||
|
width: ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Мобильные (1 в ряд) */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
|
.articles-preview-rfo{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.article-item-wrapper__rfo {
|
||||||
|
width: 100%; /* На мобильных - на всю ширину */
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-item-main__rfo {
|
||||||
|
width: 100%; /* или любой нужный вам размер */
|
||||||
|
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;
|
||||||
|
-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-repeat: no-repeat;
|
||||||
|
mask-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.article-item-rfo {
|
||||||
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 100%; /* или любой нужный вам размер */
|
||||||
|
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;
|
||||||
|
-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-repeat: no-repeat;
|
||||||
|
mask-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-single--rfo{
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-info--rfo{
|
||||||
|
flex: 0;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.articles-preview-rfo{
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-item__text{
|
||||||
|
padding: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-title__rfo{
|
||||||
|
font-size: 1.8rem;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-excerpt__rfo{
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
0
frontend/src/styles/rfo/articles.css
Normal file
0
frontend/src/styles/rfo/articles.css
Normal file
@@ -1,6 +1,6 @@
|
|||||||
.featured-post {
|
.featured-post {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
/** width: 100%;
|
||||||
max-width: 1200px; /* Ограничиваем максимальную ширину */
|
max-width: 1200px; /* Ограничиваем максимальную ширину */
|
||||||
margin: 0 auto; /* Центрируем */
|
margin: 0 auto; /* Центрируем */
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
@@ -60,3 +60,19 @@
|
|||||||
color: #333;
|
color: #333;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
|
.featured-post {
|
||||||
|
/* Адаптивная маска */
|
||||||
|
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 288 199" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79424 0L279.205 0C284.042 0 287.999 3.94986 287.999 8.77791V34.6476V164.353V190.222C287.999 195.05 284.042 199 279.205 199H115.707C109.54 199 108.385 195.144 105.499 190.222L99.3918 179.805C97.3825 176.378 93.1269 173.509 89.5588 173.13H8.79422C3.95661 173.13 0 169.181 0 164.352V8.77756C0 3.94951 3.95663 0 8.79424 0Z" fill="black"/></svg>');
|
||||||
|
-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 288 199" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79424 0L279.205 0C284.042 0 287.999 3.94986 287.999 8.77791V34.6476V164.353V190.222C287.999 195.05 284.042 199 279.205 199H115.707C109.54 199 108.385 195.144 105.499 190.222L99.3918 179.805C97.3825 176.378 93.1269 173.509 89.5588 173.13H8.79422C3.95661 173.13 0 169.181 0 164.352V8.77756C0 3.94951 3.95663 0 8.79424 0Z" fill="black"/></svg>');
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: 100% 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -48,11 +48,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content-rfo{
|
.content-rfo{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
margin-top: -222px;
|
margin-top: -222px;
|
||||||
|
/**width: 1200px;
|
||||||
|
max-width: 1200px;**/
|
||||||
|
}
|
||||||
|
.content-rfo-min{
|
||||||
|
margin-top: -222px;
|
||||||
|
border: 0;
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.rfo__rubric{
|
.rfo__rubric{
|
||||||
font-family: var(--second-family);
|
font-family: var(--second-family);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@@ -124,3 +133,40 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.footer__rfo{
|
||||||
|
background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/rfo-footer.png');
|
||||||
|
background-size: cover; /* Растягивает изображение на весь блок */
|
||||||
|
background-position: center; /* Центрирует изображение */
|
||||||
|
background-repeat: no-repeat; /* Отключает повторение */
|
||||||
|
padding: 40px 20px; /* Отступы внутри подвала */
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
|
.header__inner_rfo{
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-rfo {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-top__rfo{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-logoline__rfo{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-nav__rfo{
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -68,6 +68,8 @@ function theme_enqueue_styles_scripts()
|
|||||||
// Enqueue Google Fonts
|
// Enqueue Google Fonts
|
||||||
wp_enqueue_style('google-fonts-raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600&display=swap', false);
|
wp_enqueue_style('google-fonts-raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600&display=swap', false);
|
||||||
wp_enqueue_style('google-fonts-roboto', 'https://fonts.googleapis.com/css2?family=Roboto:wght@400&display=swap', false);
|
wp_enqueue_style('google-fonts-roboto', 'https://fonts.googleapis.com/css2?family=Roboto:wght@400&display=swap', false);
|
||||||
|
|
||||||
|
wp_enqueue_style('google-fonts-Unbounded', 'https://fonts.googleapis.com/css2?family=Unbounded:wght@200..900&display=swap', false);
|
||||||
}
|
}
|
||||||
add_action('wp_enqueue_scripts', 'theme_enqueue_styles_scripts');
|
add_action('wp_enqueue_scripts', 'theme_enqueue_styles_scripts');
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
17
rfo/breadcrumbs-rfo.php
Normal file
17
rfo/breadcrumbs-rfo.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
$current_category_id = get_queried_object_id(); // ID текущей категории
|
||||||
|
$category_url = get_category_link($current_category_id);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="breadcrumbs__rfo">
|
||||||
|
<li class="breadcrumbs-home__rfo">
|
||||||
|
<span><a href="<?=home_url()?>/rfo">Главная</a></span>
|
||||||
|
<span class="breadcrumbs-arrow">
|
||||||
|
<svg width="6" height="18" viewBox="0 0 6 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1.5 12.75L5.25 9L1.5 5.25" stroke="#4F4F4F" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li><a href="<?=$category_url?>"><?=get_category_name();?></a></li>
|
||||||
|
</ul>
|
||||||
8
rfo/logoline.php
Normal file
8
rfo/logoline.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="header-rfo-logoline">
|
||||||
|
<img src="https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/rfo-logo.svg" >
|
||||||
|
<div class="agroexpess-logo">
|
||||||
|
<?php $site_logo = get_field('site_logo', 'option');?>
|
||||||
|
<a href="<?php echo home_url(); ?>" class="logo header__logo">
|
||||||
|
<img src="<?php echo esc_url($site_logo); ?>" width="158" alt="" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
22
rfo/post-list.php
Normal file
22
rfo/post-list.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
global $wp_query;
|
||||||
|
$large_first_image = $args['large_first_image'] ?? true;
|
||||||
|
$post_counter = 0;
|
||||||
|
$query = $args['query'] ?? $wp_query;
|
||||||
|
if ($query->have_posts()) {
|
||||||
|
while ($query->have_posts()) {
|
||||||
|
$post_counter++;
|
||||||
|
$end = $query->post_count;
|
||||||
|
$query->the_post();
|
||||||
|
|
||||||
|
if ( $post_counter == 1 ) :
|
||||||
|
get_template_part('content', 'post-main-rfo', ['full_width' => $post_count === 1 ]);
|
||||||
|
elseif ( $post_counter == 2) :
|
||||||
|
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1 && $large_first_image]);
|
||||||
|
else:?>
|
||||||
|
<?get_template_part('content', 'post-rfo', ['full_width' => false]);?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?wp_reset_postdata();
|
||||||
|
}
|
||||||
|
}?>
|
||||||
@@ -17,7 +17,7 @@ if ($categories) {
|
|||||||
$related_posts_query = new WP_Query($args);
|
$related_posts_query = new WP_Query($args);
|
||||||
|
|
||||||
if ($related_posts_query->have_posts()) {
|
if ($related_posts_query->have_posts()) {
|
||||||
|
echo '<div class="related-posts">';
|
||||||
echo '<div class="article-section-title__rfo">Читайте также:</div>';
|
echo '<div class="article-section-title__rfo">Читайте также:</div>';
|
||||||
echo '<div class="articles-preview-rfo">';
|
echo '<div class="articles-preview-rfo">';
|
||||||
|
|
||||||
@@ -26,6 +26,7 @@ if ($categories) {
|
|||||||
get_template_part('content', 'post-rfo');
|
get_template_part('content', 'post-rfo');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user