diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php index d6bc95f..ed584db 100644 --- a/wp-content/themes/cosmopet/functions.php +++ b/wp-content/themes/cosmopet/functions.php @@ -24,52 +24,5 @@ require_once __DIR__ . '/temp-functions/filters-logic.php'; -function theme_enqueue_scripts() { - $base_dir = get_template_directory_uri() . '/static/js/'; - // Библиотеки - wp_enqueue_script('materialize', $base_dir . 'libs/materialize.min.js', array(), null, true); - wp_enqueue_script('swiper-bundle', $base_dir . 'libs/swiper-bundle.min.js', array(), null, true); - // Скрипты из js-single-product - wp_enqueue_script('gp-form', $base_dir . 'js-single-product/gp-form.js', array(), null, true); - wp_enqueue_script('gp-main', $base_dir . 'js-single-product/gp-main.js', array(), null, true); - wp_enqueue_script('gp-product', $base_dir . 'js-single-product/gp-product.js', array(), null, true); - wp_enqueue_script('tabs', $base_dir . 'js-single-product/tabs.js', array(), null, true); - wp_enqueue_script('toggle', $base_dir . 'js-single-product/toggle.js', array(), null, true); - // Основные скрипты - $scripts = array( - 'about-page', 'author-posts-ajax', 'blog', 'cart', 'checkout', 'comments', - 'footer', 'forms', 'front-page', 'header', 'layout-core', 'layout-form', - 'layout-main', 'layout-product', 'modal', 'popups', 'production-page', - 'profile', 'script', 'tags-in-wpf_filter', 'wtb-page' - ); - - foreach ($scripts as $script) { - wp_enqueue_script($script, $base_dir . $script . '.js', array(), null, true); - } -} -add_action('wp_enqueue_scripts', 'theme_enqueue_scripts'); - - -function theme_enqueue_styles() { - $base_dir = get_template_directory_uri() . '/static/css/'; - $libs_dir = $base_dir . 'libs/'; - - // CSS из папки libs - wp_enqueue_style('materialize', $libs_dir . 'materialize.min.css'); - wp_enqueue_style('swiper-bundle', $libs_dir . 'swiper-bundle.css'); - - // Основные CSS-файлы - $styles = array( - 'about-page', 'author-style', 'blog-style', 'checkout', 'footer', - 'forms', 'front-page', 'gp-layout-core', 'gp-layout-full', - 'gp-normalize', 'header', 'production-page', 'profile', 'shop', - 'single-product', 'style', 'wtb-page' - ); - - foreach ($styles as $style) { - wp_enqueue_style($style, $base_dir . $style . '.css'); - } -} -add_action('wp_enqueue_scripts', 'theme_enqueue_styles'); diff --git a/wp-content/themes/cosmopet/modules/author/assets/css/author-style.css.bak b/wp-content/themes/cosmopet/modules/author/assets/css/author-style.css.bak deleted file mode 100644 index 36811eb..0000000 --- a/wp-content/themes/cosmopet/modules/author/assets/css/author-style.css.bak +++ /dev/null @@ -1,722 +0,0 @@ -/* Authors */ -.authors { - padding-bottom: 120px; -} - -.authors h2 { - font-weight: bold; - font-size: 64px; - line-height: 120%; - color: white; - text-transform: uppercase; - margin-bottom: 36px; -} - -.authors ul { - display: flex; - flex-wrap: wrap; - align-items: stretch; - justify-content: center; - gap: 24px; -} - -.authors li { - background: #F5F5F5; - border-radius: 48px; - display: flex; - flex-direction: column; - align-items: center; - text-align: center; - width: calc(100% / 3 - 16px); -} - -.authors a { - padding: 52px 17px 57px; - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; -} - -.authors .main-img { - width: 200px; - height: 200px; - border-radius: 50%; - overflow: hidden; - flex-shrink: 0; - margin-bottom: 31px; -} - -.authors .main-img img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.authors-name { - font-size: 24px; - font-weight: bold; - text-transform: uppercase; - line-height: 28px; - color: #121212; - margin-bottom: 5px; -} - -.authors-type { - color: #121212; - font-size: 24px; - font-weight: 500; - line-height: 32px; - margin-bottom: 31px; -} - -.authors p { - color: #666666; - font-weight: 500; - font-size: 20px; - line-height: 24px; -} -/* Authors end */ - -/* author-head */ -.author-head { - padding-bottom: 36px; -} - -.author-head-content { - display: flex; - align-items: center; - gap: 31px; - margin-bottom: 17.5px; -} - -.author-head .main-img { - width: 278px; - height: 278px; - flex-shrink: 0; - border-radius: 48px; - overflow: hidden; -} - -.author-head .main-img img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.author-name { - font-size: 24px; - font-weight: bold; - line-height: 28px; - color: white; - margin-bottom: 5px; - text-transform: uppercase; -} - -.author-type { - font-size: 24px; - font-weight: 500; - line-height: 32px; - color: white; - margin-bottom: 5px; -} - -.author-description { - font-size: 24px; - font-weight: 500; - line-height: 32px; - color: white; - margin-bottom: 45px; -} - -.author-head p { - font-size: 20px; - font-weight: 500; - line-height: 24px; - color: white; -} - -.author-head h2 { - font-size: 64px; - font-weight: bold; - line-height: 120%; - color: white; -} -/* author-head end */ - -.home-title { - font-size: 82px; - font-weight: bold; - line-height: 96px; - color: var(--main_white); - margin-bottom: 16px; -} - -.home-description { - font-size: 32px; - font-weight: bold; - line-height: 40px; - color: var(--main_white); - text-transform: uppercase; - margin-bottom: 68px; -} - -.home-swp { - position: relative; -} - -.home-swp__btn { - position: absolute; - bottom: 22px; - left: 50%; - transform: translateX(-50%); - z-index: 2; - display: flex; - align-items: center; - gap: 24px; -} - -.home-swp__btn button { - border: 1px solid var(--main_black); - background: var(--main_white); - width: 56px; - height: 56px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 20px; -} - -.home-swp .swiper-slide:not(.swiper-slide-active) { - height: 0; - overflow: hidden; -} - -.home-card { - border-radius: 60px; - overflow: hidden; - display: flex; - align-items: flex-start; - gap: 24px; - position: relative; -} - -.home-card.bg-yellow { - background: var(--orange_80); -} - -.home-card.bg-green { - background: var(--green_90); -} - -.home-card.bg-violet { - background: var(--violet_90); -} - -.home-card__img { - width: 395px; - border-radius: 60px; - overflow: hidden; - height: 393px; - flex-shrink: 0; -} - -.home-card__img img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.home-card__content { - padding: 32px 79px 0 0; -} - -.home-card__content-title { - font-size: 36px; - font-weight: bold; - line-height: 40px; - text-transform: uppercase; - max-width: 660px; - margin-bottom: 10px; - color: var(--interface_title); -} - -.home-card__content-description { - color: var(--interface_title); - margin-bottom: 10px; - font-size: 20px; - font-weight: 500; - line-height: 24px; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; - text-overflow: ellipsis; -} - -.home-card__content-body { - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 12px; -} - -.home-card__content-body__alerts { - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 12px; -} - -.home-card__content-body__alerts li { - background: var(--interface_hover); - color: var(--background); - border-radius: 16px; - padding: 6px 8px; - font-size: 16px; - font-weight: 500; - line-height: 20px; -} - -.home-card__content-body__day { - color: var(--interface_hover); - font-size: 14px; - font-weight: 500; - line-height: 16px; -} - -.home-card__content-body__time { - font-size: 14px; - font-weight: 500; - line-height: 16px; - color: var(--interface_hover); -} - -.home-card__content-body__data { - display: flex; - align-items: center; - gap: 12px; -} - -.home-card__content-body__data>div { - display: flex; - align-items: center; - gap: 4px; - font-size: 14px; - font-weight: 500; - line-height: 16px; - color: var(--interface_hover); -} - -.home-card__content-body__data>div .main-img { - width: 32px; - height: 32px; - border-radius: 50%; - object-fit: cover; -} - -.home-card__content-body__link { - border: 1px solid #000000; - border-radius: 28px; - background: var(--main_white); - position: absolute; - right: 37px; - bottom: 26px; - padding: 8.5px 16px 12.5px; - font-style: 20px; - font-weight: 500; - line-height: 24px; -} -/* Home end */ - - -/* Anons */ -.anons { - background: var(--main_white); - border-radius: 60px; - padding: 51px 0; -} - -.anons-theme__title { - color: var(--main_black); - font-size: 24px; - font-weight: bold; - line-height: 28px; - text-transform: uppercase; - margin-bottom: 20px; -} - -.anons-theme { - margin-bottom: 60px; -} - -.anons-theme ul { - max-width: 1022px; - display: flex; - flex-wrap: wrap; - gap: 12px; -} - -.anons-theme ul a { - font-size: 20px; - font-weight: 600; - line-height: 24px; - color: var(--main_black); - padding: 4px 24px; - border: 1px solid #000; - border-radius: 20px; -} - -.anons-theme ul a:hover, -.anons-theme ul a.active { - background: var(--main_black); - color: var(--main_white); -} - -.anons-best { - margin-bottom: 60px; -} - -.anons-best__title { - font-size: 36px; - line-height: 40px; - font-weight: bold; - color: var(--main_black); - margin-bottom: 20px; -} - -.anons-best__card-wrap { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 24px; -} - -.anons-best__card { - padding-top: 293px; - border-radius: 48px; - overflow: hidden; - position: relative; - z-index: 1; -} - -.anons-best__card.light { - padding-top: 0; - border-radius: 0; -} - -.anons-best__card .main-img { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 360px; - z-index: -1; -} - -.anons-best__card .main-img img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.anons-best__card.light .main-img { - position: static; - height: 265px; -} -.anons-best__card.light .main-img img { - border-radius: 30px; -} - -.anons-best__card-alerts { - position: absolute; - top: 21px; - left: 17px; - width: calc(100% - 34px); - display: flex; - flex-wrap: wrap; - gap: 7px; - z-index: 1; -} - -.anons-best__card-alerts li { - padding: 6px 8px; - font-size: 16px; - line-height: 20px; - font-weight: 500; - color: var(--background); - background: var(--main_black); - border-radius: 30px; -} - -.anons-best__card-body { - background: var(--accent-1); - padding: 30px 17px 22px; - border-radius: 48px 48px 0 0; - color: var(--main_white); - position: relative; - height: 100%; -} - -.anons-best__card.light .anons-best__card-body { - background: transparent; - color: var(--main_black); - padding: 12px 0 34px; -} - -.anons-best__card-body__title { - font-size: 28px; - font-weight: bold; - line-height: 32px; - text-transform: uppercase; - margin-bottom: 14px; -} - -.anons-best__card.light .anons-best__card-body__title { - font-size: 26px; -} - -.anons-best__card-body__datas { - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 6px 10px; - max-width: 264px; -} - -.anons-best__card.light .anons-best__card-body__datas { - color: var(--placeholder); -} - -.anons-best__card-body__datas p { - font-size: 14px; - line-height: 16px; - font-weight: 500; -} - -.anons-best__card-body__datas ul { - display: flex; - align-items: center; - gap: 10px; -} - -.anons-best__card-body__datas ul li { - display: flex; - align-items: center; - gap: 4px; - font-size: 14px; - line-height: 16px; - font-weight: 500; -} - -.anons-best__card-body__datas ul .logo img { - width: 24px; - height: 24px; - border-radius: 50%; - object-fit: cover; -} - -.anons-article { - margin-bottom: 40px; -} - -.anons-article__title { - font-size: 36px; - line-height: 40px; - font-weight: bold; - color: var(--main_black); - margin-bottom: 20px; -} - -.anons-article__card-wrap { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 40px 25px; -} - -.anons-article__more-link { - display: flex; - align-items: center; - justify-content: center; -} - -.anons-article__more-link a { - background: var(--accent-3); - color: var(--main_white); - border-radius: 20px; - border: 1px solid var(--main_white); - padding: 16px 24px; - font-size: 20px; - font-weight: 600; - line-height: 24px; - text-transform: uppercase; -} -/* Anons end */ - - -/* Стили для планшетов */ -@media only screen and (max-width: 992px) { - - .authors h2 { - font-size: 48px; - margin-bottom: 24px; - } - - .authors li { - border-radius: 32px; - width: calc(50% - 12px); - } - - .authors .main-img { - margin-bottom: 24px; - } - - .author { - padding-bottom: 24px; - } - - .author h2 { - font-size: 48px; - } - - .author-head-content { - flex-direction: column; - align-items: flex-start; - } -} - - - -/* Стили для планшетов */ -@media only screen and (max-width: 992px) { - - .author { - padding: 188px 0 36px; - } - - - - -} - - - -@media only screen and (max-width: 576px) { - .anons-best__title { - font-size: 26px; - line-height: 32px; - margin-bottom: 12px; - } - - .anons-best__card { - padding-top: 205px; - } - - .anons-best__card .main-img { - height: 300px; - } - - .anons-best__card-body { - padding: 20px 17px; - } - - .anons-best__card-body__title { - font-size: 20px; - line-height: 24px; - margin-bottom: 16px; - } - - .anons-best__card.light .main-img { - height: 197px; - } - - .anons-best__card.light .anons-best__card-body__title { - font-size: 20px; - line-height: 24px; - } - - - - .authors { - padding-bottom: 138px; - } - - .authors h2 { - font-size: 32px; - line-height: 38px; - margin-bottom: 15px; - } - - .authors li { - border-radius: 24px; - width: 100%; - } - - .authors a { - padding: 32px 17px 52px; - } - - .authors .main-img { - width: 180px; - height: 180px; - margin-bottom: 20px; - } - - .authors-name { - font-size: 20px; - line-height: 24px; - } - - .authors-type { - font-size: 18px; - line-height: 24px; - margin-bottom: 20px; - } - - .authors p { - font-size: 16px; - line-height: 20px; - } - - .author-head { - padding-bottom: 15px; - } - - .author-head-content { - margin-bottom: 23px; - } - - .author-head .main-img { - width: 100%; - } - - .author-head h2 { - font-size: 32px; - line-height: 38px; - } - - .author-name { - font-size: 20px; - line-height: 24px; - } - - .author-type { - font-size: 18px; - line-height: 24px; - } - - .author-description { - font-size: 18px; - line-height: 24px; - margin-bottom: 24px; - } - - .author-head p { - font-size: 16px; - line-height: 20px; - } -} - - - - diff --git a/wp-content/themes/cosmopet/static/css/author-style.css b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css similarity index 79% rename from wp-content/themes/cosmopet/static/css/author-style.css rename to wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css index 0d1abc1..a89bf48 100644 --- a/wp-content/themes/cosmopet/static/css/author-style.css +++ b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css @@ -554,165 +554,6 @@ /* Anons end */ -/* Стили для планшетов */ -@media only screen and (max-width: 992px) { - - .authors h2 { - font-size: 48px; - margin-bottom: 24px; - } - - .authors li { - border-radius: 32px; - width: calc(50% - 12px); - } - - .authors .main-img { - margin-bottom: 24px; - } - - .author { - padding-bottom: 24px; - } - - .author h2 { - font-size: 48px; - } - - .author-head-content { - flex-direction: column; - align-items: flex-start; - } -} - - - -/* Стили для планшетов */ -@media only screen and (max-width: 992px) { - - .author { - padding: 188px 0 36px; - } -} - - - -@media only screen and (max-width: 576px) { - .anons-best__title { - font-size: 26px; - line-height: 32px; - margin-bottom: 12px; - } - - .anons-best__card { - padding-top: 205px; - } - - .anons-best__card .main-img { - height: 300px; - } - - .anons-best__card-body { - padding: 20px 17px; - } - - .anons-best__card-body__title { - font-size: 20px; - line-height: 24px; - margin-bottom: 16px; - } - - .anons-best__card.light .main-img { - height: 197px; - } - - .anons-best__card.light .anons-best__card-body__title { - font-size: 20px; - line-height: 24px; - } - - - - .authors { - padding-bottom: 138px; - } - - .authors h2 { - font-size: 32px; - line-height: 38px; - margin-bottom: 15px; - } - - .authors li { - border-radius: 24px; - width: 100%; - } - - .authors a { - padding: 32px 17px 52px; - } - - .authors .main-img { - width: 180px; - height: 180px; - margin-bottom: 20px; - } - - .authors-name { - font-size: 20px; - line-height: 24px; - } - - .authors-type { - font-size: 18px; - line-height: 24px; - margin-bottom: 20px; - } - - .authors p { - font-size: 16px; - line-height: 20px; - } - - .author-head { - padding-bottom: 15px; - } - - .author-head-content { - margin-bottom: 23px; - } - - .author-head .main-img { - width: 100%; - } - - .author-head h2 { - font-size: 32px; - line-height: 38px; - } - - .author-name { - font-size: 20px; - line-height: 24px; - } - - .author-type { - font-size: 18px; - line-height: 24px; - } - - .author-description { - font-size: 18px; - line-height: 24px; - margin-bottom: 24px; - } - - .author-head p { - font-size: 16px; - line-height: 20px; - } -} - diff --git a/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-mobile.css b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-mobile.css new file mode 100644 index 0000000..5b3fc9f --- /dev/null +++ b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-mobile.css @@ -0,0 +1,120 @@ +/* Стили для мобильных устройств */ +@media only screen and (max-width: 576px) { + .anons-best__title { + font-size: 26px; + line-height: 32px; + margin-bottom: 12px; + } + + .anons-best__card { + padding-top: 205px; + } + + .anons-best__card .main-img { + height: 300px; + } + + .anons-best__card-body { + padding: 20px 17px; + } + + .anons-best__card-body__title { + font-size: 20px; + line-height: 24px; + margin-bottom: 16px; + } + + .anons-best__card.light .main-img { + height: 197px; + } + + .anons-best__card.light .anons-best__card-body__title { + font-size: 20px; + line-height: 24px; + } + + + + .authors { + padding-bottom: 138px; + } + + .authors h2 { + font-size: 32px; + line-height: 38px; + margin-bottom: 15px; + } + + .authors li { + border-radius: 24px; + width: 100%; + } + + .authors a { + padding: 32px 17px 52px; + } + + .authors .main-img { + width: 180px; + height: 180px; + margin-bottom: 20px; + } + + .authors-name { + font-size: 20px; + line-height: 24px; + } + + .authors-type { + font-size: 18px; + line-height: 24px; + margin-bottom: 20px; + } + + .authors p { + font-size: 16px; + line-height: 20px; + } + + .author-head { + padding-bottom: 15px; + } + + .author-head-content { + margin-bottom: 23px; + } + + .author-head .main-img { + width: 100%; + } + + .author-head h2 { + font-size: 32px; + line-height: 38px; + } + + .author-name { + font-size: 20px; + line-height: 24px; + } + + .author-type { + font-size: 18px; + line-height: 24px; + } + + .author-description { + font-size: 18px; + line-height: 24px; + margin-bottom: 24px; + } + + .author-head p { + font-size: 16px; + line-height: 20px; + } +} + + + + diff --git a/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-tablet.css b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-tablet.css new file mode 100644 index 0000000..00bae10 --- /dev/null +++ b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-tablet.css @@ -0,0 +1,44 @@ +/* Стили для планшетов */ +@media only screen and (max-width: 992px) { + + .authors h2 { + font-size: 48px; + margin-bottom: 24px; + } + + .authors li { + border-radius: 32px; + width: calc(50% - 12px); + } + + .authors .main-img { + margin-bottom: 24px; + } + + .author { + padding-bottom: 24px; + } + + .author h2 { + font-size: 48px; + } + + .author-head-content { + flex-direction: column; + align-items: flex-start; + } +} + + + +/* Стили для планшетов */ +@media only screen and (max-width: 992px) { + + .author { + padding: 188px 0 36px; + } + + + + +} diff --git a/wp-content/themes/cosmopet/static/img/arrow-down.svg b/wp-content/themes/cosmopet/modules/author/assets/img/arrow-down.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/arrow-down.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/arrow-down.svg diff --git a/wp-content/themes/cosmopet/static/img/author-1.png b/wp-content/themes/cosmopet/modules/author/assets/img/author-1.png similarity index 100% rename from wp-content/themes/cosmopet/static/img/author-1.png rename to wp-content/themes/cosmopet/modules/author/assets/img/author-1.png diff --git a/wp-content/themes/cosmopet/static/img/author-2.png b/wp-content/themes/cosmopet/modules/author/assets/img/author-2.png similarity index 100% rename from wp-content/themes/cosmopet/static/img/author-2.png rename to wp-content/themes/cosmopet/modules/author/assets/img/author-2.png diff --git a/wp-content/themes/cosmopet/static/img/author-3.png b/wp-content/themes/cosmopet/modules/author/assets/img/author-3.png similarity index 100% rename from wp-content/themes/cosmopet/static/img/author-3.png rename to wp-content/themes/cosmopet/modules/author/assets/img/author-3.png diff --git a/wp-content/themes/cosmopet/static/img/author-4.png b/wp-content/themes/cosmopet/modules/author/assets/img/author-4.png similarity index 100% rename from wp-content/themes/cosmopet/static/img/author-4.png rename to wp-content/themes/cosmopet/modules/author/assets/img/author-4.png diff --git a/wp-content/themes/cosmopet/static/img/author-5.png b/wp-content/themes/cosmopet/modules/author/assets/img/author-5.png similarity index 100% rename from wp-content/themes/cosmopet/static/img/author-5.png rename to wp-content/themes/cosmopet/modules/author/assets/img/author-5.png diff --git a/wp-content/themes/cosmopet/static/img/author-main-card.png b/wp-content/themes/cosmopet/modules/author/assets/img/author-main-card.png similarity index 100% rename from wp-content/themes/cosmopet/static/img/author-main-card.png rename to wp-content/themes/cosmopet/modules/author/assets/img/author-main-card.png diff --git a/wp-content/themes/cosmopet/modules/author/assets/img/bars.svg b/wp-content/themes/cosmopet/modules/author/assets/img/bars.svg new file mode 100644 index 0000000..0ff9b2e --- /dev/null +++ b/wp-content/themes/cosmopet/modules/author/assets/img/bars.svg @@ -0,0 +1,11 @@ + diff --git a/wp-content/themes/cosmopet/static/img/basket-icon.svg b/wp-content/themes/cosmopet/modules/author/assets/img/basket-icon.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/basket-icon.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/basket-icon.svg diff --git a/wp-content/themes/cosmopet/static/img/favicon.ico b/wp-content/themes/cosmopet/modules/author/assets/img/favicon.ico similarity index 100% rename from wp-content/themes/cosmopet/static/img/favicon.ico rename to wp-content/themes/cosmopet/modules/author/assets/img/favicon.ico diff --git a/wp-content/themes/cosmopet/static/img/footer-network-1.svg b/wp-content/themes/cosmopet/modules/author/assets/img/footer-network-1.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/footer-network-1.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/footer-network-1.svg diff --git a/wp-content/themes/cosmopet/static/img/footer-network-2.svg b/wp-content/themes/cosmopet/modules/author/assets/img/footer-network-2.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/footer-network-2.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/footer-network-2.svg diff --git a/wp-content/themes/cosmopet/static/img/footer-network-3.svg b/wp-content/themes/cosmopet/modules/author/assets/img/footer-network-3.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/footer-network-3.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/footer-network-3.svg diff --git a/wp-content/themes/cosmopet/static/img/header-red.svg b/wp-content/themes/cosmopet/modules/author/assets/img/header-red.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/header-red.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/header-red.svg diff --git a/wp-content/themes/cosmopet/static/img/heart-grey.svg b/wp-content/themes/cosmopet/modules/author/assets/img/heart-grey.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/heart-grey.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/heart-grey.svg diff --git a/wp-content/themes/cosmopet/static/img/heart-white.svg b/wp-content/themes/cosmopet/modules/author/assets/img/heart-white.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/heart-white.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/heart-white.svg diff --git a/wp-content/themes/cosmopet/static/img/heart.svg b/wp-content/themes/cosmopet/modules/author/assets/img/heart.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/heart.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/heart.svg diff --git a/wp-content/themes/cosmopet/static/img/indent-icon-1.svg b/wp-content/themes/cosmopet/modules/author/assets/img/indent-icon-1.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/indent-icon-1.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/indent-icon-1.svg diff --git a/wp-content/themes/cosmopet/static/img/logo-green.svg b/wp-content/themes/cosmopet/modules/author/assets/img/logo-green.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/logo-green.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/logo-green.svg diff --git a/wp-content/themes/cosmopet/modules/author/assets/img/logo.svg b/wp-content/themes/cosmopet/modules/author/assets/img/logo.svg new file mode 100644 index 0000000..d3929b8 --- /dev/null +++ b/wp-content/themes/cosmopet/modules/author/assets/img/logo.svg @@ -0,0 +1,3 @@ + diff --git a/wp-content/themes/cosmopet/static/img/long-arrow.svg b/wp-content/themes/cosmopet/modules/author/assets/img/long-arrow.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/long-arrow.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/long-arrow.svg diff --git a/wp-content/themes/cosmopet/static/img/minus-icon.svg b/wp-content/themes/cosmopet/modules/author/assets/img/minus-icon.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/minus-icon.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/minus-icon.svg diff --git a/wp-content/themes/cosmopet/static/img/msg-green.svg b/wp-content/themes/cosmopet/modules/author/assets/img/msg-green.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/msg-green.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/msg-green.svg diff --git a/wp-content/themes/cosmopet/static/img/msg-grey.svg b/wp-content/themes/cosmopet/modules/author/assets/img/msg-grey.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/msg-grey.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/msg-grey.svg diff --git a/wp-content/themes/cosmopet/static/img/msg-white.svg b/wp-content/themes/cosmopet/modules/author/assets/img/msg-white.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/msg-white.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/msg-white.svg diff --git a/wp-content/themes/cosmopet/static/img/msg.svg b/wp-content/themes/cosmopet/modules/author/assets/img/msg.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/msg.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/msg.svg diff --git a/wp-content/themes/cosmopet/static/img/plus-icon.svg b/wp-content/themes/cosmopet/modules/author/assets/img/plus-icon.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/plus-icon.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/plus-icon.svg diff --git a/wp-content/themes/cosmopet/static/img/swp-next.svg b/wp-content/themes/cosmopet/modules/author/assets/img/swp-next.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/swp-next.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/swp-next.svg diff --git a/wp-content/themes/cosmopet/static/img/swp-prev.svg b/wp-content/themes/cosmopet/modules/author/assets/img/swp-prev.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/swp-prev.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/swp-prev.svg diff --git a/wp-content/themes/cosmopet/static/img/user-icon.svg b/wp-content/themes/cosmopet/modules/author/assets/img/user-icon.svg similarity index 100% rename from wp-content/themes/cosmopet/static/img/user-icon.svg rename to wp-content/themes/cosmopet/modules/author/assets/img/user-icon.svg diff --git a/wp-content/themes/cosmopet/static/js/author-posts-ajax.js b/wp-content/themes/cosmopet/modules/author/assets/js/author-posts-ajax.js similarity index 100% rename from wp-content/themes/cosmopet/static/js/author-posts-ajax.js rename to wp-content/themes/cosmopet/modules/author/assets/js/author-posts-ajax.js diff --git a/wp-content/themes/cosmopet/modules/author/assets/js/author-posts-ajax.js.bak b/wp-content/themes/cosmopet/modules/author/assets/js/author-posts-ajax.js.bak deleted file mode 100644 index 8fdcaff..0000000 --- a/wp-content/themes/cosmopet/modules/author/assets/js/author-posts-ajax.js.bak +++ /dev/null @@ -1,46 +0,0 @@ -jQuery(document).ready(function ($) { - $('#ajax-load-author').on('submit', function (e) { - e.preventDefault(); - var form = $(this); - var currentPage = parseInt($('#page_num').val()); - var totalPosts = parseInt(form.data('total')); - var postsPerPage = 9; - - console.log('Current page before load:', currentPage); - console.log('Total posts:', totalPosts); - console.log('Posts loaded before request:', postsPerPage); - - var data = { - action: 'get_author_posts', - page_num: currentPage, - author_id: form.data('author') - }; - - console.log('Sending AJAX request with data:', data); - - $.ajax({ - url: '/wp-admin/admin-ajax.php', - type: 'POST', - data: data, - success: function (response) { - console.log('AJAX response received'); - $(".anons-article__card-wrap").append(response); - - $('#page_num').val(currentPage + 1); - console.log('New page number:', currentPage + 1); - - // Считаем общее количество загруженных постов - var currentlyDisplayed = $('.anons-article__card-wrap .anons-best__card').length; - console.log('Actually displayed posts:', currentlyDisplayed); - - if (currentlyDisplayed >= totalPosts) { - console.log('Hiding load more button - all posts loaded'); - form.hide(); - } - }, - error: function (error) { - console.error('AJAX error:', error); - } - }); - }); -}); \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/author/components/author-archive/component-controller.php b/wp-content/themes/cosmopet/modules/author/components/author-archive/component-controller.php index 21042e7..92c3a0a 100644 --- a/wp-content/themes/cosmopet/modules/author/components/author-archive/component-controller.php +++ b/wp-content/themes/cosmopet/modules/author/components/author-archive/component-controller.php @@ -51,4 +51,4 @@ foreach ($authors_arr as $author) { } $context['authors'] = $authors_arr; -Timber::render('blog_author/author-archive-page.twig', $context); +Timber::render('blog_author/author-archive.twig', $context); diff --git a/wp-content/themes/cosmopet/modules/author/components/author-single/component-controller.php b/wp-content/themes/cosmopet/modules/author/components/author-single/component-controller.php index 512cd7b..832d82d 100644 --- a/wp-content/themes/cosmopet/modules/author/components/author-single/component-controller.php +++ b/wp-content/themes/cosmopet/modules/author/components/author-single/component-controller.php @@ -38,4 +38,4 @@ $author->posts = Timber::get_posts([ $context['author'] = $author; $context['total_pages'] = ceil($author->post_count / 9); -Timber::render('blog_author/author-single-page.twig', $context); \ No newline at end of file +Timber::render('blog_author/author-single.twig', $context); \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/author/module-ajax-controller.php b/wp-content/themes/cosmopet/modules/author/module-ajax-controller.php index 933df28..5ed693d 100644 --- a/wp-content/themes/cosmopet/modules/author/module-ajax-controller.php +++ b/wp-content/themes/cosmopet/modules/author/module-ajax-controller.php @@ -27,7 +27,7 @@ function get_author_posts() { $context = Timber::context(); $context['posts'] = $remaining_posts; - Timber::render('blog_author/author-posts-list-block.twig', $context); + Timber::render('blog_author/author-posts-list.twig', $context); wp_die(); } diff --git a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css.bak b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css similarity index 79% rename from wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css.bak rename to wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css index 4b6316b..d6fb152 100644 --- a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css.bak +++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css @@ -89,25 +89,5 @@ main{ width: max-content; } -@media (max-width: 1200px) { - .header-navs { - gap: 12px; - } - .header-navs__link { - font-size: 14px; - } - .header-right { - gap: 4px; - } -} -@media(max-width:600px) { - .article-content h2 { - max-width: 661px; - font-size: 24px!important; - line-height: 40px; - font-weight: bold; - text-transform: uppercase; - color: var(--grey-black); - } -} + diff --git a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-mobile.css b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-mobile.css new file mode 100644 index 0000000..05bb28b --- /dev/null +++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-mobile.css @@ -0,0 +1,10 @@ +@media(max-width:600px) { + .article-content h2 { + max-width: 661px; + font-size: 24px!important; + line-height: 40px; + font-weight: bold; + text-transform: uppercase; + color: var(--grey-black); + } +} 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 new file mode 100644 index 0000000..5220caa --- /dev/null +++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-tablet.css @@ -0,0 +1 @@ +/* Стили для планшетов */ diff --git a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-ultra.css b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-ultra.css new file mode 100644 index 0000000..c149baa --- /dev/null +++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-ultra.css @@ -0,0 +1,4 @@ +/* Стили для ультрашироких экранов */ +@media only screen and (min-width: 1400px) { + +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-xl.css b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-xl.css new file mode 100644 index 0000000..478ccf2 --- /dev/null +++ b/wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-xl.css @@ -0,0 +1,11 @@ +@media (max-width: 1200px) { + .header-navs { + gap: 12px; + } + .header-navs__link { + font-size: 14px; + } + .header-right { + gap: 4px; + } +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/js/comments.js b/wp-content/themes/cosmopet/modules/blog/assets/js/comments.js similarity index 100% rename from wp-content/themes/cosmopet/static/js/comments.js rename to wp-content/themes/cosmopet/modules/blog/assets/js/comments.js diff --git a/wp-content/themes/cosmopet/modules/blog/assets/js/comments.js.bak b/wp-content/themes/cosmopet/modules/blog/assets/js/comments.js.bak deleted file mode 100644 index baa8004..0000000 --- a/wp-content/themes/cosmopet/modules/blog/assets/js/comments.js.bak +++ /dev/null @@ -1,198 +0,0 @@ -// comment -let answerbtns = document.querySelectorAll('.answer-btn'); -let answerbtnicons = document.querySelectorAll('.answer-btn svg'); - -// При загрузке страницы проверяем активные кнопки -document.addEventListener('DOMContentLoaded', function() { - // Для каждой кнопки ответов - answerbtns.forEach((answerbtn) => { - // Находим родительский контейнер, чтобы искать ответы только для этого комментария - const buttonParent = answerbtn.parentElement; - - // Находим все блоки ответов для этого комментария (после текущей кнопки) - const answerBlocks = getRelatedAnswerBlocks(answerbtn); - if (answerBlocks.length === 0) return; - - // Проверяем, должны ли быть ответы развернуты (если у кнопки или любого ответа есть класс active) - const shouldBeActive = answerbtn.querySelector('svg').classList.contains('active') || - Array.from(answerBlocks).some(block => block.classList.contains('active')); - - if (shouldBeActive) { - // Активируем все ответы только для этого комментария - answerBlocks.forEach(block => { - block.classList.add('active'); - }); - - // Обновляем состояние кнопки - answerbtn.querySelector('svg').classList.add('active'); - - // Обновляем текст кнопки - let buttonText = answerbtn.querySelector('span'); - if (buttonText) { - buttonText.textContent = 'Свернуть'; - } - } else { - // Скрываем все ответы - answerBlocks.forEach(block => { - block.classList.remove('active'); - }); - - // Обновляем состояние кнопки - answerbtn.querySelector('svg').classList.remove('active'); - - // Обновляем текст кнопки в зависимости от количества ответов - let buttonText = answerbtn.querySelector('span'); - if (buttonText) { - const count = answerBlocks.length; - buttonText.textContent = count === 1 ? 'ответ' : 'ответа'; - } - } - }); -}); - -// Функция для получения блоков ответов, связанных с данной кнопкой -function getRelatedAnswerBlocks(answerBtn) { - // Получаем следующий блок комментариев (если он есть) - let currentElement = answerBtn; - let answerBlocks = []; - - // Собираем все блоки ответов до следующего основного комментария или кнопки ответов - while ((currentElement = currentElement.nextElementSibling) !== null) { - if (currentElement.classList.contains('comment-block') && !currentElement.classList.contains('answer-block')) { - // Достигли следующего основного комментария, прерываем сбор - break; - } else if (currentElement.classList.contains('answer-btn')) { - // Достигли следующей кнопки ответов, прерываем сбор - break; - } else if (currentElement.classList.contains('answer-block')) { - // Это блок ответа, добавляем в коллекцию - answerBlocks.push(currentElement); - } - } - - return answerBlocks; -} - -// Обработчики нажатия на кнопки ответов -answerbtns.forEach((answerbtn) => { - answerbtn.addEventListener('click', () => { - // Получаем все блоки ответов для этого комментария - const answerBlocks = getRelatedAnswerBlocks(answerbtn); - if (answerBlocks.length === 0) return; - - // Определяем, развернуты ли ответы сейчас - const isCurrentlyActive = answerbtn.querySelector('svg').classList.contains('active'); - - // Переключаем состояние - if (isCurrentlyActive) { - // Скрываем все ответы - answerBlocks.forEach(block => { - block.classList.remove('active'); - }); - - // Обновляем состояние кнопки - answerbtn.querySelector('svg').classList.remove('active'); - - // Обновляем текст кнопки - let buttonText = answerbtn.querySelector('span'); - if (buttonText) { - const count = answerBlocks.length; - buttonText.textContent = count === 1 ? 'ответ' : 'ответа'; - } - } else { - // Показываем все ответы - answerBlocks.forEach(block => { - block.classList.add('active'); - }); - - // Обновляем состояние кнопки - answerbtn.querySelector('svg').classList.add('active'); - - // Обновляем текст кнопки - let buttonText = answerbtn.querySelector('span'); - if (buttonText) { - buttonText.textContent = 'Свернуть'; - } - } - }); -}); - -// Обработка нажатия на кнопку "Ответить" на комментарий -document.addEventListener('DOMContentLoaded', function() { - // Получаем все кнопки "Ответить" на странице - const replyButtons = document.querySelectorAll('.reply-to-comment'); - - // Добавляем обработчик на каждую кнопку - replyButtons.forEach(button => { - button.addEventListener('click', function() { - // Получаем ID комментария, на который отвечаем - const commentId = this.getAttribute('data-comment-id'); - const postId = this.getAttribute('data-post-id'); - const replyToName = this.getAttribute('data-reply-to'); - - // Получаем контейнер для формы ответа - const replyFormContainer = document.getElementById('reply-form-' + commentId); - - // Если форма уже открыта, скрываем её - if (replyFormContainer.style.display !== 'none') { - replyFormContainer.style.display = 'none'; - return; - } - - // Скрываем все открытые формы ответов - document.querySelectorAll('.reply-form-container').forEach(container => { - container.style.display = 'none'; - }); - - // Клонируем основную форму комментариев - const originalForm = document.getElementById('commentform'); - if (originalForm) { - const clonedForm = originalForm.cloneNode(true); - - // Изменяем атрибуты формы для ответа - clonedForm.id = 'commentform-reply-' + commentId; - - // Добавляем скрытое поле с ID родительского комментария - const hiddenInput = document.createElement('input'); - hiddenInput.type = 'hidden'; - hiddenInput.name = 'comment_parent'; - hiddenInput.value = commentId; - clonedForm.appendChild(hiddenInput); - - // Изменяем заголовок формы - const formTitle = clonedForm.querySelector('.comment-reply-title'); - if (formTitle) { - formTitle.textContent = 'Ответить ' + replyToName; - } - - // Добавляем кнопку отмены - const cancelButton = document.createElement('button'); - cancelButton.type = 'button'; - cancelButton.className = 'cancel-reply-btn'; - cancelButton.textContent = 'Отменить'; - cancelButton.addEventListener('click', function() { - replyFormContainer.style.display = 'none'; - }); - - // Добавляем кнопку отмены в форму - const submitContainer = clonedForm.querySelector('.form-submit'); - if (submitContainer) { - submitContainer.appendChild(cancelButton); - } - - // Очищаем контейнер и добавляем клонированную форму - replyFormContainer.innerHTML = ''; - replyFormContainer.appendChild(clonedForm); - - // Показываем форму - replyFormContainer.style.display = 'block'; - - // Фокусируемся на текстовой области - const textarea = clonedForm.querySelector('textarea'); - if (textarea) { - textarea.focus(); - } - } - }); - }); -}); diff --git a/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php b/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php index 125b96f..61c4425 100644 --- a/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php +++ b/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php @@ -17,4 +17,4 @@ $context['blog_desc'] = get_field('blog_desc', 'options'); $context['post_count'] = wp_count_posts()->publish; // Количество опубликованных постов $context['total_pages'] = ceil($context['post_count'] / get_option('posts_per_page')); // Общее количество страниц -Timber::render('blog/blog-archive-page.twig', $context); +Timber::render('blog/blog-archive.twig', $context); diff --git a/wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css.bak b/wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css similarity index 100% rename from wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css.bak rename to wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css diff --git a/wp-content/themes/cosmopet/modules/blog/components/editorial/assets/css/style.css.bak b/wp-content/themes/cosmopet/modules/blog/components/editorial/assets/css/style.css similarity index 100% rename from wp-content/themes/cosmopet/modules/blog/components/editorial/assets/css/style.css.bak rename to wp-content/themes/cosmopet/modules/blog/components/editorial/assets/css/style.css diff --git a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css.bak b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css similarity index 63% rename from wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css.bak rename to wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css index f2fec8c..c06abc9 100644 --- a/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css.bak +++ b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css @@ -177,100 +177,4 @@ .blog-home{ padding-bottom: 4rem; -} - -@media only screen and (max-width: 992px) { - .home-swp__btn { - bottom: auto; - top: 93px; - left: -10px; - width: calc(100% + 20px); - justify-content: space-between; - transform: translateX(0); - } - - .home-swp__btn button { - width: 48px; - height: 48px; - border-radius: 20px; - } - - .home-card { - flex-direction: column; - border-radius: 24px; - gap: 17px; - } - - .home-card__img { - height: 234px; - width: 100%; - border-radius: 24px; - } - - .home-card__content { - padding: 0 16px 89px; - } - - .home-card__content-title { - font-size: 20px; - line-height: 24px; - margin-bottom: 15px; - } - - .home-card__content-description { - font-size: 16px; - line-height: 20px; - margin-bottom: 15px; - display: -webkit-box; - -webkit-line-clamp: 5; - -webkit-box-orient: vertical; - overflow: hidden; - text-overflow: ellipsis; - } - - .home-card__content-body { - gap: 7px; - } - - .home-card__content-body__alerts { - gap: 7px; - } - - .home-card__content-body__alerts li { - font-size: 14px; - line-height: 16px; - padding: 8px; - } - - .home-card__content-body__day { - font-size: 14px; - line-height: 16px; - } - - .home-card__content-body__time { - font-size: 14px; - line-height: 16px; - } - - .home-card__content-body__data { - gap: 7px; - } - - .home-card__content-body__data>div { - gap: 4px; - font-size: 14px; - line-height: 16px; - } - - .home-card__content-body__data .main-img { - width: 32px; - height: 32px; - } - - .home-card__content-body__link { - right: 50%; - bottom: 27px; - transform: translateX(50%); - width: max-content; - } -} +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/layout/assets/js/layout-core.js.bak b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-mobile.css similarity index 100% rename from wp-content/themes/cosmopet/modules/layout/assets/js/layout-core.js.bak rename to wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-mobile.css 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 new file mode 100644 index 0000000..59eb0fb --- /dev/null +++ b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-tablet.css @@ -0,0 +1,96 @@ +/* Стили для планшетов */ +@media only screen and (max-width: 992px) { + .home-swp__btn { + bottom: auto; + top: 93px; + left: -10px; + width: calc(100% + 20px); + justify-content: space-between; + transform: translateX(0); + } + + .home-swp__btn button { + width: 48px; + height: 48px; + border-radius: 20px; + } + + .home-card { + flex-direction: column; + border-radius: 24px; + gap: 17px; + } + + .home-card__img { + height: 234px; + width: 100%; + border-radius: 24px; + } + + .home-card__content { + padding: 0 16px 89px; + } + + .home-card__content-title { + font-size: 20px; + line-height: 24px; + margin-bottom: 15px; + } + + .home-card__content-description { + font-size: 16px; + line-height: 20px; + margin-bottom: 15px; + display: -webkit-box; + -webkit-line-clamp: 5; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + } + + .home-card__content-body { + gap: 7px; + } + + .home-card__content-body__alerts { + gap: 7px; + } + + .home-card__content-body__alerts li { + font-size: 14px; + line-height: 16px; + padding: 8px; + } + + .home-card__content-body__day { + font-size: 14px; + line-height: 16px; + } + + .home-card__content-body__time { + font-size: 14px; + line-height: 16px; + } + + .home-card__content-body__data { + gap: 7px; + } + + .home-card__content-body__data>div { + gap: 4px; + font-size: 14px; + line-height: 16px; + } + + .home-card__content-body__data .main-img { + width: 32px; + height: 32px; + } + + .home-card__content-body__link { + 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.bak b/wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js similarity index 100% rename from wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js.bak rename to wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/js/slider.js diff --git a/wp-content/themes/cosmopet/modules/blog/components/news-list/assets/js/posts-ajax.js.bak b/wp-content/themes/cosmopet/modules/blog/components/news-list/assets/js/posts-ajax.js similarity index 100% rename from wp-content/themes/cosmopet/modules/blog/components/news-list/assets/js/posts-ajax.js.bak rename to wp-content/themes/cosmopet/modules/blog/components/news-list/assets/js/posts-ajax.js diff --git a/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.bak b/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.css similarity index 77% rename from wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.bak rename to wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.css index 5b14787..2b7ced0 100644 --- a/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.bak +++ b/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.css @@ -454,150 +454,4 @@ p.discount-description__2 { .other-home { padding-top: 36px !important; } -/* comment */ - -@media (max-width: 992px) { - .discount { - padding: 32px 24px; - border-radius: 32px; - margin-bottom: 48px; - } - - .discount-title { - font-size: 26px; - line-height: 32px; - margin-bottom: 21px; - } - - .discount-bg { - display: none; - } - - .discount-bg.mb { - display: inline-block; - position: static; - margin-bottom: 21px; - } - - .discount-form { - flex-direction: column; - gap: 21px; - margin-bottom: 21px; - } - - .discount-form img { - display: none; - } - - .discount-form input { - width: 100%; - text-align: center; - } - - .discount-form button { - width: 100%; - text-align: center; - } - - .discount-descriptions { - display: flex; - flex-direction: column-reverse; - } - - p.discount-description__2 { - font-size: 18px; - line-height: 24px; - font-weight: 500; - grid-area: 21px; - margin-bottom: 21px; - } - - p.discount-description__1 { - margin-bottom: 0; - font-size: 12px; - line-height: 120%; - } - - .article-home { - padding-bottom: 36px; - } - - .article-home .container { - display: flex; - flex-direction: column; - } - - .article-home h1 { - order: 1; - font-size: 32px; - line-height: 38px; - margin-bottom: 15px; - } - - .article-home__card { - order: 2; - - } - - .article-home__card img { - border-radius: 32px; - } - - .article-home__data { - gap: 8px 16px; - order: 3; - margin: 15px 0 0; - } - - .article-home__data-alerts { - gap: 16px; - } - - .article-home__data-alerts a { - padding: 6px 8px; - } - - .article-content { - padding: 48px 0; - border-radius: 64px; - } - - .comment .comment-block { - padding: 20px 24px; - margin-top: 28px; - } - - .comment .comment-title { - padding-bottom: 20px; - } - - .comment .answer-block { - margin: 10px 0 0 42px; - } - - .comment .comment-user h6 { - font-size: 16px; - line-height: 24px; - } - - .comment .comment-block p { - font-size: 16px; - line-height: 24px; - } - - .comment .comment-btns { - gap: 14px; - } - - .comment .comment-btns button { - font-size: 12px; - line-height: 16px; - } - - .comment .comment-user span { - font-size: 12px; - line-height: 16px; - } - - -} \ No newline at end of file +/* comment */ \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/js/layout-core.js b/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-mobile.css similarity index 100% rename from wp-content/themes/cosmopet/static/js/layout-core.js rename to wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-mobile.css diff --git a/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-tablet.css b/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-tablet.css new file mode 100644 index 0000000..0f2d485 --- /dev/null +++ b/wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-tablet.css @@ -0,0 +1,145 @@ +@media (max-width: 992px) { + .discount { + padding: 32px 24px; + border-radius: 32px; + margin-bottom: 48px; + } + + .discount-title { + font-size: 26px; + line-height: 32px; + margin-bottom: 21px; + } + + .discount-bg { + display: none; + } + + .discount-bg.mb { + display: inline-block; + position: static; + margin-bottom: 21px; + } + + .discount-form { + flex-direction: column; + gap: 21px; + margin-bottom: 21px; + } + + .discount-form img { + display: none; + } + + .discount-form input { + width: 100%; + text-align: center; + } + + .discount-form button { + width: 100%; + text-align: center; + } + + .discount-descriptions { + display: flex; + flex-direction: column-reverse; + } + + p.discount-description__2 { + font-size: 18px; + line-height: 24px; + font-weight: 500; + grid-area: 21px; + margin-bottom: 21px; + } + + p.discount-description__1 { + margin-bottom: 0; + font-size: 12px; + line-height: 120%; + } + + .article-home { + padding-bottom: 36px; + } + + .article-home .container { + display: flex; + flex-direction: column; + } + + .article-home h1 { + order: 1; + font-size: 32px; + line-height: 38px; + margin-bottom: 15px; + } + + .article-home__card { + order: 2; + + } + + .article-home__card img { + border-radius: 32px; + } + + .article-home__data { + gap: 8px 16px; + order: 3; + margin: 15px 0 0; + } + + .article-home__data-alerts { + gap: 16px; + } + + .article-home__data-alerts a { + padding: 6px 8px; + } + + .article-content { + padding: 48px 0; + border-radius: 64px; + } + + .comment .comment-block { + padding: 20px 24px; + margin-top: 28px; + } + + .comment .comment-title { + padding-bottom: 20px; + } + + .comment .answer-block { + margin: 10px 0 0 42px; + } + + .comment .comment-user h6 { + font-size: 16px; + line-height: 24px; + } + + .comment .comment-block p { + font-size: 16px; + line-height: 24px; + } + + .comment .comment-btns { + gap: 14px; + } + + .comment .comment-btns button { + font-size: 12px; + line-height: 16px; + } + + .comment .comment-user span { + font-size: 12px; + line-height: 16px; + } + + +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/js/popups.js b/wp-content/themes/cosmopet/modules/blog/components/single/assets/js/comments.js similarity index 100% rename from wp-content/themes/cosmopet/static/js/popups.js rename to wp-content/themes/cosmopet/modules/blog/components/single/assets/js/comments.js diff --git a/wp-content/themes/cosmopet/modules/blog/components/single/assets/js/post-likes.js.bak b/wp-content/themes/cosmopet/modules/blog/components/single/assets/js/post-likes.js similarity index 100% rename from wp-content/themes/cosmopet/modules/blog/components/single/assets/js/post-likes.js.bak rename to wp-content/themes/cosmopet/modules/blog/components/single/assets/js/post-likes.js diff --git a/wp-content/themes/cosmopet/modules/blog/components/single/component-controller.php b/wp-content/themes/cosmopet/modules/blog/components/single/component-controller.php index ac8c047..85e5737 100644 --- a/wp-content/themes/cosmopet/modules/blog/components/single/component-controller.php +++ b/wp-content/themes/cosmopet/modules/blog/components/single/component-controller.php @@ -4,4 +4,4 @@ include_component('blog', 'featured-slider'); $context = Timber::get_context(); $post = Timber::get_post(); $context['post'] = $post; -Timber::render('blog/blog-single-page.twig', $context); +Timber::render('blog/blog-single.twig', $context); diff --git a/wp-content/themes/cosmopet/modules/blog/components/themes/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/blog/components/themes/assets/css/gp-style-desktop.css new file mode 100644 index 0000000..e69de29 diff --git a/wp-content/themes/cosmopet/modules/blog/components/themes/assets/css/gp-style-mobile.css b/wp-content/themes/cosmopet/modules/blog/components/themes/assets/css/gp-style-mobile.css new file mode 100644 index 0000000..e69de29 diff --git a/wp-content/themes/cosmopet/modules/blog/components/themes/assets/css/gp-style-tablet.css b/wp-content/themes/cosmopet/modules/blog/components/themes/assets/css/gp-style-tablet.css new file mode 100644 index 0000000..e69de29 diff --git a/wp-content/themes/cosmopet/modules/footer/assets/css/footer.css.bak b/wp-content/themes/cosmopet/modules/footer/assets/css/footer.css.bak deleted file mode 100644 index 80f73f6..0000000 --- a/wp-content/themes/cosmopet/modules/footer/assets/css/footer.css.bak +++ /dev/null @@ -1,276 +0,0 @@ -/* Footer */ -.footer { - background: var(--main_black); - padding: 40px 0 38px; - color: var(--main_white); -} - -.footer-top { - display: flex; - align-items: stretch; - justify-content: space-between; - gap: 48px; -} - -.footer-top .logo { - display: flex; - align-items: center; - gap: 10px; - font-size: 20px; - font-weight: 500; - text-transform: uppercase; - background: var(--accent-1); - color: transparent; - -webkit-background-clip: text; - background-clip: text; - margin-bottom: 24px; -} - -.footer-content__address { - font-size: 24px; - font-weight: 500; - line-height: 32px; - margin-bottom: 32px; -} - -.footer-content { - width: 100%; -} - -.footer-content ul { - display: flex; - flex-direction: column; - gap: 24px; -} - -.footer-content ul li { - display: flex; - flex-direction: column; - gap: 4px; -} - -.footer-content ul p { - font-size: 16px; - font-weight: bold; - line-height: 20px; -} - -.footer-content ul a { - font-size: 24px; - font-weight: 500; - line-height: 32px; -} - -.footer-content__wrap { - display: flex; - align-items: flex-end; - justify-content: space-between; - width: 100%; -} - -.footer-top__link { - display: flex; - flex-direction: column; - gap: 24px; -} - -.footer-top__link .link-black { - padding: 7px 15px; - color: var(--main_white); - font-size: 24px; - line-height: 32px; - font-weight: 500; - white-space: nowrap; - border: 1px solid var(--main_white); - border-radius: 24px; -} - -.footer-top__link .link-white { - width: 100%; - text-align: center; - background: var(--main_white); - color: var(--main_black); - font-size: 20px; - font-weight: 600; - line-height: 24px; - padding: 12px; - border-radius: 20px; -} - -.footer-contact { - width: 364px; - flex-shrink: 0; - background: var(--accent-1); - border-radius: 24px; - padding: 24px; - display: flex; - flex-direction: column; - gap: 16px; -} - -.footer-contact__title { - color: var(--main_black); - font-size: 24px; - font-weight: 500; - line-height: 32px; -} - -.footer-contact__submit { - width: 100%; - text-align: center; - height: 48px; - border-radius: 16px; - background: var(--main_black); - font-size: 20px; - font-weight: 600; - line-height: 24px; - color: var(--main_white); -} - -.footer-bottom { - display: flex; - align-items: center; - justify-content: space-between; - padding-top: 17px; - margin-top: 19px; - border-top: 1px solid var(--main_white); -} - -.footer-network { - display: flex; - align-items: center; - gap: 32px; -} - -.footer-bottom a { - font-size: 16px; - line-height: 20px; - font-weight: 500; - color: var(--main_white); - opacity: 0.6; - text-decoration: underline; -} -/* Footer end */ -.modal__aside { - position: fixed; - top: 0; - right: 0; - width: 0; - height: 100%; - overflow: hidden; - transition: width .4s ease-out; -} - -.modal__item { - height: 100%; - padding: 24px; - background: var(--background-white); - position: relative; - display: none; - filter: blur(10px); - transition: filter .2s ease-out; -} - -.modal__login { - max-width: 100vw; - width: 400px; -} - -.modal__item.active { - display: flex; - flex-direction: column; - justify-content: space-between; -} - -.modal__close { - position: absolute; - top: 32px; - right: 24px; - width: 24px; - height: 24px; - border: none; - background: none; -} - -.login_wrap { - height: 100%; -} - - -.social-media__icon { - width: 32px; - aspect-ratio: 1; -} - -.login_btn { - margin-bottom: 24px; -} - - -@media only screen and (max-width: 576px) { - .footer { - padding: 24px 0 58px; - } - - .footer-top { - align-items: flex-start; - text-align: left; - gap: 24px; - } - - .footer-content__wrap { - align-items: flex-start; - gap: 24px; - } - - .footer-content { - align-items: flex-start; - } - - .footer-content .logo { - font-size: 20px; - margin-bottom: 24px; - } - - .footer-content__address { - font-size: 18px; - line-height: 24px; - margin-bottom: 32px; - } - - .footer-content ul { - gap: 24px; - } - - .footer-content ul p { - font-size: 16px; - line-height: 20px; - } - - .footer-content ul a { - font-size: 24px; - line-height: 32px; - } - - .footer-top__link .link-white { - display: none; - } - - .footer-contact { - width: 100%; - padding: 16px; - border-radius: 24px; - } - - .footer-contact__title { - color: var(--main_white); - } - - .footer-bottom { - margin-top: 0; - padding-top: 24px; - border: 0; - align-items: flex-start; - gap: 17px; - } -} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/css/footer.css b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css similarity index 75% rename from wp-content/themes/cosmopet/static/css/footer.css rename to wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css index 80f73f6..958d07b 100644 --- a/wp-content/themes/cosmopet/static/css/footer.css +++ b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css @@ -205,72 +205,3 @@ .login_btn { margin-bottom: 24px; } - - -@media only screen and (max-width: 576px) { - .footer { - padding: 24px 0 58px; - } - - .footer-top { - align-items: flex-start; - text-align: left; - gap: 24px; - } - - .footer-content__wrap { - align-items: flex-start; - gap: 24px; - } - - .footer-content { - align-items: flex-start; - } - - .footer-content .logo { - font-size: 20px; - margin-bottom: 24px; - } - - .footer-content__address { - font-size: 18px; - line-height: 24px; - margin-bottom: 32px; - } - - .footer-content ul { - gap: 24px; - } - - .footer-content ul p { - font-size: 16px; - line-height: 20px; - } - - .footer-content ul a { - font-size: 24px; - line-height: 32px; - } - - .footer-top__link .link-white { - display: none; - } - - .footer-contact { - width: 100%; - padding: 16px; - border-radius: 24px; - } - - .footer-contact__title { - color: var(--main_white); - } - - .footer-bottom { - margin-top: 0; - padding-top: 24px; - border: 0; - align-items: flex-start; - gap: 17px; - } -} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-tablet.css b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-tablet.css new file mode 100644 index 0000000..ffc5b2e --- /dev/null +++ b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-tablet.css @@ -0,0 +1,4 @@ +/* Стили для планшетов */ +@media only screen and (max-width: 992px) { + +} diff --git a/wp-content/themes/cosmopet/static/js/footer.js b/wp-content/themes/cosmopet/modules/footer/assets/js/footer.js similarity index 100% rename from wp-content/themes/cosmopet/static/js/footer.js rename to wp-content/themes/cosmopet/modules/footer/assets/js/footer.js diff --git a/wp-content/themes/cosmopet/modules/footer/assets/js/footer.js.bak b/wp-content/themes/cosmopet/modules/footer/assets/js/footer.js.bak deleted file mode 100644 index eeedb76..0000000 --- a/wp-content/themes/cosmopet/modules/footer/assets/js/footer.js.bak +++ /dev/null @@ -1,314 +0,0 @@ -'use strict'; - -(function ($) { - const metaLocale = document.querySelector('meta[property="og:locale"]'); - const localeValue = metaLocale.getAttribute('content'); - - // Login - - $('.login_popup').on('click', function(e){ - e.preventDefault(); - $('.login_modal').addClass('active'); - }); - $('.login_close').on('click', function(){ - $('.login_modal').removeClass('active'); - }); - $('.login_back').on('click', function(){ - if($(this).is('.disabled')) { - return false; - } - $('.login_wrap .step').toggleClass('active'); - }); - $('.login_input input').on('input keyup', function(){ - $('.login_input').removeClass('error'); - }); - $('.js-get-code').on('click', function(){ - $('.login_input').removeClass('error'); - - var email = $('.js-input-email input').val(); - $('.sended_email').text(email); - - if(email === '') { - $('.js-input-email').addClass('error'); - $('.js-input-email .login_error').text(localeValue == 'en_US' ? 'Enter your email' : 'Укажите Email'); - return false; - } else { - // Проверка Email - $.ajax({ - type: 'POST', - url: '/wp-admin/admin-ajax.php', - data: {action: 'email_validate', email:email}, - success: function(data){ - if(data['status'] === 'error') { - $('.js-input-email').addClass('error'); - $('.js-input-email .login_error').text(data['text']); - return false; - } else { - $('.login_wrap .step').toggleClass('active'); - send_code(); - } - } - }); - - } - - }); - $('.js-repeat-code').on('click', function(){ - $('.login_input').removeClass('error'); - send_code(); - }); - - function send_code(){ - $('.login_timer').show(); - $('.js-repeat-code').hide(); - $('.login_back').addClass('disabled'); - // Timer - var seconds = 15; - var interval = setInterval(function() { - if (seconds > 0) { - seconds--; - $('.seconds').text(seconds); - } else { - clearInterval(interval); - $('.login_timer').hide(); - $('.js-repeat-code').show(); - $('.login_back').removeClass('disabled'); - $('.seconds').text(15); - } - }, 1000); - //Ajax отправка кода - $.ajax({ - type: 'POST', - url: '/wp-admin/admin-ajax.php', - data: {action: 'send_code', email: $('.js-input-email input').val()} - }); - } - // Проверка кода и регистрация/авторизация - $('.js-input-code input').on('input keydown keyup propertychange paste cut copy change', function(){ - var val = $(this).val(); - var email = $('.js-input-email input').val(); - if(val.length === 4) { - $.ajax({ - type: 'POST', - url: '/wp-admin/admin-ajax.php', - data: {action: 'check_code', code: val, email: email}, - success: function(data){ - console.log(data); - if(data['status'] == 'success_reg') { - $('.login_forms').addClass('hide'); - $('.login_success').removeClass('hide'); - if (typeof wc_checkout_params !== 'undefined') { - location.reload() - } - } - if(data['status'] == 'success_auth') { - $('.login_forms').addClass('hide'); - $('.login_auth').removeClass('hide'); - if (typeof wc_checkout_params !== 'undefined') { - location.reload() - } - } - if(data['status'] == 'error') { - $('.js-input-code').addClass('error'); - $('.js-input-code .login_error').text(data['text']); - } - } - }); - } - }); - - $('.email_link_form').on('submit', function(e){ - e.preventDefault(); - $('.cabinet-card_linked-email .error').remove(); - var data = $(this).serializeArray(); - $.ajax({ - type: 'POST', - url: '/wp-admin/admin-ajax.php', - data: data, - success: function(data){ - if(data['error']) { - $('.cabinet-card_linked-email').append('
1&&m.push(e.virtualSize-r)}if(o&&s.loop){const t=g[0]+x;if(s.slidesPerGroup>1){const a=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/s.slidesPerGroup),i=t*s.slidesPerGroup;for(let e=0;e!(s.cssMode&&!s.loop)||t!==c.length-1)).forEach((e=>{e.style[t]=`${x}px`}))}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;g.forEach((t=>{e+=t+(x||0)})),e-=x;const t=e-r;m=m.map((e=>e<=0?-v:e>t?t+w:e))}if(s.centerInsufficientSlides){let e=0;if(g.forEach((t=>{e+=t+(x||0)})),e-=x,e 0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{h[e?"scrollLeft":"scrollTop"]=s}))):h[e?"scrollLeft":"scrollTop"]=s,t&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}))}else{if(!r.support.smoothScroll)return m({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(w),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,a),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,a){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),"string"==typeof e){e=parseInt(e,10)}const i=this,r=i.grid&&i.params.grid&&i.params.grid.rows>1;let n=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)n+=i.virtual.slidesBefore;else{let e;if(r){const t=n*i.params.grid.rows;e=i.slides.filter((e=>1*e.getAttribute("data-swiper-slide-index")===t))[0].column}else e=i.getSlideIndexByData(n);const t=r?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:s}=i.params;let a=i.params.slidesPerView;"auto"===a?a=i.slidesPerViewDynamic():(a=Math.ceil(parseFloat(i.params.slidesPerView,10)),s&&a%2==0&&(a+=1));let l=t-e1*t.getAttribute("data-swiper-slide-index")===e))[0].column}else n=i.getSlideIndexByData(n)}return requestAnimationFrame((()=>{i.slideTo(n,t,s,a)})),i},slideNext:function(e,t,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const a=this,{enabled:i,params:r,animating:n}=a;if(!i)return a;let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(a.slidesPerViewDynamic("current",!0),1));const o=a.activeIndex1){const e=[];return n.querySelectorAll(t.el).forEach((s=>{const a=p({},t,{el:s});e.push(new ee(a))})),e}const l=this;l.__swiper__=!0,l.support=P(),l.device=L({userAgent:t.userAgent}),l.browser=A(),l.eventsListeners={},l.eventsAnyListeners=[],l.modules=[...l.__modules__],t.modules&&Array.isArray(t.modules)&&l.modules.push(...t.modules);const o={};l.modules.forEach((e=>{e({params:t,swiper:l,extendParams:Z(t,o),on:l.on.bind(l),once:l.once.bind(l),off:l.off.bind(l),emit:l.emit.bind(l)})}));const d=p({},K,o);return l.params=p({},d,J,t),l.originalParams=p({},l.params),l.passedParams=p({},t),l.params&&l.params.on&&Object.keys(l.params.on).forEach((e=>{l.on(e,l.params.on[e])})),l.params&&l.params.onAny&&l.onAny(l.params.onAny),Object.assign(l,{enabled:l.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===l.params.direction,isVertical:()=>"vertical"===l.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:l.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.emit("_swiper"),l.params.init&&l.init(),l}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:s}=this,a=y(f(t,`.${s.slideClass}, swiper-slide`)[0]);return y(e)-a}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=f(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const a=s.minTranslate(),i=(s.maxTranslate()-a)*e+a;s.translateTo(i,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((s=>{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if("number"==typeof s.slidesPerView)return s.slidesPerView;if(s.centeredSlides){let e,t=a[l]?a[l].swiperSlideSize:0;for(let s=l+1;sM&&(u=M),g0?u:0),t&&(t.style.opacity=-u>0?-u:0)}}},setTransition:e=>{t.slides.map((e=>h(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;oe({effect:"creative",swiper:t,on:a,setTranslate:()=>{const{slides:e,wrapperEl:s,slidesSizesGrid:a}=t,r=t.params.creativeEffect,{progressMultiplier:n}=r,l=t.params.centeredSlides;if(l){const e=a[0]/2-t.params.slidesOffsetBefore||0;s.style.transform=`translateX(calc(50% - ${e}px))`}for(let s=0;s