diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php index ced12ab..abbca47 100644 --- a/wp-content/themes/cosmopet/functions.php +++ b/wp-content/themes/cosmopet/functions.php @@ -969,4 +969,14 @@ add_filter( 'script_loader_tag', function ( $tag, $handle, $src ) { return $tag; }, 10, 3 ); - \ No newline at end of file +// Для кнопки "Применить фильтр" +add_filter('wbw_filter_submit_button_text', 'change_wbw_filter_button_text'); +function change_wbw_filter_button_text($text) { + return 'Ваш текст'; // Например, "Фильтровать" или "Поиск" +} + +// Для кнопки сброса (если есть) +add_filter('wbw_filter_reset_button_text', 'change_wbw_reset_button_text'); +function change_wbw_reset_button_text($text) { + return 'Сбросить'; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/global-functions/multilang-functions.php b/wp-content/themes/cosmopet/global-functions/multilang-functions.php index 161d7a7..015ff51 100644 --- a/wp-content/themes/cosmopet/global-functions/multilang-functions.php +++ b/wp-content/themes/cosmopet/global-functions/multilang-functions.php @@ -40,5 +40,55 @@ add_action('init', function() { 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('cosmopet_bestsellers_title', 'BESTSELLERS', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_previous_products', 'Previous products', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_next_products', 'Next products', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_view_product', 'View product:', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_product_image', 'Product image:', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_buy_button', 'Buy', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_all_products', 'All products', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_no_products', 'No bestsellers found', 'CosmoPet Theme Bestsellers'); + pll_register_string('cosmopet_back_to_catalog', 'к каталогу', 'Product Detail'); + pll_register_string('cosmopet_sale_tag', 'Распродажа %', 'Product Detail'); + pll_register_string('cosmopet_add_to_cart', 'Добавить в корзину', 'Product Detail'); + pll_register_string('cosmopet_description', 'ОПИСАНИЕ', 'Product Detail'); + pll_register_string('cosmopet_composition', 'СОСТАВ', 'Product Detail'); + pll_register_string('cosmopet_feeding_recommendations', 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ', 'Product Detail'); + pll_register_string('cosmopet_nutritional_value', 'ПИЩЕВАЯ ЦЕННОСТЬ', 'Product Detail'); + pll_register_string('cosmopet_vitamins_per_kg', 'ВИТАМИНЫ НА КГ', 'Product Detail'); + pll_register_string('cosmopet_nutritional_additives_per_kg', 'ПИТАТЕЛЬНЫЕ ДОБАВКИ НА КГ', 'Product Detail'); + pll_register_string('cosmopet_energy_value_per_100g', 'ЭНЕРГЕТИЧЕСКАЯ ЦЕННОСТЬ НА 100 ГРАММ', 'Product Detail'); + pll_register_string('cosmopet_important', 'Важно', 'Product Detail'); + pll_register_string('cosmopet_you_may_also_like', 'вашему питомцу может понравиться', 'Product Detail'); + pll_register_string('cosmopet_new_product', 'Новинка', 'Product Detail'); + pll_register_string('cosmopet_buy', 'Купить', 'Product Detail'); + pll_register_string('cosmopet_volume', 'Объем', 'Product Detail'); + pll_register_string('cosmopet_quantity', 'Количество', 'Product Detail'); + pll_register_string('cosmopet_details', 'Подробнее', 'Product Detail'); + + pll_register_string('reviews_title', 'Customer Reviews', 'Reviews Section'); + pll_register_string('show_more', 'Show more', 'Reviews Section'); + pll_register_string('default_reviewer_name', 'Anastasia', 'Reviews Section'); + pll_register_string('default_reviewer_role', 'dog owner', 'Reviews Section'); + pll_register_string('default_review_excerpt', 'Just wanted to say thank you - your treats are amazing!', 'Reviews Section'); + pll_register_string('default_review_full_1', 'She loves the lamb one - tasty, safe, and it even works great as a dental treat!', 'Reviews Section'); + pll_register_string('default_review_full_2', 'And the salmon sandwich in the tube is our go-to. We never leave the house without it. Perfect for walks and training!', 'Reviews Section'); + pll_register_string('default_review_full_3', 'So glad we found you!', 'Reviews Section'); + pll_register_string ('ВАША ЗАЯВКА ПРИНЯТА!', 'ВАША ЗАЯВКА ПРИНЯТА!'); + pll_register_string ('Спасибо! Сообщение успешно отправлено.', 'Спасибо! Сообщение успешно отправлено.'); + pll_register_string ('Наш менеджер скоро свяжемся с вами
для уточнения деталей.', 'Наш менеджер скоро свяжемся с вами
для уточнения деталей.'); + pll_register_string ('Вернуться на сайт', 'Вернуться на сайт'); + }); diff --git a/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css index ed21ee4..397cefb 100644 --- a/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css +++ b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css @@ -152,3 +152,7 @@ } /* Footer end */ +.social-media__icon { + width: 32px; + aspect-ratio: 1; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/forms/assets/js/form.js b/wp-content/themes/cosmopet/modules/forms/assets/js/form.js index 0859e59..4edb3c7 100644 --- a/wp-content/themes/cosmopet/modules/forms/assets/js/form.js +++ b/wp-content/themes/cosmopet/modules/forms/assets/js/form.js @@ -8,7 +8,7 @@ function showModal(modalClass) { // Функция для закрытия модальных окон function closeModals() { - const modals = document.querySelectorAll('.modal'); + const modals = document.querySelectorAll('.mform'); modals.forEach(modal => { modal.style.display = 'none'; }); @@ -26,7 +26,7 @@ function showModal(modalClass) { // Закрытие при клике вне контента window.addEventListener('click', function(event) { - const modals = document.querySelectorAll('.modal'); + const modals = document.querySelectorAll('.mform'); modals.forEach(modal => { if (event.target === modal) { modal.style.display = 'none'; @@ -52,7 +52,7 @@ jQuery(document).ready(function($) { }, success: function(response) { closeModals() - showModal('modal-success') + showModal('mform-success') } }); } diff --git a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css index 050d350..bdc22e3 100644 --- a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css +++ b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css @@ -271,7 +271,7 @@ textarea{ } } -.modal { +.mform { position: fixed; top: 0; left: 0; @@ -284,7 +284,7 @@ textarea{ z-index: 1000; } - .modal-content { + .mform-content { position: relative; width: 100%; max-width: 600px; @@ -294,9 +294,9 @@ textarea{ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } - .modal-success .modal-content { + .mform-success .mform-content { background-color: #fff; - background: url(/wp-content/uploads/2025/04/background.png) center center / contain no-repeat; + background: url(/wp-content/themes/cosmopet/static/img/form-img.png) center center / contain no-repeat; background-color: #fff; background-position: bottom; height: 500px; @@ -306,15 +306,15 @@ textarea{ gap: 20px; } - .modal-success .modal-button-container { + .mform-success .mform-button-container { margin-top: 200px; } - .modal-message { + .mform-message { font-size: 20px; } - .modal-success .modal-image { + .mform-success .mform-image { position: absolute; bottom: 0; left: 50%; @@ -331,7 +331,7 @@ textarea{ color: #000; } - .modal-title { + .mform-title { font-size: 32px; font-weight: bold; margin-bottom: 10px; @@ -339,17 +339,17 @@ textarea{ } /* Стили для второго модального окна - Предложить статью */ - .modal-offer .modal-content { + .mform-offer .mform-content { background-color: #d6ff9f; padding-bottom: 30px; } - .modal-subtitle { + .mform-subtitle { font-size: 18px; margin-bottom: 20px; } - .modal-form { + .mform-form { width: 100%; } @@ -419,12 +419,12 @@ textarea{ /* Адаптивность */ @media (max-width: 768px) { - .modal-content { + .mform-content { width: 90%; padding: 30px 20px; } - .modal-title { + .mform-title { font-size: 18px; margin-bottom: 5px; } @@ -452,6 +452,7 @@ textarea{ } } + .wrapper { margin: 0 auto; max-width: 1600px; @@ -472,10 +473,8 @@ textarea{ height: 100%; background: rgba(0, 0, 0, 0.25); - - z-index: 200; - opacity: 0; + z-index: 200; transition: opacity .2s ease-out; pointer-events: none; diff --git a/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-core.css b/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-core.css index 8d7942d..b1770c0 100644 --- a/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-core.css +++ b/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-core.css @@ -1,62 +1,3 @@ -<<<<<<< HEAD -*{ - margin: 0; - padding: 0; - box-sizing: border-box; -} - -/* Переменные, шрифты, UI kit */ - -/* -700 - Bold -600 - SemiBold / Demi -500 - Medium -400 - Regular -*/ - -a{ - cursor: pointer; -} - -/* Глобальные переменные: */ - -:root { - /* fonts */ - --font-family: "Craftwork Grotesk", sans-serif; - --second-family: "DIN 2014 Rounded", sans-serif; - --third-family: "Roboto", sans-serif; - - /* color */ - /* text */ - --text-white: #fff; - --text-black: #121212; - --text-dark: #2b2b3b; - --text-grey: #999; - --text-red: #fa0505; - --text-green: #2ED15D; - --text-0: #000; - --text-3: #333; - --text-6: #666; - --text-9: #999; - - /* background */ - --background-white: #fff; - --background-black: #121212; - --background-grey: #f2f2f2; - --background-green: #2ED15D; - --background-green-white: #f4fff0; - --background-9: #999; - - - /* gradient */ - --gradient-blue: radial-gradient(346.57% 244.17% at 149.73% -58.39%, rgb(15, 88, 129) 0%, rgb(30, 164, 156) 51.21689438819885%, rgb(118, 206, 117) 80.70731163024902%, rgb(236, 243, 159) 91.14583134651184%); - --gradient-turquoise: radial-gradient(346.57% 244.17% at 149.73% -58.39%, rgb(117, 196, 240) 0%, rgb(126, 231, 225) 51.21689438819885%, rgb(181, 228, 180) 80.70731163024902%, rgb(237, 244, 164) 91.14583134651184%); - --gradient-red: linear-gradient(22deg, #f44242 0%, #569ef0 100%); -} - -======= ->>>>>>> 219d098 (Fix | bugfix after restructurization) - /* общие */ button{ cursor: pointer; diff --git a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig index 591f39a..248ed2f 100644 --- a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig +++ b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig @@ -52,7 +52,7 @@ {% endif %} {% if product.is_on_sale() %}
- {{ function('pll_e', 'Распродажа') }} % + {{ function('pll_e', 'Распродажа %') }}
{% endif %} @@ -84,7 +84,7 @@ {{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }}

- {{ ((product.get_regular_price - product.get_price) / product.get_regular_price * 100)|round }} {{ fn('get_woocommerce_currency_symbol') }} + {{ ((product.get_regular_price - product.get_price) / product.get_regular_price * 100)|round }}

{% endif %} diff --git a/wp-content/themes/cosmopet/static/front-page/css/style.css b/wp-content/themes/cosmopet/static/front-page/css/style.css index 767e4cc..6f02d2c 100644 --- a/wp-content/themes/cosmopet/static/front-page/css/style.css +++ b/wp-content/themes/cosmopet/static/front-page/css/style.css @@ -1506,6 +1506,7 @@ justify-content: center; border-radius: 60px; background: var(--creme-white, #F4F1F0); box-shadow: 6px 9px 20px 0px rgba(0, 0, 0, 0.15); + margin-bottom: 6rem; } .discount__sale .discount_title { @@ -4001,4 +4002,278 @@ text-align: left; .btn--black-hover { transition: .3s +} + + +.reviews-plus{ + background:none; +} + + +.section-nav{ +position:relative; +display:block; +} + +.reviews-plus .container{ +display:flex; +align-items:center; + +justify-content:space-between;; + + +} + +.section-nav > *{ +position:relative; +} + +.section-nav { +display:flex; +} + + +.container-plus{ +max-width:1040px; +margin:0 auto; +} + + +.section-title { + font-weight: 500; +font-size: 82px; + width:50%; + line-height:1.2; + +text-transform: uppercase; +color: #f4f1f0; +} + +.reviews-slider { + padding: 20px; + margin-top:20px; + position: relative; + overflow:visible !important; +} + +.review-card { + background: white; +border-radius: 50px; + + padding: 36px; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); + margin: 10px; +} + +.review-header { + display: flex; + flex-direction:column; + align-items: left; + gap:20px; + margin-bottom: 20px; +} + +/* Для нечетных слайдов (1, 3, 5...) */ +.reviews-slider .swiper-slide:nth-child(odd) { + transform: rotate(-3deg); + transition: transform 0.3s ease; + border: 2px solid transparent; +background: padding-box linear-gradient(rgb(255 255 255), rgb(255 255 255)), +border-box linear-gradient(rgb(244 66 66), rgb(86 158 240 / 0.1)); + + +} + + +.review-card{ +position:relative; +} + +.review-card:before{ +content:''; +position:absolute; +background-image:url(https://test.cosmopet.ae/wp-content/uploads/2025/04/99.svg); +width:72px; +height:72px; +display:block; +right:36px; +top:36px; +} + +/* Для четных слайдов (2, 4, 6...) */ +.reviews-slider .swiper-slide:nth-child(even) { + transform: rotate(3deg); + transition: transform 0.3s ease; + border: 2px solid #dbbdbd; +background: #121212; + +} + +.reviews-slider .swiper-slide:nth-child(even) p , .reviews-slider .swiper-slide:nth-child(even) h3 { +color:#fff; +} + +.review-avatar { + width: 78px; + height: 78px; + border-radius: 50%; + background:#00000020; + object-fit: cover; + margin-right: 15px; + +} + +.review-author h3 { +font-weight: 400; +font-size: 24px; +text-transform: uppercase; +} + +.review-author p { +font-weight: 500; +font-size: 12px; +color: #121212; +} + +.review-text { +font-weight: 500; +font-size: 15px; +color: #121212; +} + +.review-more-content { + display: none; +} + +.show-more-btn { + background: none; + border: none; + color: #4a90e2; + cursor: pointer; + padding: 5px 0; + margin-top: 10px; + font-weight: 600; +} + +.show-more-btn:hover { + text-decoration: underline; +} + +/* Swiper Navigation */ +.reviews-plus .swiper-button-next, +.reviews-plus .swiper-button-prev { +border: 1px solid #121212; +border-radius: 20px; +padding: 16px; +width: 56px; +height: 56px; + background: #fff; +} + +.reviews-plus .swiper-button-prev{ +transform:rotate(-180deg) +} + +.reviews-plus .swiper-button-next::after, +.reviews-plus .swiper-button-prev::after { + font-size: 18px; + display:none; +} + +.swiper-pagination-bullet-active { + background: #4a90e2; +} + +/* Popup Styling */ +.review-popup { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.7); + display: none; + justify-content: center; + align-items: center; + z-index: 1000; +} + +.popup-content { + background: white; + padding: 30px; + border-radius: 12px; + max-width: 600px; + width: 90%; + max-height: 80vh; + overflow-y: auto; + position: relative; +} + +.close-popup { + position: absolute; + top: 15px; + right: 15px; + font-size: 24px; + background: none; + border: none; + cursor: pointer; + color: #777; +} + +.popup-review-content { + padding: 20px 0; +} + +/* Responsive */ +@media (max-width: 768px) { + .review-card { + padding: 20px; + } + + .reviews-plus .container{ + flex-wrap:wrap; + } + + .review-text { +font-weight: 500; +font-size: 12px; + } + + .star-igm{ + width:20%; + } + + .section-nav{ + gap:5px; + } + + .reviews-plus .swiper-button-next, .reviews-plus .swiper-button-prev { +border: 1px solid #121212; +border-radius: 10px; +padding: 5px; + inset:0; +width: 36px; +height: 36px; +background: #fff; +position: static !important; +margin-top: 16px; +} + + .review-card{ + padding:20px; + } + + .section-title { +font-weight: 500; +font-size: 42px; +width: 100%; +line-height: 1.2; +text-transform: uppercase; +color: #f4f1f0; +} + +} + +.reviews-plus{ + overflow: hidden; } \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/front-page/img/stars.svg b/wp-content/themes/cosmopet/static/front-page/img/stars.svg new file mode 100644 index 0000000..545167d --- /dev/null +++ b/wp-content/themes/cosmopet/static/front-page/img/stars.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/wp-content/themes/cosmopet/static/front-page/js/main.js b/wp-content/themes/cosmopet/static/front-page/js/main.js index ef30cbf..060bcef 100644 --- a/wp-content/themes/cosmopet/static/front-page/js/main.js +++ b/wp-content/themes/cosmopet/static/front-page/js/main.js @@ -197,11 +197,6 @@ document.addEventListener('DOMContentLoaded', function () { slidesPerView: 'auto', spaceBetween: 13, - mousewheel: { - sensitivity: 1, - enabled: true, - releaseOnEdges: true, - }, }); // sellerSlider @@ -215,11 +210,6 @@ document.addEventListener('DOMContentLoaded', function () { nextEl: '.sellerSlider-next', prevEl: '.sellerSlider-prev' }, - mousewheel: { - sensitivity: 1, - enabled: true, - releaseOnEdges: true, - }, breakpoints: { 250: { slidesPerView: 1, @@ -248,11 +238,6 @@ document.addEventListener('DOMContentLoaded', function () { let blogSlider = new Swiper(".blogSlider", { slidesPerView: 2.5, spaceBetween: 43, - mousewheel: { - sensitivity: 1, - enabled: true, - releaseOnEdges: true, - }, navigation: { nextEl: '.blogSlider-next', prevEl: '.blogSlider-prev' @@ -280,11 +265,6 @@ document.addEventListener('DOMContentLoaded', function () { let cosmopetSwiper = new Swiper(".cosmopet-x__swiper", { slidesPerView: 2.5, spaceBetween: 43, - mousewheel: { - sensitivity: 1, - enabled: true, - releaseOnEdges: true, - }, navigation: { nextEl: '.cosmopet-next', prevEl: '.cosmopet-prev' @@ -316,11 +296,6 @@ document.addEventListener('DOMContentLoaded', function () { nextEl: '.smiSlider-next', prevEl: '.smiSlider-prev' }, - mousewheel: { - sensitivity: 1, - enabled: true, - releaseOnEdges: true, - }, breakpoints: { 300: { slidesPerView: 1.3, @@ -490,4 +465,74 @@ document.addEventListener('DOMContentLoaded', function () { swiperInstance.autoplay.start(); }, index * 1000); // Задержка перед стартом: 0, 1000, 2000 мс }); +}); + + +document.addEventListener('DOMContentLoaded', function() { + // Initialize Swiper + const reviewsSwiper = new Swiper('.reviews-slider', { + slidesPerView: 1, + spaceBetween: 50, + pagination: { + el: '.swiper-pagination', + clickable: true, + }, + navigation: { + nextEl: '.swiper-button-prev', + prevEl: '.swiper-button-next', + }, + breakpoints: { + 320: { + slidesPerView: 1.3, + spaceBetween: 20, + + }, + 1024: { + slidesPerView: 2, + }, + 1200: { + slidesPerView: 2, + } + } + }); + + // Show more functionality + const showMoreButtons = document.querySelectorAll('.show-more-btn'); + const reviewPopup = document.querySelector('.review-popup'); + const popupContent = document.querySelector('.popup-review-content'); + const closePopup = document.querySelector('.close-popup'); + + showMoreButtons.forEach(button => { + button.addEventListener('click', function() { + const reviewCard = this.closest('.review-card'); + const reviewHeader = reviewCard.querySelector('.review-header').cloneNode(true); + const reviewText = reviewCard.querySelector('.review-text').cloneNode(true); + + // Show the hidden content in the review text + const moreContent = reviewText.querySelector('.review-more-content'); + if (moreContent) { + moreContent.style.display = 'block'; + } + + // Populate popup + popupContent.innerHTML = ''; + popupContent.appendChild(reviewHeader); + popupContent.appendChild(reviewText); + + // Show popup + reviewPopup.style.display = 'flex'; + }); + }); + + // Close popup + closePopup.addEventListener('click', function() { + reviewPopup.style.display = 'none'; + }); + + // Close popup when clicking outside + reviewPopup.addEventListener('click', function(e) { + if (e.target === reviewPopup) { + reviewPopup.style.display = 'none'; + } + }); }); \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/img/form-img.png b/wp-content/themes/cosmopet/static/img/form-img.png new file mode 100644 index 0000000..a543660 Binary files /dev/null and b/wp-content/themes/cosmopet/static/img/form-img.png differ diff --git a/wp-content/themes/cosmopet/templates/footer.twig b/wp-content/themes/cosmopet/templates/footer.twig index 9598b8f..d8612b0 100644 --- a/wp-content/themes/cosmopet/templates/footer.twig +++ b/wp-content/themes/cosmopet/templates/footer.twig @@ -39,7 +39,7 @@ {% for item in social %}
  • - +
  • {% endfor %} @@ -54,31 +54,30 @@ - {% verbatim %} -