124 lines
5.9 KiB
PHP
124 lines
5.9 KiB
PHP
<?php
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
$page = sev_tort_current_page_config();
|
|
$content = isset( $page['content'] ) ? $page['content'] : array();
|
|
$intro = isset( $content['intro'] ) ? $content['intro'] : array();
|
|
$cards = isset( $content['cards'] ) ? $content['cards'] : array();
|
|
$formats = isset( $content['formats'] ) ? $content['formats'] : array();
|
|
$faq = isset( $content['faq'] ) ? $content['faq'] : array();
|
|
|
|
get_header();
|
|
?>
|
|
<main class="service-page">
|
|
<section class="service-hero">
|
|
<div class="service-hero__inner">
|
|
<div class="service-hero__content">
|
|
<span class="service-hero__eyebrow">Кондитерская студия в Севастополе</span>
|
|
<h1 class="service-hero__title"><?php echo esc_html( $page['h1'] ); ?></h1>
|
|
<p class="service-hero__lead"><?php echo esc_html( $page['lead'] ); ?></p>
|
|
<div class="service-hero__actions">
|
|
<button class="button-main" type="button" data-lead-open data-lead-source="Получить расчет: первый экран <?php echo esc_attr( $page['label'] ); ?>">Получить расчет</button>
|
|
<a class="button-link" href="<?php echo esc_url( sev_tort_telegram_url() ); ?>" target="_blank" rel="noopener noreferrer">Написать в Telegram</a>
|
|
</div>
|
|
</div>
|
|
<div class="service-hero__media">
|
|
<img class="service-hero__image" src="<?php echo esc_url( sev_tort_asset_image( $page['image'] ) ); ?>" alt="<?php echo esc_attr( $page['h1'] ); ?>" width="700" height="700" loading="eager">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php if ( $intro || $cards ) : ?>
|
|
<section class="service-details">
|
|
<div class="service-details__inner">
|
|
<div class="service-details__content">
|
|
<span class="section-kicker">Подбор формата</span>
|
|
<h2 class="section-title"><?php echo esc_html( isset( $intro['title'] ) ? $intro['title'] : 'Подберем формат под ваш повод' ); ?></h2>
|
|
<?php if ( ! empty( $intro['text'] ) ) : ?>
|
|
<p class="service-details__lead"><?php echo esc_html( $intro['text'] ); ?></p>
|
|
<?php endif; ?>
|
|
<?php if ( $cards ) : ?>
|
|
<div class="service-details__grid">
|
|
<?php foreach ( array_values( $cards ) as $index => $card ) : ?>
|
|
<article class="info-card">
|
|
<span class="info-card__number"><?php echo esc_html( str_pad( (string) ( $index + 1 ), 2, '0', STR_PAD_LEFT ) ); ?></span>
|
|
<h3 class="info-card__title"><?php echo esc_html( $card['title'] ); ?></h3>
|
|
<p class="info-card__text"><?php echo esc_html( $card['text'] ); ?></p>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php endif; ?>
|
|
|
|
<?php if ( $formats ) : ?>
|
|
<section class="service-formats">
|
|
<div class="service-formats__inner">
|
|
<div class="service-formats__content">
|
|
<!-- <span class="section-kicker">Варианты</span> -->
|
|
<h2 class="section-title"><?php echo esc_html( isset( $content['formats_title'] ) ? $content['formats_title'] : 'Популярные варианты' ); ?></h2>
|
|
</div>
|
|
<div class="service-formats__grid">
|
|
<?php foreach ( $formats as $format ) : ?>
|
|
<span class="service-formats__item"><?php echo esc_html( $format ); ?></span>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php endif; ?>
|
|
|
|
<section class="service-process">
|
|
<div class="service-process__inner">
|
|
<div class="service-process__content">
|
|
<!-- <span class="section-kicker">Процесс</span> -->
|
|
<h2 class="section-title">Как оформить заявку</h2>
|
|
<ol class="service-process__list">
|
|
<li class="service-process__item">Оставьте телефон, дату праздника и коротко опишите задачу.</li>
|
|
<li class="service-process__item">Мы уточним вес, начинку, декор, доставку и доступный срок.</li>
|
|
<li class="service-process__item">После согласования подтвердим заказ и отправим детали в мессенджер.</li>
|
|
</ol>
|
|
</div>
|
|
<div class="service-process__note">
|
|
<span class="service-process__note-title">Без корзины и онлайн-оплаты</span>
|
|
<p class="service-process__note-text">Каждый торт индивидуальный, поэтому заявку обрабатываем вручную. Так проще точно посчитать стоимость и не обещать невозможный декор или срок.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php if ( $faq ) : ?>
|
|
<section class="service-faq">
|
|
<div class="service-faq__inner">
|
|
<div class="service-faq__head">
|
|
<!-- <span class="section-kicker">FAQ</span> -->
|
|
<h2 class="section-title">Частые вопросы</h2>
|
|
</div>
|
|
<div class="service-faq__list">
|
|
<?php foreach ( $faq as $item ) : ?>
|
|
<details class="service-faq__item">
|
|
<summary class="service-faq__question"><?php echo esc_html( $item['q'] ); ?></summary>
|
|
<p class="service-faq__answer"><?php echo esc_html( $item['a'] ); ?></p>
|
|
</details>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php endif; ?>
|
|
|
|
<section class="service-lead" id="lead-form">
|
|
<div class="service-lead__inner">
|
|
<div class="service-lead__content">
|
|
<!-- <span class="section-kicker">Заявка</span> -->
|
|
<h2 class="section-title">Расскажите, какой торт нужен</h2>
|
|
<p class="service-lead__text">Укажите дату, повод, примерный вес и пожелания по декору. Если пока нет точной идеи, поможем подобрать варианты.</p>
|
|
</div>
|
|
<?php get_template_part( 'template-parts/lead-form', null, array( 'title' => 'Получить расчет', 'page' => $page['title'], 'source' => 'Встроенная форма: страница ' . $page['label'] ) ); ?>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
<?php
|
|
get_footer();
|