Global-2026-07-12
This commit is contained in:
parent
2826a8591d
commit
b1d601ac78
@ -114,10 +114,6 @@ background: rgba(124, 58, 237, 0.2);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bento-p--light {
|
||||
color: rgba(255,255,255,0.65);
|
||||
}
|
||||
|
||||
.bento-p {
|
||||
font-size: 1rem;
|
||||
line-height: 1.65;
|
||||
@ -125,6 +121,10 @@ background: rgba(124, 58, 237, 0.2);
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
.bento-p--light {
|
||||
color: rgba(255,255,255,0.65);
|
||||
}
|
||||
|
||||
/* ── Centered section header (replaces inline style="text-align:center" on bento__full) ── */
|
||||
.section-header--centered {
|
||||
text-align: center;
|
||||
@ -2715,40 +2715,40 @@ background: rgba(124, 58, 237, 0.2);
|
||||
/* ── Honest Timer ── */
|
||||
.honest-timer {
|
||||
text-align: center;
|
||||
margin: 20px 0 12px;
|
||||
margin: 24px 0 16px;
|
||||
}
|
||||
|
||||
.honest-timer__label {
|
||||
display: block;
|
||||
font-size: 0.875rem;
|
||||
color: var(--slate-500, #64748B);
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.honest-timer__digits {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.honest-timer__unit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.honest-timer__num {
|
||||
display: block;
|
||||
min-width: 52px;
|
||||
padding: 6px 8px;
|
||||
min-width: 60px;
|
||||
padding: 10px 14px;
|
||||
background: linear-gradient(135deg, #1E1B4B, #312E81);
|
||||
color: #fff;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
border-radius: 10px;
|
||||
border-radius: 12px;
|
||||
line-height: 1.2;
|
||||
text-align: center;
|
||||
}
|
||||
@ -2764,14 +2764,17 @@ background: rgba(124, 58, 237, 0.2);
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: var(--slate-300, #CBD5E1);
|
||||
margin-bottom: 18px;
|
||||
align-self: center;
|
||||
line-height: 1;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.honest-timer__num {
|
||||
min-width: 40px;
|
||||
min-width: 44px;
|
||||
font-size: 1.25rem;
|
||||
padding: 4px 6px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.honest-timer__sep {
|
||||
font-size: 1.25rem;
|
||||
@ -2784,12 +2787,19 @@ background: rgba(124, 58, 237, 0.2);
|
||||
═══════════════════════════════════════════════════════════ */
|
||||
|
||||
.pksh-compare {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding-bottom: 16px;
|
||||
margin-top: -16px;
|
||||
}
|
||||
|
||||
/* Fix: stretch full width in CSS Grid (bento = 12-col grid) */
|
||||
.bento[aria-label="Сравнение"] .pksh-compare {
|
||||
grid-column: 1 / -1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pksh-compare::-webkit-scrollbar { height: 6px; }
|
||||
.pksh-compare::-webkit-scrollbar-thumb {
|
||||
background: var(--accent, #7C3AED);
|
||||
|
||||
@ -686,6 +686,58 @@ function add_carbon() {
|
||||
->set_default_value( 'Осталось 3 места в группе' ),
|
||||
))
|
||||
// ====================================================
|
||||
// Вкладка: Сравнение (Как мы отличаемся)
|
||||
// ====================================================
|
||||
->add_tab('📊 Как мы отличаемся', array(
|
||||
Field::make( 'html', 'pksh_compare_tab_desc', '' )
|
||||
->set_html( '<p style="color: #64748b; font-size: 13px; margin: 0 0 12px;">Секция: <strong>.pksh-compare</strong>. Таблица сравнения Декарт vs Репетитор vs Кружок. Каждая строка — отдельная запись. Порядок = порядок вывода.</p>' ),
|
||||
Field::make( 'complex', 'pksh_compare_rows', 'Строки таблицы' )
|
||||
->set_layout( 'tabbed-horizontal' )
|
||||
->set_help_text( 'Добавьте строки сравнения. Для каждой строки: критерий, текст для трёх колонок, иконка ✓/✗ для каждой колонки.' )
|
||||
->add_fields( array(
|
||||
Field::make( 'text', 'criteria', 'Критерий' )
|
||||
->set_width( 100 )
|
||||
->set_help_text( 'Название строки, например: «Гослицензия»' ),
|
||||
Field::make( 'html', 'pksh_compare_dekart_header', '' )
|
||||
->set_html( '<hr style="margin: 12px 0; border: none; border-top: 1px solid #e2e8f0;"><h4 style="margin: 4px 0; color: #7C3AED;">🔸 Декарт</h4>' ),
|
||||
Field::make( 'select', 'dekart_icon', 'Иконка' )
|
||||
->set_width( 20 )
|
||||
->set_options( array(
|
||||
'' => '— нет —',
|
||||
'yes' => '✓ (да)',
|
||||
'no' => '✗ (нет)',
|
||||
) ),
|
||||
Field::make( 'textarea', 'dekart_text', 'Текст' )
|
||||
->set_width( 80 )
|
||||
->set_help_text( 'Например: «Есть»' ),
|
||||
Field::make( 'html', 'pksh_compare_repetitor_header', '' )
|
||||
->set_html( '<h4 style="margin: 8px 0 4px;">🔸 Репетитор</h4>' ),
|
||||
Field::make( 'select', 'repetitor_icon', 'Иконка' )
|
||||
->set_width( 20 )
|
||||
->set_options( array(
|
||||
'' => '— нет —',
|
||||
'yes' => '✓ (да)',
|
||||
'no' => '✗ (нет)',
|
||||
) ),
|
||||
Field::make( 'textarea', 'repetitor_text', 'Текст' )
|
||||
->set_width( 80 ),
|
||||
Field::make( 'html', 'pksh_compare_kruzhok_header', '' )
|
||||
->set_html( '<h4 style="margin: 8px 0 4px;">🔸 Обычный кружок</h4>' ),
|
||||
Field::make( 'select', 'kruzhok_icon', 'Иконка' )
|
||||
->set_width( 20 )
|
||||
->set_options( array(
|
||||
'' => '— нет —',
|
||||
'yes' => '✓ (да)',
|
||||
'no' => '✗ (нет)',
|
||||
) ),
|
||||
Field::make( 'textarea', 'kruzhok_text', 'Текст' )
|
||||
->set_width( 80 ),
|
||||
)),
|
||||
Field::make( 'textarea', 'pksh_compare_footnote', 'Сноска под таблицей' )
|
||||
->set_help_text( 'Текст под таблицей. Можно использовать HTML.' )
|
||||
->set_default_value( '<strong>Важно:</strong> Данные по репетиторам и кружкам — рыночная оценка по городу и требует уточнения.' ),
|
||||
))
|
||||
// ====================================================
|
||||
// Вкладка: JSON-LD Schema (данные для микроразметки)
|
||||
// ====================================================
|
||||
->add_tab('🧠 JSON-LD (схема)', array(
|
||||
|
||||
@ -429,6 +429,10 @@ $opt_social_raw = get_option( 'branch_social' ) ?: carbon_get_post_meta( $post_
|
||||
$prem_urgency = carbon_get_post_meta( $post_id, 'pksh_prog_prem_urgency' ) ?: 'Осталось 3 места в группе';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$compare_rows = carbon_get_post_meta( get_the_ID(), 'pksh_compare_rows' );
|
||||
$compare_footnote = carbon_get_post_meta( get_the_ID(), 'pksh_compare_footnote' );
|
||||
?>
|
||||
<section class="bento pksh-section" aria-label="Сравнение">
|
||||
<div class="bento__full section-header--centered">
|
||||
<span class="bento-label">Почему мы</span>
|
||||
@ -456,6 +460,46 @@ $opt_social_raw = get_option( 'branch_social' ) ?: carbon_get_post_meta( $post_
|
||||
</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>
|
||||
@ -492,13 +536,13 @@ $opt_social_raw = get_option( 'branch_social' ) ?: carbon_get_post_meta( $post_
|
||||
<td><span class="pksh-compare__no">✗</span> Нет</td>
|
||||
<td><span class="pksh-compare__no">✗</span> Нет</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="pksh-compare__footnote">
|
||||
<strong>Важно:</strong> Данные по репетиторам и кружкам — рыночная оценка, требуют уточнения.
|
||||
Пожалуйста, подтвердите или скорректируйте цифры у руководителя.
|
||||
</p>
|
||||
<?php if ( ! empty( $compare_footnote ) ) : ?>
|
||||
<p class="pksh-compare__footnote"><?php echo wp_kses_post( $compare_footnote ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -975,25 +1019,39 @@ $opt_social_raw = get_option( 'branch_social' ) ?: carbon_get_post_meta( $post_
|
||||
<h2 class="bento-h2">Первое занятие — бесплатно</h2>
|
||||
<p class="final-cta__text">Ребёнок познакомится с педагогом, попробует задания. Вы увидите методику своими глазами. Никакой оплаты и договоров.</p>
|
||||
|
||||
<div class="final-cta__timer" id="cta-timer">
|
||||
<span class="final-cta__timer-label">Скидка 10% действует ещё:</span>
|
||||
<div class="final-cta__timer-digits">
|
||||
<div class="final-cta__timer-unit">
|
||||
<span class="final-cta__timer-num" id="timer-hours">24</span>
|
||||
<span class="final-cta__timer-text">часов</span>
|
||||
</div>
|
||||
<span class="final-cta__timer-sep">:</span>
|
||||
<div class="final-cta__timer-unit">
|
||||
<span class="final-cta__timer-num" id="timer-minutes">00</span>
|
||||
<span class="final-cta__timer-text">минут</span>
|
||||
</div>
|
||||
<span class="final-cta__timer-sep">:</span>
|
||||
<div class="final-cta__timer-unit">
|
||||
<span class="final-cta__timer-num" id="timer-seconds">00</span>
|
||||
<span class="final-cta__timer-text">секунд</span>
|
||||
</div>
|
||||
<?php
|
||||
$timer_ts_final = function_exists('dekart_get_honest_deadline') ? (int) dekart_get_honest_deadline() : 0;
|
||||
if ($timer_ts_final > 0) :
|
||||
?>
|
||||
<div class="honest-timer">
|
||||
<span class="honest-timer__label">Акция действует еще:</span>
|
||||
<div class="honest-timer__digits">
|
||||
<span class="honest-timer__unit">
|
||||
<span class="honest-timer__num" data-timer="d">00</span>
|
||||
<span class="honest-timer__unit-label">дн</span>
|
||||
</span>
|
||||
<span class="honest-timer__sep">:</span>
|
||||
<span class="honest-timer__unit">
|
||||
<span class="honest-timer__num" data-timer="h">00</span>
|
||||
<span class="honest-timer__unit-label">ч</span>
|
||||
</span>
|
||||
<span class="honest-timer__sep">:</span>
|
||||
<span class="honest-timer__unit">
|
||||
<span class="honest-timer__num" data-timer="m">00</span>
|
||||
<span class="honest-timer__unit-label">мин</span>
|
||||
</span>
|
||||
<span class="honest-timer__sep">:</span>
|
||||
<span class="honest-timer__unit">
|
||||
<span class="honest-timer__num" data-timer="s">00</span>
|
||||
<span class="honest-timer__unit-label">сек</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<script>window.__HONEST_DEADLINE=<?php echo $timer_ts_final; ?>;</script>
|
||||
<script>
|
||||
!function(){var e=window.__HONEST_DEADLINE;if(!e)return;e*=1e3;var t=document.querySelectorAll('[data-timer]');if(!t.length)return;var n={};t.forEach(function(r){n[r.getAttribute('data-timer')]=r});var o=function(r){return r<10?'0'+r:''+r};!function r(){var t=e-Date.now();if(t<=0){for(var u in n)n[u].textContent='00';return}n.d.textContent=o(Math.floor(t/864e5)),n.h.textContent=o(Math.floor(t%864e5/36e5)),n.m.textContent=o(Math.floor(t%36e5/6e4)),n.s.textContent=o(Math.floor(t%6e4/1e3)),requestAnimationFrame(r)}()}();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<button class="btn-primary btn-primary--large open-bitrix-form btn-write">Записаться на бесплатное пробное</button>
|
||||
<p class="final-cta__footnote">🔥 Осталось 2 места в группе 5–6 лет. Успейте!</p>
|
||||
@ -1001,28 +1059,6 @@ $opt_social_raw = get_option( 'branch_social' ) ?: carbon_get_post_meta( $post_
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var hours = 24, minutes = 0, seconds = 0;
|
||||
var hEl = document.getElementById('timer-hours');
|
||||
var mEl = document.getElementById('timer-minutes');
|
||||
var sEl = document.getElementById('timer-seconds');
|
||||
if (!hEl || !mEl || !sEl) return;
|
||||
function pad(n) { return n < 10 ? '0' + n : '' + n; }
|
||||
function tick() {
|
||||
if (hours === 0 && minutes === 0 && seconds === 0) return;
|
||||
if (seconds === 0) {
|
||||
if (minutes === 0) { hours--; minutes = 59; seconds = 59; }
|
||||
else { minutes--; seconds = 59; }
|
||||
} else { seconds--; }
|
||||
hEl.textContent = pad(hours);
|
||||
mEl.textContent = pad(minutes);
|
||||
sEl.textContent = pad(seconds);
|
||||
}
|
||||
setInterval(tick, 1000);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<section class="bento pksh-section" id="pksh-contact" aria-label="Контакты">
|
||||
<div class="bento__full section-header--centered">
|
||||
<span class="bento-label">Контакты</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user