task 17081 | пределал часть натяжки блоков с requirements по specs
This commit is contained in:
1 parent
ecc5a1b12a
commit
07a4f5b19d
7 files changed
+107
-11
No files matched your search
@@ -3181,6 +3181,30 @@ h4 {
|
||||
.getapp-title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.getapp--custom-title .getapp-body__left {
|
||||
min-width: 0;
|
||||
}
|
||||
.getapp--custom-title .getapp-title {
|
||||
font-size: clamp(24px, 11.5691px + 3.3149vw, 54px);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -0.01em;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.getapp-title__ending {
|
||||
display: block;
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
.getapp--custom-title .getapp-title {
|
||||
width: 731px;
|
||||
max-width: none;
|
||||
}
|
||||
.getapp--custom-title .getapp-stores {
|
||||
margin-top: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.getapp-descr {
|
||||
margin-top: 25px;
|
||||
font-size: 18px;
|
||||
|
||||
@@ -4235,6 +4235,30 @@ h4 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.getapp--custom-title .getapp-body__left {
|
||||
min-width: 0;
|
||||
}
|
||||
.getapp--custom-title .getapp-title {
|
||||
font-size: clamp(24px, 11.5691px + 3.3149vw, 54px);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -0.01em;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.getapp-title__ending {
|
||||
display: block;
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
.getapp--custom-title .getapp-title {
|
||||
width: 731px;
|
||||
max-width: none;
|
||||
}
|
||||
.getapp--custom-title .getapp-stores {
|
||||
margin-top: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
.blog-item__img-link:hover img {
|
||||
transform: scale(1.15);
|
||||
|
||||
@@ -11,10 +11,10 @@ $formats_id = wp_unique_id('work-formats-');
|
||||
<?php if ($formats_title || $formats_description) : ?>
|
||||
<header class="work-formats__header">
|
||||
<?php if ($formats_title) : ?>
|
||||
<h2 class="work-formats__title" id="<?php echo esc_attr($formats_id); ?>"><?php echo esc_html($formats_title); ?></h2>
|
||||
<h2 class="work-formats__title" id="<?php echo esc_attr($formats_id); ?>">Выберите подходящий формат работы <?php echo esc_html($formats_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($formats_description) : ?>
|
||||
<p class="work-formats__description"><?php echo esc_html($formats_description); ?></p>
|
||||
<p class="work-formats__description">Выбирайте удобный график, формат <?php echo esc_html($formats_description); ?> и условия работы</p>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<?php
|
||||
$cta_title = get_field('cta_title');
|
||||
$getapp_stores = get_field('download', 'option');
|
||||
$getapp_qrcode = get_field('download_qrcode', 'option');
|
||||
if ($getapp_stores && $getapp_qrcode) :
|
||||
?>
|
||||
<section class="getapp">
|
||||
<section class="getapp<?php if ($cta_title) echo ' getapp--custom-title'; ?>">
|
||||
<div class="container">
|
||||
<div class="getapp-body">
|
||||
<div class="getapp-body__left">
|
||||
<h2 class="getapp-title">Скачай и начни уже сегодня</h2>
|
||||
<h2 class="getapp-title"><?php if ($cta_title) : ?>Скачай и начни получать заказы на <?php echo esc_html($cta_title); ?><span class="getapp-title__ending">уже завтра!</span><?php else : ?>Скачай и начни уже сегодня<?php endif; ?></h2>
|
||||
<?php if (!$cta_title) : ?>
|
||||
<div class="getapp-descr">Hantico есть на всех платформах. Установи приложение, пройди регистрацию — и через 15 минут ты готов к первому заказу</div>
|
||||
<?php endif; ?>
|
||||
<div class="getapp-stores">
|
||||
<a href="<?php echo $getapp_stores['appstore']; ?>" class="getapp-store" target="_blank" rel="noopener">
|
||||
<div class="getapp-store__icon">
|
||||
|
||||
@@ -1,15 +1,44 @@
|
||||
<?php
|
||||
$post_type = get_post_type();
|
||||
$current_post_id = get_the_ID();
|
||||
$current_post_id = is_singular() ? get_queried_object_id() : get_the_ID();
|
||||
$post_type = get_post_type($current_post_id);
|
||||
$selected_articles = get_field('article_category', $current_post_id) ?: [];
|
||||
if (!$selected_articles) {
|
||||
$article_field = get_field_object('article_category', $current_post_id, false, false);
|
||||
if ($article_field) {
|
||||
return;
|
||||
}
|
||||
// Also detect an available field that has never been saved on this page.
|
||||
foreach (acf_get_field_groups(['post_id' => $current_post_id]) as $field_group) {
|
||||
foreach (acf_get_fields($field_group) ?: [] as $field) {
|
||||
if ($field['name'] === 'article_category') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$selected_ids = [];
|
||||
foreach ($selected_articles as $row) {
|
||||
$article = $row['post'] ?? null;
|
||||
$article_id = $article instanceof WP_Post ? $article->ID : (int) $article;
|
||||
if ($article_id > 0 && $article_id !== $current_post_id) {
|
||||
$selected_ids[] = $article_id;
|
||||
}
|
||||
}
|
||||
$terms = get_the_terms($current_post_id, 'article_category');
|
||||
$related_args = [
|
||||
'post_type' => $post_type,
|
||||
'post_type' => $post_type === 'news' ? 'news' : 'article',
|
||||
'posts_per_page' => 6,
|
||||
'post__not_in' => [$current_post_id],
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC'
|
||||
];
|
||||
if ($terms) {
|
||||
if ($selected_ids) {
|
||||
$related_args['post_type'] = 'article';
|
||||
$related_args['post__in'] = $selected_ids;
|
||||
$related_args['posts_per_page'] = -1;
|
||||
$related_args['orderby'] = 'post__in';
|
||||
} elseif ($terms && !is_wp_error($terms)) {
|
||||
$term_ids = wp_list_pluck($terms, 'term_id');
|
||||
$related_args['tax_query'] = [
|
||||
[
|
||||
@@ -20,6 +49,21 @@
|
||||
];
|
||||
}
|
||||
$related_query = new WP_Query($related_args);
|
||||
if ($selected_ids) {
|
||||
// WP_Query removes duplicates; restore the exact order and rows from ACF.
|
||||
$posts_by_id = [];
|
||||
foreach ($related_query->posts as $selected_post) {
|
||||
$posts_by_id[$selected_post->ID] = $selected_post;
|
||||
}
|
||||
$related_query->posts = [];
|
||||
foreach ($selected_ids as $selected_id) {
|
||||
if (isset($posts_by_id[$selected_id])) {
|
||||
$related_query->posts[] = $posts_by_id[$selected_id];
|
||||
}
|
||||
}
|
||||
$related_query->post_count = count($related_query->posts);
|
||||
}
|
||||
|
||||
if ($related_query->have_posts()) :
|
||||
$title = $post_type === 'news' ? 'Другие новости' : 'Вам также может понравиться';
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
$this_page_id = get_the_ID();
|
||||
$review_title = get_field('review_title', $this_page_id);
|
||||
$review_type = get_field('review_type', $this_page_id);
|
||||
$reviews = get_field('review_arr', $this_page_id);
|
||||
|
||||
$reviews_args = [
|
||||
@@ -29,8 +31,8 @@
|
||||
<section class="reviews reviews--block">
|
||||
<div class="reviews-header">
|
||||
<div class="container">
|
||||
<h2 class="reviews-title section-title">Отзывы наших клиентов</h2>
|
||||
<div class="reviews-descr section-descr">Живые истории водителей и курьеров, которые подключились к Hantico</div>
|
||||
<h2 class="reviews-title section-title">Что говорят <?php echo esc_html($review_title ?: 'пользователи'); ?> о Hantico</h2>
|
||||
<div class="reviews-descr section-descr">Реальные истории <?php echo esc_html($review_type ?: 'пользователей'); ?>, которые подключились к Hantico</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reviews-slider">
|
||||
|
||||
@@ -16,7 +16,6 @@ Template Name: Курьерам
|
||||
<?php get_template_part('template-parts/delivery-orders'); ?>
|
||||
<?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'); ?>
|
||||
|
||||
Reference in new issue
Block a user