From ad92f9e706e82efca39e6048c206a8559e89199c Mon Sep 17 00:00:00 2001 From: Dekart Deploy Bot Date: Mon, 11 May 2026 21:15:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B3=D0=B5=D1=80=D1=8C:=20=D0=A1?= =?UTF-8?q?=D0=B5=D0=BA=D1=86=D0=B8=D1=8F=20Hero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/dekart/assets/css/camp.css | 29 +- wp-content/themes/dekart/assets/js/camp.js | 22 +- wp-content/themes/dekart/page-camp.php | 107 +-- .../dekart/page-camp.php.bak.20260511-141210 | 769 ++++++++++++++++++ .../dekart/page-camp.php.bak.20260511-141749 | 769 ++++++++++++++++++ 5 files changed, 1627 insertions(+), 69 deletions(-) create mode 100644 wp-content/themes/dekart/page-camp.php.bak.20260511-141210 create mode 100644 wp-content/themes/dekart/page-camp.php.bak.20260511-141749 diff --git a/wp-content/themes/dekart/assets/css/camp.css b/wp-content/themes/dekart/assets/css/camp.css index f5f57d2..674140c 100644 --- a/wp-content/themes/dekart/assets/css/camp.css +++ b/wp-content/themes/dekart/assets/css/camp.css @@ -2991,4 +2991,31 @@ html { width: 27px; display: flex; } -} \ No newline at end of file +} + +.modal-camp-request-form { + background-color: rgba(0,0,0,0.6); +} +.modal-camp-request-form .form-wrapper { + width: 100%; + max-width: 600px; + background: #fff; + border-radius: 24px; + padding: 40px 32px 32px; + position: relative; + box-sizing: border-box; +} +.modal-camp-request-form .btn-close-request-form { + position: absolute; + top: 12px; + right: 12px; + background: none; + border: none; + cursor: pointer; + z-index: 2; +} +.modal-camp-request-form .btn-close-request-form img { + width: 24px; + height: 24px; + display: block; +} diff --git a/wp-content/themes/dekart/assets/js/camp.js b/wp-content/themes/dekart/assets/js/camp.js index a1d5b72..0c0dfda 100644 --- a/wp-content/themes/dekart/assets/js/camp.js +++ b/wp-content/themes/dekart/assets/js/camp.js @@ -1,4 +1,3 @@ - var swiper = new Swiper(".camp-swiper-foto-thumbsSlider", { spaceBetween: 10, slidesPerView: 7, @@ -25,6 +24,9 @@ const modalMentors = document.querySelector('.modal-mentors'); const modalCampRequestForm = document.querySelector('.modal-camp-request-form'); +const b24template = document.querySelector('#b24-camp-template'); +const b24container = document.querySelector('.b24-form-container'); + btnCloseModalPrograms.addEventListener("click", function (event) { modalPrograms.classList.remove('open'); }); @@ -36,14 +38,28 @@ document.addEventListener("click", function (event) { const target = event.target; if (target.classList.contains("btn-close-request-form-camp")) { - modalCampRequestForm.style.display = "none"; + modalCampRequestForm.classList.add('hidden'); + // clear bitrix24 form on close (ready for re-open) + b24container.innerHTML = ''; return; } const campBtn = target.closest('.btn-write-camp'); if (campBtn) { if (campBtn.tagName === 'A') event.preventDefault(); - modalCampRequestForm.style = ""; + + // prevent footer bitrix24 loader + window.b24campLoaded = true; + + // show modal + modalCampRequestForm.classList.remove('hidden'); + + // load Bitrix24 from template + if (b24template && !b24container.hasChildNodes()) { + const clone = document.importNode(b24template.content, true); + b24container.appendChild(clone); + } + return; } diff --git a/wp-content/themes/dekart/page-camp.php b/wp-content/themes/dekart/page-camp.php index b9cbd72..99cc738 100644 --- a/wp-content/themes/dekart/page-camp.php +++ b/wp-content/themes/dekart/page-camp.php @@ -7,6 +7,7 @@ Template Name: Шаблон страницы Лагерь get_header(); $post_id = get_the_ID(); +$theme_uri = get_template_directory_uri(); $priceMin = 1000000; $programs = carbon_get_post_meta($post_id, 'programs' ); @@ -18,29 +19,8 @@ if (is_array($programs)) { } } -/** - * Banner helper - */ -function getBanner($suffix, $post_id) { - $img = carbon_get_post_meta($post_id, 'banner_add_img' . $suffix); - $img_url = $img ? wp_get_attachment_url($img) : ''; - if (!$img_url) return; - $title = carbon_get_post_meta($post_id, 'banner_add_title' . $suffix); - $text = carbon_get_post_meta($post_id, 'banner_add_text' . $suffix); - $note = carbon_get_post_meta($post_id, 'banner_add_text_min' . $suffix); - ?> - - +
carbon_get_post_meta( $post_id, 'hero_metric_1_img' ), 'number' => carbon_get_post_meta( $post_id, 'hero_metric_1_number' ) ?: '12', 'label' => carbon_get_post_meta( $post_id, 'hero_metric_1_label' ) ?: 'лет в городе', - 'default_icon' => get_template_directory_uri() . '/assets/images/doodles/icon-home.png', + 'default_icon' => $theme_uri . '/assets/images/doodles/icon-home.png', ], [ 'img_id' => carbon_get_post_meta( $post_id, 'hero_metric_2_img' ), 'number' => carbon_get_post_meta( $post_id, 'hero_metric_2_number' ) ?: '2 500+', 'label' => carbon_get_post_meta( $post_id, 'hero_metric_2_label' ) ?: 'счастливых детей', - 'default_icon' => get_template_directory_uri() . '/assets/images/doodles/icon-bulb.png', + 'default_icon' => $theme_uri . '/assets/images/doodles/icon-bulb.png', ], [ 'img_id' => carbon_get_post_meta( $post_id, 'hero_metric_3_img' ), 'number' => carbon_get_post_meta( $post_id, 'hero_metric_3_number' ) ?: '4.9 / 5', 'label' => carbon_get_post_meta( $post_id, 'hero_metric_3_label' ) ?: 'рейтинг от родителей', - 'default_icon' => get_template_directory_uri() . '/assets/images/doodles/icon-award.png', + 'default_icon' => $theme_uri . '/assets/images/doodles/icon-award.png', ], ]; @@ -97,7 +77,7 @@ $metrics = [
- +

Один пробный день — за наш счёт. Оцените качество сами, а решение примете после.

@@ -116,14 +96,14 @@ $metrics = [ ] ); ?> Детский лагерь Декарт - -
@@ -171,9 +151,9 @@ $metrics = [ '; endif; ?> - - @@ -206,7 +186,7 @@ $metrics = [ $icon_file = $icons[$index % count($icons)]; ?>
-

@@ -223,7 +203,7 @@ $metrics = [
- +

6,5−11 лет

возраст

@@ -231,7 +211,7 @@ $metrics = [
- +

до 10 детей

каждая группа

@@ -239,7 +219,7 @@ $metrics = [
- +

на выбор

время посещения

@@ -247,7 +227,7 @@ $metrics = [
- +

от

стоимость недели

@@ -273,7 +253,7 @@ $metrics = [ $programs_days = $item['programs_days']; $programs_content = $item['programs_content'];?>
- <?php echo get_post_meta($programs_img, '_wp_attachment_image_alt', true); ?> + <?php echo $programs_img ? esc_attr(get_post_meta($programs_img, '_wp_attachment_image_alt', true)) : ''; ?>

@@ -282,7 +262,7 @@ $metrics = [
- +
@@ -293,8 +273,6 @@ $metrics = [
- -
@@ -308,7 +286,7 @@ $metrics = [

Половина дня

- +

Время пребывания — на выбор (до обеда или до вечера)

@@ -328,7 +306,7 @@ $metrics = [

за 5 дней пребывания

- +

Тематическая неделя на выбор

@@ -342,7 +320,7 @@ $metrics = [

Полный день

- +

Пребывание в клубе с утра до вечера, дополнительные активности

@@ -354,7 +332,7 @@ $metrics = [

за 5 дней пребывания

- +

Тематическая неделя на выбор

@@ -376,33 +354,33 @@ $metrics = [ if (is_array($mentors)) { foreach ($mentors as $item) { $mentor = $item['mentor']; - $mentorName = get_the_title($mentor[0]['id']); + $mentorName = !empty($mentor[0]['id']) ? get_the_title($mentor[0]['id']) : ''; $mentor_job = $item['mentor_job']; $mentor_directions = $item['mentor_directions']; $HTMLdirection = ""; - $post_url = get_permalink($mentor[0]['id']); + $post_url = !empty($mentor[0]['id']) ? get_permalink($mentor[0]['id']) : ''; if (is_array($mentor_directions)) { foreach ($mentor_directions as $direction) {$HTMLdirection .= "" . esc_html($direction['direction_name'])."";} } - $teacher_foto = carbon_get_post_meta($mentor[0]['id'] , 'teacher_avatar'); + $teacher_foto = !empty($mentor[0]['id']) ? carbon_get_post_meta($mentor[0]['id'], 'teacher_avatar') : ''; ?>
- + <?php echo get_post_meta( $teacher_foto, '_wp_attachment_image_alt', true ); ?> - + + +
+ +

Контакты

+
+
+
Телефон:
+ +
Почта:
+ +
Адрес:
+
+
Наши соцсети:
+
+ + + +
+
+
+
+
+
+
+ +
+ + + + + + + + + + +