From a8b32b860491e3539b4a4a038a8c72b1daa16e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9EAndrei?= Date: Fri, 23 May 2025 15:50:43 +0300 Subject: [PATCH] Fix | Profile add forms --- robots.txt | 79 + wp-content/themes/cosmopet/functions.php | 39 +- .../global-functions/core-functions.php | 172 ++ .../global-functions/multilang-functions.php | 6 +- .../modules/layout/assets/js/gp-form.js | 504 ++-- .../modules/profile/assets/css/profile.css | 2250 ++++++++++++++++- .../modules/profile/assets/js/profile.js | 21 +- .../profile/module-ajax-controller.php | 2 +- .../modules/profile/module-controller.php | 177 -- .../themes/cosmopet/templates/pet-card.twig | 303 +++ .../cosmopet/templates/profile/profile.twig | 448 ++-- 11 files changed, 3375 insertions(+), 626 deletions(-) create mode 100644 robots.txt create mode 100644 wp-content/themes/cosmopet/templates/pet-card.twig diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..1a5f6c9 --- /dev/null +++ b/robots.txt @@ -0,0 +1,79 @@ +User-agent: * +Disallow: /cgi-bin +Disallow: /? +Disallow: /wp- +Disallow: /wp/ +Disallow: *?s= +Disallow: *&s= +Disallow: /search/ +Disallow: /author/ +Disallow: /users/ +Disallow: */trackback +Disallow: */feed +Disallow: */rss +Disallow: */embed +Disallow: */wlwmanifest.xml +Disallow: /xmlrpc.php +Allow: */uploads +Sitemap: https://cosmopet.ru/sitemap_index.xml + +User-agent: GoogleBot +Disallow: /cgi-bin +Disallow: /? +Disallow: /wp- +Disallow: /wp/ +Disallow: *?s= +Disallow: *&s= +Disallow: /search/ +Disallow: /author/ +Disallow: /users/ +Disallow: */trackback +Disallow: */feed +Disallow: */rss +Disallow: */embed +Disallow: */wlwmanifest.xml +Disallow: /xmlrpc.php +Disallow: *utm*= +Disallow: *etext*= +Disallow: *?add-to-cart* +Disallow: *?per_page* +Disallow: *?per_row* +Disallow: *openstat= +Allow: */uploads +Allow: /*/*.js +Allow: /*/*.css +Allow: /wp-*.png +Allow: /wp-*.jpg +Allow: /wp-*.jpeg +Allow: /wp-*.gif +Allow: /wp-admin/admin-ajax.php +Sitemap: https://cosmopet.ru/sitemap_index.xml + +User-agent: Yandex +Disallow: /cgi-bin +Disallow: /? +Disallow: /wp- +Disallow: /wp/ +Disallow: *?s= +Disallow: *&s= +Disallow: /search/ +Disallow: /author/ +Disallow: /users/ +Disallow: */trackback +Disallow: */feed +Disallow: */rss +Disallow: */embed +Disallow: */wlwmanifest.xml +Disallow: /xmlrpc.php +Allow: */uploads +Allow: /*/*.js +Allow: /*/*.css +Allow: /wp-*.png +Allow: /wp-*.jpg +Allow: /wp-*.jpeg +Allow: /wp-*.gif +Allow: /wp-admin/admin-ajax.php +Sitemap: https://cosmopet.ru/sitemap_index.xml + +Clean-Param: utm_source&utm_medium&utm_campaign&etext&add-to-cart&per_page&per_row&from&attribute_pa_weight&attribute_pa_ves-upakovki +Clean-Param: openstat \ No newline at end of file diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php index f2efb6b..a67ebb0 100644 --- a/wp-content/themes/cosmopet/functions.php +++ b/wp-content/themes/cosmopet/functions.php @@ -424,7 +424,7 @@ requireShortcodes(get_template_directory() . '/modules'); require_once('modules/blog/module-ajax-controller.php'); require_once('modules/forms/module-ajax-controller.php'); require_once('modules/shop/module-ajax-controller.php'); - +require_once('modules/profile/module-ajax-controller.php'); add_action('wp', 'my_custom_checkout_code'); @@ -1195,3 +1195,40 @@ function remove_woocommerce_styles_on_checkout() { } } +// Отключаем канонические ссылки и hreflang от Yoast SEO +add_filter('wpseo_canonical', '__return_false'); +add_filter('wpseo_opengraph_url', '__return_false'); // Отключаем OG URL +add_filter('wpseo_add_x_default_hreflang', '__return_false'); // Отключаем hreflang от Yoast +add_filter('wpseo_disable_adjacent_rel_links', '__return_true'); // Отключаем соседние rel-ссылки + +// Добавляем каноническую ссылку +add_action('wp_head', 'custom_canonical_url', 5); +function custom_canonical_url() { + // Защищаем от дублирования + static $canonical_added = false; + if ($canonical_added) { + return; + } + $canonical_added = true; + + $current_url = home_url(add_query_arg('', $_SERVER['REQUEST_URI'])); + echo '' . "\n"; +} + +// Добавляем hreflang теги для cosmopet.shop +add_action('wp_head', 'custom_hreflang_shop', 6); +function custom_hreflang_shop() { + // Защищаем от дублирования + static $hreflang_added = false; + if ($hreflang_added) { + return; + } + $hreflang_added = true; + + $current_path = add_query_arg('', $_SERVER['REQUEST_URI']); + $ru_domain = 'https://cosmopet-test-ru.cp.good-production.xyz'; + $en_domain = 'https://cosmopet-test-ae.cp.good-production.xyz'; + + echo '' . "\n"; + echo '' . "\n"; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/global-functions/core-functions.php b/wp-content/themes/cosmopet/global-functions/core-functions.php index a4abe2d..2638d0c 100644 --- a/wp-content/themes/cosmopet/global-functions/core-functions.php +++ b/wp-content/themes/cosmopet/global-functions/core-functions.php @@ -1,2 +1,174 @@ array( + 'name' => 'Питомцы', // Основное название типа записи + 'singular_name' => 'Питомец', // отдельное название записи типа Book + 'add_new' => 'Добавить нового', + 'add_new_item' => 'Добавить нового питомца', + 'edit_item' => 'Редактировать питомца', + 'new_item' => 'Новый питомец', + 'view_item' => 'Посмотреть питомца', + 'search_items' => 'Найти питомца', + 'not_found' => 'Питомцев не найдено', + 'not_found_in_trash' => 'В корзине книг не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Питомцы' + + ), + 'public' => false, + 'show_ui' => true, + 'supports' => array('title','editor') +) ); +} + +function get_pet_card($item){ +?> + +
+
+
+
+
+ +
+
+ +

+
+ +
+

:

+

+
+
+

:

+

+
+ +
+

:

+

+
+ + + +
+

:

+

+
+ +
+

:

+

+
+ +
+

+ +
+ +
+ +
+
+
+для уточнения деталей.', 'Наш менеджер скоро свяжемся с вами
для уточнения деталей.'); pll_register_string ('Вернуться на сайт', 'Вернуться на сайт'); - + pll_register_string( 'Link email', 'Link email'); +pll_register_string( 'Linked accounts', 'Linked accounts'); + + + }); diff --git a/wp-content/themes/cosmopet/modules/layout/assets/js/gp-form.js b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-form.js index bf515fa..4b3ca82 100644 --- a/wp-content/themes/cosmopet/modules/layout/assets/js/gp-form.js +++ b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-form.js @@ -1,54 +1,54 @@ 'use strict'; -inputPhone('.form-input__phone', '.form-input-phone__icon', '.form-input-phone__code', '.form-input-phone__input', '.form-input-phone__list', 'form-input-phone-list__item', '.form-input-phone-list-item__icon', '.form-input-phone-list-item__code', 'form-input-phone-list__search'); - -function inputPhone(main, mainFlag, mainCode, input, list, selects, selectIcon, selectCode, searchInput) { - let inputs = document.querySelectorAll(main); - - inputs.forEach(e => { - let thisMainFlag = e.querySelector(mainFlag), - thisMainCode = e.querySelector(mainCode), - thisInput = e.querySelector(input), - thisList = e.querySelector(list), - thisSelects = e.querySelectorAll(`.${selects}`), - thisSearchInput = e.querySelector(`.${searchInput}`); - - thisInput.onblur = function (input) { - if (!(input.relatedTarget != null && (input.relatedTarget.classList.contains(searchInput) || input.relatedTarget.classList.contains(selects)))) { - thisList.classList.remove('active'); - } - } - - e.onclick = function (event) { - if (!event.target.classList.contains(searchInput)) { - if (thisList.classList.contains('active')) { - thisList.classList.remove('active'); - } - - thisInput.focus(); - thisList.classList.add('active'); - } - } - - thisSelects.forEach(e => { - let newIcon = e.querySelector(selectIcon), - newCode = e.querySelector(selectCode); - - e.onclick = function (event) { - event.preventDefault(); - thisMainFlag.style.cssText = `background-image:url("${newIcon.src}");`; - thisMainCode.textContent = newCode.textContent; +// inputPhone('.form-input__phone', '.form-input-phone__icon', '.form-input-phone__code', '.form-input-phone__input', '.form-input-phone__list', 'form-input-phone-list__item', '.form-input-phone-list-item__icon', '.form-input-phone-list-item__code', 'form-input-phone-list__search'); + +// function inputPhone(main, mainFlag, mainCode, input, list, selects, selectIcon, selectCode, searchInput) { +// let inputs = document.querySelectorAll(main); + +// inputs.forEach(e => { +// let thisMainFlag = e.querySelector(mainFlag), +// thisMainCode = e.querySelector(mainCode), +// thisInput = e.querySelector(input), +// thisList = e.querySelector(list), +// thisSelects = e.querySelectorAll(`.${selects}`), +// thisSearchInput = e.querySelector(`.${searchInput}`); + +// thisInput.onblur = function (input) { +// if (!(input.relatedTarget != null && (input.relatedTarget.classList.contains(searchInput) || input.relatedTarget.classList.contains(selects)))) { +// thisList.classList.remove('active'); +// } +// } + +// e.onclick = function (event) { +// if (!event.target.classList.contains(searchInput)) { +// if (thisList.classList.contains('active')) { +// thisList.classList.remove('active'); +// } + +// thisInput.focus(); +// thisList.classList.add('active'); +// } +// } + +// thisSelects.forEach(e => { +// let newIcon = e.querySelector(selectIcon), +// newCode = e.querySelector(selectCode); + +// e.onclick = function (event) { +// event.preventDefault(); +// thisMainFlag.style.cssText = `background-image:url("${newIcon.src}");`; +// thisMainCode.textContent = newCode.textContent; - setTimeout(() => { - thisList.classList.remove('active'); - }, 0); - } +// setTimeout(() => { +// thisList.classList.remove('active'); +// }, 0); +// } - }) - }) -} +// }) +// }) +// } if (document.querySelector('.form-input-phone__input')) { checkPhone('.form-input-phone__input'); @@ -84,15 +84,9 @@ function inputTabs(main, button) { buttons.forEach(button => { button.onclick = function () { - if (button.classList.contains('active')) { - return ; - } - main.querySelector('.active').classList.remove('active'); button.classList.add('active'); - - button.querySelector('input').click(); } }) @@ -100,197 +94,283 @@ function inputTabs(main, button) { } -inputRadio('.form-input__radio', '.form-input-radio__item', '.form-input-radio__title', '.form-input-radio__input') +// inputRadio('.form-input__radio', '.form-input-radio__item', '.form-input-radio__title', '.form-input-radio__input') -function inputRadio(main ,item, textClass, input) { - let inputRadios = document.querySelectorAll(main); +// function inputRadio(main ,item, textClass, input) { +// let inputRadios = document.querySelectorAll(main); - inputRadios.forEach(inputRadio => { - let items = inputRadio.querySelectorAll(item), - thisInput = inputRadio.querySelector(input); +// inputRadios.forEach(inputRadio => { +// let items = inputRadio.querySelectorAll(item), +// thisInput = inputRadio.querySelector(input); - items.forEach(radio => { - let thisText = radio.querySelector(textClass).textContent; +// items.forEach(radio => { +// let thisText = radio.querySelector(textClass).textContent; - radio.onclick = function (event) { - event.preventDefault(); +// radio.onclick = function (event) { +// event.preventDefault(); - if (inputRadio.querySelector(`${item}.active`)) { - inputRadio.querySelector(`${item}.active`).classList.remove('active'); - } - thisInput.value = thisText; - radio.classList.add('active'); - } - }) - }) -} +// if (inputRadio.querySelector(`${item}.active`)) { +// inputRadio.querySelector(`${item}.active`).classList.remove('active'); +// } +// thisInput.value = thisText; +// radio.classList.add('active'); +// } +// }) +// }) +// } -listInputRadio('.form-input__list' ,'.form-input-list__item', '.form-input-list-item__text', '.form-input-list__input', '.form-input-list__content', '.form-input-list__block-content'); +// listInputRadio('.form-input__list' ,'.form-input-list__item', '.form-input-list-item__text', '.form-input-list__content', '.form-input-list__block-content'); -function listInputRadio(main ,item, textClass, input, content, block) { - let listInputRadios = document.querySelectorAll(main); +// function listInputRadio(main ,item, textClass, input, content, block) { +// let listInputRadios = document.querySelectorAll(main); - listInputRadios.forEach(listInputRadio => { - let thisInput = listInputRadio.querySelector(input), - items = listInputRadio.querySelectorAll(item), - thisContent = listInputRadio.querySelector(content), - thisBlock = listInputRadio.querySelector(block); +// listInputRadios.forEach(listInputRadio => { +// let thisInput = listInputRadio.querySelector(input), +// items = listInputRadio.querySelectorAll(item), +// thisContent = listInputRadio.querySelector(content), +// thisBlock = listInputRadio.querySelector(block); - thisInput.onclick = function () { - thisBlock.classList.add('active'); - thisBlock.style.height = '192px'; - } +// // thisInput.onclick = function () { +// // thisBlock.classList.add('active'); +// // thisBlock.style.height = '192px'; +// // } - thisInput.onblur = function(){ - thisBlock.classList.remove('active'); - thisBlock.style.height = '0px'; - }; +// // thisInput.onblur = function(){ +// // thisBlock.classList.remove('active'); +// // thisBlock.style.height = '0px'; +// // }; - items.forEach(item => { - item.onclick = function (event) { - event.preventDefault(); - let newText = item.querySelector(textClass).textContent; +// items.forEach(item => { +// item.onclick = function (event) { +// event.preventDefault(); +// let newText = item.querySelector(textClass).textContent; - thisInput.value = newText; +// thisInput.value = newText; - if (thisContent.querySelector('.active')) { - thisContent.querySelector('.active').classList.remove('active'); - } +// if (thisContent.querySelector('.active')) { +// thisContent.querySelector('.active').classList.remove('active'); +// } - item.classList.add('active'); - } - }) - }) -} +// item.classList.add('active'); +// } +// }) +// }) +// } -remoteControl('.form-input__remote-control', '.form-input-tabs__button'); -remoteControl('.modal-map__control', '.modal-map-control__item'); -function remoteControl(main, button) { - let mains = document.querySelectorAll(main); +// remoteControl('.form-input__remote-control', '.form-input-tabs__button'); +// remoteControl('.modal-map__control', '.modal-map-control__item'); - mains.forEach(main => { - let subjectClass = main.dataset.content; - if (!subjectClass) return; // Skip if no data-content attribute - - let subject = document.querySelector(`.${subjectClass}`); - if (!subject) { - console.warn(`Element with class "${subjectClass}" not found`); - return; // Skip if subject element doesn't exist - } +// function remoteControl(main, button) { +// let mains = document.querySelectorAll(main); - let buttons = Array.from(main.querySelectorAll(button)); - if (!buttons.length) return; // Skip if no buttons found +// console.log(mains); + - main.addEventListener('click', function(eventMain) { - setTimeout(() => { - let indexActive = buttons.findIndex(button => { - return button.classList.contains('active'); - }); - - // Check if subject has children and index is valid - if (!subject.children.length || indexActive === -1 || indexActive >= subject.children.length) { - return; - } - - let activeItem = subject.querySelector('.remote-control__item.active'); - if (activeItem) { - activeItem.classList.remove('active'); - } - - if (subject.children[indexActive].classList.contains('active')) { - return; - } - - subject.children[indexActive].classList.add('active'); +// mains.forEach(main => { +// let subjectClass = main.dataset.content, +// subject = document.querySelector(`.${subjectClass}`), +// buttons = Array.from(main.querySelectorAll(button)); - let mandatorys = subject.querySelectorAll('.mandatory'); - if (mandatorys.length) { - mandatorys.forEach(mandatory => { - mandatory.required = !mandatory.required; - }); - } - }, 0); - }); - }); -} -formCheck('.modal-form__content', 'input[type=submit]'); -formCheck('.modal-map__form', 'input[type=submit]'); - -function formCheck(form, submit) { - let forms = document.querySelectorAll(form); - - forms.forEach(form => { - let thisSubmit = form.querySelector(submit); - - thisSubmit.onclick = function () { - form.classList.add('check') - } - - }) -} - -inputPhoneNoFlag('.no-flag'); - -function inputPhoneNoFlag(input){ - let inputs = document.querySelectorAll(input); + - inputs.forEach(input => { - let code = '+' + input.dataset.code; +// main.addEventListener('mousedown', function (eventMain) { +// setTimeout(() => { +// let indexActive = buttons.findIndex((button, index) => { +// if (button.classList.contains('active')) { +// return true; +// } +// }); + +// subject.querySelector('.remote-control__item.active').classList.remove('active'); +// subject.children[indexActive].classList.add('active'); +// }, 0); +// }) +// }) +// } + +// formCheck('.modal-form__content', 'input[type=submit]'); +// formCheck('.modal-map__form', 'input[type=submit]'); + +// function formCheck(form, submit) { +// let forms = document.querySelectorAll(form); + +// forms.forEach(form => { +// let thisSubmit = form.querySelector(submit); + +// thisSubmit.onclick = function () { +// form.classList.add('check') +// } - input.onfocus = function () { - if (input.value == '') { - input.value = code; - } - } - - input.addEventListener('input', function(event) { - let text = event.target.value; - let length = text.length; - let newSymbol = event.data; - - if (isNaN(event.data) || event.data == ' ') { - event.target.value = text.slice(0, -1); - return; - } +// }) +// } + + +jQuery('.form-input-list__item').on('click', function(){ + var value = jQuery(this).find('p').html() + var content = jQuery(this).closest('.form-input-list__block-content') + jQuery(content).prev().html(value) + jQuery(content).removeClass('active').css('height', '0px') +}) + +jQuery('.form-input-list__input').on('click', function(){ + // jQuery(this).next().toggleClass('active') + if(!jQuery(this).next().hasClass('active')){ + jQuery('.form-input-list__block-content').removeClass('active').css('height', '0px') + jQuery(this).next().css('height', '192px').addClass('active') + } + else{ + jQuery(this).next().css('height', '0px').removeClass('active') + } + +}) + +jQuery(document).mouseup(function(e){ + var container = jQuery(".modal-form-content-line__element"); + if(!container.is(e.target) && container.has(e.target).length === 0){ + jQuery('.form-input-list__block-content').removeClass('active').css('height', '0px') + } + }); + + + + + jQuery('#add-pet-form').on('submit', function(e) { + e.preventDefault(); // предотвращаем стандартное поведение формы + var data = jQuery(this).serialize() + jQuery(this).find('button[type="submit"]').addClass('loading').attr('disabled', true) + jQuery.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: data, // отправляем данные формы + complete: function(response) { + location.reload(true) + } + }); + }); - if (length == 3 || length == 7 || length == 11) { - if (newSymbol != null) { - event.target.value = text.slice(0, -1) + ' ' + newSymbol; + jQuery('.edit-pet-form').on('submit', function(e) { + e.preventDefault(); // предотвращаем стандартное поведение формы + var data = jQuery(this).serialize() + jQuery(this).find('button[type="submit"]').addClass('loading').attr('disabled', true) + jQuery.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: data, // отправляем данные формы + complete: function(response) { + location.reload(true) } - } - + }); + }); + jQuery('.form-input-list__item').on('click', function(){ + jQuery(this).closest('.form-input-list__content').find('.form-input-list__item').removeClass('active') + jQuery(this).addClass('active') + }) + jQuery('.form-input-radio__item').on('click', function(){ + jQuery(this).closest('.form-input__radio').find('.form-input-radio__item').removeClass('active') + jQuery(this).addClass('active') }) - }) -} - - -inputCheck('.form-agreement__check'); - -function inputCheck(className) { - let checks = document.querySelectorAll(className); - checks.forEach(check => { - let square = check.querySelector('.form-agreement__square'), - input = check.querySelector('input'); - square.onclick = function () { - input.click(); + jQuery('.cabinet-card__block-add-pets').on('click', function(){ + + jQuery('#pet_add_form').addClass('active') + }) +// jQuery('#pet-form-submit').on('click', function(e) { +// jQuery(this).closest('form').submit() +// }); + + +jQuery('.popup-wrap, .modal-form__close, .modal-form__button-close').on('click', function(e){ + if (e.target == this){ + jQuery(this).closest('.modalProfile').removeClass('active') + } + }) + jQuery('.close-btn').on('click', function(e){ + jQuery(this).closest('.modalProfile').removeClass('active') + }) + + jQuery('input[name="pet"]').on('change', function( + + ){ + var block = jQuery(this).closest('form').find('.sterilized') + if (jQuery(this).val() == 'cat'){ + jQuery(block).show() + jQuery(this).closest('form').find('input[name="sterilized"]').attr('required', true) + } + else{ + jQuery(block).hide() + jQuery(this).closest('form').find('input[name="sterilized"]').attr('required', false) + } + }) + + + jQuery('[data-edit]').on('click', function(){ + jQuery('#pet_edit_'+jQuery(this).data('edit')).addClass('active') + }) + + + +// const reset = () => { +// input.classList.remove("error"); +// errorMsg.innerHTML = ""; +// errorMsg.classList.add("hide"); +// validMsg.classList.add("hide"); +// }; + +// const showError = (msg) => { +// input.classList.add("error"); +// errorMsg.innerHTML = msg; +// errorMsg.classList.remove("hide"); +// }; + + +jQuery('.user-edit-form').on('submit', function(e) { + e.preventDefault(); // предотвращаем стандартное поведение формы + jQuery('.form-input__phone').removeClass('error') + + + var data = jQuery(this).serialize() + jQuery(this).find('button[type="submit"]').addClass('loading').attr('disabled', true) + jQuery.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: data, // отправляем данные формы + complete: function(response) { + location.reload(true) + } + }); + + +}); + +jQuery('.email_approve_form, .foodSub').on('submit', function(e) { + e.preventDefault(); // предотвращаем стандартное поведение формы + var data = jQuery(this).serialize() + jQuery(this).find('button[type="submit"]').addClass('loading').attr('disabled', true) + jQuery.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: data, // отправляем данные формы + complete: function(response) { + location.reload(true) } - }) -} + }); +}); +jQuery('.user-edit-open').on('click', function(){ + jQuery('#user_edit').addClass('active') +}) -inputRead('.input-read'); -function inputRead(className) { - let inputs = document.querySelectorAll(className); +jQuery('[data-rm]').on('click', function(){ + var rm = jQuery(this).closest('.rm') + jQuery(rm).find('[data-rmcont]').removeClass('active').find('input').attr('required', false) + jQuery(rm).find('[data-rmcont="' + jQuery(this).data('rm') + '"]').addClass('active').find('input').attr('required', true) +}) - inputs.forEach(input => { - input.addEventListener("input", function (event) { - let text = event.target.value; - event.target.value = text.slice(0, -1); - }) - }) -} \ No newline at end of file +jQuery('.form-sub__btn').on('click', function(){ + jQuery('#subForm').addClass('active') +}) + diff --git a/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css b/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css index ed407c1..765b806 100644 --- a/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css +++ b/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css @@ -448,10 +448,6 @@ font-size: 16px; line-height: 125%; color: var(--text-black); } -.cabinet-card-order-payment__price::after{ -margin-left: 5px; -content: '₽'; -} .cabinet-card-order__content{ margin-top: 24px; } @@ -578,9 +574,7 @@ line-height: 133%; text-align: right; color: var(--text-black); } -.cabinet-card-order-detail-main-product__price::after{ -content: ' Р'; -} + .cabinet-card-order-detail-main__links{ display: flex; flex-direction: column; @@ -849,4 +843,2246 @@ margin-top: 7px; } /* cabinet */ +} + + + + + + + + + + + + + + + + + + + + + + +button{ + cursor: pointer; + } + + .wrapper{ + margin: 0 auto; + + max-width: 1600px; + } + + .main_link{ + font-size: 24px; + font-weight: 500; + line-height: 28.8px; + color: var(--creme-white, #F4F1F0); + width: 221px; + height: 50px; + padding: 10px; + white-space: nowrap; + display: flex; + align-items: center; + justify-content: center; + border-radius: 48px; + border: 2px solid var(--creme-white, #F4F1F0); + transition: .3s ease all; +} +.main_link:hover{ + background-color: #F4F1F0; + color: #121212; +} + +.btn--black-hover:hover{ + background: #121212 !important; + color: #F4F1F0 !important; +} + body{ + font-family: var(--font-family); + } + + :root { + --font-family: "Craftwork Grotesk", sans-serif; + --second-family: "DIN 2014 Rounded", sans-serif; + --third-family: "Roboto", sans-serif; + --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-white: #fff; + --background-black: #121212; + --background-grey: #f2f2f2; + --background-green: #2ED15D; + --background-green-white: #f4fff0; + --background-9: #999; + --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%); +} + + +.form{ + width: 100%; + + padding: 24px 24px 43px; + + display: flex; + flex-direction: column; + + position: relative; + overflow: hidden; + border-radius: 24px; + background: var(--gradient-turquoise); + } + .form.submited .footer-thx{ + display: flex; + } + .footer-thx{ + height: 100%; + width: 100%; + top: 0; + left: 0; + text-align: center; + position: absolute; + display: none; + font-size: 32px; + align-items: center; + justify-content: center; + padding: 24px; + background: var(--gradient-turquoise); + flex-direction: column; + } + .footer-thx-sub{ + font-size: 15px; + margin-top: 8px; + } + .form__item{ + margin-top: 16px; + } + .form__title{ + font-family: var(--font-family); + font-weight: 500; + font-size: 24px; + line-height: 133%; + color: var(--text-black); + } + .form__input{ + width: 100%; + + border-radius: 20px; + padding: 12px 16px; + border: 1px solid var(--text-black); + + background: var(--background-white); + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + + color: var(--text-black); + } + .form__input::placeholder{ + color: var(--text-grey); + } + .form__input--textarea{ + height: 96px; + resize: none; + } + .form__button{ + width: 100%; + + padding: 12px 24px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-white); + + border-radius: 16px; + border: none; + background: var(--background-black); + + cursor: pointer; + + transition: background-color .2s ease-out; + } + .form__button:hover{ + opacity: .8; + } + + .label{ + padding-bottom: 4px; + + display: inline-block; + + position: relative; + } + .label::after{ + content: ''; + + position: absolute; + top: 2px; + right: -20px; + + width: 16px; + height: 16px; + + background-image: url(../img/svg/main/question.svg); + + cursor: pointer; + } + .label__title{ + font-family: var(--font-family); + font-weight: 700; + font-size: 16px; + line-height: 125%; + color: var(--text-3); + } + .label__question{ + position: absolute; + + padding: 8px; + width: max-content; + max-width: 200px; + border-radius: 6px; + transition: height .2s ease-out; + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1), 0 0 2px 0 rgba(0, 0, 0, 0.2); + overflow: hidden; + background-color: var(--background-white); + + opacity: 0; + transition: opacity .2s ease-out; + pointer-events: none; + } + .label:hover .label__question{ + opacity: 1; + pointer-events: auto; + } + + + .social-media{ + display: flex; + align-items: center; + } + .social-media__item{ + margin-left: 32px; + + transition: opacity .2s ease-out; + } + .social-media__item:hover{ + opacity: .8; + } + .social-media__item:first-child{ + margin-left: 0px; + } + .social-media__icon{ + width: 32px; + aspect-ratio: 1; + } + + .breadcrumbs{ + margin: 24px; + + display: flex; + align-items: center; + } + .breadcrumbs__item{ + display: block; + + padding: 0px 16px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 16px; + line-height: 125%; + color: var(--text-6); + + text-decoration: none; + + position: relative; + } + .breadcrumbs__item:first-child{ + padding-left: 0; + } + .breadcrumbs__item:nth-child(n+2)::before{ + content: ''; + + position: absolute; + top: -2px; + left: -12px; + + width: 24px; + aspect-ratio: 1; + + background-image: url(../img/svg/main/arrow-breadcrumbs.svg); + background-repeat: no-repeat; + background-size: contain; + } + + /* button */ +.button{ + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + border-radius: 20px; + text-transform: none; + cursor: pointer; + } + .button--100-perc{ + width: 100%; + } + .button--white{ + padding: 11px 24px; + + text-align: center; + + background-color: var(--background-white); + border: 1px solid var(--background-black); + + transition: opacity .2s ease-out; + } + .button--white:hover{ + opacity: .8; + } + .button--white.active{ + background: var(--background-black); + color: var(--background-white); + } + .button--gradient{ + background: var(--gradient-turquoise); + border: none; + + transition: opacity .2s ease-out; + } + .button--gradient:hover{ + opacity: .8; + } + .button--base{ + padding: 12px 24px; + } + .button--high{ + height: 56px; + + padding: 16px 24px 16px 24px; + + font-weight: 700; + text-align: center; + + position: relative; + } + .button--icon{ + padding-right: 56px; + + text-align: start; + } + .button--filter::after{ + content: ''; + + position: absolute; + top: 16px; + right: 24px; + + width: 24px; + aspect-ratio: 1; + + background-image: url(../img/svg/main/filter.svg); + background-repeat: no-repeat; + background-size: contain; + } + .button--black{ + padding: 7px 15px; + + font-family: var(--font-family); + font-weight: 500; + font-size: 24px; + line-height: 133%; + color: var(--text-white); + + background: var(--background-black); + border: 1px solid var(--text-white); + } + .button--link{ + text-decoration: none; + } + .button--red-48-px{ + border-radius: 48px; + } + .to-know{ + width: 100%; + + padding: 12px; + + display: flex; + justify-content: center; + + border: none; + + transition: opacity .2s ease-out; + } + .to-know:hover{ + opacity: .8; + } + .to-know p{ + padding-bottom: 4px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + border-bottom: 1px var(--text-black) solid; + + cursor: pointer; + } + .to-know--background-none{ + background: none; + } + .back{ + margin-top: 16px; + margin-left: 16px; + + padding: 8px; + padding-left: 32px; + + background: none; + border: none; + + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + text-decoration: none; + + position: relative; + } + .back::before{ + content: ''; + + position: absolute; + top: 8px; + left: 0; + + margin-right: 8px; + + width: 24px; + height: 24px; + + background-image: url(../img/svg/main/arrow-back.svg); + } + + .back::after{ + content: ''; + + position: absolute; + bottom: 6px; + left: 0; + + width: calc(100% - 8px); + height: 1px; + + background: var(--text-black); + } + /* button */ + + + /* select */ +.select{ + max-width: 144px; + + position: relative; + } + .select__state{ + width: 100%; + + padding: 11px 47px 11px 13px; + + /* pointer-events:none; */ + + border: 1px solid var(--background-black); + border-radius: 20px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + cursor: pointer; + + position: relative; + + transition: opacity .2s ease-out; + } + .select:hover .select__state{ + opacity: .8; + } + .select::after{ + content: ''; + + position: absolute; + top: 20.5px; + right: 21.5px; + + width: 17px; + height: 10px; + + background-image: url(../img/svg/main/arrow-black.svg); + background-repeat: no-repeat; + background-size: contain; + + pointer-events: none; + } + .state__block{ + position: absolute; + top: 48px; + left: 0; + + width: 100%; + + height: 0; + overflow: hidden; + + transition: height .2s ease-out; + } + .state__content{ + padding: 8px; + + border-radius: 6px; + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1), 0 0 2px 0 rgba(0, 0, 0, 0.2); + background-color: var(--background-white); + + list-style-type: none; + } + .state__content li{ + margin-top: 8px; + } + .state__content li:first-child{ + margin-top: 0; + } + .state__button{ + width: 100%; + + padding: 4px 32px 4px 4px; + + background: none; + border: none; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); + text-align: start; + + border-radius: 6px; + + transition: background-color .2s ease-out; + + position: relative; + } + .state__button:hover, + .state__button.active{ + background-color: var(--background-grey); + } + + .state__button.active::before{ + content: ''; + position: absolute; + top: 10px; + right: 8px; + width: 16px; + height: 12px; + background-image: url(../img/svg/main/arrow-selected.svg); + } + + /* select */ + + /* counter */ + .counter{ + display: flex; + align-items: center; + } + .counter__input{ + width: 48px; + + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + text-align: center; + color: var(--text-black); + + pointer-events: none; + + background: none; + border: none; + } + .counter__button{ + width: 48px; + height: 48px; + + display: flex; + justify-content: center; + align-items: center; + + border: 1px solid var(--text-3); + border-radius: 24px; + + background: var(--background-white); + + transition: opacity .2s ease-out; + } + .counter__button:hover{ + opacity: .8; + } + .counter--small{ + + } + .counter--small .counter__button{ + width: 32px; + height: 32px; + } + .counter--small{ + + } + /* counter */ + + /* modal */ +/* modal */ +.modal{ + position: fixed; + top: 0; + left: 0; + + padding: 20px; + + width: 100%; + height: 100%; + + background: rgba(0, 0, 0, 0.25); + + z-index: 200; + + opacity: 0; + transition: opacity .2s ease-out; + pointer-events: none; + + display: flex; + justify-content: center; + align-items: center; + + overflow-y: auto; +} +.modal.active{ + opacity: 1; + pointer-events: auto; +} +.modal__notification{} +.form__button-mobile{ + display: none; +} +.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__item--no-title{ + padding-top: 72px; +} +.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; +} +.modal__header{} +.modal__title{ + padding-right: 48px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 36px; + line-height: 111%; + text-transform: uppercase; + color: var(--text-black); +} +.modal__small-title{ + font-family: var(--font-family); + font-weight: 700; + font-size: 24px; + line-height: 100%; + text-transform: uppercase; + color: var(--text-black); +} +.modal__text{ + margin-top: 16px; + + padding-right: 10px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-0); +} +.modal__form-sub{ + margin-top: 48px; +} +.modal-form-sub__submit{ + margin-top: 64px; +} +.modal__block-button{ + margin-top: 24px; +} +.modal__button{ + margin-top: 16px; +} +.modal__button:first-child{ + margin-top: 0; +} +.modal__content{ + margin-top: 24px; +} +.modal__filter{ + width: 400px; + overflow-y: auto; +} +.modal__footer{ + border-top: 1px solid var(--text-6); + padding-top: 23px; +} +.modal__block-price{ + display: flex; + justify-content: space-between; + align-items: center; +} +.modal-block-price__title{ + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.modal-block-price__price{ + font-family: var(--font-family); + font-weight: 700; + font-size: 24px; + line-height: 100%; + text-transform: uppercase; + text-align: right; + color: var(--text-black); +} +.modal-block-price__price::after{ + content: 'Р'; +} +.modal__basket{ + width: 600px; +} +.modal__to-know, +.modal__to-know-submit{ + width: 412px; +} + +.modal-basket__item{ + padding-top: 23px; + padding-right: 15px; + padding-bottom: 24px; + + display: flex; + + border-top: 1px solid #f2f2f2; + + position: relative; +} +.modal-basket__item-before{ + content: ''; + + position: absolute; + top: 24px; + right: 6px; + + width: 24px; + aspect-ratio: 1; + + background-image: url(../img/svg/main/basket.svg); + background-repeat: no-repeat; + background-position: center; + + cursor: pointer; + + transition: opacity .2s ease-out; +} +.modal-basket__item:hover .modal-basket__item::before{ + opacity: .8; +} +.modal-basket__item--return{ + padding-right: 5px; + + display: flex; + justify-content: space-between; + align-items: center; +} +.modal-basket__item--return .modal-basket-item__title{ + padding-right: 10px; +} +.modal-basket__item--return::before{ + display: none; +} +.modal-basket-item__return{ + border-radius: 20px; + padding: 4px 24px; + + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + color: var(--text-white); + + background: var(--background-black); + + border: none; +} +.modal-basket-item__block-image{ + width: 128px; + aspect-ratio: 1; + + display: flex; + justify-content: center; + align-items: center; +} +.modal-basket-item__image{ + width: 96px; + aspect-ratio: 1; + + object-fit: contain; +} +.modal-basket-item__content{ + margin-left: 16px; +} +.modal-basket-item__title{ + padding-right: 40px; + + font-family: var(--font-family); + font-weight: 500; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.modal-basket-item__sub-title{ + margin-top: 8px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 12px; + line-height: 133%; + color: var(--text-black); +} +.modal-basket-item__control{ + margin-top: 24px; + + display: flex; + justify-content: space-between; + align-items: center; +} +.modal-basket-item__price{ + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + text-align: right; + color: var(--text-black); +} +.modal-basket-item__price::after{ + content: 'Р'; + + padding-left: 4px; +} +.modal__basket .modal__header{ + height: calc(100% - 92px); + margin-bottom: -36px; +} +.modal__basket .modal__content{ + height: calc(100% - 100px); + overflow-x: hidden; + +} +.modal__basket .modal__content::-webkit-scrollbar { + width: 7px; + background-color: #f9f9fd; +} +.modal__basket .modal__content::-webkit-scrollbar-thumb { + background-color: var(--background-black); + border-radius: 2px; +} + +.modal-form{ + margin: auto; + + width: 600px; + + padding: 24px; + + border-radius: 20px; + + position: relative; + + display: none; +} +.modal-form.active{ + display: block; +} +.modal-form--white{ + border: 1px solid var(--background-black); + background: var(--background-white); +} +.modal-form--green-gradient{ + background: var(--gradient-blue); +} +.modal-form--width-584{ + width: 584px; +} +.modal-form__close{ + position: absolute; + top: 24px; + right: 24px; + + width: 24px; + aspect-ratio: 1; + + border: none; + background: none; + background-image: url(../img/svg/main/black-x.svg); + background-repeat: no-repeat; + background-size: 24px; + background-position: center; + + transition: opacity .2s ease-out; +} +.modal-form__close--white{ + background-image: url(../img/svg/main/white-x.svg); +} +.modal-form__close:hover{ + opacity: .8; +} +.modal-form__button-close{} +.modal-form__title{ + padding-right: 50px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 26px; + line-height: 123%; + text-transform: uppercase; + color: var(--text-dark); +} +.modal-form__text--center{ + text-align: center; +} +.modal-form__text--center-pc{ + text-align: center; +} +.modal-form__title--green-gradient{ + background: var(--gradient-blue); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} +.modal-form__title--white{ + color: var(--text-white); +} +.modal-form__element{ + margin-top: 24px; +} +.modal-form__element--center{ + display: flex; + justify-content: center; +} +.modal-form__element--top-40{ + margin-top: 40px; +} +.modal-form__text{ + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.modal-form__text--weight-500{ + font-weight: 500; +} +.modal-form__text--white{ + color: var(--text-white); +} +.modal-form__img{ + width: 100%; + height: 360px; + + object-fit: contain; +} +.modal-form__content{ + margin-top: 40px; +} +.modal-form-content__line{ + margin-top: 24px; +} +.modal-form-content__line:first-child{ + margin-top: 0; +} +.modal-form-content__line--two{ + display: flex; + justify-content: space-between; +} +.modal-form-content-line__element{ + position: relative; +} +.modal-form-content__line--two .modal-form-content-line__element{ + width: calc(50% - 12px); +} +.modal-form-content__line--three{ + display: flex; +} +.modal-form-content__line--three .modal-form-content-line__element:nth-child(1){ + width: 85px; + + flex-shrink: 0; +} +.modal-form-content__line--three .modal-form-content-line__element:nth-child(2){ + margin-left: 8px; + + width: 100%; +} +.modal-form-content__line--three .modal-form-content-line__element:nth-child(3){ + margin-left: 8px; + + width: 85px; + + flex-shrink: 0; +} +.modal-form-content__line--margin-top-16{ + margin-top: 16px; +} +.modal-form__buttons{ + margin-top: 32px; +} +.modal-form__buttons--two{ + display: flex; + justify-content: space-between; + align-items: center; +} + +.modal-form__buttons--two button, +.modal-form__buttons--two input{ + width: calc(50% - 20px); +} +.modal-map{ + margin: auto; + + width: 1105px; + + display: none; + + border-radius: 24px; + border: none; +} +.modal-map.active{ + display: flex; +} +.modal-map__left{ + width: 600px; + + padding: 24px; + + position: relative; +} +.modal-map__control{ + margin: 38px -12px -12px -12px; + + display: flex; +} +.modal-map-control__item{ + margin: 12px; + + padding: 2px; + + width: calc(50% - 24px); + + background: var(--background-9); + border-radius: 20px; + border: none; +} +.modal-map-control__item.active{ + background: var(--gradient-blue); +} +.modal-map-control__item.active .form-input-radio__circle::before{ + content: ''; + position: absolute; + top: 4px; + left: 4px; + width: 12px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--gradient-blue); +} +.modal-map-control-item__content{ + padding: 14px; + + border-radius: 18px; + + background: var(--background-white); +} +.modal-map-control-item__header{ + display: flex; + align-items: center; +} +.modal-map-control-item__circle{ + padding: 2px; + width: 20px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--background-9); + position: relative; +} +.modal-map-control-item-circle__content{ + width: 16px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--background-white); +} +.modal-map-control__item.active .modal-map-control-item__circle{ + background: var(--gradient-blue); +} +.modal-map-control__item.active .modal-map-control-item__circle::before{ + content: ''; + position: absolute; + top: 4px; + left: 4px; + width: 12px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--gradient-blue); +} +.modal-map-control-item__title{ + margin-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); +} +.modal-map-control-item__description{ + margin-top: 16px; +} +.modal-map-control-item__time{ + font-family: var(--font-family); + font-weight: 500; + font-size: 16px; + line-height: 125%; + color: var(--text-black); + + text-align: start; +} +.modal-map-control-item__price{ + margin-top: 8px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 12px; + line-height: 133%; + color: var(--text-6); + + text-align: start; +} +.modal-map__form{ + margin-top: 24px; +} +.modal-map-form__hidden{ + +} +.modal-map-form__button{ + margin-top: 83px; +} +.modal-map-form__sub-button{ + display: none; +} +.modal-map__right{ + padding: 16px 0px 16px 16px; +} +.modal-map__map{ + border: 2px solid var(--background-9); + border-radius: 16px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.modal-map__map iframe{ + height: 650px; +} +.modal__age{ + +} +.modal__age > div{ + display: none; +} +.modal__age > div.active{ + display: flex; +} +/* modal */ + /* modal */ + + /* toggle */ + .toggle{ + padding-top: 26px; + padding-bottom: 25px; + + border-bottom: 1px solid var(--text-3); + + position: relative; + } + .toggle::after{ + content: ''; + + position: absolute; + top: 24px; + right: 0; + + width: 24px; + aspect-ratio: 1; + + background-image: url(../img/svg/main/black-x.svg); + transform: rotate(45deg); + transition: transform .2s; + pointer-events: none; + } + .toggle.active::after{ + transform: rotate(0deg); + } + .toggle__title{ + padding-right: 30px; + text-transform: uppercase; + + font-family: var(--font-family); + font-weight: 700; + font-size: 16px; + line-height: 125%; + color: var(--text-black); + margin-bottom: 0; + cursor: pointer; + } + .toggle__block-content{ + height: 0; + overflow: hidden; + + transition: height .2s ease-out; + } + .toggle__content{ + padding-top: 24px; + } + .toggle-content__item{ + margin: 12px -12px -12px -12px; + + display: flex; + align-items: center; + flex-wrap: wrap; + } + .toggle-content__item:first-child{ + margin-top: 0; + } + .toggle-content__element{ + margin: 12px; + } + .toggle-content__element--width-perc-100{ + width: 100%; + } + .toggle-content__element--width-perc-50{ + width: calc(50% - 24px); + } + .toggle__text{ + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + } + /* toggle */ + + /* checkbox */ + .checkbox{ + display: flex; + align-items: center; + + cursor: pointer; + } + .checkbox__state{ + border-radius: 4px; + + width: 18px; + height: 18px; + + border: 2px solid var(--background-black); + background: var(--background-white); + + flex-shrink: 0; + } + .checkbox.active .checkbox__state{ + background-color: var(--background-black); + + background-image: url(../img/svg/main/arrow-selected-white.svg); + background-repeat: no-repeat; + background-position: center; + } + .checkbox__input{ + display: none; + } + .checkbox__label{ + padding-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); + + cursor: pointer; + } + .checkbox__label a{ + color: #76ce75; + + text-decoration: none; + } + .checkbox--small{ + margin-top: 24px; + } + .checkbox--small .checkbox__label{ + padding-left: 24px; + + font-weight: 500; + font-size: 12px; + line-height: 133%; + } + /* checkbox */ + + /* radio */ + .radio{ + display: flex; + align-items: center; + } + .radio__input{ + width: 18px; + aspect-ratio: 1; + + accent-color: var(--background-black); + + cursor: pointer; + } + .radio__label{ + padding-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); + + cursor: pointer; + } + /* radio */ + + + @keyframes slidein { + from { + opacity: 0; + } + + to { + opacity: 1; + } + } + + .slider-arrow{ + background-color: transparent; + } + + .product__footer{ + width: 100%; + } + + .button.loading{ + font-size: 0; + color: transparent !important; + position: relative; + } + .button.loading::before{ + content: ''; + height: 36px; + width: 36px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' width='200' height='200' style='shape-rendering: auto; display: block; background: transparent;'%3E%3Cg%3E%3Ccircle stroke-dasharray='164.93361431346415 56.97787143782138' r='35' stroke-width='10' stroke='%23000000' fill='none' cy='50' cx='50'%3E%3CanimateTransform keyTimes='0;1' values='0 50 50;360 50 50' dur='1s' repeatCount='indefinite' type='rotate' attributeName='transform'/%3E%3C/circle%3E%3Cg/%3E%3C/g%3E%3C!-- %5Bldio%5D generated by https://loading.io --%3E%3C/svg%3E"); + background-size: contain; + background-repeat: no-repeat; + } + + + .products.loading{ + position: relative; + } + .products.loading::before{ + content: ''; + z-index: 150; + height: 100%; + width: 100%; + position: absolute; + top: 0; + left: 0; + background-color: rgba(255,255,255, .6); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' width='200' height='200' style='shape-rendering: auto; display: block; background: transparent;'%3E%3Cg%3E%3Ccircle stroke-dasharray='164.93361431346415 56.97787143782138' r='35' stroke-width='10' stroke='%23000000' fill='none' cy='50' cx='50'%3E%3CanimateTransform keyTimes='0;1' values='0 50 50;360 50 50' dur='1s' repeatCount='indefinite' type='rotate' attributeName='transform'/%3E%3C/circle%3E%3Cg/%3E%3C/g%3E%3C!-- %5Bldio%5D generated by https://loading.io --%3E%3C/svg%3E"); + background-size: 48px; + background-position: top 200px center; + background-repeat: no-repeat; + } + + html{ + background: #fff !important; + } + + .detail__label-wrap{ + display: flex; + flex-wrap: wrap; + gap: 5px; + } + + .product-item-label__tag--sale{ + flex-shrink: 0; + margin-left: auto; + } + + .detail__label-wrap .detail__label .product-item-label__tag:last-child{ + margin-left: 0; + } + + .detail__label-wrap{ + align-items: center; + } + + .open-to-know{ + background-color: transparent; + } + + .detail-block-form__item .open-to-know{ + width: auto; + padding-left: 0; + padding-right: 0; + margin-right: 0; + margin-left: 0; + } + + .input-text { + display: flex; + flex-direction: row; + align-items: center; + padding: 12px 16px; + gap: 8px; + width: 100%; + height: 48px; + background: #FFFFFF; + border: 1px solid #999999; + border-radius: 20px; + margin-top: 6px; + color: #000 + } + + textarea.input-text{ + height: 150px; + } + + .woocommerce-button{ + padding: 20px; + margin-top: 20px; + } + + fieldset{ + padding: 0; + } + + +.radio-button{ + display: flex; + gap: 10px; +} + + +/* By Max fix add to cart button */ +.store-add-to-cart{ + min-height: 48px; +} +.mini-profile__button{ + position: relative; +} +.mini-profile__button--counter{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + padding: 2px; + position: absolute; + background: var(--gradient-turquoise); + border-radius: 10px; + width: 16px; + height: 16px; + + border-radius: 50%; + top: 6px; + right: 6px; + font-style: normal; + font-weight: 700; + font-size: 9px; + line-height: 16px; + color: #121212; +} + +.mini-profile__button--counter.disabled{ + display: none; +} + +.--text-center{ + text-align: center; +} + +.post{ + padding-bottom: 1.5rem; +} + +.login_wrap{ + min-height: 100%; +} + +.button--high-46{ + padding: 12px 24px; + + font-size: 20px; + font-weight: 700; + line-height: 24px; +} + +/* form */ +.form{ + width: 100%; + + padding: 24px 24px 43px; + + display: flex; + flex-direction: column; + + border-radius: 24px; + background: var(--gradient-turquoise); +} +.form__item{ + margin-top: 16px; +} +.form__title{ + font-family: var(--font-family); + font-weight: 500; + font-size: 24px; + line-height: 133%; + color: var(--text-black); +} +.form__input{ + width: 100%; + + border-radius: 20px; + padding: 12px 16px; + border: 1px solid var(--text-black); + + background: var(--background-white); + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + + color: var(--text-black); +} +.form__input::placeholder{ + color: var(--text-grey); +} +.form__input--textarea{ + height: 96px; + resize: none; +} +.form__input--center{ + text-align: center; +} +.form__button{ + width: 100%; + + padding: 12px 24px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-white); + + border-radius: 16px; + border: none; + background: var(--background-black); + + cursor: pointer; + + transition: background-color .2s ease-out; +} +.form__button:hover{ + opacity: .8; +} + +.label{ + padding-bottom: 4px; + + display: inline-block; + + position: relative; +} +.label::after{ + content: ''; + + position: absolute; + top: 2px; + right: -20px; + + width: 16px; + height: 16px; + + background-image: url(../img/svg/main/question.svg); + + cursor: pointer; +} +.label__title, .form-row label{ + font-family: var(--font-family); + font-weight: 700; + font-size: 16px; + line-height: 125%; + color: var(--text-3); +} +.label__question{ + position: absolute; + + padding: 8px; + + border-radius: 6px; + transition: height .2s ease-out; + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1), 0 0 2px 0 rgba(0, 0, 0, 0.2); + overflow: hidden; + background-color: var(--background-white); + + opacity: 0; + transition: opacity .2s ease-out; + pointer-events: none; +} +.label:hover .label__question{ + opacity: 1; + pointer-events: auto; +} + +.label-name{ + margin-bottom: 8px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 16px; + line-height: 125%; + color: var(--text-black); + + display: block; +} +.form-input__error{ + margin-top: 4px; + + font-family: var(--font-family); + font-weight: 500; + font-size: 12px; + line-height: 133%; + + color: #f60909; + + display: none; + + position: relative; +} +.form-input__error--absolute{ + position: absolute; + bottom: -19.95px; + left: 0; + + width: 100%; +} +.form__input.error, .form-input__phone.error{ + border-color: #f60909; +} +.form__input.error + .form-input__error{ + display: block; +} +.form-input__phone.error .form-input__error{ + display: block; +} +.form-input-phone__input.error + .form-input__error--absolute::before{ + content: ''; + + position: absolute; + top: -53px; + left: -1px; + + width: 100%; + height: 48px; + + border-radius: 20px; + border: 1px solid #f60909; +} +.form-input__phone{ + padding: 12px 16px 12px ; + + display: flex; + align-items: center; + + border-radius: 20px; + border: 1px solid var(--text-black); + + cursor: pointer; + + position: relative; +} +.form-input__phone.focus{ + outline: 1px solid var(--text-black); +} +.form-input-phone__icon{ + flex-shrink: 0; + + height: 16px; + width: 28px; + + background-size: 16px; + background-repeat: no-repeat; + background-position: left; + + position: relative; +} +.form-input-phone__icon::after{ + content: ''; + + position: absolute; + top: 4px; + right: 0; + + width: 8px; + aspect-ratio: 1; + + background-image: url(../img/svg/main/triangle-grey.svg); +} +.form-input-phone__code{ + flex-shrink: 0; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.form-input-phone__code::before{ + content: '+'; +} +.form-input-phone__input{ + margin-left: 6px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + border: none; + outline: none; +} +.form-input-phone__list{ + position: absolute; + top: 52px; + left: 8px; + + width: 280px; + + z-index: 10; + + transition: opacity .2s ease-out; + + opacity: 0; + pointer-events: none; + + border-radius: 20px; + + overflow: hidden; +} +.form-input-phone__list.active{ + opacity: 1; + pointer-events: auto; +} +.form-input-phone-list__search{ + width: 100%; + + padding: 12px 16px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + border-left: 1px solid var(--background-black); + border-right: 1px solid var(--background-black); + border-top: 1px solid var(--background-black); + border-radius: 20px 20px 0 0; + + background: var(--background-white); +} +.form-input-phone-list__search::placeholder{ + color: var(--text-6); +} +.form-input-phone-list__content{ + width: 100%; + max-height: 224px; + + padding: 24px 16px; + + border: 1px solid var(--background-black); + border-top: none; + border-radius: 0 0 20px 20px; + + background: var(--background-white); + + overflow-y: auto; +} +.form-input-phone-list__item{ + margin-top: 14px; + + display: flex; + align-items: center; + + background: none; + border: none; + + cursor: pointer; +} +.form-input-phone-list__item:first-child{ + margin-top: 0; +} +.form-input-phone-list-item__icon{ + width: 16px; + aspect-ratio: 1; +} +.form-input-phone-list-item__name{ + margin-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.form-input-phone-list-item__code{ + margin-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.form-input-phone-list-item__code::before{ + content: '+'; +} +.form-input__tabs{ + padding: 2px; + + display: flex; + + border-radius: 20px; + background: var(--gradient-turquoise); + + position: relative; +} +.form-input-tabs__button{ + width: 100%; + margin-bottom: 0; + padding: 10px; + cursor: pointer; + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + text-align: center; + + border-radius: 18px; + + z-index: 2; + + transition: background-color .2s ease-out; +} +.form-input-tabs__button.active{ + background-color: var(--background-white); +} +.form-input-tabs__input{ + display: none; +} +.form-input__radio{ + padding: 16px; + + display: flex; + flex-direction: column; +} +.form-input-radio__item{ + margin-top: 14px; + + display: flex; + align-items: center; +} +.form-input-radio__item:first-child{ + margin-top: 0; +} +.form-input-radio__circle{ + padding: 2px; + + width: 20px; + aspect-ratio: 1; + + border-radius: 50%; + + background: var(--gradient-blue); + + position: relative; +} +.form-input-radio__item.active .form-input-radio__circle::before{ + content: ''; + + position: absolute; + top: 4px; + left: 4px; + + width: 12px; + aspect-ratio: 1; + + border-radius: 50%; + + background: var(--gradient-blue); +} +.form-input-radio-circle__content{ + width: 16px; + aspect-ratio: 1; + + border-radius: 50%; + + background: var(--background-white); +} +.form-input-radio__title{ + margin-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); +} +.form-input-radio__input{ + display: none; +} +.form-input__list{ + position: relative; +} +.form-input__list::before{ + content: ''; + position: absolute; + top: 21.5px; + right: 19.5px; + width: 13px; + height: 8px; + background-image: url(../img/svg/main/arrow-black.svg); + background-repeat: no-repeat; + background-size: contain; + pointer-events: none; +} +.form-input-list__input{ + width: 100%; + + border-radius: 20px; + padding: 12px 16px; + padding-right: 40px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); + + border: 1px solid var(--text-black); +} + +.form-input-list__input::placeholder{ + color: var(--text-grey); +} +.form-input-list__block-content{ + position: absolute; + top: 50px; + left: 0; + + width: 100%; + max-height: 192px; + height: 0; + + border-radius: 20px; + background-color: var(--background-white); + + overflow: hidden; + + transition: height .2s ease-out; + + z-index: 10; +} +.form-input-list__block-content.active{ + border: 1px solid var(--background-black); +} +.form-input-list__content{ + margin: 8px 16px; + + max-height: 176px; + + padding-right: 16px; + + overflow-y: auto; +} +.form-input-list__content::-webkit-scrollbar{ + border-radius: 8px; + width: 4px; + background: rgba(204, 204, 204, 0.2); +} +.form-input-list__content::-webkit-scrollbar-thumb{ + border-radius: 8px; + background: var(--background-9); +} +.form-input-list__content +.form-input-list__item{ + margin-top: 16px; + + width: 100%; + + display: flex; + justify-content: space-between; + align-items: center; + + border-radius: 8px; + padding: 4px; + + background: none; + border: none; +} +.form-input-list__item:first-child{ + margin-top: 0; +} +.form-input-list__item.active{ + background: rgba(204, 204, 204, 0.2); +} +.form-input-list-item__text{ + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.form-input-list-item__box{ + width: 20px; + aspect-ratio: 1; + + padding: 2px; + + border-radius: 4px; + + background: var(--gradient-blue); +} +.form-input-list-item-box__content{ + width: 16px; + aspect-ratio: 1; + + border-radius: 2px; + + background: var(--background-white); +} +.form-input-list__item.active .form-input-list-item-box__content{ + background: var(--gradient-blue); +} +.remote-control__item{ + display: none; +} +.remote-control__item.active{ + display: block; +} +/* .form-input-radio__ */ +/* form */ + + +.v-hidden{ + position: absolute !important; + clip: rect(1px 1px 1px 1px); + clip: rect(1px, 1px, 1px, 1px); + padding: 0 !important; + border: 0 !important; + height: 1px !important; + width: 1px !important; + overflow: hidden; +} + +.form-input-list-item-box__content{ + display: inline-flex; + align-items: center; + justify-content: center; +} + +.modalProfile{ + position: fixed; + top: 0; + left: 0; + + padding: 20px; + + width: 100vw; + height: 100vh; + + background: rgba(0, 0, 0, 0.25); + + z-index: 200; + + opacity: 0; + transition: opacity .2s ease-out; + pointer-events: none; + + display: flex; + justify-content: center; + align-items: center; + + overflow-y: auto; + padding-top: 30px; + padding-bottom: 30px; +} +.modalProfile.active{ + opacity: 1; + pointer-events: auto; +} + +.popup-wrap{ + width: 100%; + height: 100%; + display: flex; +} + +.modal-form{ + margin: auto; +} + +.iti__country-name{ + color: #000; +} + +.rm{ + margin-top: 24px; +} + +body { + background-color: rgb(255, 255, 255) !important; + background-image: none; +} + +.login_inner img{ + display: block; + margin: 40px auto; +} + + +.product-item__price p::after, +.modal-basket-item__price::after, +.modal-block-price__price::after, +.product-item-overlay__price::after, +.detail-block-price__price::after { +content: '₽'; +padding-left: 5px; +} + +.checkout { + margin-top: 2rem; +} + +.modal-basket-item__block-image{ + flex-shrink: 0; +} + +.modal-basket-item__content{ + flex-grow: 1; +} + +.modal__close{ + padding: 0; +} + +.woocommerce-order * { + color: #000; +} + +.woocommerce-notices-wrapper{ + position: relative; + top: 112px; + z-index: 100; } \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js b/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js index a0660b8..b7ea97a 100644 --- a/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js +++ b/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js @@ -297,4 +297,23 @@ function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, // } // }) // } -// function \ No newline at end of file +// function + + +jQuery('.cabinet-card__button').on('click', function(){ + var id = jQuery(this).data('edit') + jQuery(`#pet_edit_` + id).addClass('active') +}) + +jQuery('.form-sub__btn').on('click', function(){ + jQuery(`#subForm`).addClass('active') +}) + +jQuery('.user-edit-open').on('click', function(){ + jQuery(`#user_edit`).addClass('active') +}) + +jQuery('.cabinet-card__block-add-pets').on('click', function(){ + jQuery(`#pet_add_form`).addClass('active') +}) + diff --git a/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php b/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php index e1777fb..5eb183a 100644 --- a/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php +++ b/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php @@ -15,7 +15,7 @@ function save_custom_user_profile_fields() { ) ); - $phone = update_user_meta( get_current_user_id(), 'billing_phone', $_POST['full'] ); + $phone = update_user_meta( get_current_user_id(), 'billing_phone', $_POST['phone'] ); } diff --git a/wp-content/themes/cosmopet/modules/profile/module-controller.php b/wp-content/themes/cosmopet/modules/profile/module-controller.php index ab9a72c..dc84e23 100644 --- a/wp-content/themes/cosmopet/modules/profile/module-controller.php +++ b/wp-content/themes/cosmopet/modules/profile/module-controller.php @@ -1,178 +1 @@ array( - 'name' => 'Питомцы', // Основное название типа записи - 'singular_name' => 'Питомец', // отдельное название записи типа Book - 'add_new' => 'Добавить нового', - 'add_new_item' => 'Добавить нового питомца', - 'edit_item' => 'Редактировать питомца', - 'new_item' => 'Новый питомец', - 'view_item' => 'Посмотреть питомца', - 'search_items' => 'Найти питомца', - 'not_found' => 'Питомцев не найдено', - 'not_found_in_trash' => 'В корзине книг не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Питомцы' - - ), - 'public' => false, - 'show_ui' => true, - 'supports' => array('title','editor') -) ); -} - -function get_pet_card($item){ -?> - -
-
-
-
-
- -
-
- -

-
- -
-

:

-

-
-
-

:

-

-
- -
-

:

-

-
- - - -
-

:

-

-
- -
-

:

-

-
- -
-

- -
- -
- -
-
-
- +
+
+
+
+ +
+
+

{{ function('get_the_title', pet_id) }}

+
+ +
+

{{ __('Breed', 'woodmart') }}:

+

{{ function('get_field', 'breed', pet_id) }}

+
+ +
+

{{ __('Weight', 'woodmart') }}:

+

{{ w }}

+
+ + {% if old %} +
+

{{ __('Age', 'woodmart') }}:

+

{{ old }}

+
+ {% else %} + {% set month = function('get_field', 'month', pet_id) %} + {% set zero = month < 10 ? '0' : '' %} +
+

{{ __('Birhtday', 'woodmart') }}:

+

+ {{ function('get_field', 'day', pet_id) }}.{{ zero }}{{ month }}.{{ function('get_field', 'year', pet_id) }} +

+
+ {% endif %} + +
+

{{ __('Activity', 'woodmart') }}:

+

{{ act }}

+
+ + {% if function('get_field', 'type', pet_id) == 'cat' and function('get_field', 'sterilized', pet_id) %} +
+

{{ __('Sterilized', 'woodmart') }}

+
+ {% endif %} + +
+ +
+
+ + +{% set months = [ + __('january', 'woodmart'), + __('february', 'woodmart'), + __('march', 'woodmart'), + __('april', 'woodmart'), + __('mail', 'woodmart'), + __('june', 'woodmart'), + __('july', 'woodmart'), + __('august', 'woodmart'), + __('september', 'woodmart'), + __('october', 'woodmart'), + __('november', 'woodmart'), + __('december', 'woodmart') +] %} + +
+ +
\ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/profile/profile.twig b/wp-content/themes/cosmopet/templates/profile/profile.twig index 47f1b78..641c708 100644 --- a/wp-content/themes/cosmopet/templates/profile/profile.twig +++ b/wp-content/themes/cosmopet/templates/profile/profile.twig @@ -103,7 +103,7 @@ {% if pets %} {% for pet in pets %} - {% include 'pet-card.twig' with { 'post': pet } %} + {% include 'pet-card.twig' with { 'item': pet } %} {% endfor %} {% endif %} @@ -146,7 +146,7 @@

{{ function('pll_e', 'Summary') }}:

-

{{ order.total }}

+

{{ order.get_total() }}

@@ -169,7 +169,7 @@
{% for item in order.get_items %} {% set product = item.get_product %} - {% set thumbnail = product ? product.thumbnail.src('thumbnail') : '' %} + {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %}
@@ -177,7 +177,7 @@

{{ item.name }}

{{ item.quantity }}

-

{{ item.total }}

+

{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}

{% endfor %} @@ -197,7 +197,7 @@
{% for item in order.get_items %} {% set product = item.get_product %} - {% set thumbnail = product ? product.thumbnail.src('thumbnail') : '' %} + {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} {% if thumbnail %} {% endif %} @@ -224,110 +224,108 @@
-{% if pet %} -
-
-
-

{{ function('pll_e', 'Weight') }}:

-

{{ pet.weight_text }}

-
-
-

{{ function('pll_e', 'Age') }}:

-

{{ pet.old_text }}

-
-
-

{{ function('pll_e', 'Activity') }}:

-

{{ pet.activity_text }}

-
-
-
-{% endif %} -
+ + + +