Лагерь: Global

This commit is contained in:
Dekart Deploy Bot 2026-05-11 16:32:36 +03:00
parent bb1ef7220f
commit 7e430fe801
4 changed files with 174 additions and 103 deletions

View File

@ -31,7 +31,7 @@ html {
padding: 0 20px; padding: 0 20px;
} }
p { .camp p {
font-weight: 400; font-weight: 400;
margin: 0 0 30px 0; margin: 0 0 30px 0;
padding: 0; padding: 0;
@ -201,10 +201,6 @@ p {
overflow: hidden; overflow: hidden;
} }
.modal-programs__content {
max-width: 860px;
overflow-y: auto;
}
/* banner END */ /* banner END */
@ -944,15 +940,14 @@ p {
.modal-programs, .modal-programs,
.modal-mentors { .modal-mentors {
position: fixed; position: fixed;
top: 0; inset: 0;
right: 0;
bottom: 0;
left: 0;
display: none; display: none;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000ce; background: rgba(0,0,0,0.8);
z-index: 100; z-index: 100;
padding: 16px;
overflow-y: auto;
} }
.modal-programs.open, .modal-programs.open,
@ -960,30 +955,140 @@ p {
display: flex; display: flex;
} }
.modal-programs-wrapper { .modal-programs__card {
position: relative; position: relative;
display: flex; display: flex;
gap: 30px; flex-direction: column;
border-radius: 30px; gap: 0;
background-color: #fff; width: 100%;
padding: 40px; max-width: 720px;
max-width: 90%; margin: auto;
max-height: 90%; background: #fff;
border-radius: 24px;
overflow: visible;
}
.modal-programs__close {
position: absolute;
top: 12px;
right: 12px;
z-index: 10;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: rgba(0,0,0,0.35);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background .2s;
}
.modal-programs__close:hover {
background: rgba(0,0,0,0.6);
} }
.modal-programs__img { .modal-programs__img {
min-width: 260px; width: 100%;
height: 260px; aspect-ratio: 16 / 10;
border-radius: 30px;
overflow: hidden; overflow: hidden;
border-radius: 24px 24px 0 0;
} }
.modal-programs__img img { .modal-programs__img img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: cover;
display: block;
}
.modal-programs__body {
display: flex;
flex-direction: column;
gap: 12px;
padding: 24px 20px 28px;
}
.modal-programs__body .programs__item_title {
font-family: Montserrat, sans-serif;
font-size: 22px;
font-weight: 700;
line-height: 1.3;
color: #1c2b2d;
margin: 0;
}
.modal-programs__body .programs__item_price {
font-size: 20px;
font-weight: 700;
color: #3bb273;
margin: 0;
}
.programs__content {
font-size: 16px;
line-height: 1.7;
color: #333;
margin-top: 4px;
white-space: pre-line;
}
.programs__content p {
margin: 0 0 16px;
}
.programs__content p:last-child {
margin-bottom: 0;
}
.programs__content ul,
.programs__content ol {
margin: 0 0 16px;
padding-left: 20px;
}
.programs__content li {
margin-bottom: 8px;
line-height: 1.6;
}
.programs__content strong {
font-weight: 700;
color: #1c2b2d;
}
@media (min-width: 641px) {
.modal-programs__card {
flex-direction: row;
}
.modal-programs__img {
min-width: 260px;
width: 260px;
aspect-ratio: auto;
height: 260px;
border-radius: 20px;
margin: 28px 0 28px 28px;
}
.modal-programs__body {
padding: 28px 28px 28px 0;
}
.modal-programs__body .programs__item_title {
font-size: 24px;
}
}
@media (min-width: 1024px) {
.modal-programs__img {
min-width: 300px;
width: 300px;
height: 300px;
margin: 36px 0 36px 36px;
}
.modal-programs__body {
padding: 36px 36px 36px 0;
}
} }
.btn-close-modal { position: absolute; top: 16px; right: 16px; z-index: 10; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s;}.btn-close-modal:hover { background: rgba(0,0,0,0.65);}.btn-close-modal svg { width: 18px; height: 18px;}.btn-close-modal svg g { stroke: #fff; fill: #fff;}.btn-close-mentors { position: absolute; bottom: 100%; left: 100%; border: none; background: none; cursor: pointer;}
/* modal END */ /* modal END */
/* bring-child */ /* bring-child */
@ -1925,6 +2030,12 @@ p {
.hero-media-search__propositions.on-mobile h3 { font-size: 14px; } .hero-media-search__propositions.on-mobile h3 { font-size: 14px; }
.hero-media-search__propositions.on-mobile p { font-size: 14px; } .hero-media-search__propositions.on-mobile p { font-size: 14px; }
@media (max-width: 1023px) {
.camp .hero-media-search {
padding-top: clamp(60px, 8vw, 100px);
}
}
.hero-cta__text { .hero-cta__text {
font-size: 16.1px; font-size: 16.1px;
text-align: center; text-align: center;
@ -2079,9 +2190,6 @@ p {
border-radius: clamp(26px, 3.33vw, 40px); border-radius: clamp(26px, 3.33vw, 40px);
} }
.modal-programs__content {
max-width: clamp(559px, 71.67vw, 860px);
}
margin-top: clamp(20px, 2.5vw, 30px); margin-top: clamp(20px, 2.5vw, 30px);
gap: clamp(26px, 3.33vw, 40px); gap: clamp(26px, 3.33vw, 40px);
@ -2130,21 +2238,8 @@ p {
padding: clamp(10px, 1.25vw, 15px) clamp(20px, 2.5vw, 30px); padding: clamp(10px, 1.25vw, 15px) clamp(20px, 2.5vw, 30px);
} }
.modal-programs-wrapper {
gap: clamp(20px, 2.5vw, 30px);
border-radius: clamp(20px, 2.5vw, 30px);
padding: clamp(26px, 3.33vw, 40px);
}
.modal-programs__content p {
margin-bottom: clamp(10px, 1.25vw, 15px);
}
.modal-programs__img {
min-width: clamp(169px, 21.67vw, 260px);
height: clamp(169px, 21.67vw, 260px);
border-radius: clamp(20px, 2.5vw, 30px);
}
.bring-child-wrapper { .bring-child-wrapper {
gap: clamp(26px, 3.33vw, 40px); gap: clamp(26px, 3.33vw, 40px);
@ -2810,17 +2905,6 @@ p {
left: -20px; left: -20px;
top: 40%; top: 40%;
} }
.modal-programs-wrapper {
gap: 15px;
border-radius: 10px;
padding: 15px;
max-width: 95%;
flex-direction: column;
}
.modal-programs__img {
height: auto;
border-radius: 10px;
}
.modal-mentors-wrapper { .modal-mentors-wrapper {
position: relative; position: relative;
padding: 15px; padding: 15px;

View File

@ -36,7 +36,7 @@ document.addEventListener("click", function (event) {
const target = event.target; const target = event.target;
if (target.classList.contains("btn-close-request-form-camp")) { if (target.classList.contains("btn-close-request-form-camp")) {
modalCampRequestForm.style="display: none;"; modalCampRequestForm.style.display = "none";
return; return;
} }
@ -107,3 +107,12 @@ document.addEventListener("click", function (event) {
card.style.transitionDelay = (i * 0.08) + 's'; card.style.transitionDelay = (i * 0.08) + 's';
}); });
})(); })();
document.querySelectorAll('.box__accordion_label').forEach(function(label) {
label.addEventListener('keydown', function(e) {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.click();
}
});
});

View File

@ -840,7 +840,7 @@ function enqueue_template_specific_styles() {
'template-specific-style', 'template-specific-style',
get_template_directory_uri() . '/assets/css/camp.css', get_template_directory_uri() . '/assets/css/camp.css',
array(), array(),
'1.2' '1.3'
); );
wp_enqueue_script( wp_enqueue_script(
'camp-script', 'camp-script',
@ -1013,18 +1013,6 @@ add_filter('acf/settings/load_json', function($paths) {
return $paths; return $paths;
}); });
// === ACF JSON Auto-save ===
// Автоматически сохраняет группы полей в JSON при редактировании
add_filter('acf/settings/save_json', function($path) {
return get_stylesheet_directory() . '/acf-json';
});
// Загружает группы полей из JSON
add_filter('acf/settings/load_json', function($paths) {
$paths[] = get_stylesheet_directory() . '/acf-json';
return $paths;
});
// Автоматическое удаление JSON при удалении группы полей // Автоматическое удаление JSON при удалении группы полей
add_action('trashed_post', 'dekart_acf_delete_json', 10, 1); add_action('trashed_post', 'dekart_acf_delete_json', 10, 1);
add_action('deleted_post', 'dekart_acf_delete_json', 10, 1); add_action('deleted_post', 'dekart_acf_delete_json', 10, 1);

View File

@ -9,13 +9,11 @@ get_header();
$post_id = get_the_ID(); $post_id = get_the_ID();
$priceMin = 1000000; $priceMin = 1000000;
$priceMax = 0;
$programs = carbon_get_post_meta($post_id, 'programs' ); $programs = carbon_get_post_meta($post_id, 'programs' );
if (is_array($programs)) { if (is_array($programs)) {
foreach ($programs as $item) { foreach ($programs as $item) {
$price = (int)$item['programs_price']; $price = (int)$item['programs_price'];
if ($price > $priceMax) $priceMax = $price;
if ($price < $priceMin) $priceMin = $price; if ($price < $priceMin) $priceMin = $price;
} }
} }
@ -99,12 +97,12 @@ $metrics = [
<!-- CTA (десктоп) --> <!-- CTA (десктоп) -->
<div class="hero-cta on-desktop"> <div class="hero-cta on-desktop">
<a href="#0" class="btn-write-camp about-us__cta-link" aria-label="<?php echo esc_attr( $hero['btn_text'] ); ?>"> <a href="#" class="btn-write-camp about-us__cta-link" aria-label="<?php echo esc_attr( $hero['btn_text'] ); ?>">
<?php echo esc_html( $hero['btn_text'] ); ?> <?php echo esc_html( $hero['btn_text'] ); ?>
</a> </a>
<p class="hero-cta__note">Один пробный день за наш счёт. Оцените качество сами, а решение примете после.</p> <p class="hero-cta__note">Один пробный день за наш счёт. Оцените качество сами, а решение примете после.</p>
</div>
</div> </div>
</div>
<!-- Правая колонка (изображение + мобильные элементы) --> <!-- Правая колонка (изображение + мобильные элементы) -->
<div class="hero-media-search__media"> <div class="hero-media-search__media">
@ -189,7 +187,7 @@ $metrics = [
<span class="about-us__badge"> 2500+ мам доверили нам лето</span> <span class="about-us__badge"> 2500+ мам доверили нам лето</span>
</div> </div>
<div class="about-us__cta"> <div class="about-us__cta">
<a href="#0" class="btn-write-camp about-us__cta-link">Хочу на пробный день </a> <a href="#" class="btn-write-camp about-us__cta-link">Хочу на пробный день </a>
</div> </div>
</div> </div>
@ -298,6 +296,8 @@ $metrics = [
<?php getBanner('', $post_id); ?> <?php getBanner('', $post_id); ?>
<section class="bring-child" itemscope itemtype="https://schema.org/Product"> <section class="bring-child" itemscope itemtype="https://schema.org/Product">
<meta itemprop="name" content="Городской лагерь Декарт">
<meta itemprop="description" content="Стоимость пребывания в городском лагере Декарт">
<?php <?php
$price_half_day = carbon_get_post_meta($post_id, 'price_half_day' ); $price_half_day = carbon_get_post_meta($post_id, 'price_half_day' );
$price_full_day = carbon_get_post_meta($post_id, 'price_full_day' ); $price_full_day = carbon_get_post_meta($post_id, 'price_full_day' );
@ -450,10 +450,10 @@ $metrics = [
if (is_array($fotos)) { if (is_array($fotos)) {
foreach ($fotos as $item) { foreach ($fotos as $item) {
$img = wp_get_attachment_url($item['foto']); $img = wp_get_attachment_url($item['foto']);
$alt = get_post_meta( $item['foto'], '_wp_attachment_image_alt', true ); $alt = esc_attr(get_post_meta( $item['foto'], '_wp_attachment_image_alt', true ));
$HTMLimgs .= "<div class='swiper-slide'> $HTMLimgs .= "<div class='swiper-slide'>
<img loading='lazy' src='$img' alt='$alt' width='560' height='420'> <img loading='lazy' src='$img' alt='$alt' width='560' height='420'>
</div>"; </div>";
} }
} ?> } ?>
<div class="foto-left-part"> <div class="foto-left-part">
@ -580,7 +580,7 @@ $metrics = [
$questions_question = $item['questions_question']; $questions_question = $item['questions_question'];
$questions_answer = $item['questions_answer']; $questions_answer = $item['questions_answer'];
$accordion_item = "<div class='box__accordion'> $accordion_item = "<div class='box__accordion'>
<div class='box__accordion_label' itemscope itemprop='mainEntity' itemtype='https://schema.org/Question'> <div class='box__accordion_label' role='button' tabindex='0' itemscope itemprop='mainEntity' itemtype='https://schema.org/Question'>
<span itemprop='name'>" . esc_html($questions_question) . "</span> <span itemprop='name'>" . esc_html($questions_question) . "</span>
<svg role='presentation' focusable='false' width='24px' height='24px' viewBox='0 0 24 24'> <svg role='presentation' focusable='false' width='24px' height='24px' viewBox='0 0 24 24'>
<g stroke='none' stroke-width='2px' fill='none' fill-rule='evenodd' stroke-linecap='square'> <g stroke='none' stroke-width='2px' fill='none' fill-rule='evenodd' stroke-linecap='square'>
@ -651,34 +651,24 @@ $metrics = [
</main> </main>
<div class="modal-programs" role="dialog" aria-modal="true" aria-label="Программа лагеря"> <div class="modal-programs" role="dialog" aria-modal="true" aria-label="Программа лагеря">
<div class="modal-programs-wrapper"> <div class="modal-programs__card">
<button class="btn-close-modal btn-close-programs" aria-label="Закрыть"><svg role="presentation" <button class="modal-programs__close btn-close-programs" aria-label="Закрыть">
class="t-popup__close-icon t-popup__close-icon_cross" width="23px" height="23px" viewBox="0 0 23 23" <svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M18 6L6 18M6 6l12 12" stroke="#fff" stroke-width="2" stroke-linecap="round"\/><\/svg>
version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> </button>
<g stroke="none" stroke-width="1" fill="#ffffff" fill-rule="evenodd"> <div class="modal-programs__img">
<rect <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3C/svg%3E" alt="">
transform="translate(11.313708, 11.313708) rotate(-45.000000) translate(-11.313708, -11.313708) " </div>
x="10.3137085" y="-3.6862915" width="2" height="30"></rect> <div class="modal-programs__body">
<rect <h3 class="programs__item_title"></h3>
transform="translate(11.313708, 11.313708) rotate(-315.000000) translate(-11.313708, -11.313708) " <p class="programs__item_price"></p>
x="10.3137085" y="-3.6862915" width="2" height="30"></rect> <div class="programs__content"></div>
</g> </div>
</svg>
</button>
<div class="modal-programs__img">
<img src="./img/_.jpg" alt="">
</div> </div>
<div class="modal-programs__content">
<p class="programs__item_title"></p>
<p class="programs__item_price"></p>
<div class="programs__content"></div>
</div>
</div>
</div> </div>
<div class="modal-mentors"> <div class="modal-mentors" role="dialog" aria-modal="true" aria-label="Информация о наставнике">
<div class="modal-mentors-wrapper"> <div class="modal-mentors-wrapper">
<button class="btn-close-mentors"> <button class="btn-close-mentors" aria-label="Закрыть">
<svg role="presentation" class="t-popup__close-icon" width="23px" height="23px" viewBox="0 0 23 23"> <svg role="presentation" class="t-popup__close-icon" width="23px" height="23px" viewBox="0 0 23 23">
<g stroke="none" stroke-width="1" fill="#3bb273" fill-rule="evenodd"> <g stroke="none" stroke-width="1" fill="#3bb273" fill-rule="evenodd">
<rect <rect
@ -691,7 +681,7 @@ $metrics = [
</svg> </svg>
</button> </button>
<div class="modal-programs__img"> <div class="modal-programs__img">
<img src="./img/_.jpg" alt=""> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3C/svg%3E" alt="">
</div> </div>
<div class="modal-mentors__content"> <div class="modal-mentors__content">
<div class="modal-mentors_name"></div> <div class="modal-mentors_name"></div>