2026-08-07 11:52:31 +00:00

57 lines
3.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// ─── Персональный план (CF block_text_1 + school_plan_*) ───
if (! defined('ABSPATH')) {
exit;
}
$post_id = get_the_ID();
$plan_title = crb_get_post_meta($post_id, 'school_plan_title', 'Персональный план развития для каждого ученика');
$plan_text = crb_get_post_meta($post_id, 'block_text_1');
$plan_benefits = crb_get_post_meta($post_id, 'school_plan_benefits');
if (empty($plan_benefits) || ! is_array($plan_benefits)) {
$plan_benefits = [
[ 'text' => 'Учитель знает каждого ученика по имени' ],
[ 'text' => 'Программы «Перспектива» и методика Занкова' ],
[ 'text' => 'Английский язык с первого класса' ],
];
}
$plan_badge_num = crb_get_post_meta($post_id, 'school_plan_badge_num', 'до 15');
$plan_badge_label = crb_get_post_meta($post_id, 'school_plan_badge_label', 'учеников в классе');
?>
<section class="school-plan section-bg reveal" data-bg="plan" id="personal-plan" aria-label="Персональный план развития">
<div class="container">
<div class="school-plan__inner">
<div class="school-plan__content">
<h2 class="bento-h2"><?php echo esc_html($plan_title); ?></h2>
<div class="school-plan__text">
<?php echo wp_kses_post($plan_text); ?>
</div>
<div class="school-plan__benefits">
<?php foreach ($plan_benefits as $pb) :
$pb_text = $pb['text'] ?? '';
if (! $pb_text) {
continue;
}
?>
<div class="school-plan__benefit">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#2563EB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="M22 4 12 14.01l-3-3"/></svg>
<span><?php echo esc_html($pb_text); ?></span>
</div>
<?php endforeach; ?>
</div>
<button class="school-plan__cta btn-write btn-primary open-bitrix-form" data-track="plan-cta">
<?php echo esc_html(crb_get_post_meta($post_id, 'school_cta_label', 'Записаться на экскурсию')); ?>
</button>
</div>
<div class="school-plan__media">
<div class="school-plan__photo">
<img loading="lazy" width="600" height="420" src="<?php echo get_template_directory_uri(); ?>/assets/images/school-plan.svg" alt="Персональный план развития ученика начальной школы Декарт — ребёнок с книгой и график роста успеваемости">
</div>
<div class="school-plan__badge">
<span class="school-plan__badge-num"><?php echo esc_html($plan_badge_num); ?></span>
<span class="school-plan__badge-label"><?php echo esc_html($plan_badge_label); ?></span>
</div>
</div>
</div>
</div>
</section>