task-17075__opdate-blog #1

Merged
web_103.2 merged 37 commits from task-17075__opdate-blog into master 2026-10-26 13:36:52 +03:00
5 changed files with 819 additions and 0 deletions
Showing only changes of commit 5026edff9b - Show all commits

No files matched your search

@@ -7468,3 +7468,382 @@ h4 {
white-space: nowrap;
text-overflow: ellipsis;
}
.courier-services {
--services-heading: #172d38;
--services-text: #595757;
--services-accent: #ae001b;
--services-card: #f5f5f9;
--logo-size: 70px;
box-sizing: border-box;
width: min(1280px, calc(100% - 80px));
margin: 0 auto;
padding: 120px 0 40px;
color: var(--services-heading);
font-family: "Onest", sans-serif;
-webkit-font-smoothing: antialiased;
}
.courier-services *,
.courier-services *::before,
.courier-services *::after {
box-sizing: border-box;
}
.courier-services__header {
display: flex;
flex-direction: column;
gap: 40px;
text-align: center;
}
.courier-services__title {
margin: 0;
font-size: 56px;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__description {
margin: 0;
color: var(--services-text);
font-size: 20px;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__content {
display: flex;
flex-direction: column;
gap: 32px;
margin-top: 60px;
}
.courier-services__navigation {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 12px 20px;
}
.courier-services__navigation-title {
margin: 0;
font-size: 26px;
font-weight: 600;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__topics {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
}
.courier-services__topic {
display: inline-block;
padding: 8px 12px;
border: 0;
border-radius: 10px;
background: #f6f6f6;
color: #798079;
font: 600 20px / 1.3 "Onest", sans-serif;
letter-spacing: -0.01em;
text-decoration: none;
cursor: pointer;
}
.courier-services__topic:hover {
color: var(--services-accent);
background: #fff0f2;
}
.courier-services__grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 20px;
margin: 0;
padding: 0;
list-style: none;
}
.courier-services__card {
position: relative;
display: flex;
min-width: 0;
height: 100%;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 24px;
padding: 24px 32px;
border-radius: 20px;
background: var(--services-card);
box-shadow: inset 0 0 0 1px #ededed;
color: inherit;
text-decoration: none;
}
.courier-services__card:hover,
.courier-services__card:active {
box-shadow: inset 0 0 0 1px rgb(174 0 27 / 20%);
}
.courier-services__name {
font-size: 20px;
font-weight: 600;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__logo {
position: relative;
display: block;
flex: 0 0 var(--logo-size);
width: var(--logo-size);
height: var(--logo-size);
transition: transform 0.25s ease;
}
.courier-services__card:is(:hover, :focus-visible) .courier-services__logo {
transform: scale(1.05);
}
@media (prefers-reduced-motion: reduce) {
.courier-services__logo {
transition: none;
}
}
.courier-services picture,
.courier-services picture img {
display: block;
}
.courier-services__logo > img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
}
.courier-services__logo--samokat {
overflow: hidden;
border-radius: 50%;
background: #ff335f;
}
.courier-services__samokat-symbol {
position: absolute;
top: 22.857143%;
left: calc(50% - 0.5px);
transform: translateX(-50%);
}
.courier-services__logo--eda {
overflow: hidden;
}
.courier-services__eda-clip {
position: absolute;
top: 0;
left: 0.101429%;
width: 99.898571%;
height: 100%;
mask: url("../img/aggregators/desktop-eda-mask.svg") 0 0 / 100% 100% no-repeat;
}
.courier-services__eda-symbol {
position: absolute;
top: 6.5%;
left: -3.5%;
width: 87.5%;
height: 87.5%;
mask: url("../img/aggregators/desktop-eda-symbol-mask.svg") 0 0 / 100% 100% no-repeat;
}
.courier-services__lavka-clip {
position: absolute;
top: 0.04%;
left: 0.05%;
width: 100%;
height: 100%;
mask: url("../img/aggregators/desktop-lavka-mask.svg") 0 0 / 100% 100% no-repeat;
}
.courier-services__arrow {
position: absolute;
top: 15px;
right: 21px;
display: flex;
align-items: center;
justify-content: center;
width: 51px;
height: 51px;
border-radius: 50%;
background: #fff;
color: var(--services-accent);
transition: background-color 0.2s ease, color 0.2s ease;
}
.courier-services__arrow svg {
display: block;
width: 25%;
height: 25%;
}
.courier-services__card:is(:hover, :active, :focus-visible) .courier-services__arrow {
background: var(--services-accent);
color: #fff;
}
.courier-services :is(a, button):focus-visible {
outline: 2px solid var(--services-accent);
outline-offset: 4px;
}
@media (max-width: 1199px) {
.courier-services__title {
font-size: 44px;
}
.courier-services__grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.courier-services__navigation-title {
font-size: 22px;
}
.courier-services__topic {
font-size: 18px;
}
}
@media (max-width: 899px) {
.courier-services {
width: calc(100% - 48px);
padding-top: 80px;
}
.courier-services__title {
font-size: 36px;
}
.courier-services__header {
gap: 24px;
}
.courier-services__description {
font-size: 18px;
line-height: 1.3;
}
.courier-services__content {
margin-top: 40px;
gap: 24px;
}
.courier-services__grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.courier-services__navigation {
flex-direction: column;
}
}
@media (max-width: 600px) {
.courier-services {
--logo-size: 32px;
width: calc(100% - 40px);
padding: 60px 0 40px;
}
.courier-services__header {
gap: 14px;
}
.courier-services__title {
font-size: 24px;
}
.courier-services__description {
font-size: 14px;
line-height: 1.1;
}
.courier-services__content {
gap: 14px;
margin-top: 30px;
}
.courier-services__navigation {
gap: 8px;
}
.courier-services__navigation-title {
font-size: 16px;
}
.courier-services__topics {
gap: 12px;
}
.courier-services__topic {
padding: 4px 8px;
font-size: 14px;
}
.courier-services__grid {
gap: 9px;
}
.courier-services__card {
gap: 16px;
padding: 20px;
}
.courier-services__name {
font-size: 14px;
}
.courier-services__arrow {
top: 11px;
right: 13px;
width: 24px;
height: 24px;
}
.courier-services__eda-clip {
mask-image: url("../img/aggregators/mobile-eda-mask.svg");
}
.courier-services__eda-symbol {
mask-image: url("../img/aggregators/mobile-eda-symbol-mask.svg");
}
.courier-services__lavka-clip {
mask-image: url("../img/aggregators/mobile-lavka-mask.svg");
}
}
@media (max-width: 359px) {
.courier-services__topics {
gap: 6px;
}
.courier-services__topic {
font-size: 12px;
}
.courier-services__card {
padding-right: 12px;
padding-left: 12px;
}
}
@@ -0,0 +1,378 @@
.courier-services {
--services-heading: #172d38;
--services-text: #595757;
--services-accent: #ae001b;
--services-card: #f5f5f9;
--logo-size: 70px;
box-sizing: border-box;
width: min(1280px, calc(100% - 80px));
margin: 0 auto;
padding: 120px 0 40px;
color: var(--services-heading);
font-family: "Onest", sans-serif;
-webkit-font-smoothing: antialiased;
}
.courier-services *,
.courier-services *::before,
.courier-services *::after {
box-sizing: border-box;
}
.courier-services__header {
display: flex;
flex-direction: column;
gap: 40px;
text-align: center;
}
.courier-services__title {
margin: 0;
font-size: 56px;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__description {
margin: 0;
color: var(--services-text);
font-size: 20px;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__content {
display: flex;
flex-direction: column;
gap: 32px;
margin-top: 60px;
}
.courier-services__navigation {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 12px 20px;
}
.courier-services__navigation-title {
margin: 0;
font-size: 26px;
font-weight: 600;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__topics {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
}
.courier-services__topic {
display: inline-block;
padding: 8px 12px;
border: 0;
border-radius: 10px;
background: #f6f6f6;
color: #798079;
font: 600 20px / 1.3 "Onest", sans-serif;
letter-spacing: -0.01em;
text-decoration: none;
cursor: pointer;
}
.courier-services__topic:hover {
color: var(--services-accent);
background: #fff0f2;
}
.courier-services__grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 20px;
margin: 0;
padding: 0;
list-style: none;
}
.courier-services__card {
position: relative;
display: flex;
min-width: 0;
height: 100%;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 24px;
padding: 24px 32px;
border-radius: 20px;
background: var(--services-card);
box-shadow: inset 0 0 0 1px #ededed;
color: inherit;
text-decoration: none;
}
.courier-services__card:hover,
.courier-services__card:active {
box-shadow: inset 0 0 0 1px rgb(174 0 27 / 20%);
}
.courier-services__name {
font-size: 20px;
font-weight: 600;
line-height: 1.1;
letter-spacing: -0.01em;
}
.courier-services__logo {
position: relative;
display: block;
flex: 0 0 var(--logo-size);
width: var(--logo-size);
height: var(--logo-size);
transition: transform 0.25s ease;
}
.courier-services__card:is(:hover, :focus-visible) .courier-services__logo {
transform: scale(1.05);
}
@media (prefers-reduced-motion: reduce) {
.courier-services__logo {
transition: none;
}
}
.courier-services picture,
.courier-services picture img {
display: block;
}
.courier-services__logo > img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
}
.courier-services__logo--samokat {
overflow: hidden;
border-radius: 50%;
background: #ff335f;
}
.courier-services__samokat-symbol {
position: absolute;
top: 22.857143%;
left: calc(50% - 0.5px);
transform: translateX(-50%);
}
.courier-services__logo--eda {
overflow: hidden;
}
.courier-services__eda-clip {
position: absolute;
top: 0;
left: 0.101429%;
width: 99.898571%;
height: 100%;
mask: url("../img/aggregators/desktop-eda-mask.svg") 0 0 / 100% 100% no-repeat;
}
.courier-services__eda-symbol {
position: absolute;
top: 6.5%;
left: -3.5%;
width: 87.5%;
height: 87.5%;
mask: url("../img/aggregators/desktop-eda-symbol-mask.svg") 0 0 / 100% 100% no-repeat;
}
.courier-services__lavka-clip {
position: absolute;
top: 0.04%;
left: 0.05%;
width: 100%;
height: 100%;
mask: url("../img/aggregators/desktop-lavka-mask.svg") 0 0 / 100% 100% no-repeat;
}
.courier-services__arrow {
position: absolute;
top: 15px;
right: 21px;
display: flex;
align-items: center;
justify-content: center;
width: 51px;
height: 51px;
border-radius: 50%;
background: #fff;
color: var(--services-accent);
transition: background-color 0.2s ease, color 0.2s ease;
}
.courier-services__arrow svg {
display: block;
width: 25%;
height: 25%;
}
.courier-services__card:is(:hover, :active, :focus-visible) .courier-services__arrow {
background: var(--services-accent);
color: #fff;
}
.courier-services :is(a, button):focus-visible {
outline: 2px solid var(--services-accent);
outline-offset: 4px;
}
@media (max-width: 1199px) {
.courier-services__title {
font-size: 44px;
}
.courier-services__grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.courier-services__navigation-title {
font-size: 22px;
}
.courier-services__topic {
font-size: 18px;
}
}
@media (max-width: 899px) {
.courier-services {
width: calc(100% - 48px);
padding-top: 80px;
}
.courier-services__title {
font-size: 36px;
}
.courier-services__header {
gap: 24px;
}
.courier-services__description {
font-size: 18px;
line-height: 1.3;
}
.courier-services__content {
margin-top: 40px;
gap: 24px;
}
.courier-services__grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.courier-services__navigation {
flex-direction: column;
}
}
@media (max-width: 600px) {
.courier-services {
--logo-size: 32px;
width: calc(100% - 40px);
padding: 60px 0 40px;
}
.courier-services__header {
gap: 14px;
}
.courier-services__title {
font-size: 24px;
}
.courier-services__description {
font-size: 14px;
line-height: 1.1;
}
.courier-services__content {
gap: 14px;
margin-top: 30px;
}
.courier-services__navigation {
gap: 8px;
}
.courier-services__navigation-title {
font-size: 16px;
}
.courier-services__topics {
gap: 12px;
}
.courier-services__topic {
padding: 4px 8px;
font-size: 14px;
}
.courier-services__grid {
gap: 9px;
}
.courier-services__card {
gap: 16px;
padding: 20px;
}
.courier-services__name {
font-size: 14px;
}
.courier-services__arrow {
top: 11px;
right: 13px;
width: 24px;
height: 24px;
}
.courier-services__eda-clip {
mask-image: url("../img/aggregators/mobile-eda-mask.svg");
}
.courier-services__eda-symbol {
mask-image: url("../img/aggregators/mobile-eda-symbol-mask.svg");
}
.courier-services__lavka-clip {
mask-image: url("../img/aggregators/mobile-lavka-mask.svg");
}
}
@media (max-width: 359px) {
.courier-services__topics {
gap: 6px;
}
.courier-services__topic {
font-size: 12px;
}
.courier-services__card {
padding-right: 12px;
padding-left: 12px;
}
}
@@ -1,5 +1,6 @@
@use "mixins" as *;
@use "config" as *;
@use "courier-services";
*,
*::before,
@@ -0,0 +1,60 @@
<?php
$services_title = get_field('services_title');
$services_description = get_field('services_description');
$services_title_links = get_field('services_title_links');
$services_links = get_field('services_links') ?: [];
$services_repeat = get_field('services_repeat') ?: [];
if (!$services_title && !$services_repeat) {
return;
}
?>
<section class="courier-services"<?php if ($services_title) : ?> aria-labelledby="courier-services-title"<?php endif; ?>>
<?php if ($services_title || $services_description) : ?>
<header class="courier-services__header">
<?php if ($services_title) : ?>
<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>
<?php endif; ?>
</header>
<?php endif; ?>
<?php if ($services_links || $services_repeat) : ?>
<div class="courier-services__content">
<?php if ($services_links) : ?>
<nav class="courier-services__navigation" aria-label="О работе курьером">
<?php if ($services_title_links) : ?>
<p class="courier-services__navigation-title"><?php echo esc_html($services_title_links); ?></p>
<?php endif; ?>
<div class="courier-services__topics">
<?php foreach ($services_links as $item) : ?>
<?php if (empty($item['name']) || empty($item['url'])) continue; ?>
<a class="courier-services__topic" href="<?php echo esc_url($item['url']); ?>"><?php echo esc_html($item['name']); ?></a>
<?php endforeach; ?>
</div>
</nav>
<?php endif; ?>
<?php if ($services_repeat) : ?>
<ul class="courier-services__grid" aria-label="Сервисы доставки">
<?php foreach ($services_repeat as $item) : ?>
<?php
if (empty($item['name']) || empty($item['link'])) continue;
$logo = $item['img'] ?? [];
?>
<li>
<a class="courier-services__card" target="_blank" href="<?php echo esc_url($item['link']); ?>" aria-label="<?php echo esc_attr(sprintf('Подключиться к сервису «%s» через Hantico', $item['name'])); ?>">
<?php if (!empty($logo['url'])) : ?>
<span class="courier-services__logo"><img src="<?php echo esc_url($logo['url']); ?>" alt="" loading="lazy" decoding="async"></span>
<?php endif; ?>
<span class="courier-services__name"><?php echo esc_html($item['name']); ?></span>
<span class="courier-services__arrow" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13" fill="none" focusable="false"><path d="M12.5537 7.72367L10.6267 7.71891L10.6369 3.27442L1.36107 12.5326L0.00014086 11.1689L9.25079 1.93597L4.8608 1.92575L4.86557 0.000152722L12.5721 0.0178628L12.5537 7.72367Z" fill="currentColor"/></svg></span>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
<?php endif; ?>
</section>
@@ -10,6 +10,7 @@ Template Name: Курьерам
<main class="main">
<?php get_template_part('template-parts/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/scheme'); ?>