From 9e21c34547df503be435f96d9731cbfc00246d4d Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Thu, 15 Oct 2026 16:35:06 +0300 Subject: [PATCH 01/36] =?UTF-8?q?task=2017075=20|=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D1=83=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/hantico/assets/css/style.css | 161 +++++++++++++++++- wp-content/themes/hantico/single-article.php | 68 ++++++-- 2 files changed, 213 insertions(+), 16 deletions(-) diff --git a/wp-content/themes/hantico/assets/css/style.css b/wp-content/themes/hantico/assets/css/style.css index 5e12633..dea0285 100644 --- a/wp-content/themes/hantico/assets/css/style.css +++ b/wp-content/themes/hantico/assets/css/style.css @@ -5943,4 +5943,163 @@ h4 { .specs-tabs__item:hover { color: var(--color-red); } -} \ No newline at end of file +} + +/* новые */ + +.h-article-hero { + --h-hero-accent: #d52d49; + --h-hero-text: #202b35; + --h-hero-muted: #68747f; + --h-hero-line: #e7eaf0; + --h-hero-bg: #f7f8fa; + --h-hero-radius: 26px; + + box-sizing: border-box; + width: 100%; + min-width: 1100px; + color: var(--h-hero-text); + font-family: inherit; +} + +.h-article-hero *, +.h-article-hero *::before, +.h-article-hero *::after { + box-sizing: border-box; +} + +.h-article-hero__container { + display: grid; + grid-template-columns: minmax(400px, 500px) minmax(0, 1fr); + align-items: stretch; + gap: 64px; + width: calc(100% - 80px); + max-width: 1360px; +} + +.h-article-hero__picture { + min-height: 600px; + overflow: hidden; + border-radius: var(--h-hero-radius); + background: #e4e8ec; +} + +.h-article-hero__image { + display: block; + width: 100%; + height: 100%; + min-height: 600px; + object-fit: cover; + object-position: center; +} + +.h-article-hero__content { + display: flex; + flex-direction: column; + align-items: flex-start; + min-width: 0; + padding: 5px 0 4px; +} + +.h-article-hero__breadcrumb-divider { + flex: none; + color: #a9b0b8; +} + +.h-article-hero__breadcrumb-current { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: var(--h-hero-text); +} + +.h-article-hero__categories { + display: flex; + gap: 8px; + margin-bottom: 19px; +} + +.h-article-hero__category { + display: inline-flex; + align-items: center; + min-height: 29px; + padding: 5px 12px; + border: 1px solid rgba(213, 45, 73, .17); + border-radius: 100px; + background: #fff0f3; + color: var(--h-hero-accent); + font-size: 12px; + font-weight: 600; + line-height: 1.3; +} + +.h-article-hero__title { + width: 100%; + margin: 0; + color: var(--h-hero-text); + font-size: 44px; + font-weight: 700; + line-height: 1.12; + letter-spacing: -.035em; + text-wrap: balance; +} + +.h-article-hero__title > span { + background: linear-gradient(98deg, #f05d6b 0%, #bc203f 100%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.h-article-hero__description { + max-width: 710px; + margin: 24px 0 34px; + color: #535f6c; + font-size: 17px; + font-weight: 400; + line-height: 1.6; +} + +.h-article-hero__meta { + display: flex; + align-items: center; + flex-wrap: nowrap; + width: 100%; + margin-top: auto; + padding-top: 25px; + border-top: 1px solid var(--h-hero-line); + color: #4e5a65; +} + +.h-article-hero__meta-item { + display: inline-flex; + align-items: center; + gap: 10px; + flex: none; + min-height: 31px; + padding: 0 20px; + font-size: 14px; + line-height: 1.35; + white-space: nowrap; +} + +.h-article-hero__meta-item:first-child { + padding-left: 0; +} + +.h-article-hero__meta-item + .h-article-hero__meta-item { + border-left: 1px solid #d7dce3; +} + +.h-article-hero__meta-item svg { + display: block; + flex: none; + width: 22px; + height: 22px; + color: var(--h-hero-accent); +} + +.h-article-hero__meta-item strong { + color: var(--h-hero-text); + font-weight: 600; +} diff --git a/wp-content/themes/hantico/single-article.php b/wp-content/themes/hantico/single-article.php index 877ca3b..3a64421 100644 --- a/wp-content/themes/hantico/single-article.php +++ b/wp-content/themes/hantico/single-article.php @@ -6,6 +6,7 @@ Назад -
-

-
- -- 2.54.0 From 6edf5d69bdaf3eb38e45a4fb305873f445a9a765 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Fri, 16 Oct 2026 12:34:53 +0300 Subject: [PATCH 03/36] =?UTF-8?q?task=2017075=20|=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B1=D0=BB=D0=BE=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/hantico/assets/css/style.css | 608 +++++++++++++++++- wp-content/themes/hantico/single-article.php | 61 +- .../hantico/template-parts/app-steps.php | 84 +++ .../article-blocks/attention_blocks.php | 25 + .../article-blocks/block_main.php | 14 + .../template-parts/article-blocks/cta_1.php | 33 + .../template-parts/article-blocks/cta_2.php | 31 + .../article-blocks/plaque_authorship.php | 17 + .../template-parts/article-blocks/quote.php | 32 + .../template-parts/article-blocks/text.php | 9 + 10 files changed, 891 insertions(+), 23 deletions(-) create mode 100644 wp-content/themes/hantico/template-parts/app-steps.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/attention_blocks.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/block_main.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/cta_1.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/cta_2.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/plaque_authorship.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/quote.php create mode 100644 wp-content/themes/hantico/template-parts/article-blocks/text.php diff --git a/wp-content/themes/hantico/assets/css/style.css b/wp-content/themes/hantico/assets/css/style.css index dea0285..dd5a499 100644 --- a/wp-content/themes/hantico/assets/css/style.css +++ b/wp-content/themes/hantico/assets/css/style.css @@ -4138,6 +4138,9 @@ h4 { .article-main { min-width: 0; } +.article-main .article-content:not(:first-child){ + margin-top: clamp(30px, 17.5691px + 3.3149vw, 60px); +} .article-sidebar { position: sticky; top: 112px; @@ -5947,14 +5950,14 @@ h4 { /* новые */ -.h-article-hero { - --h-hero-accent: #d52d49; - --h-hero-text: #202b35; - --h-hero-muted: #68747f; - --h-hero-line: #e7eaf0; - --h-hero-bg: #f7f8fa; - --h-hero-radius: 26px; +.h-article-hero { + --h-hero-accent: var(--color-red); + --h-hero-text: var(--color-dark); + --h-hero-muted: var(--color-grey-dark); + --h-hero-line: var(--color-grey); + --h-hero-bg: var(--color-light); + --h-hero-radius: 26px; box-sizing: border-box; width: 100%; min-width: 1100px; @@ -5981,7 +5984,7 @@ h4 { min-height: 600px; overflow: hidden; border-radius: var(--h-hero-radius); - background: #e4e8ec; + background: var(--color-grey); } .h-article-hero__image { @@ -6003,7 +6006,7 @@ h4 { .h-article-hero__breadcrumb-divider { flex: none; - color: #a9b0b8; + color: var(--color-grey-light); } .h-article-hero__breadcrumb-current { @@ -6024,9 +6027,9 @@ h4 { align-items: center; min-height: 29px; padding: 5px 12px; - border: 1px solid rgba(213, 45, 73, .17); + border: 1px solid color-mix(in srgb, var(--color-red) 17%, transparent); border-radius: 100px; - background: #fff0f3; + background: color-mix(in srgb, var(--color-red) 8%, var(--color-light)); color: var(--h-hero-accent); font-size: 12px; font-weight: 600; @@ -6045,7 +6048,11 @@ h4 { } .h-article-hero__title > span { - background: linear-gradient(98deg, #f05d6b 0%, #bc203f 100%); + background: linear-gradient( + 98deg, + var(--color-red) 0%, + var(--color-red-dark) 100% + ); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -6054,7 +6061,7 @@ h4 { .h-article-hero__description { max-width: 710px; margin: 24px 0 34px; - color: #535f6c; + color: var(--color-text); font-size: 17px; font-weight: 400; line-height: 1.6; @@ -6068,7 +6075,7 @@ h4 { margin-top: auto; padding-top: 25px; border-top: 1px solid var(--h-hero-line); - color: #4e5a65; + color: var(--color-text); } .h-article-hero__meta-item { @@ -6088,7 +6095,7 @@ h4 { } .h-article-hero__meta-item + .h-article-hero__meta-item { - border-left: 1px solid #d7dce3; + border-left: 1px solid var(--color-grey); } .h-article-hero__meta-item svg { @@ -6103,3 +6110,574 @@ h4 { color: var(--h-hero-text); font-weight: 600; } + +.h-attention { + --attention-color: var(--color-red); + --attention-bg: color-mix(in srgb, var(--color-red) 8%, var(--color-light)); + --attention-icon-bg: color-mix(in srgb, var(--color-red) 15%, var(--color-light)); + display: flex; + align-items: center; + gap: 20px; + width: 100%; + box-sizing: border-box; + margin: 28px 0; + padding: 24px 28px; + border-radius: 16px; + background: var(--attention-bg); +} + +.h-attention--warning { + --attention-color: var(--color-red); + --attention-bg: color-mix(in srgb, var(--color-red) 8%, var(--color-light)); + --attention-icon-bg: color-mix(in srgb, var(--color-red) 15%, var(--color-light)); +} + +.h-attention--info { + --attention-color: #a8740b; + --attention-bg: #fff8e8; + --attention-icon-bg: #f9ebc8; +} + +.h-attention--success { + --attention-color: #277547; + --attention-bg: #eff8f2; + --attention-icon-bg: #dceee2; +} + +.h-attention__icon { + display: flex; + align-items: center; + justify-content: center; + flex: 0 0 48px; + width: 48px; + height: 48px; + border-radius: 12px; + background: var(--attention-icon-bg); + color: var(--attention-color); +} + +.h-attention__icon span { + font-family: Arial, sans-serif; + font-size: 30px; + font-weight: 700; + line-height: 1; +} + +.h-attention__content { + flex: 1; + min-width: 0; + font-size: 16px; + line-height: 1.65; + color: var(--color-text); +} + +.h-attention__content p { + margin: 0; + padding: 0; +} + +.h-attention__content p + p { + margin-top: 10px; +} + +.h-attention__content a { + color: var(--attention-color); + text-decoration: underline; +} + +.h-attention__content > :last-child { + margin-bottom: 0; +} + +@media (max-width: 767.98px) { + .h-attention{ + padding: 12px 14px; + + flex-direction: column; + gap: 12px; + } +} + +.h-article-quote { + display: flex; + align-items: center; + gap: 18px; + width: 100%; + box-sizing: border-box; + margin: 30px 0; + padding: 28px 16px; + border-radius: 14px; + background: var(--color-dark); + color: var(--color-light); + font-family: inherit; +} + +.h-article-quote .h-article-quote__avatar { + display: block; + flex: 0 0 90px; + width: 90px; + height: 90px; + border-radius: 50%; + object-fit: cover; + object-position: center; +} + +.h-article-quote .h-article-quote__body { + flex: 1; + min-width: 0; +} + +.h-article-quote .h-article-quote__author { + margin: 0 0 6px; + font-size: 20px; + font-weight: 700; + line-height: 1.3; + color: var(--color-light); +} + +.h-article-quote .h-article-quote__text { + display: block; + margin: 0; + padding: 0; + border: 0; + background: none; + font-size: 20px; + font-weight: 400; + font-style: normal; + line-height: 1.3; + color: var(--color-light); +} + +@media (max-width: 767.98px) { + .h-article-quote{ + padding: 12px 14px; + + flex-direction: column; + align-items: start; + } + + .h-article-quote .h-article-quote__text{ + font-size: 14px; + } +} + +.h-article-cards { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 20px; + width: 100%; + margin: 30px 0; + box-sizing: border-box; +} + +.h-article-cards .h-article-cards__item { + display: flex; + flex-direction: column; + min-width: 0; + min-height: 110px; + padding: 20px 22px; + box-sizing: border-box; + border: 1px solid var(--color-grey); + border-radius: 10px; + background: var(--color-light); + box-shadow: 0 2px 12px color-mix(in srgb, var(--color-dark) 8%, transparent); +} + +.h-article-cards .h-article-cards__item p { + margin: 0; + padding: 0; + font-family: inherit; + font-size: 20px; + font-weight: 400; + line-height: 1.6; + color: var(--color-dark); +} + +.h-article-cards .h-article-cards__item p + p { + margin-top: 12px; +} + +@media (max-width: 767.98px) { + .h-article-cards{ + grid-template-columns: 1fr; + } + + .h-article-cards .h-article-cards__item p { + font-size: 16px; + } +} + +.h-article-cta { + display: flex; + align-items: center; + justify-content: space-between; + gap: 40px; + width: 100%; + box-sizing: border-box; + padding: 30px 40px; + margin: 30px 0; + background: var(--color-dark); + border-radius: 22px; + color: var(--color-light); + font-family: inherit; +} + +.h-article-cta .h-article-cta__content { + flex: 1; + min-width: 0; +} + +.h-article-cta .h-article-cta__title { + margin: 0 0 12px; + padding: 0; + font-size: 26px; + font-weight: 700; + line-height: 1.25; + color: var(--color-light); +} + +.h-article-cta .h-article-cta__description { + margin: 0; + padding: 0; + max-width: 520px; + font-size: 14px; + font-weight: 400; + line-height: 1.5; + color: var(--color-grey); +} + +.h-article-cta .h-article-cta__actions { + display: flex; + flex-direction: column; + flex: 0 0 245px; + gap: 12px; +} + +.h-article-cta .h-article-cta__btn { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + min-height: 48px; + box-sizing: border-box; + padding: 12px 20px; + border-radius: 50px; + font-size: 14px; + font-weight: 600; + line-height: 1.3; + text-align: center; + text-decoration: none; + transition: background 0.2s, color 0.2s, border-color 0.2s; +} + +.h-article-cta .h-article-cta__btn--outline { + background: transparent; + border: 1px solid var(--color-grey-light); + color: var(--color-light); +} + +.h-article-cta .h-article-cta__btn--outline:hover { + background: var(--color-light); + border-color: var(--color-light); + color: var(--color-dark); +} + +.h-article-cta .h-article-cta__btn--white { + background: var(--color-light); + border: 1px solid var(--color-light); + color: var(--color-dark); +} + +.h-article-cta .h-article-cta__btn--white:hover { + background: var(--color-grey); + border-color: var(--color-grey); + color: var(--color-dark); +} + +@media (max-width: 767.98px) { + .h-article-app-cta, + .h-article-cta{ + flex-direction: column; + } + .h-article-cta .h-article-cta__content{ + width: 100%; + } + .h-article-cta .h-article-cta__actions{ + width: 100%; + flex: auto; + } +} + +.h-article-app-cta { + display: flex; + align-items: center; + gap: 24px; + width: 100%; + min-height: 120px; + box-sizing: border-box; + margin: 30px 0; + padding: 18px 32px; + border-radius: 16px; + background: var(--color-red); + font-family: inherit; +} + +.h-article-app-cta .h-article-app-cta__image { + display: flex; + align-items: center; + justify-content: center; + flex: 0 0 100px; + width: 100px; + height: 100px; +} + +.h-article-app-cta .h-article-app-cta__image img { + display: block; + width: 100%; + height: 100%; + object-fit: contain; +} + +.h-article-app-cta .h-article-app-cta__content { + flex: 1; + min-width: 0; +} + +.h-article-app-cta .h-article-app-cta__title { + margin: 0; + padding: 0; + font-size: 20px; + font-weight: 700; + line-height: 1.4; + color: var(--color-light); +} + +.h-article-app-cta .h-article-app-cta__button { + display: flex; + align-items: center; + justify-content: center; + flex: 0 0 145px; + min-height: 40px; + box-sizing: border-box; + padding: 10px 20px; + border: 0; + border-radius: 50px; + background: var(--color-light); + color: var(--color-dark); + font-size: 14px; + font-weight: 600; + line-height: 1.3; + text-align: center; + text-decoration: none; + transition: background 0.2s, color 0.2s; +} + +.h-article-app-cta .h-article-app-cta__button:hover { + background: var(--color-grey); +} + +@media (max-width: 767.98px) { + .h-article-app-cta .h-article-app-cta__title{ + font-size: 16px; + } + + .h-article-app-cta .h-article-app-cta__button{ + width: 100%; + + flex:auto; + } +} + + +.h-article-author { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 5px; + width: 100%; + box-sizing: border-box; + margin: 30px 0; + padding: 20px 24px; + border: 1px solid var(--color-grey); + border-radius: 14px; + background: var(--color-light); + font-family: inherit; +} + +.h-article-author__text { + font-size: 15px; + line-height: 1.5; + color: var(--color-grey-dark); +} + +.h-article-author__link { + font-size: 15px; + font-weight: 600; + line-height: 1.5; + color: var(--color-red); + text-decoration: none; + transition: color .2s ease; +} + +.h-article-author__link:hover { + color: var(--color-red-dark); + text-decoration: underline; +} + +.h-app-steps { + width: 100%; + box-sizing: border-box; + margin: 40px 0; + padding: 40px 30px; + background: var(--color-light); + border-radius: 18px; + font-family: inherit; + color: var(--color-dark); +} + +.h-app-steps *, +.h-app-steps *::before, +.h-app-steps *::after { + box-sizing: border-box; +} + +.h-app-steps .h-app-steps__title { + margin: 0 0 40px; + padding: 0; + text-align: center; + font-size: 32px; + font-weight: 700; + line-height: 1.3; + color: var(--color-dark); +} + +.h-app-steps .h-app-steps__layout { + display: grid; + grid-template-columns: minmax(210px, 35%) minmax(0, 1fr); + gap: 30px; + align-items: center; + width: 100%; +} + +.h-app-steps .h-app-steps__phone { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + min-width: 0; + height: 100%; +} + +.h-app-steps .h-app-steps__phone img { + display: block; + width: 100%; + max-width: 350px; + height: auto; + max-height: 420px; + object-fit: contain; + object-position: center; + border: none; + border-radius: 0; + box-shadow: none; +} + +.h-app-steps .h-app-steps__grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + column-gap: 28px; + row-gap: 40px; + width: 100%; + min-width: 0; + align-items: start; +} + +.h-app-steps .h-app-steps__step { + display: flex; + flex-direction: column; + align-items: flex-start; + min-width: 0; + height: 100%; +} + +.h-app-steps .h-app-steps__number { + display: flex; + align-items: center; + justify-content: center; + flex: 0 0 44px; + width: 44px; + height: 44px; + margin: 0 0 16px; + padding: 0; + background: var(--color-grey-light); + border-radius: 12px; + color: var(--color-light); + font-size: 20px; + font-weight: 700; + line-height: 1; + text-align: center; +} + +.h-app-steps .h-app-steps__step:first-child .h-app-steps__number { + background: var(--color-red); +} + +.h-app-steps .h-app-steps__step-title { + margin: 0 0 8px; + padding: 0; + font-size: 18px; + font-weight: 600; + line-height: 1.35; + color: var(--color-dark); + text-align: left; +} + +.h-app-steps .h-app-steps__description { + margin: 0; + padding: 0; + font-size: 15px; + font-weight: 400; + line-height: 1.55; + color: var(--color-text); + text-align: left; +} + +.h-app-steps .h-app-steps__download { + display: flex; + align-items: center; + gap: 14px; + width: 100%; + margin-top: 20px; +} + +.h-app-steps .h-app-steps__qr { + display: block; + flex: 0 0 82px; + width: 82px; + height: 82px; + max-width: none; + object-fit: contain; + border-radius: 0; + box-shadow: none; +} + +@media (max-width: 1279.98px) { + .h-app-steps .h-app-steps__layout{ + display: flex; + flex-direction: column; + gap: 20px; + } + .h-app-steps .h-app-steps__phone{ + display: none; + } +} + +@media (max-width: 767.98px) { + .h-app-steps .h-app-steps__title{ + font-size: 24px; + } + + .h-app-steps .h-app-steps__grid{ + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/wp-content/themes/hantico/single-article.php b/wp-content/themes/hantico/single-article.php index d03a237..338ad1b 100644 --- a/wp-content/themes/hantico/single-article.php +++ b/wp-content/themes/hantico/single-article.php @@ -14,11 +14,21 @@ $parent_id = is_singular('news') ? 82 : 42; $terms = get_the_terms(get_the_ID(), 'article_category'); - $article_content = get_field('article_content'); - if ($article_content) : - $generated = generate_toc($article_content); + $article_blocks = get_field('new_blocks') ?: []; + $article_content = get_field('article_content') ?: ''; + $generated = generate_toc($article_content, 'article-content'); $content = $generated['content']; $toc_items = $generated['toc_items']; + foreach ($article_blocks as $block_index => &$block) { + if (($block['acf_fc_layout'] ?? '') !== 'text') { + continue; + } + $generated = generate_toc($block['content'] ?? '', 'article-block-' . ($block_index + 1)); + $block['content'] = $generated['content']; + $toc_items = array_merge($toc_items, $generated['toc_items']); + } + unset($block); + if ($article_content || $article_blocks) : ?>
@@ -81,10 +91,44 @@
-
+ +
+ + $block, + ] + ); + } + } + } + ?>
- -
+ diff --git a/wp-content/themes/hantico/template-parts/app-steps.php b/wp-content/themes/hantico/template-parts/app-steps.php new file mode 100644 index 0000000..3f49228 --- /dev/null +++ b/wp-content/themes/hantico/template-parts/app-steps.php @@ -0,0 +1,84 @@ +
+
+
+

+ Начать работать — просто +

+ +
+ +
+ Приложение Hantico на смартфоне +
+ +
+ +
+
1
+ +

+ Скачайте приложение +

+ +

+ Установите Hantico на смартфон. +

+ +
+ QR-код для скачивания Hantico +
+
+ +
+
2
+ +

+ Зарегистрируйтесь +

+ +

+ Создайте аккаунт и заполните + необходимые данные. +

+
+ +
+
3
+ +

+ Выберите подходящий формат работы +

+ +

+ Найдите доступные варианты и условия, + которые подходят именно вам. +

+
+ +
+
4
+ +

+ Начинайте работать +

+ +

+ Переходите к заказам и используйте + Hantico в работе. +

+
+ +
+
+
+
+
\ No newline at end of file diff --git a/wp-content/themes/hantico/template-parts/article-blocks/attention_blocks.php b/wp-content/themes/hantico/template-parts/article-blocks/attention_blocks.php new file mode 100644 index 0000000..01f370d --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/attention_blocks.php @@ -0,0 +1,25 @@ + ['class' => 'warning', 'icon' => '!', 'title' => 'Важно!'], + 'yellow' => ['class' => 'info', 'icon' => 'i', 'title' => 'Полезная информация'], + 'green' => ['class' => 'success', 'icon' => '✓', 'title' => 'Рекомендация'], +]; +$variant = $variants[$attention] ?? $variants['red']; +?> + + +
+
+ +
+
+ +
+
+ diff --git a/wp-content/themes/hantico/template-parts/article-blocks/block_main.php b/wp-content/themes/hantico/template-parts/article-blocks/block_main.php new file mode 100644 index 0000000..91c35c6 --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/block_main.php @@ -0,0 +1,14 @@ + + + +
+ +
+

+
+ +
+ diff --git a/wp-content/themes/hantico/template-parts/article-blocks/cta_1.php b/wp-content/themes/hantico/template-parts/article-blocks/cta_1.php new file mode 100644 index 0000000..f63c7e5 --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/cta_1.php @@ -0,0 +1,33 @@ + + +
+
+ +

+ + + +

+ +
+ +
+ + + + + + + + + + + +
+
diff --git a/wp-content/themes/hantico/template-parts/article-blocks/cta_2.php b/wp-content/themes/hantico/template-parts/article-blocks/cta_2.php new file mode 100644 index 0000000..aeb2bf6 --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/cta_2.php @@ -0,0 +1,31 @@ + + +
+ +
+ <?php echo esc_attr($image['alt'] ?? ''); ?> +
+ + + +
+

+
+ + + + + + + +
diff --git a/wp-content/themes/hantico/template-parts/article-blocks/plaque_authorship.php b/wp-content/themes/hantico/template-parts/article-blocks/plaque_authorship.php new file mode 100644 index 0000000..c7939e6 --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/plaque_authorship.php @@ -0,0 +1,17 @@ + + + diff --git a/wp-content/themes/hantico/template-parts/article-blocks/quote.php b/wp-content/themes/hantico/template-parts/article-blocks/quote.php new file mode 100644 index 0000000..b15ee93 --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/quote.php @@ -0,0 +1,32 @@ + + +
+ + <?php echo esc_attr($image['alt'] ?? ''); ?> + + +
+ +
+ +
+ + + +
+ +
+ +
+
diff --git a/wp-content/themes/hantico/template-parts/article-blocks/text.php b/wp-content/themes/hantico/template-parts/article-blocks/text.php new file mode 100644 index 0000000..fe9439e --- /dev/null +++ b/wp-content/themes/hantico/template-parts/article-blocks/text.php @@ -0,0 +1,9 @@ + + + +
+ \ No newline at end of file -- 2.54.0 From 2a90b6957ce44572f0071a31e129689dfe60e140 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Fri, 16 Oct 2026 12:48:10 +0300 Subject: [PATCH 04/36] =?UTF-8?q?task=2017075=20|=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D1=81?= =?UTF-8?q?=D0=BE=D1=86.=20=D1=81=D0=B5=D1=82=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/hantico/assets/css/style.css | 34 ++++++++++++++++++- wp-content/themes/hantico/single-article.php | 21 ++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/hantico/assets/css/style.css b/wp-content/themes/hantico/assets/css/style.css index dd5a499..77de592 100644 --- a/wp-content/themes/hantico/assets/css/style.css +++ b/wp-content/themes/hantico/assets/css/style.css @@ -6680,4 +6680,36 @@ h4 { .h-app-steps .h-app-steps__grid{ grid-template-columns: 1fr; } -} \ No newline at end of file +} + +.article-social{ + margin-top: 20px; + + padding: 25px 30px; + background-color: var(--color-light); + border-radius: var(--radius-sm); + + display: flex; + flex-direction: column; + gap: 15px; +} +.article-social__title{ + font-size: var(--fs-h3-sm); + line-height: 1.2; + font-weight: 600; + color: var(--color-dark); +} +.article-social__text{ + font-size: 18px; + line-height: 1.2; +} +.article-social__list{ + display: flex; + gap: 10px; +} +.article-social__list > .footer-socials__item { + flex: 1; + width: auto; + height: 44px; + aspect-ratio: auto; +} diff --git a/wp-content/themes/hantico/single-article.php b/wp-content/themes/hantico/single-article.php index 338ad1b..94d6356 100644 --- a/wp-content/themes/hantico/single-article.php +++ b/wp-content/themes/hantico/single-article.php @@ -19,6 +19,7 @@ $generated = generate_toc($article_content, 'article-content'); $content = $generated['content']; $toc_items = $generated['toc_items']; + $footer_socials = get_field('socials', 'option'); foreach ($article_blocks as $block_index => &$block) { if (($block['acf_fc_layout'] ?? '') !== 'text') { continue; @@ -142,6 +143,26 @@
+ +
+

+ Работайте проще и зарабатывайте больше! +

+ +

+ Лайфхаки, полезные инструкции, изменения в правилах и важные новости для водителей и курьеров — в каналах Hantico. +

+ +
+ + VK + + + + Telegram + +
+
-- 2.54.0 From 2e54c26224be3b7f2639412447cd5f3975a5c394 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Fri, 16 Oct 2026 12:54:08 +0300 Subject: [PATCH 05/36] =?UTF-8?q?task=2017075=20|=20=D1=81=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=20=D0=BF=D0=BE=D0=B4=D1=81=D1=87=D0=B5=D1=82?= =?UTF-8?q?=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20=D1=87=D1=82?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/hantico/single-article.php | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/hantico/single-article.php b/wp-content/themes/hantico/single-article.php index 94d6356..52dbfa2 100644 --- a/wp-content/themes/hantico/single-article.php +++ b/wp-content/themes/hantico/single-article.php @@ -16,6 +16,26 @@ $terms = get_the_terms(get_the_ID(), 'article_category'); $article_blocks = get_field('new_blocks') ?: []; $article_content = get_field('article_content') ?: ''; + $reading_parts = [$article_content]; + foreach ($article_blocks as $block) { + $layout = $block['acf_fc_layout'] ?? ''; + if ($layout === 'text') { + $reading_parts[] = $block['content'] ?? ''; + } elseif (in_array($layout, ['attention_block', 'attention_blocks', 'quote'], true)) { + $reading_parts[] = $block['text'] ?? ''; + } elseif ($layout === 'block_main') { + foreach (($block['cards'] ?? []) as $card) { + $reading_parts[] = $card['text_card'] ?? ''; + } + } + } + // Разделяем HTML-элементы пробелами, чтобы соседние абзацы не склеивались. + $reading_text = strip_shortcodes(implode(' ', $reading_parts)); + $reading_text = preg_replace('@<(script|style)\b[^>]*>.*?@si', ' ', $reading_text); + $reading_text = preg_replace('/<[^>]*>/', ' ', $reading_text); + $reading_text = html_entity_decode(wp_strip_all_tags($reading_text), ENT_QUOTES | ENT_HTML5, 'UTF-8'); + $word_count = preg_match_all("/[\p{L}\p{N}]+(?:[’'\x{002D}][\p{L}\p{N}]+)*/u", $reading_text); + $reading_minutes = $word_count ? max(1, (int) ceil($word_count / 200)) : 0; $generated = generate_toc($article_content, 'article-content'); $content = $generated['content']; $toc_items = $generated['toc_items']; @@ -70,13 +90,15 @@ +
- Время чтения: — + Время чтения: ≈ мин
+

Статьи не найдены.

'; $html = ob_get_clean(); wp_send_json_success([ 'html' => $html, diff --git a/wp-content/themes/hantico/inc/article-urls.php b/wp-content/themes/hantico/inc/article-urls.php new file mode 100644 index 0000000..f2e1653 --- /dev/null +++ b/wp-content/themes/hantico/inc/article-urls.php @@ -0,0 +1,94 @@ + 'blog-taxi', + 'courier' => 'blog-courier', + 'cargo' => 'blog-cargo', + ]; + $terms = get_the_terms($post_id, 'article_chapter'); + if (!$terms || is_wp_error($terms)) { + return 'blog'; + } + $slugs = wp_list_pluck($terms, 'slug'); + foreach ($sections as $slug => $base) { + if (in_array($slug, $slugs, true)) { + return $base; + } + } + return 'blog'; +} + +add_filter('post_type_link', function ($url, $post, $leavename, $sample) { + if ($post->post_type !== 'article' || (!$post->post_name && !$leavename)) { + return $url; + } + $slug = $leavename ? '%article%' : $post->post_name; + return home_url(user_trailingslashit('/' . hantico_article_url_base($post->ID) . '/' . $slug, 'single')); +}, 10, 4); + +add_action('init', function () { + add_rewrite_rule('^blog-(taxi|courier|cargo)/?$', 'index.php?pagename=blog&article_section_filter=$matches[1]', 'top'); + // /blog/ продолжает обслуживаться существующими правилами типа article. + add_rewrite_rule( + '^(?:blog-taxi|blog-courier|blog-cargo)/([^/]+)/?$', + 'index.php?post_type=article&name=$matches[1]', + 'top' + ); +}); + +add_filter('query_vars', function ($vars) { + $vars[] = 'article_section_filter'; + return $vars; +}); + +function hantico_blog_section() { + $section = get_query_var('article_section_filter', ''); + if (!$section && isset($_GET['section']) && is_string($_GET['section'])) { + $section = sanitize_key(wp_unslash($_GET['section'])); + } + return in_array($section, ['general', 'taxi', 'courier', 'cargo'], true) ? $section : ''; +} + +function hantico_blog_tax_query($section, $category = '') { + $query = ['relation' => 'AND']; + if ($section !== '') { + $query[] = ['taxonomy' => 'article_chapter', 'field' => 'slug', 'terms' => $section]; + } + if ($category !== '') { + $query[] = ['taxonomy' => 'article_category', 'field' => 'slug', 'terms' => $category]; + } + return count($query) > 1 ? $query : []; +} + +add_filter('redirect_canonical', function ($redirect) { + return is_page('blog') && get_query_var('article_section_filter') ? false : $redirect; +}); + +// Старый адрес и адрес с чужим разделом ведут на текущую ссылку статьи. +add_action('template_redirect', function () { + if (!is_singular('article') || is_preview() || is_feed() || is_embed() + || !in_array($_SERVER['REQUEST_METHOD'] ?? '', ['GET', 'HEAD'], true)) { + return; + } + $request_path = wp_parse_url(wp_unslash($_SERVER['REQUEST_URI'] ?? ''), PHP_URL_PATH); + $home_path = wp_parse_url(home_url('/'), PHP_URL_PATH); + $relative_path = substr((string) $request_path, strlen((string) $home_path)); + if (!preg_match('~^blog(?:-taxi|-courier|-cargo)?/[^/]+/?$~', $relative_path)) { + return; + } + $url = get_permalink(get_queried_object_id()); + $canonical_path = wp_parse_url($url, PHP_URL_PATH); + if (rawurldecode((string) $request_path) === rawurldecode((string) $canonical_path)) { + return; + } + // Сохраняем параметры, например UTM-метки. + $query = wp_parse_url(wp_unslash($_SERVER['REQUEST_URI'] ?? ''), PHP_URL_QUERY); + if ($query) { + $url .= '?' . $query; + } + if (wp_safe_redirect($url, 301)) { + exit; + } +}, 5); diff --git a/wp-content/themes/hantico/templates/template-blog.php b/wp-content/themes/hantico/templates/template-blog.php index be3f7f1..0969559 100644 --- a/wp-content/themes/hantico/templates/template-blog.php +++ b/wp-content/themes/hantico/templates/template-blog.php @@ -10,6 +10,14 @@ Template Name: Блог
home_url('/blog/'), + 'general' => add_query_arg('section', 'general', home_url('/blog/')), + 'taxi' => home_url('/blog-taxi/'), + 'courier' => home_url('/blog-courier/'), + 'cargo' => home_url('/blog-cargo/'), + ]; $blog_title = get_field('blog_title'); $blog_descr = get_field('blog_descr'); $blog_args = [ @@ -18,6 +26,7 @@ Template Name: Блог 'orderby' => 'date', 'order' => 'DESC' ]; + $blog_args['tax_query'] = hantico_blog_tax_query($current_section); $blog_query = new WP_Query($blog_args); if ($blog_query->have_posts()) : ?> @@ -32,8 +41,24 @@ Template Name: Блог + +
+ + + + +
@@ -91,25 +116,12 @@ Template Name: Блог 'orderby' => 'date', 'order' => 'DESC' ]; - if (!empty($current_category)) { - $blog_args['tax_query'] = [ - [ - 'taxonomy' => 'article_category', - 'field' => 'slug', - 'terms' => $current_category - ], - ]; - } + $blog_args['tax_query'] = hantico_blog_tax_query($current_section, $current_category); $blog_query = new WP_Query($blog_args); - if ($blog_query->have_posts()) : ?>

Все статьи

-
- -- 2.54.0 From 9ab584cba5cb522a61132f7fc7ca71fa38c46110 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Fri, 16 Oct 2026 16:39:18 +0300 Subject: [PATCH 08/36] =?UTF-8?q?task=2017075=20|=20=D1=80=D0=B5=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D0=BB=20=D0=BC=D0=B8=D0=BA?= =?UTF-8?q?=D1=80=D0=BE=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/hantico/functions.php | 1 + wp-content/themes/hantico/inc/schema.php | 234 ++++++++++++++++++ .../hantico/templates/template-blog.php | 18 +- 3 files changed, 237 insertions(+), 16 deletions(-) create mode 100644 wp-content/themes/hantico/inc/schema.php diff --git a/wp-content/themes/hantico/functions.php b/wp-content/themes/hantico/functions.php index 30205d0..7fb0801 100644 --- a/wp-content/themes/hantico/functions.php +++ b/wp-content/themes/hantico/functions.php @@ -374,3 +374,4 @@ require_once get_template_directory() . '/inc/ajax.php'; require_once get_template_directory() . '/inc/menu.php'; require_once get_template_directory() . '/inc/breadcrumbs.php'; require_once get_template_directory() . '/inc/article-urls.php'; +require_once get_template_directory() . '/inc/schema.php'; diff --git a/wp-content/themes/hantico/inc/schema.php b/wp-content/themes/hantico/inc/schema.php new file mode 100644 index 0000000..ebab475 --- /dev/null +++ b/wp-content/themes/hantico/inc/schema.php @@ -0,0 +1,234 @@ + 'article', + 'posts_per_page' => $featured ? 6 : 12, + 'orderby' => 'date', + 'order' => 'DESC', + 'tax_query' => hantico_blog_tax_query(hantico_blog_section(), $category), + ]); + } + return $queries[$key]; +} + +function hantico_schema_url() { + if (is_singular('article')) { + return get_permalink(get_queried_object_id()); + } + $section = hantico_blog_section(); + $url = home_url(user_trailingslashit('/' . ($section && $section !== 'general' ? 'blog-' . $section : 'blog'))); + return $section === 'general' ? add_query_arg('section', 'general', $url) : $url; +} + +function hantico_schema_text($text) { + return trim(html_entity_decode(wp_strip_all_tags((string) $text), ENT_QUOTES | ENT_HTML5, 'UTF-8')); +} + +function hantico_schema_section_name($section) { + $term = $section ? get_term_by('slug', $section, 'article_chapter') : false; + return $term && !is_wp_error($term) ? $term->name : get_the_title(get_queried_object_id()); +} + +// Yoast хранит прежний permalink в индексе: корректируем только вывод, +// не меняя настройки плагина или сохранённые SEO-поля. +add_filter('wpseo_canonical', function ($url) { + return hantico_schema_enabled() ? hantico_schema_url() : $url; +}); +add_filter('wpseo_opengraph_url', function ($url) { + return hantico_schema_enabled() ? hantico_schema_url() : $url; +}); + +function hantico_schema_has_type($node, $types) { + return (bool) array_intersect((array) ($node['@type'] ?? []), (array) $types); +} + +function hantico_schema_graph($graph) { + if (!hantico_schema_enabled()) { + return $graph; + } + $url = hantico_schema_url(); + $post_id = get_queried_object_id(); + $is_blog = hantico_schema_is_blog(); + $page_index = null; + // Обновляем также связанные ID изображений, крошек и действий Yoast. + foreach ($graph as $node) { + if (hantico_schema_has_type($node, ['WebPage', 'CollectionPage', 'ItemPage']) && !empty($node['url'])) { + $old_url = $node['url']; + array_walk_recursive($graph, function (&$value) use ($old_url, $url) { + if (is_string($value) && ($value === $old_url || strpos($value, $old_url . '#') === 0)) { + $value = $url . substr($value, strlen($old_url)); + } + }); + break; + } + } + $website_id = home_url('/#website'); + $organization_id = home_url('/#organization'); + $organization_found = false; + foreach ($graph as $index => $node) { + if (hantico_schema_has_type($node, ['WebPage', 'CollectionPage', 'ItemPage'])) { + $page_index = $index; + } + if (hantico_schema_has_type($node, 'WebSite')) { + $website_id = $node['@id']; + } + if (hantico_schema_has_type($node, 'Organization')) { + $organization_id = $node['@id']; + $organization_found = true; + } + } + if (!$organization_found) { + $graph[] = [ + '@type' => 'Organization', '@id' => $organization_id, + 'name' => 'Hantico', 'url' => home_url('/'), + 'logo' => ['@type' => 'ImageObject', 'url' => get_theme_file_uri('assets/img/icons/logo.svg')], + ]; + } + $website_found = false; + foreach ($graph as &$node) { + if (hantico_schema_has_type($node, 'WebSite')) { + $node['publisher'] = ['@id' => $organization_id]; + $website_found = true; + } + } + unset($node); + if (!$website_found) { + $graph[] = ['@type' => 'WebSite', '@id' => $website_id, 'url' => home_url('/'), + 'name' => get_bloginfo('name'), 'publisher' => ['@id' => $organization_id]]; + } + if ($page_index === null) { + $graph[] = ['@type' => 'WebPage', '@id' => $url]; + $page_index = array_key_last($graph); + } + $page = &$graph[$page_index]; + $page['url'] = $url; + $page['isPartOf'] = ['@id' => $website_id]; + $page['inLanguage'] = get_bloginfo('language'); + $page['breadcrumb'] = ['@id' => $url . '#breadcrumb']; + $description = $page['description'] ?? ''; + if ($is_blog) { + $section = hantico_blog_section(); + $page['@type'] = 'CollectionPage'; + $page['name'] = hantico_schema_text($section ? hantico_schema_section_name($section) : (get_field('blog_title', $post_id) ?: get_the_title($post_id))); + $term = $section ? get_term_by('slug', $section, 'article_chapter') : false; + $description = $term && !is_wp_error($term) && $term->description + ? $term->description : ($description ?: get_field('blog_descr', $post_id)); + // Два списка соответствуют двум реальным блокам, без повторных запросов + // и без включения статей из следующих AJAX-порций. + $page['mainEntity'] = []; + foreach ([true, false] as $featured) { + $list_id = $url . ($featured ? '#featured-articles' : '#articles'); + $items = []; + foreach (hantico_blog_query($featured)->posts as $post) { + $items[] = ['@type' => 'ListItem', 'position' => count($items) + 1, + 'url' => get_permalink($post), 'name' => hantico_schema_text(get_the_title($post))]; + } + $graph[] = ['@type' => 'ItemList', '@id' => $list_id, + 'numberOfItems' => count($items), 'itemListElement' => $items]; + $page['mainEntity'][] = ['@id' => $list_id]; + } + $crumbs = [['name' => 'Главная', 'item' => home_url('/')], ['name' => $page['name'], 'item' => $url]]; + } else { + $description = $description ?: (get_field('brief_description', $post_id) ?: get_field('article_descr', $post_id)); + $article = [ + '@type' => 'BlogPosting', '@id' => $url . '#article', 'url' => $url, + 'headline' => hantico_schema_text(get_the_title($post_id)), + 'datePublished' => get_post_time('c', true, $post_id), + 'dateModified' => get_post_modified_time('c', true, $post_id), + 'publisher' => ['@id' => $organization_id], + 'mainEntityOfPage' => ['@id' => $page['@id']], + 'inLanguage' => get_bloginfo('language'), + ]; + $image = get_the_post_thumbnail_url($post_id, 'full'); + if ($image) { + $article['image'] = $image; + } + $author_id = (int) get_post_field('post_author', $post_id); + $author = get_userdata($author_id); + if ($author && $author->display_name) { + $article['author'] = strcasecmp($author->display_name, 'Hantico') === 0 + ? ['@id' => $organization_id] + : ['@type' => 'Person', '@id' => home_url('/#author-' . $author_id), 'name' => $author->display_name]; + } + if ($description) { + $article['description'] = hantico_schema_text($description); + } + $article_index = null; + foreach ($graph as $index => $node) { + if (hantico_schema_has_type($node, ['Article', 'BlogPosting', 'NewsArticle'])) { + $article_index = $index; + $article['@id'] = $node['@id']; + break; + } + } + if ($article_index === null) { + $graph[] = $article; + } else { + $graph[$article_index] = array_merge($graph[$article_index], $article); + } + $page['mainEntity'] = ['@id' => $article['@id']]; + $base = hantico_article_url_base($post_id); + $section = $base === 'blog' ? '' : substr($base, 5); + $blog_page = get_page_by_path('blog'); + $crumbs = [ + ['name' => 'Главная', 'item' => home_url('/')], + ['name' => $section ? hantico_schema_section_name($section) : ($blog_page ? get_the_title($blog_page) : 'Блог'), + 'item' => home_url(user_trailingslashit('/' . $base))], + ['name' => $article['headline'], 'item' => $url], + ]; + } + if ($description) { + $page['description'] = hantico_schema_text($description); + } + unset($page); + $breadcrumb = ['@type' => 'BreadcrumbList', '@id' => $url . '#breadcrumb', 'itemListElement' => []]; + foreach ($crumbs as $crumb) { + $breadcrumb['itemListElement'][] = array_merge(['@type' => 'ListItem', 'position' => count($breadcrumb['itemListElement']) + 1], $crumb); + } + $breadcrumb_index = null; + foreach ($graph as $index => $node) { + if (hantico_schema_has_type($node, 'BreadcrumbList')) { + $breadcrumb_index = $index; + break; + } + } + if ($breadcrumb_index === null) { + $graph[] = $breadcrumb; + } else { + $graph[$breadcrumb_index] = $breadcrumb; + } + return $graph; +} + +// Yoast выводит граф в wp_head и безопасно кодирует JSON самостоятельно. +add_filter('wpseo_schema_graph', 'hantico_schema_graph', 20); + +// Резервный вывод, если Yoast деактивирован. При активном плагине второй +// script не создаётся, даже если его разметка отключена настройкой. +add_action('wp_head', function () { + if (defined('WPSEO_VERSION') || !hantico_schema_enabled()) { + return; + } + $json = wp_json_encode(['@context' => 'https://schema.org', '@graph' => hantico_schema_graph([])], + JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE); + if ($json) { + echo '' . "\n"; + } +}, 30); diff --git a/wp-content/themes/hantico/templates/template-blog.php b/wp-content/themes/hantico/templates/template-blog.php index 0969559..6c88270 100644 --- a/wp-content/themes/hantico/templates/template-blog.php +++ b/wp-content/themes/hantico/templates/template-blog.php @@ -20,14 +20,7 @@ Template Name: Блог ]; $blog_title = get_field('blog_title'); $blog_descr = get_field('blog_descr'); - $blog_args = [ - 'post_type' => 'article', - 'posts_per_page' => 6, - 'orderby' => 'date', - 'order' => 'DESC' - ]; - $blog_args['tax_query'] = hantico_blog_tax_query($current_section); - $blog_query = new WP_Query($blog_args); + $blog_query = hantico_blog_query(true); if ($blog_query->have_posts()) : ?>
@@ -110,14 +103,7 @@ Template Name: Блог 'taxonomy' => 'article_category', 'hide_empty' => true, ]); - $blog_args = [ - 'post_type' => 'article', - 'posts_per_page' => 12, - 'orderby' => 'date', - 'order' => 'DESC' - ]; - $blog_args['tax_query'] = hantico_blog_tax_query($current_section, $current_category); - $blog_query = new WP_Query($blog_args); + $blog_query = hantico_blog_query(); ?>
-- 2.54.0 From 3e62e846fd967b7e542085e0dda7ea2f536ceab6 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Fri, 16 Oct 2026 19:32:13 +0300 Subject: [PATCH 09/36] =?UTF-8?q?task=2017075=20|=20=D0=B2=D0=BD=D0=B5?= =?UTF-8?q?=D1=81=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BE=D1=82=20?= =?UTF-8?q?16.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/hantico/assets/css/style.css | 7 ++++++- wp-content/themes/hantico/inc/schema.php | 15 +++++++-------- .../themes/hantico/templates/template-blog.php | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/wp-content/themes/hantico/assets/css/style.css b/wp-content/themes/hantico/assets/css/style.css index dbae473..eee8628 100644 --- a/wp-content/themes/hantico/assets/css/style.css +++ b/wp-content/themes/hantico/assets/css/style.css @@ -4146,6 +4146,8 @@ h4 { top: 112px; } .article-toc { + height: 46vh; + padding: 25px 30px; background-color: var(--color-light); border-radius: var(--radius-sm); @@ -4168,8 +4170,8 @@ h4 { width: 0; } .article-toc__list.is-scrollable { - padding-right: 10px; scrollbar-width: auto; + height: 83%; } @-moz-document url-prefix() { .article-toc__list.is-scrollable { @@ -6328,6 +6330,9 @@ h4 { background: var(--color-light); box-shadow: 0 2px 12px color-mix(in srgb, var(--color-dark) 8%, transparent); } +.h-article-cards__item:last-child:nth-child(odd) { + grid-column: 1 / -1; +} .h-article-cards .h-article-cards__item p { margin: 0; diff --git a/wp-content/themes/hantico/inc/schema.php b/wp-content/themes/hantico/inc/schema.php index ebab475..0b7ba55 100644 --- a/wp-content/themes/hantico/inc/schema.php +++ b/wp-content/themes/hantico/inc/schema.php @@ -148,7 +148,7 @@ function hantico_schema_graph($graph) { } else { $description = $description ?: (get_field('brief_description', $post_id) ?: get_field('article_descr', $post_id)); $article = [ - '@type' => 'BlogPosting', '@id' => $url . '#article', 'url' => $url, + '@type' => 'Article', '@id' => $url . '#article', 'url' => $url, 'headline' => hantico_schema_text(get_the_title($post_id)), 'datePublished' => get_post_time('c', true, $post_id), 'dateModified' => get_post_modified_time('c', true, $post_id), @@ -160,13 +160,12 @@ function hantico_schema_graph($graph) { if ($image) { $article['image'] = $image; } - $author_id = (int) get_post_field('post_author', $post_id); - $author = get_userdata($author_id); - if ($author && $author->display_name) { - $article['author'] = strcasecmp($author->display_name, 'Hantico') === 0 - ? ['@id' => $organization_id] - : ['@type' => 'Person', '@id' => home_url('/#author-' . $author_id), 'name' => $author->display_name]; - } + $article['author'] = [ + '@type' => 'Organization', + '@id' => home_url('/about/#editorial'), + 'name' => 'Редакция Hantico', + 'url' => home_url('/about/'), + ]; if ($description) { $article['description'] = hantico_schema_text($description); } diff --git a/wp-content/themes/hantico/templates/template-blog.php b/wp-content/themes/hantico/templates/template-blog.php index 6c88270..1fa865d 100644 --- a/wp-content/themes/hantico/templates/template-blog.php +++ b/wp-content/themes/hantico/templates/template-blog.php @@ -36,7 +36,7 @@ Template Name: Блог
-- 2.54.0 From 68ef50a3d9628b8a0eb31d7f7b903ca5b2b4e898 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Tue, 20 Oct 2026 18:39:36 +0300 Subject: [PATCH 10/36] =?UTF-8?q?task=2017291=20|=20=D0=B7=D0=B0=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=BB=20=D0=BC=D0=B5=D1=82=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D1=80=D0=B8=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/hantico/footer.php | 6 ++-- wp-content/themes/hantico/functions.php | 4 +-- wp-content/themes/hantico/header.php | 4 +-- .../themes/hantico/template-parts/income.php | 6 +++- .../themes/hantico/template-parts/reviews.php | 18 ++++++++++++ .../themes/hantico/template-parts/scheme.php | 2 +- .../themes/hantico/template-parts/work.php | 2 +- .../hantico/templates/template-contacts.php | 4 +-- .../hantico/templates/template-courier.php | 4 +-- .../themes/hantico/templates/template-job.php | 28 +++++++++++++++++++ .../hantico/templates/template-work.php | 2 +- 11 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 wp-content/themes/hantico/templates/template-job.php diff --git a/wp-content/themes/hantico/footer.php b/wp-content/themes/hantico/footer.php index d802a21..3f0c6c7 100644 --- a/wp-content/themes/hantico/footer.php +++ b/wp-content/themes/hantico/footer.php @@ -20,10 +20,10 @@ true]); ?> diff --git a/wp-content/themes/hantico/functions.php b/wp-content/themes/hantico/functions.php index 7fb0801..299033a 100644 --- a/wp-content/themes/hantico/functions.php +++ b/wp-content/themes/hantico/functions.php @@ -351,7 +351,7 @@ function theme_yandex_metrika() { } k = e.createElement(t), a = e.getElementsByTagName(t)[0], k.async = 1, k.src = r, a.parentNode.insertBefore(k, a) })(window, document, 'script', 'https://mc.yandex.ru/metrika/tag.js', 'ym'); - ym(100213356, 'init', { + ym(113689913, 'init', { webvisor: true, clickmap: true, referrer: document.referrer, @@ -361,7 +361,7 @@ function theme_yandex_metrika() { }); @@ -33,7 +33,7 @@
true]); ?>
diff --git a/wp-content/themes/hantico/template-parts/income.php b/wp-content/themes/hantico/template-parts/income.php index 630536d..b29247f 100644 --- a/wp-content/themes/hantico/template-parts/income.php +++ b/wp-content/themes/hantico/template-parts/income.php @@ -11,7 +11,11 @@ } else { $page_id = 'option'; } - $income_title = get_field('income_title', $page_id); + + $this_page_id = get_the_ID(); + + $income_title = get_field('calculator_title', $this_page_id) + ?: get_field('income_title', $page_id); $income_descr = get_field('income_descr', $page_id); if ($income_title && $income_descr) : ?> diff --git a/wp-content/themes/hantico/template-parts/reviews.php b/wp-content/themes/hantico/template-parts/reviews.php index 7c63d80..cc52abe 100644 --- a/wp-content/themes/hantico/template-parts/reviews.php +++ b/wp-content/themes/hantico/template-parts/reviews.php @@ -1,10 +1,28 @@ 'review', 'posts_per_page' => 8, 'orderby' => 'date', 'order' => 'DESC' ]; + $review_ids = []; + foreach ((array) $reviews as $row) { + $review = $row['review'] ?? null; + $review_id = $review instanceof WP_Post ? $review->ID : (int) $review; + if ($review_id > 0) { + $review_ids[] = $review_id; + } + } + + if (!empty($review_ids)) { + $reviews_args['post__in'] = $review_ids; + $reviews_args['posts_per_page'] = -1; + $reviews_args['orderby'] = 'post__in'; + } + $reviews_query = new WP_Query($reviews_args); if ($reviews_query->have_posts()) : ?> diff --git a/wp-content/themes/hantico/template-parts/scheme.php b/wp-content/themes/hantico/template-parts/scheme.php index 6242c06..87a0c56 100644 --- a/wp-content/themes/hantico/template-parts/scheme.php +++ b/wp-content/themes/hantico/template-parts/scheme.php @@ -23,7 +23,7 @@ />
diff --git a/wp-content/themes/hantico/template-parts/work.php b/wp-content/themes/hantico/template-parts/work.php index da8773d..56be500 100644 --- a/wp-content/themes/hantico/template-parts/work.php +++ b/wp-content/themes/hantico/template-parts/work.php @@ -19,7 +19,7 @@
- + diff --git a/wp-content/themes/hantico/templates/template-contacts.php b/wp-content/themes/hantico/templates/template-contacts.php index 7ec71ad..80bb95e 100644 --- a/wp-content/themes/hantico/templates/template-contacts.php +++ b/wp-content/themes/hantico/templates/template-contacts.php @@ -23,13 +23,13 @@ Template Name: Контакты
Связаться с нами
  • - +
diff --git a/wp-content/themes/hantico/templates/template-courier.php b/wp-content/themes/hantico/templates/template-courier.php index d0a2b1d..65ec63e 100644 --- a/wp-content/themes/hantico/templates/template-courier.php +++ b/wp-content/themes/hantico/templates/template-courier.php @@ -10,15 +10,13 @@ Template Name: Курьерам
- + - - diff --git a/wp-content/themes/hantico/templates/template-job.php b/wp-content/themes/hantico/templates/template-job.php new file mode 100644 index 0000000..228701f --- /dev/null +++ b/wp-content/themes/hantico/templates/template-job.php @@ -0,0 +1,28 @@ + + + + + +
+ + + + + + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/wp-content/themes/hantico/templates/template-work.php b/wp-content/themes/hantico/templates/template-work.php index 24d14d3..86f349e 100644 --- a/wp-content/themes/hantico/templates/template-work.php +++ b/wp-content/themes/hantico/templates/template-work.php @@ -33,7 +33,7 @@ Template Name: Работа
- + -- 2.54.0 From f79548db46b586292cc6db7e5e17e0b6de4140e1 Mon Sep 17 00:00:00 2001 From: "web_103.2" Date: Tue, 20 Oct 2026 18:41:13 +0300 Subject: [PATCH 11/36] =?UTF-8?q?task=2017291=20|=20=D1=83=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D0=BB=20=D0=BC=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=B8=20+=20=D0=BC=D0=B5=D1=82=D1=80=D0=B8=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-content/themes/hantico/functions.php | 26 +++++++------------------ wp-content/themes/hantico/header.php | 4 ++++ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/wp-content/themes/hantico/functions.php b/wp-content/themes/hantico/functions.php index 299033a..cbe5f38 100644 --- a/wp-content/themes/hantico/functions.php +++ b/wp-content/themes/hantico/functions.php @@ -339,26 +339,14 @@ function theme_yandex_metrika() { ?>