diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php
index 7bc85a1..c178e1b 100644
--- a/wp-content/themes/cosmopet/functions.php
+++ b/wp-content/themes/cosmopet/functions.php
@@ -1,6 +1,5 @@
-
-
isDir() || $template_file->getExtension() !== 'php') {
+ continue;
+ }
+
+ // Получаем относительный путь (например, "pages/template-landing.php")
+ $relative_path = str_replace($custom_templates_dir, '', $template_file->getPathname());
+
+ // Формируем имя шаблона (убираем .php и заменяем слэши на дефисы)
+ $template_name = str_replace(['/', '.php'], [' - ', ''], $relative_path);
+
+ // Добавляем в список шаблонов
+ $templates['templates/' . $relative_path] = $template_name;
+ }
+
+ return $templates;
+});
+
includeFilesFromFolder(get_template_directory() . '/global-functions');
+
+
// Add the function to the Timber context
add_filter('timber/context', function($context) {
$context['template_path'] = get_template_directory_uri();
+ $current_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+ $context['current_url'] = htmlspecialchars($current_url);
return $context;
});
+/**
+ * Подключает статические CSS и JS файлы из указанной директории
+ *
+ * @param string $dir_name Название директории в папке /static/
+ * @param array $options Дополнительные параметры:
+ * - 'css' => false - отключить подключение CSS
+ * - 'js' => false - отключить подключение JS
+ * - 'version' => string - версия файлов (по умолчанию использует время модификации файла)
+ */
+function enqueue_static_assets($dir_name, $options = []) {
+ // Устанавливаем пути к директориям
+ $static_dir = get_template_directory() . '/static/' . $dir_name;
+ $static_uri = get_template_directory_uri() . '/static/' . $dir_name;
+
+ // Подключаем CSS файлы
+ if (!isset($options['css']) || $options['css'] !== false) {
+ $css_dir = $static_dir . '/css/';
+ if (file_exists($css_dir)) {
+ $css_files = scandir($css_dir);
+ foreach ($css_files as $file) {
+ if (pathinfo($file, PATHINFO_EXTENSION) === 'css') {
+ $handle = $dir_name . '-' . pathinfo($file, PATHINFO_FILENAME);
+ $src = $static_uri . '/css/' . $file;
+ $ver = isset($options['version']) ? $options['version'] : filemtime($css_dir . $file);
+
+ wp_enqueue_style(
+ $handle,
+ $src,
+ array(),
+ $ver
+ );
+ }
+ }
+ }
+ }
+
+ // Подключаем JS файлы
+ if (!isset($options['js']) || $options['js'] !== false) {
+ $js_dir = $static_dir . '/js/';
+ if (file_exists($js_dir)) {
+ $js_files = scandir($js_dir);
+ foreach ($js_files as $file) {
+ if (pathinfo($file, PATHINFO_EXTENSION) === 'js') {
+ $handle = $dir_name . '-' . pathinfo($file, PATHINFO_FILENAME);
+ $src = $static_uri . '/js/' . $file;
+ $ver = isset($options['version']) ? $options['version'] : filemtime($js_dir . $file);
+ $in_footer = strpos($file, 'admin') === 0 ? false : true;
+
+ wp_enqueue_script(
+ $handle,
+ $src,
+ array(),
+ $ver,
+ $in_footer
+ );
+ }
+ }
+ }
+ }
+}
$modules_path = get_template_directory() . '/modules/*/editor-blocks/*/editor-block-controller.php';
foreach (glob($modules_path) as $file) {
@@ -276,13 +371,12 @@ foreach (glob($modules_path) as $file) {
}
add_filter('timber/context', function($context) {
$context['current_lang'] = pll_current_language();
-
return $context;
});
requireShortcodes(get_template_directory() . '/modules');
-require_once('modules/blog/components/news-list/component-ajax-controller.php');
+require_once('modules/blog/module-ajax-controller.php');
require_once('modules/forms/module-ajax-controller.php');
include_module('forms');
include_module('layout');
diff --git a/wp-content/themes/cosmopet/global-functions/multilang-functions.php b/wp-content/themes/cosmopet/global-functions/multilang-functions.php
index 09319fd..cff45b2 100644
--- a/wp-content/themes/cosmopet/global-functions/multilang-functions.php
+++ b/wp-content/themes/cosmopet/global-functions/multilang-functions.php
@@ -23,4 +23,19 @@ pll_register_string ('Главная', 'Главная');
pll_register_string ('Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших, предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции', 'Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции');
pll_register_string ('Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах', 'Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах');
pll_register_string ('подписаться', 'подписаться');
-pll_register_string ('Узнайте о нас больше и получите скидку!', 'Узнайте о нас больше и получите скидку!');
\ No newline at end of file
+pll_register_string ('Узнайте о нас больше и получите скидку!', 'Узнайте о нас больше и получите скидку!');
+pll_register_string ('Это миф!', 'Это миф!');
+pll_register_string ('Это правда!', 'Это правда!');
+pll_register_string ('Правда', 'Правда');
+pll_register_string ('Миф', 'Миф');
+pll_register_string ('Далее', 'Далее');
+pll_register_string ('ваш результат', 'ваш результат');
+pll_register_string ('Скопировать', 'Скопировать');
+pll_register_string ('Скопировано', 'Скопировано');
+pll_register_string ('В магазин', 'В магазин');
+pll_register_string ('Наш блог', 'Наш блог');
+pll_register_string ('Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных', 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных');
+pll_register_string ('ЭТАПЫ ПРОИЗВОД­СТВА', 'ЭТАПЫ ПРОИЗВОД­СТВА');
+pll_register_string ('Этапы производс­тва корма', 'Этапы производс­тва корма');
+pll_register_string ('Все статьи', 'Все статьи');
+pll_register_string ('Узнать больше', 'Узнать больше');
diff --git a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css
index 4159eb7..63c5937 100644
--- a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css
+++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css
@@ -1,87 +1,3 @@
-/* Header */
-.header {
- background: var(--main_white);
- border-bottom: 1px solid var(--interface_title);
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 4;
-}
-
-.header-container {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 16px 0;
-}
-
-.header-bars {
- display: none;
-}
-
-.header-logo {
- display: flex;
- align-items: center;
- gap: 8px;
-}
-
-.header-logo span {
- color: var(---main_black);
- font-size: 20px;
- text-transform: uppercase;
-}
-
-.header-navs {
- display: flex;
- align-items: center;
- gap: 24px;
-}
-
-.header-navs__link {
- padding: 8px 12px;
- font-size: 16px;
- font-weight: bold;
- text-transform: uppercase;
- line-height: 20px;
-}
-
-.header-accordion {}
-
-.header-accordion__btn {
- display: flex;
- align-items: center;
- gap: 4px;
- padding: 8px 12px;
- border-radius: 24px;
- background: var(--accent-2);
- cursor: pointer;
- user-select: none;
- font-size: 16px;
- font-weight: bold;
- line-height: 20px;
- color: var(---main_black);
-}
-
-.header-right {
- display: flex;
- align-items: center;
- gap: 8px;
-}
-
-.header-lang__btn {
- display: flex;
- align-items: center;
- cursor: pointer;
- user-select: none;
- gap: 4px;
- padding: 12px 15px;
- color: var(---main_black);
- font-size: 16px;
- font-weight: bold;
- line-height: 20px;
-}
-
-/* Header end */
-
-
+main{
+ padding-top: 72px;
+}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-tablet.css b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-tablet.css
index 0a868f5..5220caa 100644
--- a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-tablet.css
+++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-tablet.css
@@ -1,32 +1 @@
/* Стили для планшетов */
-@media only screen and (max-width: 992px) {
- .header-navs {
- display: none;
- }
-
- .header-container {
- height: 56px;
- padding: 0;
- }
-
- .header-bars {
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .header-logo {
- font-size: 16px;
- line-height: 20px;
- gap: 8px;
- }
-
- .header-logo img {
- width: 31px;
- flex-shrink: 0;
- }
-
- .header-lang {
- display: none;
- }
-}
diff --git a/wp-content/themes/cosmopet/modules/blog/components/author-banner/component-template.twig b/wp-content/themes/cosmopet/modules/blog/components/author-banner/component-template.twig
new file mode 100644
index 0000000..e249f88
--- /dev/null
+++ b/wp-content/themes/cosmopet/modules/blog/components/author-banner/component-template.twig
@@ -0,0 +1,15 @@
+ {% set current_path = template_path ~ '/modules/blog/components/author-banner' %}
+
+
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/modules/blog/components/editorial/component-controller.php b/wp-content/themes/cosmopet/modules/blog/components/editorial/component-controller.php
index 2ef4415..aa4f004 100644
--- a/wp-content/themes/cosmopet/modules/blog/components/editorial/component-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/components/editorial/component-controller.php
@@ -1,14 +1,22 @@
'post', // Specify post type (change if using custom post type)
+ 'meta_query' => array(
+ array(
+ 'key' => 'editorial', // ACF field name
+ 'value' => '1', // Assuming 'true' is stored as '1'. Change to 'true' if stored as a string.
+ 'compare' => '='
+ )
+ )
+ );
+
+ $editorial_query = new WP_Query($args);
+ $e_query = array();
+ foreach($editorial_query->posts as $item){
+ $e_query[] = Timber::get_post($item, 'BlogPost');
}
- $context['editorial'] = $repeater;
+ $context['editorial'] = $e_query;
return $context;
});
diff --git a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-tablet.css b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-tablet.css
index 458ea8a..59eb0fb 100644
--- a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-tablet.css
+++ b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-tablet.css
@@ -91,5 +91,6 @@
right: 50%;
bottom: 27px;
transform: translateX(50%);
+ width: max-content;
}
}
diff --git a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js
index 051fa36..0082fa4 100644
--- a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js
+++ b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js
@@ -3,8 +3,12 @@
slidesPerView: 1,
spaceBetween: 0,
effect: 'fade',
+ fadeEffect: {
+ crossFade: true, // Включаем перекрестное затухание
+ },
+ allowTouchMove: false,
+ speed: 750,
loop: true,
- speed: 1250,
navigation: {
nextEl: '.home-swp__btn-next',
prevEl: '.home-swp__btn-prev',
diff --git a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/component-controller.php b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/component-controller.php
index 256e5e8..cefa832 100644
--- a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/component-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/component-controller.php
@@ -1,14 +1,23 @@
'post', // Specify post type (change if using custom post type)
+ 'meta_query' => array(
+ array(
+ 'key' => 'featured', // ACF field name
+ 'value' => '1', // Assuming 'true' is stored as '1'. Change to 'true' if stored as a string.
+ 'compare' => '='
+ )
+ )
+ );
+
+ $featured_query = new WP_Query($args);
+ $f_query = array();
+ foreach($featured_query->posts as $item){
+ $f_query[] = Timber::get_post($item, 'BlogPost');
}
- $context['featured'] = $repeater;
+ $context['featured'] = $f_query;
+
return $context;
});
diff --git a/wp-content/themes/cosmopet/modules/blog/components/most-read/component-template.twig b/wp-content/themes/cosmopet/modules/blog/components/most-read/component-template.twig
new file mode 100644
index 0000000..a0acaff
--- /dev/null
+++ b/wp-content/themes/cosmopet/modules/blog/components/most-read/component-template.twig
@@ -0,0 +1,28 @@
+

diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/assets/img/preview.png
new file mode 100644
index 0000000..2c15aa5
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/editor-block-controller.php
index a7a4c18..134bd04 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/editor-block-controller.php
@@ -8,6 +8,11 @@
$context['button'] = get_field('button');
$context['link'] = get_field('link');
$context['color'] = get_field('color');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/button_block/editor-block-template.twig', $context);
}
@@ -30,6 +35,14 @@
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
wp_enqueue_style('gp_button_block_style', get_template_directory_uri() . '/modules/blog/editor-blocks/button_block/assets/css/style.css', array(), '2.0', 'all');
},
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/button_block/assets/img/preview.png'
+ )
+ )
+ ),
'supports' => array(
'align' => true,
'multiple' => true,
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/assets/img/preview.png
new file mode 100644
index 0000000..78338b1
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/editor-block-controller.php
index 7c2e932..405c94e 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/image/editor-block-controller.php
@@ -6,6 +6,11 @@
$context['is_preview'] = $is_preview;
$context['image'] = get_field('image');
$context['color'] = get_field('color');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/image/editor-block-template.twig', $context);
}
@@ -28,6 +33,14 @@
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
wp_enqueue_style('gp_image_style', get_template_directory_uri() . '/modules/blog/editor-blocks/image/assets/css/style.css', array(), '2.0', 'all');
},
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/image/assets/img/preview.png'
+ )
+ )
+ ),
'supports' => array(
'align' => true,
'multiple' => true,
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/assets/img/preview.png
new file mode 100644
index 0000000..7d1aff7
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/editor-block-controller.php
index 4224189..cb3fad5 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/editor-block-controller.php
@@ -6,6 +6,11 @@
$context['is_preview'] = $is_preview;
$context['list'] = get_field('list');
$context['icon'] = get_field('icon');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/list_v1/editor-block-template.twig', $context);
}
@@ -28,6 +33,14 @@
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
wp_enqueue_style('gp_list_v1_style', get_template_directory_uri() . '/modules/blog/editor-blocks/list_v1/assets/css/style.css', array(), '2.0', 'all');
},
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/list_v1/assets/img/preview.png'
+ )
+ )
+ ),
'supports' => array(
'align' => true,
'multiple' => true,
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/assets/img/preview.png
new file mode 100644
index 0000000..f809691
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/editor-block-controller.php
index 5fb1959..c08d60b 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/editor-block-controller.php
@@ -5,6 +5,11 @@
$context['block'] = $block;
$context['is_preview'] = $is_preview;
$context['list'] = get_field('list');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/list_v2/editor-block-template.twig', $context);
}
@@ -27,6 +32,14 @@
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
wp_enqueue_style('gp_list_v2_style', get_template_directory_uri() . '/modules/blog/editor-blocks/list_v2/assets/css/style.css', array(), '2.0', 'all');
},
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/list_v2/assets/img/preview.png'
+ )
+ )
+ ),
'supports' => array(
'align' => true,
'multiple' => true,
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/assets/img/preview.png
new file mode 100644
index 0000000..c3edfc0
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/editor-block-controller.php
index 112062c..098a2fa 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/editor-block-controller.php
@@ -5,6 +5,11 @@
$context['block'] = $block;
$context['is_preview'] = $is_preview;
$context['gallery'] = get_field('gallery');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/swiper/editor-block-template.twig', $context);
}
@@ -22,6 +27,14 @@
'icon' => 'admin-comments',
'keywords' => array( 'slider', 'gp-block',),
'mode' => 'preview',
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/swiper/assets/img/preview.png'
+ )
+ )
+ ),
'enqueue_assets' => function(){
wp_enqueue_style('gp_util_style', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-core.css', array(), '1.0', 'all');
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/img/preview.png
new file mode 100644
index 0000000..f9516d5
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/editor-block-controller.php
index 1aa4c85..c38af21 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/editor-block-controller.php
@@ -5,6 +5,11 @@
$context['block'] = $block;
$context['is_preview'] = $is_preview;
$context['content'] = get_field('content');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/table/editor-block-template.twig', $context);
}
@@ -21,6 +26,14 @@
'icon' => 'admin-comments',
'keywords' => array( 'table', 'gp-block',),
'mode' => 'preview',
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/table/assets/img/preview.png'
+ )
+ )
+ ),
'enqueue_assets' => function(){
wp_enqueue_style('gp_util_style', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-core.css', array(), '1.0', 'all');
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css
index c184da1..b6cc6df 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css
@@ -32,10 +32,12 @@
}
.texts ol li {
- display: flex;
- align-items: center;
+ /* display: flex;
+ align-items: center; */
gap: 12px;
counter-increment: num;
+ padding-left: 46px;
+ position: relative;
}
.texts ol li::before {
@@ -51,6 +53,10 @@
line-height: 32px;
font-weight: 500;
color: white;
+ position: absolute;
+ left: 0;
+ top: 50%;
+ transform: translateY(-50%);
}
.texts ul {
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/img/preview.png
new file mode 100644
index 0000000..974dc9a
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/editor-block-controller.php
index 8410e80..abe1103 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/editor-block-controller.php
@@ -5,6 +5,11 @@
$context['block'] = $block;
$context['is_preview'] = $is_preview;
$context['content'] = get_field('content');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/texts/editor-block-template.twig', $context);
}
@@ -22,10 +27,18 @@
'icon' => 'admin-comments',
'keywords' => array( 'texts', 'simple block', 'gp-block',),
'mode' => 'preview',
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/texts/assets/img/preview.png'
+ )
+ )
+ ),
'enqueue_assets' => function(){
wp_enqueue_style('gp_util_style', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-core.css', array(), '1.0', 'all');
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
- wp_enqueue_style('gp_texts_style', get_template_directory_uri() . '/modules/blog/editor-blocks/texts/assets/css/style.css', array(), '2.0', 'all');
+ wp_enqueue_style('gp_texts_style', get_template_directory_uri() . '/modules/blog/editor-blocks/texts/assets/css/style.css', array(), '5.0', 'all');
}
));
}
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/assets/img/preview.png b/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/assets/img/preview.png
new file mode 100644
index 0000000..3519d5a
Binary files /dev/null and b/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/assets/img/preview.png differ
diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/editor-block-controller.php b/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/editor-block-controller.php
index 3404be4..2c22391 100644
--- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/editor-block-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/video/editor-block-controller.php
@@ -5,6 +5,11 @@
$context['block'] = $block;
$context['is_preview'] = $is_preview;
$context['video'] = get_field('video');
+ // Проверяем, есть ли картинка превью в блоке
+ if ($is_preview && !empty($block['data']['preview_image'])) {
+ echo '
 . ')
';
+ return;
+ }
Timber::render('modules/blog/editor-blocks/video/editor-block-template.twig', $context);
}
@@ -27,6 +32,14 @@
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all');
wp_enqueue_style('gp_video_style', get_template_directory_uri() . '/modules/blog/editor-blocks/video/assets/css/style.css', array(), '2.0', 'all');
},
+ 'example' => array(
+ 'attributes' => array(
+ 'data' => array(
+ 'is_preview' => true,
+ 'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/video/assets/img/preview.png'
+ )
+ )
+ ),
'supports' => array(
'align' => true,
'multiple' => true,
diff --git a/wp-content/themes/cosmopet/modules/blog/module-ajax-controller.php b/wp-content/themes/cosmopet/modules/blog/module-ajax-controller.php
index e69de29..820c75b 100644
--- a/wp-content/themes/cosmopet/modules/blog/module-ajax-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/module-ajax-controller.php
@@ -0,0 +1,38 @@
+ 'post',
+ 'posts_per_page' => 9, // Adjust the number of posts per page
+ 'paged' => intval($paged) + 1,
+ ];
+
+ if (!empty($category)) {
+ $args['tax_query'] = [
+ [
+ 'taxonomy' => 'category',
+ 'field' => 'slug', // or 'term_id', 'name' depending on how you identify categories
+ 'terms' => $category,
+ ],
+ ];
+ }
+ $q = new WP_Query($args);
+ return new Timber\PostQuery($q);
+}
+
+function ajax_load_blog_posts() {
+ $page_num = isset($_POST['page_num']) ? sanitize_text_field($_POST['page_num']) : '';
+ $context = Timber::context();
+ $context['posts'] = get_posts_by_page_and_category($page_num);
+ $html = Timber::compile('/blog/news-list.twig', $context);
+ echo $html;
+ wp_die();
+}
+
+
+add_action('wp_ajax_load_blog_posts', 'ajax_load_blog_posts');
+add_action('wp_ajax_nopriv_load_blog_posts', 'ajax_load_blog_posts');
+
+
diff --git a/wp-content/themes/cosmopet/modules/blog/module-controller.php b/wp-content/themes/cosmopet/modules/blog/module-controller.php
index 7a1c97b..cc5f29a 100644
--- a/wp-content/themes/cosmopet/modules/blog/module-controller.php
+++ b/wp-content/themes/cosmopet/modules/blog/module-controller.php
@@ -12,6 +12,7 @@ class BlogPost extends \Timber\Post
*
* @return string
*/
+
public function reading_time()
{
$symb_per_minute = 2280;
@@ -22,6 +23,18 @@ class BlogPost extends \Timber\Post
/* translators: %s: Time duration in minute or minutes. */
return sprintf(_n('%s ' . pll__('мин.'), '%s ' . pll__('мин.'), $minutes), (int) $minutes);
}
+ public function get_author_name()
+ {
+ if (get_field('post_author', $this->ID)){
+ return get_the_title(get_field('post_author', $this->ID));
+ }
+ return false;
+ }
+ public function get_author_img()
+ {
+ $id = get_field('post_author', $this->ID);
+ return get_the_post_thumbnail_url( $id, 'thumbnail' );
+ }
}
add_filter('timber/post/classmap', function ($classmap) {
diff --git a/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.php b/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.php
index 62f9b14..623c2ca 100644
--- a/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.php
+++ b/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.php
@@ -3,7 +3,8 @@
add_shortcode( 'subs_form', 'subs_form' );
function subs_form( $atts ){
- return \Timber\Timber::compile( 'blog/shortcodes/subs_form/shortcode.twig');
+ $context = Timber::get_context();
+ return \Timber\Timber::compile( 'blog/shortcodes/subs_form/shortcode.twig', $context);
}
diff --git a/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.twig b/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.twig
index 6bde05a..2ce6fd0 100644
--- a/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.twig
+++ b/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form/shortcode.twig
@@ -1,11 +1,13 @@
{% set current_path = '/wp-content/themes/cosmopet/modules/blog/shortcodes/subs_form' %}
-
+ {{ function('wp_footer') }}
+
+
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/modules/popup/module.template.twig b/wp-content/themes/cosmopet/modules/popup/module.template.twig
new file mode 100644
index 0000000..80f3776
--- /dev/null
+++ b/wp-content/themes/cosmopet/modules/popup/module.template.twig
@@ -0,0 +1,60 @@
+{% set current_path = template_path ~ '/modules/footer' %}
+
+
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/static/about/css/style.css b/wp-content/themes/cosmopet/static/about/css/style.css
new file mode 100644
index 0000000..0bf147a
--- /dev/null
+++ b/wp-content/themes/cosmopet/static/about/css/style.css
@@ -0,0 +1,911 @@
+/* */
+
+:root{
+ --grey-black: #121212;
+ --creme-white: #F4F1F0;
+ --transition: .3s all ease;
+ --GR1: linear-gradient(22deg, #F44242 23.69%, #569EF0 66.57%);
+ --new-blue: #569EFF;
+ --border: 60px;
+}
+
+.hero{
+ position: relative;
+ background: var(--radial);
+ overflow: hidden;
+ z-index: 1;
+}
+.cont {
+ max-width: 1060px;
+ padding: 0px 30px;
+ margin: 0 auto;
+}
+.hero .cont{
+ padding-top: 245px;
+ padding-bottom: 132px;
+ position: relative;
+}
+.hero_image{
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: -2;
+ mix-blend-mode: soft-light;
+}
+.hero_title{
+ font-size: 82px;
+ font-weight: 700;
+ line-height: normal;
+ text-transform: uppercase;
+ color: #F4F1F0;
+ padding: 0 0 32px 0;
+}
+.hero_image_mobile,
+.home_line2{
+ display: none;
+}
+.about{
+ border-radius: 60px;
+ background: var(--creme-white);
+ box-shadow: 6px 9px 20px 0px rgba(0, 0, 0, 0.15);
+ padding: 145px 0 100px 0;
+ margin: -60px 0 0 0;
+ position: relative;
+ z-index: 2;
+}
+.section_top{
+ display: flex;
+ align-items: center;
+ gap: 35px;
+}
+.block_title{
+ font-size: 36px;
+ font-weight: 700;
+ line-height: normal;
+ text-transform: uppercase;
+ color: var(--grey-black);
+}
+.about .section_top{
+ margin: 0 0 200px 0;
+}
+.about_top_image2{
+ display: none;
+}
+.section_title2{
+ font-size: 99px;
+ font-weight: 700;
+ line-height: 110.5%;
+ text-transform: uppercase;
+ margin: 0 0 15px 0;
+ color: var(--grey-black);
+}
+.description{
+ font-size: 24px;
+ font-weight: 500;
+ line-height: normal;
+ color: var(--grey-black);
+}
+.advantage_row{
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ gap: 120px 0;
+ margin: 200px 0;
+ align-items: flex-start;
+}
+.advantage_row2{
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ gap: 120px 30px;
+ margin: 0 0 200px 0;
+}
+.advantage_row2 .advantage_item{
+ max-width: 100%;
+ width: calc(50% - 15px);
+}
+.advantage_item{
+ position: relative;
+}
+.advantage_item:not(.for_border .advantage_item), .for_border:has(.advantage_item){
+ width: 435px;
+ max-width: calc(50% - 15px);
+}
+.advantage_item:last-child .advantage_title, .advantage_item:last-child .description:not(.for_border .description){
+ width: 100%;
+}
+.advantage_title{
+ font-size: 36px;
+ font-weight: 700;
+ line-height: normal;
+ text-transform: uppercase;
+ color: var(--grey-black);
+ margin: 0 0 24px 0;
+ width: 85%;
+}
+.advantage_image{
+ position: absolute;
+ left: 0;
+ z-index: -1;
+ top: -130px;
+ max-width: 234px;
+ max-height: 234px;
+}
+.advantage_item .description:not(.for_border .description){
+ width: 80%;
+}
+.advantage_image2{
+ width: 100%;
+}
+.advantage_row .advantage_item:nth-child(3) .advantage_image{
+ top: -165px;
+}
+.advantage_row .advantage_item:nth-child(3){
+ margin: 82px 0 0 0;
+}
+.about .for_border{
+ border-radius: 60px;
+ background: var(--GR1);
+ padding: 2px;
+ box-shadow: 6px 9px 20px 0px rgba(0, 0, 0, 0.15);
+}
+.about .for_border .advantage_item{
+ background-color: var(--creme-white);
+ padding: 45px 34px 45px 50px;
+ border-radius: 58px;
+}
+.protein{
+ margin: 200px 0 140px 0;
+ position: relative;
+ z-index: 0;
+}
+.protein img{
+ width: 100%;
+}
+.protein::before{
+ position: absolute;
+ content: '';
+ width: 103%;
+ height: 132%;
+ left: 0;
+ top: -7%;
+ background-image: url(../img/protein_ellipse.png);
+ background-size: contain;
+ background-repeat: no-repeat;
+ z-index: -1;
+ animation: rotateAnimation 10s infinite;
+}
+@keyframes rotateAnimation {
+ 0% {
+ transform: rotate(0deg);
+ }
+ 50% {
+ transform: rotate(45deg);
+ }
+ 100% {
+ transform: rotate(0deg);
+ }
+}
+.protein .description{
+ position: absolute;
+ z-index: 1;
+}
+.protein .description:first-child{
+ left: 16px;
+ top: -23px;
+}
+.protein .description:nth-child(2){
+ top: -25px;
+ right: 0;
+}
+.protein .description:nth-child(3){
+ left: 0;
+ bottom: 112px;
+}
+.protein .description:nth-child(4){
+ right: 0;
+ bottom: 113px;
+}
+
+.diagram{
+ margin: 0 0 200px 0;
+}
+.diagram_texts{
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ margin: 40px 0 20px 0;
+}
+.diagram_texts .description{
+ width: 33.3%;
+ text-align: left;
+}
+.diagram img{
+ width: 100%;
+}
+.etaps_row{
+ display: flex;
+ align-items: center;
+ gap: 120px;
+ justify-content: flex-start;
+ margin: 135px 0 100px 0;
+ position: relative;
+ padding-right: 252px;
+}
+.etaps_col{
+ display: flex;
+ flex-direction: column;
+ gap: 135px;
+ align-items: flex-start;
+}
+.etap_item{
+ display: flex;
+ align-items: flex-start;
+ gap: 25px;
+}
+.etap_item:nth-child(2) .description{
+ max-width: 67%;
+}
+.etaps_anim{
+ max-width: 252px;
+ position: absolute;
+ right: 0;
+ top: 50%;
+ transform: translate(0,-50%);
+}
+.faq_section{
+ background: radial-gradient(358.38% 263.16% at 123.55% -27.98%, #0F5881 0%, #1EA49C 36.98%, #76CE75 66.67%, #ECF39F 91.15%);
+ padding: 140px 0 160px 0;
+ margin: -70px 0 0 0;
+}
+.faq_section .section_title2{
+ color: var(--creme-white);
+ margin: 0 0 50px 0;
+}
+.faq_block {
+ background-color: var(--creme-white);
+ border-radius: 60px;
+ border: 2px solid var(--grey-black);
+}
+.faq_block .faq_item {
+ padding: 0 72px 0 49px;
+ font-size: 24px;
+ font-weight: 500;
+ color: var(--grey-black);
+ border-bottom: 2px solid var(--grey-black);
+}
+.faq_block .faq_item:last-child{
+ border: none;
+}
+
+.faq_top{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 20px;
+ padding: 44px 0 52px 0;
+ cursor: pointer;
+}
+.faq_block .faq_top{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 20px;
+ padding: 44px 0 52px 0;
+}
+.faq_block .faq_top .faq_arr_down{
+ padding: 5px;
+ transition: var(--transition);
+}
+.faq_block .faq_top .faq_arr_down.rotate{
+ transform: rotateX(180deg);
+}
+.faq_block .faq_body{
+ overflow: hidden;
+ margin: 0;
+ height: 0;
+ transition: var(--transition);
+}
+.faq_block .faq_body.open{
+ margin: 0 0 30px 0;
+ height: auto;
+}
+.desctop_none{
+ display: none;
+}
+
+@media (min-width: 980px) {
+ .advantage_row, .advantage_row2{
+ padding-right: 5%;
+ }
+}
+
+.section_title{
+ font-size: 82px;
+ font-weight: 700;
+ line-height: normal;
+ text-transform: uppercase;
+ color: var(--grey-black);
+}
+
+
+@media only screen and (max-width: 1170px) {
+ .footer_form .footer_form-title h2,
+ .footer_box .footer_box-title{
+ font-size: 30px;
+ line-height: 34px;
+ }
+ .footer_box .footer_box-link {
+ font-size: 20px;
+ line-height: 24px;
+ }
+ .pet_inputs .input_name{
+ font-size: 22px;
+ padding: 31px 22px;
+ }
+ .section_title2 {
+ font-size: 70px;
+ }
+ .hero_title {
+ font-size: 78px;
+ padding: 150px 0;
+ }
+ .block_title {
+ font-size: 30px;
+ }
+ .block_title {
+ font-size: 24px;
+ }
+ .about .section_top,
+ .advantage_row2,
+ .diagram{
+ margin: 0 0 150px 0;
+ }
+ .advantage_row{
+ margin: 200px 0 150px 0;
+ }
+ .protein{
+ margin: 150px 0 140px 0;
+ }
+}
+
+@media only screen and (max-width: 950px){
+ .footer_form .footer_form-info,
+ .footer_form .footer_form-inp input,
+ .footer_form .footer_form-inp{
+ width: 100%;
+ }
+.section_title{
+ font-size: 48px;
+}
+.section_title2 {
+ font-size: 55px;
+}
+.description{
+ font-size: 20px;
+}
+.hero_title {
+ font-size: 60px;
+ padding: 120px 0;
+}
+.hero .cont {
+ padding-top: 100px;
+ padding-bottom: 170px;
+}
+.faq_block .faq_top{
+ padding: 30px 0;
+}
+.about{
+ padding: 100px 0;
+}
+.about .section_top, .advantage_row2, .diagram {
+ margin: 0 0 100px 0;
+}
+.advantage_row .advantage_item:nth-child(3) {
+ margin: 74px 0 0 0;
+}
+.advantage_row{
+ margin: 200px 0 100px 0;
+}
+.protein {
+ margin: 100px 0 140px 0;
+}
+.etaps_row{
+ margin: 100px 0;
+}
+.etaps_col{
+ gap: 100px;
+}
+.advantage_title {
+ font-size: 28px;
+}
+.protein .description:nth-child(4) {
+ bottom: 98px;
+}
+.protein .description:nth-child(3) {
+ bottom: 98px;
+}
+.etaps_anim{
+ display: none;
+}
+.etaps_row{
+ padding-right: 0;
+}
+}
+@media only screen and (max-width: 776px){
+ /* FAQ */
+ .section_top .section_title{
+ width: 100%;
+ }
+ .section_title{
+ width: 100%;
+ }
+ .faq_item{
+ padding: 0 40px 0 30px;
+ font-size: 18px;
+ }
+ .faq{
+ padding: 0 0 80px 0;
+ }
+ .section_title2 {
+ font-size: 36px;
+ margin: 0 0 20px 0;
+ }
+ .description{
+ font-size: 16px;
+ }
+
+ .header_navs select{
+ color: var(--grey-black);
+ border-color: var(--grey-black);
+ background-image: url(../img/i-arr_down_black.svg);
+ }
+ .hero_title {
+ font-size: 45px;
+ }
+ .hero_image{
+ display: none;
+ }
+ .hero_image_mobile{
+ display: block;
+ position: absolute;
+ top: 45px;
+ right: 50%;
+ transform: translate(50%,0);
+ z-index: -2;
+ mix-blend-mode: soft-light;
+ }
+ .home .home_line2, .hero .home_line2 {
+ position: absolute;
+ display: block;
+ top: 56px;
+ left: 0;
+ width: 108%;
+ z-index: -1;
+ }
+ .about .section_top{
+ flex-direction: column;
+ gap: 0;
+ align-items: center;
+ }
+ .block_title {
+ font-size: 22px;
+ }
+ .about_top_image2{
+ display: block;
+ }
+ .about_top_image{
+ display: none;
+ }
+ .about{
+ padding: 80px 0;
+ }
+
+ /* FAQ */
+ .faq_block .faq_item{
+ padding: 0 40px 0 30px;
+ font-size: 18px;
+ }
+ .faq_section{
+ padding: 120px 0;
+ }
+ .faq_block .faq_top {
+ padding: 25px 0;
+ }
+
+ /* */
+ .etap_right_anim{
+ display: none;
+ }
+ .advantage_row .advantage_item:not(.for_border .advantage_item){
+ width: 70%;
+ max-width: 100%;
+ }
+ .advantage_row .for_border:has(.advantage_item){
+ max-width: 100%;
+ width: 100%;
+ }
+ .advantage_image{
+ max-width: 150px;
+ max-height: 150px;
+ width: 100%;
+ height: auto;
+ object-fit: contain;
+ top: -100px;
+ }
+ .advantage_row .advantage_item:nth-child(2) .advantage_image {
+ top: -108px;
+ }
+ .advantage_row .advantage_item:nth-child(3) .advantage_image {
+ top: -115px;
+ }
+ .for_border .advantage_item{
+ padding: 25px 24px 25px 30px;
+ }
+ .advantage_row .advantage_item:nth-child(3){
+ margin: 0;
+ }
+ .advantage_row .advantage_item:nth-child(2){
+ text-align: right;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-end;
+ width: 100% !important;
+ }
+ .advantage_row .advantage_item:nth-child(2) .advantage_title,
+ .advantage_row .advantage_item:nth-child(2) .description{
+ max-width: 60%;
+ }
+ .advantage_row .advantage_item:nth-child(2) .advantage_image{
+ left: unset;
+ right: 0;
+ }
+ .advantage_row2{
+ flex-direction: column-reverse;
+ gap: 90px;
+ }
+ .advantage_row2 .advantage_item:not(.for_border .advantage_item){
+ width: 100%;
+ max-width: 100%;
+ }
+ .advantage_row{
+ margin: 150px 0 100px 0;
+ gap: 90px;
+ }
+ .advantage_title:not(.advantage_row2 .advantage_title){
+ width: 54%;
+ }
+ .etaps_row {
+ margin: 80px 0;
+ }
+ .etaps_col {
+ gap: 70px;
+ }
+ .about .section_top, .advantage_row2, .diagram {
+ margin: 0 0 80px 0;
+ }
+ .advantage_title {
+ font-size: 20px;
+ }
+ .protein .description:first-child {
+ top: -16px;
+ }
+ .protein .description:nth-child(2) {
+ top: -16px;
+ }
+ .protein .description:nth-child(3) {
+ bottom: 78px;
+ }
+ .protein .description:nth-child(4) {
+ bottom: 78px;
+ }
+}
+
+@media only screen and (max-width: 576px){
+ .section_title {
+ font-size: 26px;
+ }
+ .faq .section_desc{
+ margin: 12px 0 0 0;
+ }
+ .faq .data_block{
+ margin: 15px 0 0 0;
+ }
+ .faq_item{
+ font-size: 12px;
+ padding: 0 14px;
+ border-width: 1px;
+ }
+ .faq_top {
+ padding: 25px 0;
+ }
+ .faq_body.open{
+ margin: 0 0 14px 0;
+ }
+ .faq{
+ padding: 0 0 45px 0;
+ }
+
+ .section_title2 {
+ font-size: 26px;
+ margin: 0 0 12px 0;
+ }
+ .description{
+ font-size: 12px;
+ line-height: 115%;
+ }
+ .main_link {
+ font-size: 12px;
+ line-height: 14.4px;
+ width: 129px;
+ height: 29px;
+ padding: 7px;
+ }
+ .hero .cont {
+ padding-top: 217px;
+ padding-bottom: 94px;
+ }
+ .hero_block {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ gap: 18px;
+ padding: 0 0 54px 0;
+ }
+ .hero_title {
+ font-size: 32px;
+ width: 100%;
+ padding: 0;
+ }
+
+ .block_title {
+ font-size: 12px;
+ line-height: 135%;
+ }
+ .about .section_top {
+ margin: 0 0 50px 0;
+ }
+
+ .faq_block .faq_item{
+ font-size: 12px;
+ padding: 0 14px;
+ }
+ .faq_block .faq_top {
+ padding: 20px 0;
+ }
+ .faq_block .faq_body{
+ line-height: normal;
+ }
+ .faq_block .faq_body.open{
+ margin: 0 0 14px 0;
+ line-height: normal;
+ }
+ /* */
+ .about{
+ padding: 40px 0 60px 0;
+ border-radius: 25px;
+ }
+ .about .section_top{
+ margin: 0 0 50px 0;
+ }
+ .description:last-child{
+ margin-bottom: 0;
+ }
+ .description{
+ margin-top: 20px;
+ }
+ .advantage_title {
+ font-size: 12px;
+ margin: 0 0 5px 0;
+ }
+ .advantage_image2{
+ margin: 10px 0 0 0;
+ }
+ .advantage_image{
+ max-width: 87px;
+ max-height: 87px;
+ top: -55px;
+ }
+ .advantage_row .advantage_item:nth-child(2) .advantage_image {
+ top: -58px;
+ }
+ .advantage_row .advantage_item:nth-child(3) .advantage_image {
+ top: -70px;
+ }
+ .advantage_item .description:not(.for_border .description) {
+ width: 84%;
+ }
+ .for_border .advantage_item .description{
+ line-height: 115%;
+ }
+ .advantage_row {
+ margin: 90px 0 70px 0;
+ gap: 64px;
+ }
+ .advantage_row .advantage_item:nth-child(2) .advantage_title, .advantage_row .advantage_item:nth-child(2) .description {
+ max-width: 66%;
+ }
+ .about .for_border{
+ border-radius: 25px;
+ }
+ .about .for_border .advantage_item{
+ border-radius: 23px;
+ padding: 17px 23px;
+ }
+ .advantage_row2{
+ gap: 40px;
+ }
+ .advantage_row2, .diagram {
+ margin: 0 0 50px 0;
+ }
+ .protein {
+ margin: 50px 0;
+ }
+ .diagram_texts{
+ margin: 2px 0 10px 0;
+ gap: 19px;
+ }
+ .diagram_texts .description {
+ width: 26.3%;
+ margin-top: 20px;
+ margin-bottom: 0;
+ }
+ .diagram img {
+ width: 110%;
+ left: -5%;
+ position: relative;
+ }
+ .etaps_row {
+ margin: 10px 0 0 0;
+ }
+ .mobile_none{
+ display: none;
+ }
+ .desctop_none{
+ display: block;
+ }
+ .etap_item{
+ gap: 5px;
+ }
+ .etap_item img{
+ width: 46px;
+ flex-shrink: 0;
+ height: 26px;
+ margin-right: -4px;
+ margin-left: -15px;
+ }
+ .etap_item .description{
+ line-height: 135%;
+ margin-top: 0;
+ }
+ .etaps_col {
+ gap: 43px;
+ }
+ .description svg{
+ width: 5px;
+ height: 11px;
+ }
+ .faq_section .section_title2{
+ display: none;
+ }
+ .faq_block{
+ border-width: 1px;
+ border-radius: 25px;
+ }
+ .faq_block .faq_item{
+ border-width: 1px;
+ }
+ .faq_arr_down img{
+ height: 4px;
+ width: 7px;
+ }
+ .faq_block .faq_title{
+ line-height: 100%;
+ }
+ .mobile_none2{
+ display: none;
+ }
+ .remined_text img{
+ width: 17px;
+ height: 17px;
+ }
+ .protein .description{
+ max-width: 106px;
+ }
+ .protein .description:first-child {
+ top: -5px;
+ transform: translateY(-100%);
+ margin-top: 0;
+ }
+ .protein .description:nth-child(2) {
+ top: -5px;
+ transform: translateY(-100%);
+ margin-top: 0;
+ }
+ .protein .description:nth-child(3) {
+ bottom: 59px;
+ }
+ .protein .description:nth-child(4) {
+ bottom: 57px;
+ }
+ .protein::before{
+ top: -15%;
+ }
+ .etap_item:nth-child(2) .description {
+ max-width: 100%;
+ }
+
+ .footer_form .footer_form-title h2,
+.footer_box .footer_box-title{
+ font-size: 12px;
+ line-height: 16.2px;
+ font-weight: 700;
+}
+.footer_box .footer_box-link{
+ font-size: 12px;
+ line-height: 16.2px;
+}
+.footer_form-textarea textarea,
+.footer_form-inp input {
+ height: 28px;
+ border: 1px solid var(--grey-black, #121212);
+ padding: 5px 18px;
+ font-size: 12px;
+ line-height: 14.4px;
+ opacity: .5;
+}
+.footer_block .footer_bottom a,
+.footer_form-inp input::placeholder{
+ font-size: 12px;
+ line-height: 14.4px;
+}
+.footer_form-textarea textarea{
+ height: 123px;
+ padding: 7px 18px;
+ border-radius: 17px;
+}
+.footer_form .footer_form-textarea{
+ display: flex;
+ flex-direction: column;
+ gap: 13px;
+}
+.footer_form-textarea .footer_form-btn{
+ position: static;
+ width: 100%;
+}
+.footer_block .footer_social{
+ gap: 14px;
+}
+.footer_block .footer_bottom a:nth-child(2){
+ display: none;
+}
+.footer_form .footer_form-inp{
+ flex-direction: column;
+}
+}
+
+@media only screen and (min-width: 576px){
+ .mobile_none{
+ display: block !important;
+ }
+ .data_block_title .mobile_none,
+ .collapse_input .mobile_none{
+ display: inline !important;
+ }
+ .desctop_none{
+ display: none !important;
+ }
+}
+@media only screen and (max-width: 450px){
+ .protein .description:nth-child(3) {
+ bottom: 48px;
+ }
+ .protein .description:nth-child(4) {
+ bottom: 46px;
+ right: -25px;
+ }
+}
+
+.advantage_item .description{
+ margin-top: 0;
+}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/static/about/img/about_top_image.png b/wp-content/themes/cosmopet/static/about/img/about_top_image.png
new file mode 100644
index 0000000..4832574
Binary files /dev/null and b/wp-content/themes/cosmopet/static/about/img/about_top_image.png differ
diff --git a/wp-content/themes/cosmopet/static/about/img/about_top_image2.png b/wp-content/themes/cosmopet/static/about/img/about_top_image2.png
new file mode 100644
index 0000000..68a2d14
Binary files /dev/null and b/wp-content/themes/cosmopet/static/about/img/about_top_image2.png differ
diff --git a/wp-content/themes/cosmopet/static/about/img/advantage1.svg b/wp-content/themes/cosmopet/static/about/img/advantage1.svg
new file mode 100644
index 0000000..37d9370
--- /dev/null
+++ b/wp-content/themes/cosmopet/static/about/img/advantage1.svg
@@ -0,0 +1 @@
+