diff --git a/content-post-rfo-inter.php b/content-post-rfo-inter.php new file mode 100644 index 0000000..e69de29 diff --git a/content-post-rfo.php b/content-post-rfo.php index e0f1691..663ebb0 100644 --- a/content-post-rfo.php +++ b/content-post-rfo.php @@ -1,10 +1,12 @@
-
+
diff --git a/frontend/src/main.js b/frontend/src/main.js index 34493f6..181c565 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -30,6 +30,8 @@ import './styles/rfo/featured.css'; import './styles/rfo/social.css'; import './styles/rfo/article.css'; import './styles/rfo/breadcrumbs.css'; +import './styles/rfo/landing.css'; + import './scripts/calendar.js'; diff --git a/frontend/src/styles/rfo/article.css b/frontend/src/styles/rfo/article.css index b116235..a5faf7d 100644 --- a/frontend/src/styles/rfo/article.css +++ b/frontend/src/styles/rfo/article.css @@ -28,7 +28,8 @@ flex-shrink: 0; height: 409px; width: 397px; - background: #f1f3eb; /* пример фона */ + background: #f1f3eb; /* пример фона */ + /* МАСКА через встроенный data URI */ -webkit-mask-image: url('data:image/svg+xml;utf8,'); @@ -40,6 +41,34 @@ mask-size: cover; } +.item-rfo-zh{ + fill: var(--zheltyy); + background: var(--zheltyy); +} + +.item-rfo-zel{ + fill: var(--zelenyy); + background: var(--zelenyy); +} + + +.item-rfo-orange{ + position: relative; + flex-shrink: 0; + height: 409px; + width: 397px; + + background: #f1f3eb; /* пример фона */ + -webkit-mask-image: url('/wp-content/themes/agroexpert/frontend/img/orange-article.svg'); + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: cover; + + mask-image: url('/wp-content/themes/agroexpert/frontend/img/orange-article.svg'); + mask-repeat: no-repeat; + mask-size: cover; + +} + .post-title__rfo{ font-family: var(--second-family); font-weight: 700; @@ -120,8 +149,6 @@ display: flex; flex-direction: column; justify-content: center; /* центрирование по горизонтали */ - width: ; - } .pagination__rfo { diff --git a/frontend/src/styles/rfo/landing.css b/frontend/src/styles/rfo/landing.css new file mode 100644 index 0000000..a1fa885 --- /dev/null +++ b/frontend/src/styles/rfo/landing.css @@ -0,0 +1,133 @@ +.header-rfo__landing{ + width: 100%; + height: 728px; + background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/rfo-landing.png'); + background-size: cover; /* Заполняет весь блок, обрезая края */ + background-repeat: no-repeat; + background-position: center; +} + +.rfo-rubrics-line{ + display: flex; + gap: 28px; +} + +.end-interview__wrapper{ + display: flex; + flex-direction: column; + gap: 20px; +} + +.land-cart-title{ + display: flex; + padding: 2px 12px; +} + + + + .land-cart-title__text{ + flex-grow: 1; + font-family: var(--second-family); + font-weight: 700; + font-size: 1.8em; + line-height: 150%; + text-transform: uppercase; + color: #000; + } + + .land-cart-title__arrow{ + width: 24px; + height: 24px; + margin-left: 16px; + background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/lang-arrow.svg'); + background-repeat: no-repeat; + background-position: center; + transition: transform 0.3s ease; + } + + .land-title__arrow{ + width: 24px; + height: 24px; + margin-left: 8px; + background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/lang-arrow.svg'); + } + + .landing-block__rfo{ + display: flex; + flex-direction: column; + gap: 22px; + } + + .about-block__rfo{ + display: flex; + width: 1200px; + justify-content: center; /* горизонтальное центрирование */ + align-items: center; /* вертикальное центрирование * /* важно задать высоту */ + margin: 25px 0; + } + + .about-block_content__rfo{ + display: flex; + flex-direction: column; + flex: 1; + gap: 28px; + margin: 22px 0; + max-width: 100%; + padding: 8px; + } + + .about-block_title__rfo{ + display: flex; + gap: 8px; + align-items: center; + + } + + .about-block_name__rfo{ + font-family: var(--second-family); + font-weight: 700; + font-size: 2.2em; + line-height: 150%; + text-transform: uppercase; + color: #000; + } + + .about-block-slogan__rfo{ + flex: 0 0 30%; + font-family: var(--second-family); + font-weight: 700; + font-size: 1.6rem; + line-height: 150%; + text-transform: uppercase; + color: #006842; + margin-left: 28px; + } + + + + + + +@media (max-width: 768px) { + + .header-rfo__landing{ + width: 100%; + height: 289px; + background-image: url('https://agroexpert.press/wp-content/themes/agroexpert/frontend/img/rfo-landing-mob.png'); + } + + .rfo-rubrics-line{ + flex-direction: column; + } + + .about-block__rfo{ + flex-direction: column; + } + + .about-block_content__rfo, + .about-block-slogan__rfo{ + flex: 1 1 100%; /* На всю ширину */ + width: 100%; /* На всякий случай */ + } + +} diff --git a/frontend/src/styles/rfo/rfo.css b/frontend/src/styles/rfo/rfo.css index d9f790b..1a13ddc 100644 --- a/frontend/src/styles/rfo/rfo.css +++ b/frontend/src/styles/rfo/rfo.css @@ -1,3 +1,15 @@ +:root { + --belyy: #fff; + --zheltyy: #ffdb96; + --zelenyy: #c9fec8; + --zelenyy-2: #006842; + --oranzhevyy: #f18917; + --001: #101828; + --seryy: #c4d3d9; + --2: #f1f3eb; + --tekst: #2f2f2f; +} + .header-rfo { width: 100%; height: 400px; @@ -54,6 +66,17 @@ /**width: 1200px; max-width: 1200px;**/ } + + .content-rfo-land{ + display: flex; + flex-direction: column; + margin-top: -22px; + padding-bottom: 42px; + /**width: 1200px; + max-width: 1200px;**/ + } + + .content-rfo-min{ margin-top: -222px; border: 0; @@ -145,6 +168,10 @@ @media (max-width: 768px) { + + .content-rfo-land{ + margin-top: -22px; + } .header__inner_rfo{ flex-direction: row; diff --git a/header-rfo-landing.php b/header-rfo-landing.php new file mode 100644 index 0000000..effc3d2 --- /dev/null +++ b/header-rfo-landing.php @@ -0,0 +1,105 @@ + +> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +> + +
+ + + + +
+
+
+
+ +
+ +
+
+ + +
+
+ +
+
+ +
+ + +
+
+
+
+ + +
+ + + +
+ + + \ No newline at end of file diff --git a/inc/special.php b/inc/special.php index acd768f..8520bd4 100644 --- a/inc/special.php +++ b/inc/special.php @@ -1,10 +1,17 @@ slug == 'rfo' ) { + $rfo_template = locate_template('rfo/landing.php'); + if ($rfo_template) return $rfo_template; + } // Только родительские рубрики (их дочерние подрубрики подхватятся автоматически) $target_parent_slugs = ['forest', 'rfo']; // Только slug родительских рубрик + // Получаем родительскую рубрику $parent_category = $current_category->parent @@ -19,6 +26,7 @@ add_filter('category_template', function($template) { } return $template; + }); add_filter('single_template', function($template) { diff --git a/rfo/category-end.php b/rfo/category-end.php new file mode 100644 index 0000000..a13a0be --- /dev/null +++ b/rfo/category-end.php @@ -0,0 +1,48 @@ + + +
+ $category, + 'posts_per_page' => $posts_count, + 'orderby' => 'date', + 'order' => 'DESC' + ); + + $query = new WP_Query($query_args); + + if ($query->have_posts()) : ?> + +
+
+
+
+
+ +
+ have_posts()) : $query->the_post(); ?> + 'article-item-rfo '.$style ] );?> + +
+
+ + +
\ No newline at end of file diff --git a/rfo/end-interview.php b/rfo/end-interview.php new file mode 100644 index 0000000..990a859 --- /dev/null +++ b/rfo/end-interview.php @@ -0,0 +1,33 @@ + 'rfo', // или 'category_id' => X + 'posts_per_page' => 1, + 'orderby' => 'date', + 'order' => 'DESC' +); + +$last_post = new WP_Query($args); + +if ($last_post->have_posts()) {?> + +
+ + have_posts()) {?> + +
+
+
Интервью
+
+
+
+ + + +
+ +
+ + + +
+ + +
+ +
+ + 'rfo', // slug рубрики + 'style' => 'item-rfo-zh' + ]);?> + + 'rfo', // slug рубрики + 'style' => 'item-rfo-zel' + ]);?> + + 'rfo', // slug рубрики + 'style' => 'item-rfo-zh' + ]);?> + + +
+ +
+
+
+
О проекте
+
+
+

Фумигационный отряд создан в 1962 г. Госинспекцией по карантину растений Министерства сельского хозяйства СССР, Приказом Министерства сельского хозяйства Российской Федерации № 735 от 14 мая 2003 г. переименован в Федеральное государственное унитарное предприятие «Республиканский фумигационный отряд», Распоряжением Правительства Российской Федерации № 1592-р от 26 июля 2016 г. изменена организационно-правовая форма на Федеральное казенное предприятие «Республиканский фумигационный отряд»

+
+
+ БОЛЕЕ 60 ЛЕТ
МЫ СОХРАНЯЕМ 
ВАШ ПРОДУКТ! +
+
+ +
+
+
Новости
+
+
+ + + +
+ + +
+ + \ No newline at end of file diff --git a/rfo/news-landing.php b/rfo/news-landing.php new file mode 100644 index 0000000..18e188a --- /dev/null +++ b/rfo/news-landing.php @@ -0,0 +1,24 @@ + 3700, + 'post__not_in' => array($current_post_id), + 'posts_per_page' => 3, +); + +$related_posts_query = new WP_Query($args); + +if ($related_posts_query->have_posts()) { + echo ''; + wp_reset_postdata(); +} + \ No newline at end of file diff --git a/tag.php b/tag.php index 0929435..641da5c 100644 --- a/tag.php +++ b/tag.php @@ -2,8 +2,8 @@
- -

+ +

name ?>

@@ -13,21 +13,11 @@ 'post_type' => 'post', 'posts_per_page' => 13, 'paged' => $paged, - 'tag_id' => get_queried_object_id() // Используем tag_id вместо category__in + 'category__in' => get_queried_object_id() ); $query = new WP_Query($args); - - // Передаем query через глобальную переменную $wp_query, чтобы избежать ошибки - global $wp_query; - $original_query = $wp_query; - $wp_query = $query; - - get_template_part('partials/post-list'); - - // Восстанавливаем оригинальный запрос - $wp_query = $original_query; - wp_reset_postdata(); ?> + $query]); ?>