Лагерь: Секция 1-3
This commit is contained in:
parent
5a0940db3f
commit
480188c549
@ -903,7 +903,6 @@ p {
|
||||
}
|
||||
|
||||
.btn-close-mentors {
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 100%;
|
||||
@ -2836,6 +2835,19 @@ p {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.hero-cta__note {
|
||||
font-family: Inter, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
margin-top: 18px;
|
||||
max-width: 360px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.btn-write-camp {
|
||||
background-color: #39b7ea;
|
||||
color: #fff;
|
||||
|
||||
@ -68,40 +68,17 @@ document.addEventListener("click", function (event) {
|
||||
}
|
||||
});
|
||||
|
||||
// Scroll animation: fade-up sections
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('visible');
|
||||
}
|
||||
});
|
||||
}, { threshold: 0.15 });
|
||||
|
||||
document.querySelectorAll('.about-us__wrapper, .suggestions__item, .suggestions__subtitle, .suggestions h2').forEach(el => {
|
||||
el.classList.add('fade-up');
|
||||
observer.observe(el);
|
||||
});
|
||||
|
||||
// Stagger for suggestion cards
|
||||
document.querySelectorAll('.suggestions__item').forEach((card, i) => {
|
||||
card.style.transitionDelay = (i * 0.1) + 's';
|
||||
});
|
||||
});
|
||||
|
||||
// Scroll animation: all sections
|
||||
(function() {
|
||||
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
if (prefersReducedMotion) return;
|
||||
|
||||
const animatedSections = [
|
||||
'.hero-media-search__container',
|
||||
'.about-us__wrapper',
|
||||
'.suggestions h2',
|
||||
'.suggestions__subtitle',
|
||||
'.suggestions__item',
|
||||
'.infograph h2',
|
||||
'.infograph .camp_text',
|
||||
'.infograph-wrapper',
|
||||
'.programs h2',
|
||||
'.programs__subtitle',
|
||||
'.programs-wrapper > div',
|
||||
'.mentors h2',
|
||||
'.mentors-wrapper > div',
|
||||
@ -116,7 +93,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
'.contact-wrapper',
|
||||
].join(',');
|
||||
|
||||
const observer2 = new IntersectionObserver((entries) => {
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('visible');
|
||||
@ -126,11 +103,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
document.querySelectorAll(animatedSections).forEach(el => {
|
||||
el.classList.add('fade-up');
|
||||
observer2.observe(el);
|
||||
observer.observe(el);
|
||||
});
|
||||
|
||||
// Stagger for cards
|
||||
document.querySelectorAll('.suggestions__item, .routine__item, .programs-wrapper > div, .mentors-wrapper > div').forEach((card, i) => {
|
||||
document.querySelectorAll('.programs-wrapper > div, .mentors-wrapper > div').forEach((card, i) => {
|
||||
card.style.transitionDelay = (i * 0.08) + 's';
|
||||
});
|
||||
})();
|
||||
|
||||
@ -12,10 +12,32 @@ $priceMin = 1000000;
|
||||
$priceMax = 0;
|
||||
$programs = carbon_get_post_meta($post_id, 'programs' );
|
||||
|
||||
foreach ($programs as $item) {
|
||||
if (is_array($programs)) {
|
||||
foreach ($programs as $item) {
|
||||
$price = (int)$item['programs_price'];
|
||||
if ($price > $priceMax) $priceMax = $price;
|
||||
if ($price < $priceMin) $priceMin = $price;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Banner helper
|
||||
*/
|
||||
function getBanner($nameBanner) {
|
||||
$banner_add_img = wp_get_attachment_url(carbon_get_post_meta( get_the_ID(), 'banner_add_img' . $nameBanner ));
|
||||
if ($banner_add_img == '') return;
|
||||
$banner_add_title = carbon_get_post_meta( get_the_ID(), 'banner_add_title' . $nameBanner );
|
||||
$banner_add_text = carbon_get_post_meta( get_the_ID(), 'banner_add_text' . $nameBanner );
|
||||
$banner_add_text_min = carbon_get_post_meta( get_the_ID(), 'banner_add_text_min' . $nameBanner );
|
||||
echo "<div class='banner banner-add' style='background-image: url($banner_add_img)'>
|
||||
<div class='banner__left-part'>
|
||||
<div class='banner_title'>$banner_add_title</div>
|
||||
<p class='banner_text'>$banner_add_text</p>
|
||||
<button class='banner_btn btn-write-camp'>ЗАБРОНИРОВАТЬ</button>
|
||||
<p class='banner_text-min'>$banner_add_text_min</p>
|
||||
</div>
|
||||
<div class='banner__right-part'></div>
|
||||
</div>";
|
||||
}
|
||||
?>
|
||||
<main class="camp container_camp">
|
||||
@ -74,10 +96,10 @@ $metrics = [
|
||||
|
||||
<!-- CTA (десктоп) -->
|
||||
<div class="hero-cta on-desktop">
|
||||
<p class="hero-cta__text">Записаться на бесплатный пробный день</p>
|
||||
<a href="#camp-form" class="btn-write-camp" aria-label="<?php echo esc_attr( $hero['btn_text'] ); ?>">
|
||||
<?php echo esc_html( $hero['btn_text'] ); ?>
|
||||
<a href="#0" class="btn-write-camp about-us__cta-link" aria-label="<?php echo esc_attr( $hero['btn_text'] ); ?>">
|
||||
<?php echo esc_html( $hero['btn_text'] ); ?> →
|
||||
</a>
|
||||
<p class="hero-cta__note">Один пробный день — за наш счёт. Оцените качество сами, а решение примете после.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -89,12 +111,12 @@ $metrics = [
|
||||
'class' => 'hero-media-search__image',
|
||||
'fetchpriority' => 'high',
|
||||
'loading' => 'eager',
|
||||
'alt' => esc_attr( $hero['h1'] )
|
||||
'alt' => esc_attr( wp_trim_words( $hero['h1'], 10 ) )
|
||||
] ); ?>
|
||||
<?php else : ?>
|
||||
<img class="hero-media-search__image"
|
||||
fetchpriority="high" src="<?php echo get_template_directory_uri(); ?>/assets/images/camp-hero.jpg"
|
||||
alt="<?php echo esc_attr( $hero['h1'] ); ?>" loading="eager">
|
||||
alt="Детский лагерь Декарт" loading="eager">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Декоративные элементы -->
|
||||
@ -113,10 +135,10 @@ $metrics = [
|
||||
</div>
|
||||
|
||||
<div class="hero-cta on-mobile">
|
||||
<p class="hero-cta__text">Записаться на бесплатный пробный день</p>
|
||||
<a href="#camp-form" class="btn-write-camp" aria-label="<?php echo esc_attr( $hero['btn_text'] ); ?>">
|
||||
<?php echo esc_html( $hero['btn_text'] ); ?>
|
||||
<a href="#0" class="btn-write-camp about-us__cta-link" aria-label="<?php echo esc_attr( $hero['btn_text'] ); ?>">
|
||||
<?php echo esc_html( $hero['btn_text'] ); ?> →
|
||||
</a>
|
||||
<p class="hero-cta__note">Один пробный день — за наш счёт. Оцените качество сами, а решение примете после.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -164,7 +186,7 @@ $metrics = [
|
||||
<span class="about-us__badge">⭐ 2500+ мам доверили нам лето</span>
|
||||
</div>
|
||||
<div class="about-us__cta">
|
||||
<a href="#camp-form" class="btn-write-camp about-us__cta-link">Хочу на пробный день →</a>
|
||||
<a href="#0" class="btn-write-camp about-us__cta-link">Хочу на пробный день →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -176,18 +198,20 @@ $metrics = [
|
||||
<h2 class="camp_title">Мамы выбирают Dekart, потому что дети бегут в лагерь без уговоров</h2>
|
||||
<p class="suggestions__subtitle">Они возвращаются <strong>с горящими глазами</strong>. И просятся обратно каждый день.</p>
|
||||
<div class="suggestions-wrapper"> <?php $suggestions = carbon_get_post_meta($post_id, 'suggestions' ); $icons = ['handson-35x35-1.svg', 'steamprojects-35x35-1.svg', 'innovation-white.svg'];
|
||||
if (is_array($suggestions)) {
|
||||
foreach ($suggestions as $index => $item) {
|
||||
$suggestions_title = $item['suggestions_title'];
|
||||
$suggestions_text = $item['suggestions_text'];
|
||||
$icon_file = $icons[$index % count($icons)];
|
||||
?> <div class="suggestions__item" data-delay="<?php echo $index * 100; ?>">
|
||||
?> <div class="suggestions__item">
|
||||
<div class="suggestions__icon-wrap">
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/doodles/galileo/<?php echo $icon_file; ?>"
|
||||
alt="" class="suggestions__icon" loading="lazy">
|
||||
alt="" class="suggestions__icon">
|
||||
</div>
|
||||
<h3 class="suggestions__item_title"><?php echo esc_html( $suggestions_title ); ?></h3>
|
||||
<p class="suggestions__item_text"><?php echo esc_html( $suggestions_text ); ?></p>
|
||||
</div> <?php } ?> </div>
|
||||
</div> <?php }
|
||||
} ?> </div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="infograph">
|
||||
@ -225,6 +249,7 @@ $metrics = [
|
||||
<div class="programs-wrapper">
|
||||
<?php
|
||||
$programs = carbon_get_post_meta($post_id, 'programs' );
|
||||
if (is_array($programs)) {
|
||||
foreach ($programs as $item) {
|
||||
$programs_img = $item['programs_img'];
|
||||
$programs_title = $item['programs_title'];
|
||||
@ -234,15 +259,16 @@ $metrics = [
|
||||
$programs_days = $item['programs_days'];
|
||||
$programs_content = $item['programs_content'];?>
|
||||
<div class="programs__item">
|
||||
<img class="programs__item_img" loading="lazy" class="suggestions__item_img" width="360" height="350" src="<?php echo wp_get_attachment_url($programs_img); ?>" alt="<?php echo get_post_meta( $programs_img, '_wp_attachment_image_alt', true ); ?>">
|
||||
<p class="programs__item_title"><?php echo $programs_title; ?></p>
|
||||
<p class="programs__item_date"><?php echo $programs_date; ?></p>
|
||||
<p class="programs__item_text"><?php echo $programs_text; ?></p>
|
||||
<p class="programs__item_price">от <?php echo number_format((int)$programs_price, 0, ',', ' '); ?> ₽ / <?php echo $programs_days; ?></p>
|
||||
<div class="programs_content" style="display: none;"><?php echo $programs_content; ?></div>
|
||||
<img class="programs__item_img" loading="lazy" width="360" height="350" src="<?php echo wp_get_attachment_url($programs_img); ?>" alt="<?php echo get_post_meta( $programs_img, '_wp_attachment_image_alt', true ); ?>">
|
||||
<p class="programs__item_title"><?php echo esc_html($programs_title); ?></p>
|
||||
<p class="programs__item_date"><?php echo esc_html($programs_date); ?></p>
|
||||
<p class="programs__item_text"><?php echo esc_html($programs_text); ?></p>
|
||||
<p class="programs__item_price">от <?php echo number_format((int)$programs_price, 0, ',', ' '); ?> ₽ / <?php echo esc_html($programs_days); ?></p>
|
||||
<div class="programs_content" style="display: none;"><?php echo wp_kses_post($programs_content); ?></div>
|
||||
<button class="btn-details btn-program">Подробнее</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -325,6 +351,7 @@ $metrics = [
|
||||
<div class="mentors-wrapper">
|
||||
<?php
|
||||
$mentors = carbon_get_post_meta($post_id, 'mentors' );
|
||||
if (is_array($mentors)) {
|
||||
foreach ($mentors as $item) {
|
||||
$mentor = $item['mentor'];
|
||||
$mentorName = get_the_title($mentor[0]['id']);
|
||||
@ -332,17 +359,19 @@ $metrics = [
|
||||
$mentor_directions = $item['mentor_directions'];
|
||||
$HTMLdirection = "";
|
||||
$post_url = get_permalink($mentor[0]['id']);
|
||||
foreach ($mentor_directions as $direction) {$HTMLdirection .= "<span>" . $direction['direction_name']."</span>";}
|
||||
if (is_array($mentor_directions)) {
|
||||
foreach ($mentor_directions as $direction) {$HTMLdirection .= "<span>" . esc_html($direction['direction_name'])."</span>";}
|
||||
}
|
||||
$teacher_foto = carbon_get_post_meta($mentor[0]['id'] , 'teacher_avatar');
|
||||
?>
|
||||
<div class="mentors__item">
|
||||
<?php if ( $teacher_foto == '' ) { ?>
|
||||
<img class="mentors__item_img" loading="lazy" class="suggestions__item_img" width="260" height="270" src="<?php echo get_template_directory_uri(); ?>/assets/images/no-photo.png" alt="">
|
||||
<img class="mentors__item_img" loading="lazy" width="260" height="270" src="<?php echo get_template_directory_uri(); ?>/assets/images/no-photo.png" alt="">
|
||||
<?php } else { ?>
|
||||
<img class="mentors__item_img" loading="lazy" class="suggestions__item_img" width="260" height="270" src="<?php echo wp_get_attachment_url($teacher_foto); ?>" alt="<?php echo get_post_meta( $teacher_foto, '_wp_attachment_image_alt', true ); ?>">
|
||||
<img class="mentors__item_img" loading="lazy" width="260" height="270" src="<?php echo wp_get_attachment_url($teacher_foto); ?>" alt="<?php echo get_post_meta( $teacher_foto, '_wp_attachment_image_alt', true ); ?>">
|
||||
<?php } ?>
|
||||
<a href="<?php echo $post_url; ?>" class="mentors__item_name"><?php echo $mentorName; ?></a>
|
||||
<a href="<?php echo $post_url; ?>" class="mentors__item_text"><?php echo $mentor_job; ?></a>
|
||||
<a href="<?php echo esc_url($post_url); ?>" class="mentors__item_name"><?php echo esc_html($mentorName); ?></a>
|
||||
<a href="<?php echo esc_url($post_url); ?>" class="mentors__item_text"><?php echo esc_html($mentor_job); ?></a>
|
||||
<button class="btn-details btn-mentors">Подробнее</button>
|
||||
<div class="mentor-modal-content" style="display: none;">
|
||||
<?php
|
||||
@ -352,12 +381,13 @@ $metrics = [
|
||||
$mentor_add_experience = carbon_get_post_meta($mentor[0]['id'] , 'teacher_add_education');
|
||||
?>
|
||||
<div class="HTMLdirection"><?php echo $HTMLdirection; ?></div>
|
||||
<div class="mentor_education"><?php echo $mentor_education; ?></div>
|
||||
<div class="mentor_experience"><?php echo $mentor_experience; ?></div>
|
||||
<div class="mentor_add_experience"><?php echo $mentor_add_experience; ?></div>
|
||||
<div class="mentor_education"><?php echo esc_html($mentor_education); ?></div>
|
||||
<div class="mentor_experience"><?php echo esc_html($mentor_experience); ?></div>
|
||||
<div class="mentor_add_experience"><?php echo esc_html($mentor_add_experience); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
@ -367,21 +397,23 @@ $metrics = [
|
||||
<div class="routine-wrapper">
|
||||
<?php
|
||||
$routine = carbon_get_post_meta($post_id, 'routine' );
|
||||
if (is_array($routine)) {
|
||||
foreach ($routine as $item) {
|
||||
$routine_time = $item['routine_time'];
|
||||
$routine_title = $item['routine_title'];
|
||||
$routine_text = $item['routine_text'];
|
||||
?>
|
||||
<div class="routine__item">
|
||||
<div class="routine__item_time"><?php echo $routine_time; ?></div>
|
||||
<div class="routine__item_time"><?php echo esc_html($routine_time); ?></div>
|
||||
<div class="routine__item_circle"></div>
|
||||
<div class="routine__item_text">
|
||||
<p class="routine__item_time-mobile"><?php echo $routine_time; ?></p>
|
||||
<p class="routine__item_text-title"><?php echo $routine_title; ?></p>
|
||||
<p class="routine__item_text-text"><?php echo $routine_text; ?></p>
|
||||
<p class="routine__item_time-mobile"><?php echo esc_html($routine_time); ?></p>
|
||||
<p class="routine__item_text-title"><?php echo esc_html($routine_title); ?></p>
|
||||
<p class="routine__item_text-text"><?php echo esc_html($routine_text); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -393,12 +425,14 @@ $metrics = [
|
||||
$fotos_content = carbon_get_post_meta($post_id, 'fotos_content' );
|
||||
$fotos_link_vk = carbon_get_post_meta($post_id, 'fotos_link_vk' );
|
||||
$HTMLimgs = "";
|
||||
if (is_array($fotos)) {
|
||||
foreach ($fotos as $item) {
|
||||
$img = wp_get_attachment_url($item['foto']);
|
||||
$alt = get_post_meta( $item['foto'], '_wp_attachment_image_alt', true );
|
||||
$HTMLimgs .= "<div class='swiper-slide'>
|
||||
<img loading='lazy' src='$img' alt='$alt' width='560' height='420'>
|
||||
</div>";
|
||||
}
|
||||
} ?>
|
||||
<div class="foto-left-part">
|
||||
<div class="swiper-container camp-swiper-foto">
|
||||
@ -414,21 +448,8 @@ $metrics = [
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="foto-content"><?php echo $fotos_content; ?></div>
|
||||
<div class="foto-content"><?php echo esc_html($fotos_content); ?></div>
|
||||
</div>
|
||||
<!-- БАННЕР ССЫЛКИ НА ВК ЛАГЕРЯ
|
||||
<div class="foto-banner">
|
||||
<div class="foto-banner_text">Больше фотографий смотрите <span> <svg width="53" height="53"
|
||||
viewBox="0 0 53 53" fill="none">
|
||||
<path
|
||||
d="M50 4.90116V46.6469C50 47.1511 49.7997 47.6347 49.4431 47.9912C49.0866 48.3478 48.603 48.5481 48.0988 48.5481C47.5945 48.5481 47.1109 48.3478 46.7544 47.9912C46.3978 47.6347 46.1975 47.1511 46.1975 46.6469V9.49057L6.22205 49.4663C5.86347 49.8126 5.38322 50.0043 4.88472 49.9999C4.38622 49.9956 3.90936 49.7956 3.55686 49.4432C3.20435 49.0907 3.0044 48.6138 3.00007 48.1153C2.99574 47.6169 3.18737 47.1366 3.5337 46.7781L43.5092 6.80233H6.35324C5.849 6.80233 5.36541 6.60203 5.00886 6.24549C4.65231 5.88895 4.452 5.40538 4.452 4.90116C4.452 4.39694 4.65231 3.91338 5.00886 3.55684C5.36541 3.2003 5.849 3 6.35324 3H48.0988C48.3481 3.00119 48.5947 3.05091 48.825 3.14639C49.1724 3.28997 49.4694 3.53331 49.6786 3.84564C49.8877 4.15797 49.9996 4.52529 50 4.90116Z"
|
||||
fill="white" stroke="white" stroke-width="6" />
|
||||
</svg></span><br> в нашем сообществе ВК
|
||||
|
||||
</div>
|
||||
<a href="<?php echo $fotos_link_vk; ?>">Открыть альбом</a>
|
||||
</div>
|
||||
КОНЕЦ БАННЕРА -->
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@ -449,7 +470,6 @@ $metrics = [
|
||||
<div class='swiper reviews-owl'>
|
||||
<div class='swiper-wrapper'>
|
||||
<?php
|
||||
// получим все отзывы текущего преподавателя
|
||||
$args = array(
|
||||
'posts_per_page' => -1,
|
||||
'post_type' => 'reviews',
|
||||
@ -462,16 +482,16 @@ $metrics = [
|
||||
if ($the_query->have_posts()) :
|
||||
while ($the_query->have_posts()) : $the_query->the_post();
|
||||
|
||||
$post_id = get_the_ID();
|
||||
$review_id = get_the_ID();
|
||||
|
||||
$review_date = get_the_date( 'd.m.Y');
|
||||
$review_level = carbon_get_post_meta( $post_id, 'review_level' );
|
||||
$review_level = carbon_get_post_meta( $review_id, 'review_level' );
|
||||
|
||||
$avatar = carbon_get_post_meta( $post_id, 'review_avatar' );
|
||||
$avatar = carbon_get_post_meta( $review_id, 'review_avatar' );
|
||||
|
||||
$stars = carbon_get_post_meta( $post_id, 'review_star' );
|
||||
$tekst_otzyva = carbon_get_post_meta( $post_id, 'review_text' );
|
||||
$prepodavatel = carbon_get_post_meta( $post_id, 'review_teacher' );
|
||||
$stars = carbon_get_post_meta( $review_id, 'review_star' );
|
||||
$tekst_otzyva = carbon_get_post_meta( $review_id, 'review_text' );
|
||||
$prepodavatel = carbon_get_post_meta( $review_id, 'review_teacher' );
|
||||
|
||||
$add_class= "more";
|
||||
|
||||
@ -481,14 +501,14 @@ $metrics = [
|
||||
<div class="swiper-slide reviews__item">
|
||||
<div class="reviews__item-wrapper">
|
||||
<div class="reviews__item-client">
|
||||
<div class="reviews__item-client_avatar" style="background: <?php echo rand_color(); ?>">
|
||||
<div class="reviews__item-client_avatar" style="background: <?php echo esc_attr(rand_color()); ?>">
|
||||
<?php if ($avatar) : ?>
|
||||
<img loading="lazy" width="57" height="57" class="reviews__item-client_avatar-img" src="<?php echo wp_get_attachment_url($avatar); ?>" alt="<?php echo get_post_meta( $avatar, '_wp_attachment_image_alt', true ); ?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="reviews__item-client_data">
|
||||
<div class="reviews__item-client_name"><?php the_title(); ?></div>
|
||||
<div class="reviews__item-client_lavel" ><?php echo $review_level; ?></div>
|
||||
<div class="reviews__item-client_lavel" ><?php echo esc_html($review_level); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reviews__item-client_stars">
|
||||
@ -499,10 +519,10 @@ $metrics = [
|
||||
<path d="M9.58463 1.50884C9.89101 0.602477 11.1729 0.602476 11.4793 1.50884L13.1158 6.35007C13.2531 6.75637 13.6343 7.02985 14.0631 7.02985H19.2721C20.2504 7.02985 20.6467 8.28958 19.8447 8.84971L15.6995 11.7446C15.335 11.9991 15.1823 12.4636 15.3247 12.8847L16.9239 17.6158C17.233 18.5302 16.1954 19.3085 15.404 18.7559L11.1045 15.7533C10.7606 15.5131 10.3033 15.5131 9.95941 15.7533L5.65991 18.7559C4.86857 19.3085 3.83092 18.5302 4.14001 17.6158L5.73926 12.8847C5.8816 12.4636 5.72891 11.9991 5.36448 11.7446L1.21924 8.84971C0.417196 8.28958 0.813532 7.02985 1.79181 7.02985H7.00081C7.42969 7.02985 7.81081 6.75637 7.94815 6.35007L9.58463 1.50884Z" fill="#FFD43E" />
|
||||
</svg>
|
||||
<?php } ?>
|
||||
<span><?php echo $review_date; ?></span>
|
||||
<span><?php echo esc_html($review_date); ?></span>
|
||||
</div>
|
||||
<div class="reviews__item-client_text <?php echo $add_class; ?>">
|
||||
<?php echo $tekst_otzyva; ?>
|
||||
<div class="reviews__item-client_text <?php echo esc_attr($add_class); ?>">
|
||||
<?php echo wp_kses_post($tekst_otzyva); ?>
|
||||
<button class="btn-more"><span onclick='this.parentNode.parentNode.classList.remove("more")'>... Читать еще</span></button>
|
||||
</div>
|
||||
</div>
|
||||
@ -516,7 +536,7 @@ $metrics = [
|
||||
</div>
|
||||
<div class='custom-button-next reviews-owl-next'></div>
|
||||
<div class='custom-button-prev reviews-owl-prev'></div>
|
||||
<?php wp_reset_postdata(); // Сброс глобального состояния ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -529,48 +549,38 @@ $metrics = [
|
||||
<?php
|
||||
$post_id = get_the_ID();
|
||||
$questions = carbon_get_post_meta($post_id, 'questions' );
|
||||
$HTMcol1 = '';
|
||||
$HTMcol2 = '';
|
||||
|
||||
$count = 0;
|
||||
if (is_array($questions)) {
|
||||
foreach ($questions as $item) {
|
||||
$questions_question = $item['questions_question'];
|
||||
$questions_answer = $item['questions_answer'];
|
||||
$accordion_item = "<div class='box__accordion'>
|
||||
<div class='box__accordion_label' itemscope itemprop='mainEntity' itemtype='https://schema.org/Question'>
|
||||
<span itemprop='name'>" . esc_html($questions_question) . "</span>
|
||||
<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 transform='translate(1.000000, 1.000000)' stroke='#3bb273'>
|
||||
<path d='M0,11 L22,11'></path>
|
||||
<path d='M11,0 L11,22'></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class='box__accordion_content' itemscope itemprop='acceptedAnswer' itemtype='https://schema.org/Answer'>
|
||||
<div class='box__accordion_content-text' itemprop='text'>" . wp_kses_post($questions_answer) . "</div>
|
||||
</div>
|
||||
</div>";
|
||||
if ($count % 2 === 0) {
|
||||
$HTMcol1 .= "<div class='box__accordion'>
|
||||
<div class='box__accordion_label' itemscope itemprop='mainEntity' itemtype='https://schema.org/Question'>
|
||||
<span itemprop='name'>$questions_question</span>
|
||||
<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 transform='translate(1.000000, 1.000000)' stroke='#3bb273'>
|
||||
<path d='M0,11 L22,11'></path>
|
||||
<path d='M11,0 L11,22'></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class='box__accordion_content' itemscope itemprop='acceptedAnswer' itemtype='https://schema.org/Answer'>
|
||||
<div class='box__accordion_content-text' itemprop='text'>$questions_answer</div>
|
||||
</div>
|
||||
</div>";
|
||||
$HTMcol1 .= $accordion_item;
|
||||
} else {
|
||||
$HTMcol2 .= "<div class='box__accordion'>
|
||||
<div class='box__accordion_label' itemscope itemprop='mainEntity' itemtype='https://schema.org/Question'>
|
||||
<span itemprop='name'>$questions_question</span>
|
||||
<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 transform='translate(1.000000, 1.000000)' stroke='#3bb273'>
|
||||
<path d='M0,11 L22,11'></path>
|
||||
<path d='M11,0 L11,22'></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class='box__accordion_content' itemscope itemprop='acceptedAnswer' itemtype='https://schema.org/Answer'>
|
||||
<div class='box__accordion_content-text' itemprop='text'>$questions_answer</div>
|
||||
</div>
|
||||
</div>";
|
||||
$HTMcol2 .= $accordion_item;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
echo "<div class='accordion'>$HTMcol1</div>";
|
||||
echo "<div class='accordion accordion-last'>$HTMcol2</div>";
|
||||
?>
|
||||
@ -589,29 +599,29 @@ $metrics = [
|
||||
<div class="contact-wrapper">
|
||||
<div class="contact-content">
|
||||
<div class="contact_subtitle">Телефон:</div>
|
||||
<a class="contact_tel" href="tel:+<?php echo preg_replace('/[^0-9]/', '', $contact_tel); ?>" target="_blank"><?php echo $contact_tel ;?></a>
|
||||
<a class="contact_tel" href="tel:+<?php echo preg_replace('/[^0-9]/', '', $contact_tel); ?>" target="_blank"><?php echo esc_html($contact_tel); ?></a>
|
||||
<div class="contact_subtitle">Почта:</div>
|
||||
<a class="contact_tel" href="mailto:<?php echo $contact_mail ;?>" target="_blank"><?php echo $contact_mail ;?></a>
|
||||
<a class="contact_tel" href="mailto:<?php echo esc_attr($contact_mail); ?>" target="_blank"><?php echo esc_html($contact_mail); ?></a>
|
||||
<div class="contact_subtitle">Адрес:</div>
|
||||
<div class="contact_tel"><?php echo $contact_address ;?></div>
|
||||
<div class="contact_tel"><?php echo esc_html($contact_address); ?></div>
|
||||
<div class="contact_subtitle">Наши соцсети:</div>
|
||||
<div class="contact_social">
|
||||
<?php
|
||||
$social_media = carbon_get_post_meta( $post_id, 'social_media' );
|
||||
|
||||
if (is_array($social_media)) {
|
||||
foreach( $social_media as $item ) {
|
||||
$icon = $item['social_media_img'];
|
||||
if ($item['social_media_link'] != '') { ?>
|
||||
<a class="social_item" href="<?php echo $item['social_media_link']; ?>" title="<?php echo $item['social_media_name']; ?>">
|
||||
<a class="social_item" href="<?php echo esc_url($item['social_media_link']); ?>" title="<?php echo esc_attr($item['social_media_name']); ?>">
|
||||
<img loading="lazy" width="32" height="32" src="<?php echo wp_get_attachment_url($icon); ?>" alt="">
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contact-map">
|
||||
<div id="ya-map" style="width: 100%; height: 625px;"></div>
|
||||
<!--<iframe src="https://yandex.ru/map-widget/v1/?mode=search&text=<?php echo $contact_address; ?>" width="100%" height="400" frameborder="1" style="position:relative;"></iframe>-->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -723,24 +733,7 @@ $metrics = [
|
||||
<?php echo carbon_get_post_meta($post_id, 'camp_bitrix_script' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
function getBanner($nameBanner) {
|
||||
$banner_add_img = wp_get_attachment_url(carbon_get_post_meta( get_the_ID(), 'banner_add_img' . $nameBanner ));
|
||||
if ($banner_add_img == '') return;
|
||||
$banner_add_title = carbon_get_post_meta( get_the_ID(), 'banner_add_title' . $nameBanner );
|
||||
$banner_add_text = carbon_get_post_meta( get_the_ID(), 'banner_add_text' . $nameBanner );
|
||||
$banner_add_text_min = carbon_get_post_meta( get_the_ID(), 'banner_add_text_min' . $nameBanner );
|
||||
echo "<div class='banner banner-add' style='background-image: url($banner_add_img)'>
|
||||
<div class='banner__left-part'>
|
||||
<div class='banner_title'>$banner_add_title</div>
|
||||
<p class='banner_text'>$banner_add_text</p>
|
||||
<button class='banner_btn btn-write-camp'>ЗАБРОНИРОВАТЬ</button>
|
||||
<p class='banner_text-min'>$banner_add_text_min</p>
|
||||
</div>
|
||||
<div class='banner__right-part'></div>
|
||||
</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var mapLoaded = false;
|
||||
@ -756,16 +749,17 @@ function getBanner($nameBanner) {
|
||||
script.src = "https://api-maps.yandex.ru/2.1/?lang=ru_RU";
|
||||
script.onload = function() {
|
||||
ymaps.ready(function() {
|
||||
var coords = <?php echo $contact_location ? '[' . esc_js($contact_location) . ']' : '[55.76, 37.64]'; ?>;
|
||||
var map = new ymaps.Map("ya-map", {
|
||||
center: [<?php echo $contact_location; ?>],
|
||||
center: coords,
|
||||
zoom: 16
|
||||
}, {
|
||||
searchControlProvider: "yandex#search"
|
||||
});
|
||||
|
||||
var placemark = new ymaps.Placemark(
|
||||
[<?php echo $contact_location; ?>],
|
||||
{ iconContent: "<?php echo $contact_location_text; ?>" },
|
||||
coords,
|
||||
{ iconContent: "<?php echo esc_js($contact_location_text); ?>" },
|
||||
{ preset: "islands#redStretchyIcon" }
|
||||
);
|
||||
map.geoObjects.add(placemark);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user