From aa355fe5bd0dc01171c954576f8d455a5c0c3b0e Mon Sep 17 00:00:00 2001 From: maksim Date: Sat, 14 Jun 2025 15:11:26 +0300 Subject: [PATCH] =?UTF-8?q?Andrei=20|=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D0=BF=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=B0=20(=D1=80=D0=B0=D0=B7=D0=BD=D0=B5=D1=81=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D1=82=D0=B8=D0=BA=D1=83=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20"Where=20to=20buy")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../author/assets/css/gp-style-desktop.css | 169 ------------------ .../cosmopet/modules/author/assets/js/main.js | 48 ----- .../where_to_buy/template_wtb.php | 11 +- .../themes/cosmopet/static/css/style.css | 21 ++- wp-content/themes/cosmopet/static/css/wtb.css | 147 +++++++++++++++ wp-content/themes/cosmopet/static/js/wtb.js | 0 6 files changed, 173 insertions(+), 223 deletions(-) delete mode 100644 wp-content/themes/cosmopet/modules/author/assets/js/main.js create mode 100644 wp-content/themes/cosmopet/static/css/wtb.css create mode 100644 wp-content/themes/cosmopet/static/js/wtb.js diff --git a/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css index 91a0ddd..a89bf48 100644 --- a/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css +++ b/wp-content/themes/cosmopet/modules/author/assets/css/gp-style-desktop.css @@ -1,168 +1,3 @@ - - -/* Where home */ -.where-home { - padding: 162px 0 37px; - color: var(--background); -} - -.authors h1{ - font-size: 82px; - font-weight: bold; - line-height: 96px; - color:#fff; - margin-bottom: 41px; - text-transform: uppercase; -} - -.where-home h1 { - font-size: 82px; - font-weight: bold; - line-height: 96px; - margin-bottom: 41px; - text-transform: uppercase; -} - -.where-home p { - max-width: 928px; - color: #FFF; - font-size: 36px; - font-weight: bold; - line-height: 40px; - text-transform: uppercase; -} -/* Where home end */ - -/* Find us */ -.find-us { - color: var(--background); - padding-bottom: 24px; -} - -.find-us h2 { - padding: 10px 0; - font-size: 36px; - font-weight: bold; - line-height: 40px; - text-transform: uppercase; - margin-bottom: 24px; -} - -.find-us ul { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 36px; -} - -.find-us h3 { - font-size: 24px; - font-weight: bold; - line-height: 28px; - margin-bottom: 8px; - text-transform: uppercase; -} - -.find-us p { - font-size: 24px; - font-weight: 500; - line-height: 32px; -} -/* Find us end */ - -/* Location */ -.location { - padding-bottom: 35px; -} - -.location h2 { - padding: 10px 0; - margin-bottom: 37px; - text-align: right; - font-size: 36px; - font-weight: bold; - line-height: 40px; - text-transform: uppercase; - color: var(--main_white); -} - -.location iframe { - height: 783px; - width: 100%; - border-radius: 64px; -} -/* Location end */ - -/* Sell form */ -.sell-form { - padding-bottom: 31px; -} - -.sell-form__container { - background: var(--main_white); - border-radius: 64px; - padding: 64px 105px 38px; - color: var(--grey-black); - display: flex; - flex-direction: column; - gap: 48px; -} - -.sell-form h2 { - font-size: 36px; - font-weight: bold; - line-height: 40px; - text-transform: uppercase; -} - -.sell-form p { - text-transform: uppercase; - font-size: 24px; - font-weight: bold; - line-height: 28px; -} - -.sell-form form { - display: flex; - flex-direction: column; - align-items: center; - gap: 16px; -} - -.sell-form form button { - background: var(--main_black); - padding: 11px 70px; - color: var(--main_white); - text-transform: uppercase; - border-radius: 16px; - font-size: 20px; - font-weight: 600; - line-height: 24px; - border: 1px solid var(--main_black); -} - -.sell-form form button:hover { - background: var(--main_white); - color: var(--main_black); -} -/* Sell form end */ - -/* Breadcrumb */ -.breadcrumb { - padding: 20px 0 24px; -} - -.breadcrumb .container { - color: var(--main_white); - font-size: 14px; - font-weight: 500; - line-height: 16px; -} - -.breadcrumb a { - display: inline; -} -/* Breadcrumb end */ - /* Authors */ .authors { padding-bottom: 120px; @@ -310,10 +145,6 @@ } /* author-head end */ - - - - .home-title { font-size: 82px; font-weight: bold; diff --git a/wp-content/themes/cosmopet/modules/author/assets/js/main.js b/wp-content/themes/cosmopet/modules/author/assets/js/main.js deleted file mode 100644 index 0f43b8d..0000000 --- a/wp-content/themes/cosmopet/modules/author/assets/js/main.js +++ /dev/null @@ -1,48 +0,0 @@ -// const homeSwp = new Swiper('.home-swp .swiper', { -// slidesPerView: 1, -// spaceBetween: 0, -// effect: 'fade', -// loop: true, -// navigation: { -// nextEl: '.home-swp__btn-next', -// prevEl: '.home-swp__btn-prev', -// } -// }) - -// const textsSwp = new Swiper('.texts-swp .swiper', { -// slidesPerView: 1, -// spaceBetween: 0, -// loop: true, -// effect: 'fade', -// navigation: { -// nextEl: '.texts-swp__next', -// prevEl: '.texts-swp__prev' -// }, -// pagination: { -// el: ".texts-swp__pagination", -// clickable: true, -// } -// }) - -// comment -// let answerbtns = document.querySelectorAll('.answer-btn'); -// let answerbtnicons = document.querySelectorAll('.answer-btn svg'); -// let answerblocks = document.querySelectorAll('.answer-block'); - -// answerbtns.forEach((answerbtn, index) => { -// answerbtn.addEventListener('click', () => { -// let answerbtnicon = answerbtnicons[index]; -// let answerblock = answerblocks[index]; - -// answerblock.classList.toggle('active'); -// answerbtnicon.classList.toggle('active'); - -// let buttonText = answerbtn.querySelector('span'); -// if (buttonText.textContent === 'Ответ') { -// buttonText.textContent = 'Свернуть'; -// } else { -// buttonText.textContent = 'ответ'; -// } -// }); -// }); -// comment diff --git a/wp-content/themes/cosmopet/modules/static-pages/where_to_buy/template_wtb.php b/wp-content/themes/cosmopet/modules/static-pages/where_to_buy/template_wtb.php index 7bed31f..567e4e1 100644 --- a/wp-content/themes/cosmopet/modules/static-pages/where_to_buy/template_wtb.php +++ b/wp-content/themes/cosmopet/modules/static-pages/where_to_buy/template_wtb.php @@ -4,14 +4,15 @@ Template Name: Where to Buy Template Post Type: page */ +add_action('wp_enqueue_scripts', function() { +wp_enqueue_style('gp-front-page-style', get_template_directory_uri() . '/static/css/front-page.css'); +wp_enqueue_style('gp-wtb-page-style', get_template_directory_uri() . '/static/css/wtb-page.css'); +wp_enqueue_script( 'gp-wtb-page-main', get_template_directory_uri() . '/static/js/wtb-page.js', array(), null, true ); +}); + // Инициализация Timber $context = Timber::context(); -// Подключение стилей -wp_enqueue_style('gp-wtb-style', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-core.css?v=1.14'); -wp_enqueue_style('gp-wtb-style-dt', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-desktop.css?v=1.22'); -wp_enqueue_style('gp-wtb-style-tb', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-tablet.css?v=1.22'); -wp_enqueue_style('gp-wtb-style-mb', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-mobile.css?v=1.122'); // Получение данных маркеров из ACF $locations = get_field('location_markers') ?: []; diff --git a/wp-content/themes/cosmopet/static/css/style.css b/wp-content/themes/cosmopet/static/css/style.css index b7254ae..d6de78a 100644 --- a/wp-content/themes/cosmopet/static/css/style.css +++ b/wp-content/themes/cosmopet/static/css/style.css @@ -42,6 +42,25 @@ color: #f4f1f0; .show-more-btn:hover { text-decoration: underline; } + +/* Breadcrumb */ +.breadcrumb { + padding: 20px 0 24px; +} + +.breadcrumb .container { + color: var(--main_white); + font-size: 14px; + font-weight: 500; + line-height: 16px; +} + +.breadcrumb a { + display: inline; +} +/* Breadcrumb end */ + + @media (max-width: 576px) { /* start: Scrollbar */ body::-webkit-scrollbar { @@ -73,4 +92,4 @@ color: #f4f1f0; height: 29px; padding: 7px; } -} \ No newline at end of file +} diff --git a/wp-content/themes/cosmopet/static/css/wtb.css b/wp-content/themes/cosmopet/static/css/wtb.css new file mode 100644 index 0000000..1357718 --- /dev/null +++ b/wp-content/themes/cosmopet/static/css/wtb.css @@ -0,0 +1,147 @@ + + +/* Where home */ +.where-home { + padding: 162px 0 37px; + color: var(--background); +} + +.authors h1{ + font-size: 82px; + font-weight: bold; + line-height: 96px; + color:#fff; + margin-bottom: 41px; + text-transform: uppercase; +} + +.where-home h1 { + font-size: 82px; + font-weight: bold; + line-height: 96px; + margin-bottom: 41px; + text-transform: uppercase; +} + +.where-home p { + max-width: 928px; + color: #FFF; + font-size: 36px; + font-weight: bold; + line-height: 40px; + text-transform: uppercase; +} +/* Where home end */ + +/* Find us */ +.find-us { + color: var(--background); + padding-bottom: 24px; +} + +.find-us h2 { + padding: 10px 0; + font-size: 36px; + font-weight: bold; + line-height: 40px; + text-transform: uppercase; + margin-bottom: 24px; +} + +.find-us ul { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 36px; +} + +.find-us h3 { + font-size: 24px; + font-weight: bold; + line-height: 28px; + margin-bottom: 8px; + text-transform: uppercase; +} + +.find-us p { + font-size: 24px; + font-weight: 500; + line-height: 32px; +} +/* Find us end */ + +/* Location */ +.location { + padding-bottom: 35px; +} + +.location h2 { + padding: 10px 0; + margin-bottom: 37px; + text-align: right; + font-size: 36px; + font-weight: bold; + line-height: 40px; + text-transform: uppercase; + color: var(--main_white); +} + +.location iframe { + height: 783px; + width: 100%; + border-radius: 64px; +} +/* Location end */ + +/* Sell form */ +.sell-form { + padding-bottom: 31px; +} + +.sell-form__container { + background: var(--main_white); + border-radius: 64px; + padding: 64px 105px 38px; + color: var(--grey-black); + display: flex; + flex-direction: column; + gap: 48px; +} + +.sell-form h2 { + font-size: 36px; + font-weight: bold; + line-height: 40px; + text-transform: uppercase; +} + +.sell-form p { + text-transform: uppercase; + font-size: 24px; + font-weight: bold; + line-height: 28px; +} + +.sell-form form { + display: flex; + flex-direction: column; + align-items: center; + gap: 16px; +} + +.sell-form form button { + background: var(--main_black); + padding: 11px 70px; + color: var(--main_white); + text-transform: uppercase; + border-radius: 16px; + font-size: 20px; + font-weight: 600; + line-height: 24px; + border: 1px solid var(--main_black); +} + +.sell-form form button:hover { + background: var(--main_white); + color: var(--main_black); +} +/* Sell form end */ \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/js/wtb.js b/wp-content/themes/cosmopet/static/js/wtb.js new file mode 100644 index 0000000..e69de29