diff --git a/wp-content/themes/cosmopet/modules/forms/assets/css/forms.css b/wp-content/themes/cosmopet/modules/forms/assets/css/forms.css index 744208b..634ece5 100644 --- a/wp-content/themes/cosmopet/modules/forms/assets/css/forms.css +++ b/wp-content/themes/cosmopet/modules/forms/assets/css/forms.css @@ -1,12 +1,26 @@ -.mform-offer input, .mform-offer textarea, .mform-offer select { +.mform-offer input, .mform-offer textarea { width: 100%!important; padding: 12px 15px!important; border: none!important; border-radius: 20px!important; font-size: 16px!important; background-color: white!important; + font-family: inherit; +} +.mform-offer select{ + font-size: 16px; + width: 100%; + padding: 12px 0; } +.form-select-label { + width: 100%; + padding: 0px 15px; + border: none; + border-radius: 20px; + font-size: 16px; + background-color: white; +} .mform-parthnership.mform .mform-content{ color: #fff; background: radial-gradient(278.91% 196.13% at 128.36% -48.29%, #ee6868 0%, #569ef0 57.69%); diff --git a/wp-content/themes/cosmopet/static/css/new-front-page.css b/wp-content/themes/cosmopet/static/css/new-front-page.css index d970b3a..70bf1db 100644 --- a/wp-content/themes/cosmopet/static/css/new-front-page.css +++ b/wp-content/themes/cosmopet/static/css/new-front-page.css @@ -68,6 +68,8 @@ main { .main-slider .swiper-slide:not(.swiper-slide-active){ pointer-events: none; } + + .main-slider-content { margin-top: 85px; } @@ -657,18 +659,21 @@ background: radial-gradient(161.08% 232.33% at 133.99% -48.29%, #EE6868 0%, #569 } .main-specialists_bio-info { text-align: left; + width: 100%; } .main-specialists_bio-name { font-weight: 500; font-size: 16px; text-transform: uppercase; color: #fff; + width: 100%; } .main-specialists_bio-position { font-weight: 500; font-size: 14px; color: #fff; margin-top: 0.5em; + width: 100%; } .main-specialists_text { border-radius: 25px; @@ -922,14 +927,12 @@ background: radial-gradient(161.08% 232.33% at 133.99% -48.29%, #EE6868 0%, #569 background-color: var(--accent-color); } -.main-food_reviews { - max-width: 400px; -} .main-food_reviews { border-radius: 40px; padding: 24px; max-width: 395px; - height: 772px; + height: 672px; + flex-grow: 1; position: relative; box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.12); background: #fff; @@ -949,7 +952,7 @@ background: radial-gradient(161.08% 232.33% at 133.99% -48.29%, #EE6868 0%, #569 align-items: center; padding: 20px; border-radius: 8px; - min-height: 650px; + min-height: 580px; } .main-food_reviews-slide-img { border: 2px solid #fff; @@ -998,7 +1001,7 @@ background: radial-gradient(161.08% 232.33% at 133.99% -48.29%, #EE6868 0%, #569 position: absolute; left: 40%; transform: translateX(-50%); - bottom: 40px; + bottom: 30px; z-index: 100; font-weight: 500; font-size: 16px; @@ -1232,7 +1235,7 @@ background: radial-gradient(161.08% 232.33% at 133.99% -48.29%, #EE6868 0%, #569 position: absolute; left: 50%; transform: translateX(-50%); - bottom: 32px; + bottom: 26px; z-index: 100; font-weight: 500; font-size: 16px; @@ -1270,15 +1273,7 @@ background: radial-gradient(161.08% 232.33% at 133.99% -48.29%, #EE6868 0%, #569 left: var(--swiper-navigation-sides-offset, -65px)!important; right: auto; } -.main-treats .main-food_reviews { - border-radius: 40px; - padding: 24px; - max-width: 395px; - height: 713px; - position: relative; - box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.12); - background: #fff; -} + .main-food_reviews-slide-top { display: flex; justify-content: flex-start; @@ -1503,6 +1498,8 @@ background: #e5f1fa; height: 110%; bottom: -50px; } + + } .main-bot_wrapper-tag { border-radius: 100px; @@ -1897,7 +1894,11 @@ background: #e5f1fa; font-size: 48px; text-transform: uppercase; color: #121212; - margin-bottom: 40px; + margin-bottom: 15px; + line-height: 1; +} +.truth_block_q{ + margin-top: 1.5rem; } .truth_content-end .truth_block-title, .truth_success .truth_block-title{ @@ -1936,7 +1937,7 @@ background: #e5f1fa; } .truth_error .truth_block-text p, .truth_success .truth_block-text p { - max-width: 592px; + max-width: 460px; font-size: 20px; line-height: 24px; font-weight: 500; @@ -2021,6 +2022,10 @@ background: #e5f1fa; width: 800px; max-width: 100%; } +.truth_pictures{ + margin-left: -5rem; + margin-right: 11rem; +} .truth_pictures_brain { display: block; position: absolute; @@ -2033,13 +2038,13 @@ background: #e5f1fa; position: absolute; bottom: 5%; z-index: 0; - left: 10%; + left: 8%; } .truth_pictures_arrow { display: block; position: absolute; top: 5%; - left: 28%; + left: 26%; } .main-truth_title { font-weight: 700; @@ -2551,6 +2556,8 @@ height: 100%; .truth_pictures_present{ max-width: 333px; width: 333px; + position: relative; + left: 4rem; } @media (max-width: 940px) { .gallery-box{ @@ -2668,6 +2675,7 @@ height: 100%; .cosmopet-x__item{ height: 340px; padding: 16px; + border-radius: 24px; } .cosmopet-x .swiper-slide, .cosmopet-x__item::before, .cosmopet-x__bg{ border-radius: 24px; @@ -3340,9 +3348,6 @@ font-weight: 500; text-align: left; background: #f4f1f0; } -.truth_block .truth_link{ - width: 100%; -} .truth_links{ margin-top: -40px; } @@ -3965,12 +3970,18 @@ background-clip: text; -webkit-text-fill-color: transparent; margin-top: 2rem; border-bottom: 1px rgb(86, 158, 240) solid; +display: block; +width: max-content; } @media (max-width: 640px) { - .mform__review{ + .mform__review-wrap{ padding: 24px; - padding-top: 40px; + padding-top: 60px; + padding-right: 10px; + } + .mform__review{ + padding-right: 16px; } } @@ -3993,4 +4004,98 @@ border-bottom: 1px rgb(86, 158, 240) solid; .mform__review::-webkit-scrollbar-thumb:hover { background-color: #63acff; -} \ No newline at end of file +} + +@media (max-width: 576px) { + .main-food_reviews { + min-height: 600px; + height: 80vh; + max-height: 750px; + } + .main-food_reviews-slide { + min-height: 520px; + height: calc(80vh - 80px); + max-height: 670px; + } + .main-bot .swiper-pagination-bullet{ + width: 91px; +} +.main-bot .swiper-pagination{ + gap: 12px; +} + +.truth_block .truth_link{ + width: 100%; +} +.cosmopet-x .slider-arrows .cosmopet-prev{ + left: 0; +} +.cosmopet-x .slider-arrows .slider-next{ + right: 0; +} +} + +.bot-slider .swiper-slide:not(.swiper-slide-active){ + pointer-events: none; +} + +@media (max-width: 776px) { + .truth .truth_block{ + height: auto; + } +} + +.new-grad .mini-profile__button--counter { + color: #fff; +} + +.main-slider__bullets{ + position: absolute; + width: 100%; +bottom: 8rem !important; + left: 0; + display: flex; + justify-content: center; + gap: 16px; + top: unset !important; +} + +.main-slider__bullet{ + height: 2px; + width: 120px; + opacity: 1; + background-color: rgba(25, 25, 25, .4); + position: relative; +} +.main-slider__bullet::after{ + position: absolute; + top: 0; + left: 0; + width: 0; + background-color: rgba(25, 25, 25, 1); + height: 100%; + content: ''; +} +.main-slider__bullet-active::after{ + animation: 5s fullFill linear; +} + +@media (max-width: 768px) { + .main-slider__bullet{ + width: 48px; + background-color: rgba(255, 255, 255, 1); + opacity: 1; + box-shadow: rgba(11, 11, 11, 0.5) 0px 2px 6px 0px; + height: 6px; + border-radius: 10px; + } + .main-slider__bullet::after{ + background: radial-gradient(154.31% 232.33% at 128.36% -48.29%, #EE6868 0%, #569EF0 57.69%); + border-radius: inherit; + } + .main-slider__bullets{ + gap: 8px; + z-index: 10; + } + +} diff --git a/wp-content/themes/cosmopet/static/js/new-front-page.js b/wp-content/themes/cosmopet/static/js/new-front-page.js index 100ce59..1586f1e 100644 --- a/wp-content/themes/cosmopet/static/js/new-front-page.js +++ b/wp-content/themes/cosmopet/static/js/new-front-page.js @@ -8,7 +8,13 @@ document.addEventListener('DOMContentLoaded', function() { }, fadeEffect: { crossFade: true }, autoplay: { delay: 5000, disableOnInteraction: false }, - loop: true + loop: true, + pagination: { + el: '.main-slider__bullets', + clickable: true, + bulletClass: 'main-slider__bullet', + bulletActiveClass: 'main-slider__bullet-active', + }, }); // Ingredients slider @@ -147,9 +153,7 @@ document.addEventListener('DOMContentLoaded', function() { } } }); - - - + const whySwiper = new Swiper('.main-why_swiper', { slidesPerView: 1, spaceBetween: 20, diff --git a/wp-content/themes/cosmopet/temp-functions/woocommerce-logic.php b/wp-content/themes/cosmopet/temp-functions/woocommerce-logic.php index fb20694..c68050b 100644 --- a/wp-content/themes/cosmopet/temp-functions/woocommerce-logic.php +++ b/wp-content/themes/cosmopet/temp-functions/woocommerce-logic.php @@ -125,7 +125,7 @@ function get_add_to_cart_button ($id) { } //Получить товары из одной подборки по весу -function get_collection_siblings ($term) { +function get_collection_siblings($term) { if (!$term) { return []; } @@ -134,7 +134,7 @@ function get_collection_siblings ($term) { 'posts_per_page' => -1, 'post_type' => 'product', 'order' => 'ASC', - 'order_by' => 'name', + 'orderby' => 'name', // Fixed parameter name (was 'order_by') 'tax_query' => [ [ 'taxonomy' => 'pa_collection', @@ -145,14 +145,28 @@ function get_collection_siblings ($term) { ); $siblings = get_posts($args); - - $sibl_arr = []; - - foreach( $siblings as $sibling ) { - $sibl_arr [] = $sibling; + + // Create array with products and their weights + $siblings_with_weights = []; + foreach ($siblings as $sibling) { + $weight = function_exists('get_product_info') ? get_product_info($sibling->ID, 'weight') : 0; + $siblings_with_weights[] = [ + 'post' => $sibling, + 'weight' => floatval($weight) // Ensure weight is treated as a number + ]; } - - return $sibl_arr; + + // Sort by weight + usort($siblings_with_weights, function($a, $b) { + return $a['weight'] <=> $b['weight']; + }); + + // Extract just the posts in sorted order + $sorted_siblings = array_map(function($item) { + return $item['post']; + }, $siblings_with_weights); + + return $sorted_siblings; } add_filter( 'woocommerce_price_trim_zeros', '__return_true' ); diff --git a/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-bot.twig b/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-bot.twig index 05954dd..405a4e9 100644 --- a/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-bot.twig +++ b/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-bot.twig @@ -5,13 +5,13 @@
Первый в России

ветеринарный бот с бесплатными вет консультациями

- Перейти + Перейти
-

Телеграм с инструкцией о том, как понимать своего пета

+

Телеграм каналл с инструкцией о том, как понимать своего пета

зоопсихология, петхакинг, советы кинологов и ветеринаров

- Перейти в Telegram + Перейти в Telegram
diff --git a/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-quiz.twig b/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-quiz.twig index b36a3ec..b294727 100644 --- a/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-quiz.twig +++ b/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-quiz.twig @@ -22,8 +22,8 @@ -
{{ q_1.title }}
-
+
Правда или миф
+

Индейка - самый гипоаллергенный протеин для кошек и собак

@@ -90,8 +90,8 @@
-

{{ q_2.title }}

-
+

Правда или миф

+

Сухого корма недостаточно для поддержания здоровья питомца

@@ -160,8 +160,8 @@
-
{{q_2.title}}
-
+
Правда или миф
+

Переводить питомца на новый корм нужно постепенно

@@ -241,8 +241,8 @@
-
{{q_4.text_title}}
-
+
Правда или миф
+

Котят и щенят нельзя кормить кормом для взрослых питомцев на постоянной основе

@@ -309,8 +309,8 @@
-
{{q_5.title}}
-
+
Правда или миф
+

Сухой и горячий нос у питомца - симптом заболевания

diff --git a/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-slider.twig b/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-slider.twig index 74d17e8..db0103e 100644 --- a/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-slider.twig +++ b/wp-content/themes/cosmopet/templates/_pages/new-front-page/main-slider.twig @@ -15,5 +15,6 @@
{% endfor %} +
\ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/forms/parthners-form.twig b/wp-content/themes/cosmopet/templates/forms/parthners-form.twig index 730bf7c..d5f0555 100644 --- a/wp-content/themes/cosmopet/templates/forms/parthners-form.twig +++ b/wp-content/themes/cosmopet/templates/forms/parthners-form.twig @@ -14,15 +14,17 @@
- +
diff --git a/wp-content/themes/cosmopet/templates/shop/reviews-section_block.twig b/wp-content/themes/cosmopet/templates/shop/reviews-section_block.twig index 82e1110..0cf3171 100644 --- a/wp-content/themes/cosmopet/templates/shop/reviews-section_block.twig +++ b/wp-content/themes/cosmopet/templates/shop/reviews-section_block.twig @@ -25,7 +25,7 @@

{{fn('get_field', 'desc', slide)}}

{% if fn('get_field', 'text', slide) %} - {% set maxLength = 500 %} + {% set maxLength = 350 %} {% set content = fn('get_field', 'text', slide) %} {% if content|length > maxLength %}