shkola/wp-content/themes/dekart/template-parts/pksh/compare.php
2026-07-15 21:45:22 +00:00

128 lines
5.4 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
/**
* Таблица сравнения: Декарт vs Репетитор vs Кружок
* .bento .pksh-section
*
* @package Dekart
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$data = Pksh_Data::instance();
$compare_rows = $data->get_compare_rows();
$compare_footnote = $data->get_compare_footnote();
?>
<section class="bento pksh-section" aria-label="Сравнение">
<div class="bento__full section-header--left">
<span class="bento-label">Почему мы</span>
<h2 class="bento-h2">Как мы отличаемся от репетитора и обычного кружка</h2>
<p class="bento-p">Мы — частная школа с гослицензией, а не кружок. Занятия ведут действующие учителя начальных классов. Результат гарантируем договором.</p>
</div>
<div class="pksh-swipe-hint" aria-hidden="true">
<span class="pksh-swipe-hint__arrow">👇</span>
<span class="pksh-swipe-hint__text">Листайте, чтобы сравнить</span>
</div>
<div class="lw-scroll-x pksh-compare">
<table class="pksh-compare__table">
<thead>
<tr>
<th class="pksh-compare__label-cell" scope="col">Критерий</th>
<th class="pksh-compare__highlight" scope="col">
<span class="pksh-compare__col-title">Декарт</span>
<span class="pksh-compare__col-badge">Частная школа</span>
</th>
<th scope="col">Репетитор</th>
<th scope="col">Обычный кружок</th>
</tr>
</thead>
<tbody>
<?php if ( is_array( $compare_rows ) && ! empty( $compare_rows ) ) : ?>
<?php foreach ( $compare_rows as $row ) :
$criteria = $row['criteria'] ?? '';
$dekart_icon = $row['dekart_icon'] ?? '';
$dekart_text = $row['dekart_text'] ?? '';
$repetitor_icon = $row['repetitor_icon'] ?? '';
$repetitor_text = $row['repetitor_text'] ?? '';
$kruzhok_icon = $row['kruzhok_icon'] ?? '';
$kruzhok_text = $row['kruzhok_text'] ?? '';
?>
<tr>
<td class="pksh-compare__label-cell"><?php echo esc_html( $criteria ); ?></td>
<td class="pksh-compare__highlight">
<?php if ( 'yes' === $dekart_icon ) : ?>
<span class="pksh-compare__yes">✓</span>
<?php elseif ( 'no' === $dekart_icon ) : ?>
<span class="pksh-compare__no">✗</span>
<?php endif; ?>
<?php echo esc_html( $dekart_text ); ?>
</td>
<td>
<?php if ( 'yes' === $repetitor_icon ) : ?>
<span class="pksh-compare__yes">✓</span>
<?php elseif ( 'no' === $repetitor_icon ) : ?>
<span class="pksh-compare__no">✗</span>
<?php endif; ?>
<?php echo esc_html( $repetitor_text ); ?>
</td>
<td>
<?php if ( 'yes' === $kruzhok_icon ) : ?>
<span class="pksh-compare__yes">✓</span>
<?php elseif ( 'no' === $kruzhok_icon ) : ?>
<span class="pksh-compare__no">✗</span>
<?php endif; ?>
<?php echo esc_html( $kruzhok_text ); ?>
</td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<!-- Fallback: пока CF не заполнены -->
<tr>
<td class="pksh-compare__label-cell">Гослицензия</td>
<td class="pksh-compare__highlight"><span class="pksh-compare__yes">✓</span> Есть</td>
<td><span class="pksh-compare__no">✗</span> Нет</td>
<td><span class="pksh-compare__no">✗</span> Чаще нет</td>
</tr>
<tr>
<td class="pksh-compare__label-cell">Формат занятий</td>
<td class="pksh-compare__highlight">Группы до 10 человек, индивидуальный подход</td>
<td>Индивидуально, но без сверстников</td>
<td>Группы 1520+ человек</td>
</tr>
<tr>
<td class="pksh-compare__label-cell">Гарантия результата</td>
<td class="pksh-compare__highlight"><span class="pksh-compare__yes">✓</span> Не начнёт читать — вернём деньги</td>
<td><span class="pksh-compare__no">✗</span> Нет гарантии</td>
<td><span class="pksh-compare__no">✗</span> Нет гарантии</td>
</tr>
<tr>
<td class="pksh-compare__label-cell">Цена за 1 занятие</td>
<td class="pksh-compare__highlight">от 1 000 ₽</td>
<td>1 5002 500 ₽</td>
<td>8001 200 ₽</td>
</tr>
<tr>
<td class="pksh-compare__label-cell">Педагоги</td>
<td class="pksh-compare__highlight">Действующие учителя начальных классов</td>
<td>Часто студенты или пенсионеры</td>
<td>Педагоги доп. образования</td>
</tr>
<tr>
<td class="pksh-compare__label-cell">Итоговый документ</td>
<td class="pksh-compare__highlight"><span class="pksh-compare__yes">✓</span> Характеристика готовности к школе</td>
<td><span class="pksh-compare__no">✗</span> Нет</td>
<td><span class="pksh-compare__no">✗</span> Нет</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php if ( ! empty( $compare_footnote ) ) : ?>
<p class="pksh-compare__footnote"><?php echo wp_kses_post( $compare_footnote ); ?></p>
<?php endif; ?>
</div>
</section>