task 17081 | пределал часть натяжки блоков с hero по scheme

This commit is contained in:
web_103.2 committed 2026-10-23 13:21:31 +03:00
1 parent 7fad136ff1
commit ecc5a1b12a
5 files changed
+165 -9

No files matched your search

@@ -0,0 +1,145 @@
<?php
if (is_singular('driver')) {
$page_id = 76;
} elseif (is_singular('courier')) {
$page_id = 78;
} else {
$page_id = get_the_ID();
}
$audience = get_field('hero_audience');
$order_type = get_field('hero_type');
$hero_img = get_field('hero_img', $page_id);
$hero_features = get_field('hero_features', 'option');
$hero_scroller = get_field('hero_scroller', 'option');
$hero_stores = get_field('download', 'option');
$hero_qrcode = get_field('download_qrcode', 'option');
?>
<section class="hero">
<div class="hero-main">
<div class="container">
<div class="hero-main__body">
<div class="hero-main__left">
<h1 class="hero-title">Приложение для <?php echo esc_html($audience); ?></h1>
<div class="hero-descr">Скачай Hantico и начни получать заказы <?php echo esc_html($order_type); ?> уже завтра!</div>
<div class="hero-buttons">
<a href="<?php echo get_permalink(87); ?>" class="hero-buttons__download-btn btn btn--lg btn--red">Скачать приложение</a>
<a href="#specs" class="hero-buttons__info-btn btn btn--lg btn--transp-red">Как это работает</a>
</div>
<?php if ($hero_qrcode) { ?>
<div class="hero-qrcode">
<div class="hero-qrcode__img">
<img
src="<?php echo $hero_qrcode['url']; ?>"
alt="<?php echo $hero_qrcode['alt']; ?>"
width="<?php echo $hero_qrcode['width']; ?>"
height="<?php echo $hero_qrcode['height']; ?>"
/>
</div>
<div class="hero-qrcode__info">Наведите камеру<br> на QR-код</div>
</div>
<?php } if ($hero_stores) { ?>
<div class="hero-stores">
<a href="<?php echo $hero_stores['rustore']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/rustore.svg'); ?>" alt="">
</div>
<div class="hero-store__name">RuStore</div>
</a>
<a href="<?php echo $hero_stores['appstore']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/appstore.svg'); ?>" alt="">
</div>
<div class="hero-store__name">App Store</div>
</a>
<a href="<?php echo $hero_stores['gplay']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/gplay.svg'); ?>" alt="">
</div>
<div class="hero-store__name">Google Play</div>
</a>
<a href="<?php echo $hero_stores['appgallery']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/appgallery.svg'); ?>" alt="">
</div>
<div class="hero-store__name">AppGallery</div>
</a>
</div>
<?php } ?>
</div>
<div class="hero-main__right">
<div class="hero-img">
<img
src="/wp-content/uploads/main.webp"
width="1280"
height="1094"
alt="фоновое изображение"
fetchpriority="high"
/>
</div>
<?php if ($hero_features) : ?>
<div class="hero-features">
<?php $i = 1; foreach ($hero_features as $item) : ?>
<div class="hero-feature">
<div class="<?php echo $i === 3 ? 'hero-feature__img' : 'hero-feature__icon'; ?>">
<img
src="<?php echo $item['icon']['sizes']['medium']; ?>"
width="<?php echo $item['icon']['sizes']['medium-width']; ?>"
height="<?php echo $item['icon']['sizes']['medium-height']; ?>"
alt="<?php echo $item['icon']['alt']; ?>"
/>
</div>
<div class="hero-feature__title"><?php echo $item['title']; ?></div>
</div>
<?php $i++; endforeach; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php if ($hero_scroller) : ?>
<div class="hero-scroller" data-scroller data-speed="60">
<div class="hero-scroller__track">
<ul class="hero-scroller__group">
<?php foreach ($hero_scroller as $item) : ?>
<li class="hero-scroller__item"><?php echo $item['text']; ?></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php endif; ?>
<div class="hero-footer">
<div class="container">
<?php if ($hero_stores) : ?>
<div class="hero-stores">
<a href="<?php echo $hero_stores['rustore']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/rustore.svg'); ?>" alt="">
</div>
<div class="hero-store__name">RuStore</div>
</a>
<a href="<?php echo $hero_stores['appstore']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/appstore.svg'); ?>" alt="">
</div>
<div class="hero-store__name">App Store</div>
</a>
<a href="<?php echo $hero_stores['gplay']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/gplay.svg'); ?>" alt="">
</div>
<div class="hero-store__name">Google Play</div>
</a>
<a href="<?php echo $hero_stores['appgallery']; ?>" class="hero-store" target="_blank" rel="noopener">
<div class="hero-store__icon">
<img src="<?php echo get_theme_file_uri('assets/img/icons/appgallery.svg'); ?>" alt="">
</div>
<div class="hero-store__name">AppGallery</div>
</a>
</div>
<?php endif; ?>
</div>
</div>
</section>
@@ -1,5 +1,10 @@
<?php
$services_title = get_field('services_title');
$services_title_fields = get_field('services_title');
$services_audience = is_array($services_title_fields) ? ($services_title_fields['audience'] ?? '') : '';
$services_order_type = is_array($services_title_fields) ? ($services_title_fields['order_type'] ?? '') : '';
$services_title = ($services_audience || $services_order_type)
? sprintf('Быстрая регистрация и заказы для %s из популярных агрегаторов %s', $services_audience, $services_order_type)
: '';
$services_description = get_field('services_description');
$services_title_links = get_field('services_title_links');
$services_links = get_field('services_links') ?: [];
@@ -15,7 +20,7 @@ if (!$services_title && !$services_repeat) {
<h2 class="courier-services__title" id="courier-services-title"><?php echo esc_html($services_title); ?></h2>
<?php endif; ?>
<?php if ($services_description) : ?>
<p class="courier-services__description"><?php echo nl2br(esc_html($services_description)); ?></p>
<p class="courier-services__description">С Hantico проще выбрать подходящий сервис <?php echo esc_html($services_description); ?>, пройти регистрацию и начать получать заказы.</p>
<?php endif; ?>
</header>
<?php endif; ?>
@@ -13,10 +13,10 @@ if (!$available_title && !$available_items) {
<?php if ($available_title || $available_description) : ?>
<header class="delivery-orders__header">
<?php if ($available_title) : ?>
<h2 class="delivery-orders__title" id="delivery-orders-title"><?php echo esc_html($available_title); ?></h2>
<h2 class="delivery-orders__title" id="delivery-orders-title">Какие заказы доступны <?php echo esc_html($available_title); ?></h2>
<?php endif; ?>
<?php if ($available_description) : ?>
<p class="delivery-orders__description"><?php echo nl2br(esc_html($available_description)); ?></p>
<p class="delivery-orders__description">Выбирайте подходящий формат <?php echo esc_html($available_description); ?> и получайте заказы через сервисы, доступные в Hantico.</p>
<?php endif; ?>
</header>
<?php endif; ?>
@@ -14,15 +14,19 @@
$this_page_id = get_the_ID();
$income_title = get_field('calculator_title', $this_page_id)
?: get_field('income_title', $page_id);
$calculator_title = get_field('calculator_title', $this_page_id);
$income_title = $calculator_title
? 'Калькулятор дохода ' . esc_html($calculator_title)
: get_field('income_title', $page_id);
$income_descr = get_field('income_descr', $page_id);
if ($income_title && $income_descr) :
if ($income_title && ($calculator_title || $income_descr)) :
?>
<section class="income">
<div class="container">
<h2 class="income-title section-title"><?php echo $income_title; ?></h2>
<?php if (!$calculator_title && $income_descr) : ?>
<div class="income-descr section-descr"><?php echo $income_descr; ?></div>
<?php endif; ?>
<form class="income-calc<?php if ($is_driver || $is_courier || $is_cargo) echo ' income-calc--single'; ?>">
<div class="income-calc__top">
<fieldset class="income-calc__types">
@@ -9,18 +9,20 @@ Template Name: Курьерам
<main class="main">
<?php get_template_part('template-parts/hero'); ?>
<?php get_template_part('template-parts/audience/hero'); ?>
<?php get_template_part('template-parts/courier-services'); ?>
<?php get_template_part('template-parts/income'); ?>
<?php get_template_part('template-parts/advantages'); ?>
<?php get_template_part('template-parts/delivery-orders'); ?>
<?php get_template_part('template-parts/scheme'); ?>
<?php get_template_part('template-parts/payments'); ?>
<?php get_template_part('template-parts/scheme'); ?>
<?php get_template_part('template-parts/requirements'); ?>
<?php get_template_part('template-parts/formats'); ?>
<?php get_template_part('template-parts/reviews'); ?>
<?php get_template_part('template-parts/faq'); ?>
<?php get_template_part('template-parts/getapp'); ?>
<?php get_template_part('template-parts/related'); ?>
<?php get_template_part('template-parts/specs'); ?>
</main>