Семеный клаас
This commit is contained in:
parent
79baf03d4b
commit
b0e6f146e9
@ -12278,3 +12278,117 @@ main > .pksh-section:first-child {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ── Author info (E-E-A-T) — shared component ── */
|
||||
.author-info-section {
|
||||
background: var(--bg-surface, #F8FAFC);
|
||||
border-top: 1px solid var(--border-default, #E2E8F0);
|
||||
}
|
||||
.author-info__inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 16px 32px;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.author-info__copyright,
|
||||
.author-info__author { font-size: .875rem; color: var(--color-text-secondary, #475569); }
|
||||
.author-info__label { font-weight: 500; }
|
||||
.author-info__name { font-weight: 600; color: var(--color-text-primary, #0F172A); }
|
||||
.author-info__creds { color: var(--color-text-muted, #94A3B8); }
|
||||
.author-info__dates { font-size: .8125rem; color: var(--color-text-muted, #94A3B8); display: flex; gap: 16px; }
|
||||
@media (max-width: 639px) {
|
||||
.author-info__inner { flex-direction: column; gap: 8px; }
|
||||
.author-info__dates { flex-direction: column; gap: 4px; }
|
||||
}
|
||||
|
||||
/* ── Sticky CTA — shared component ── */
|
||||
.sticky-cta-mobile {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 0; left: 0; right: 0;
|
||||
z-index: 999;
|
||||
background: color-mix(in oklab, var(--color-bg, #FFFFFF), transparent 3%);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-top: 1px solid var(--color-border, #E5E7EB);
|
||||
padding: 12px 16px max(12px, env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -4px 20px color-mix(in oklab, var(--color-text, #1A1A1A), transparent 92%);
|
||||
}
|
||||
.sticky-cta-mobile__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 500px; margin: 0 auto; }
|
||||
.sticky-cta-mobile__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
|
||||
.sticky-cta-mobile__text { font-size: .9375rem; color: var(--color-text, #1A1A1A); font-weight: 500; line-height: 1.3; flex: 1; }
|
||||
.sticky-cta-mobile__btn {
|
||||
flex-shrink: 0;
|
||||
padding: 12px 24px;
|
||||
font-size: .9375rem;
|
||||
font-weight: 700;
|
||||
border: none;
|
||||
border-radius: 32px;
|
||||
background: var(--color-primary, #2563EB);
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
font-family: var(--font-body, 'Roboto', sans-serif);
|
||||
min-height: 48px;
|
||||
white-space: nowrap;
|
||||
transition: transform 200ms ease-out, box-shadow 200ms ease-out;
|
||||
box-shadow: 0 4px 20px color-mix(in oklab, var(--color-primary, #2563EB), transparent 60%);
|
||||
}
|
||||
.sticky-cta-mobile__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px color-mix(in oklab, var(--color-primary, #2563EB), transparent 50%); }
|
||||
.sticky-cta-mobile__btn:focus-visible { outline: 3px solid var(--color-primary, #2563EB); outline-offset: 3px; }
|
||||
|
||||
.sticky-cta-desktop {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 0; left: 0; right: 0;
|
||||
z-index: 999;
|
||||
background: color-mix(in oklab, var(--color-bg, #FFFFFF), transparent 5%);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-top: 1px solid var(--color-border, #E5E7EB);
|
||||
padding: 12px 32px;
|
||||
box-shadow: 0 -4px 20px color-mix(in oklab, var(--color-text, #1A1A1A), transparent 92%);
|
||||
transform: translateY(100%);
|
||||
transition: transform 300ms ease-out;
|
||||
}
|
||||
.sticky-cta-desktop.visible { transform: translateY(0); }
|
||||
.sticky-cta-desktop__inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
|
||||
.sticky-cta-desktop__info { display: flex; align-items: center; gap: 16px; }
|
||||
.sticky-cta-desktop__badge { display: inline-block; background: transparent; color: var(--color-primary, #2563EB); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
|
||||
.sticky-cta-desktop__text { font-size: .9375rem; color: var(--color-text, #1A1A1A); font-weight: 500; }
|
||||
.sticky-cta-desktop__btn {
|
||||
padding: 14px 32px;
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
border: none;
|
||||
border-radius: 32px;
|
||||
background: var(--color-primary, #2563EB);
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
font-family: var(--font-body, 'Roboto', sans-serif);
|
||||
white-space: nowrap;
|
||||
transition: transform 200ms ease-out, box-shadow 200ms ease-out;
|
||||
box-shadow: 0 4px 20px color-mix(in oklab, var(--color-primary, #2563EB), transparent 60%);
|
||||
}
|
||||
.sticky-cta-desktop__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px color-mix(in oklab, var(--color-primary, #2563EB), transparent 50%); }
|
||||
.sticky-cta-desktop__btn:focus-visible { outline: 3px solid var(--color-primary, #2563EB); outline-offset: 3px; }
|
||||
|
||||
@media (max-width: 860px) {
|
||||
.sticky-cta-mobile { display: block; }
|
||||
}
|
||||
@media (max-width: 380px) {
|
||||
.sticky-cta-mobile__text { font-size: .8125rem; }
|
||||
.sticky-cta-mobile__btn { padding: 10px 18px; font-size: .875rem; }
|
||||
}
|
||||
@media (min-width: 861px) {
|
||||
.sticky-cta-desktop { display: block; }
|
||||
}
|
||||
|
||||
/* Sticky CTA — кликабельность (перебиваем pointer-events:none базового правила) */
|
||||
.sticky-cta-mobile__inner,
|
||||
.sticky-cta-mobile__actions,
|
||||
.sticky-cta-mobile__text { pointer-events: auto; }
|
||||
.sticky-cta-mobile__btn { pointer-events: auto; }
|
||||
|
||||
File diff suppressed because one or more lines are too long
234
wp-content/themes/dekart/assets/css/page-semejnye-klassy.css
Normal file
234
wp-content/themes/dekart/assets/css/page-semejnye-klassy.css
Normal file
@ -0,0 +1,234 @@
|
||||
/* Семейные классы — секции лендинга (реюз bento/токенов) */
|
||||
|
||||
.page-family-classes .family-block {
|
||||
padding-block: clamp(32px, 5vw, 64px);
|
||||
}
|
||||
|
||||
.page-family-classes .family-block__cta {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
/* Hero */
|
||||
.page-family-classes .family-hero {
|
||||
padding-block: clamp(40px, 6vw, 80px);
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(1.75rem, 3.4vw, 2.75rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.15;
|
||||
margin: 0 0 16px;
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__subtitle {
|
||||
font-size: clamp(1rem, 1.4vw, 1.125rem);
|
||||
line-height: 1.7;
|
||||
color: var(--color-text-muted);
|
||||
max-width: 70ch;
|
||||
margin: 0 0 20px;
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__markers {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 18px;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__markers li {
|
||||
position: relative;
|
||||
padding-left: 22px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__markers li::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: .45em;
|
||||
width: 12px;
|
||||
height: 7px;
|
||||
border-left: 2px solid var(--color-accent, #FFD43E);
|
||||
border-bottom: 2px solid var(--color-accent, #FFD43E);
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__cta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-hero__phone {
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Cards grid */
|
||||
.page-family-classes .family-grid {
|
||||
display: grid;
|
||||
gap: 20px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-grid--3 {
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
}
|
||||
|
||||
.page-family-classes .family-card,
|
||||
.page-family-classes .family-class-card {
|
||||
background: var(--color-surface, #fff);
|
||||
border: 1px solid var(--color-border, #e6e8eb);
|
||||
border-radius: 16px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-card__title,
|
||||
.page-family-classes .family-class-card__name {
|
||||
font-size: 1.0625rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-card__text,
|
||||
.page-family-classes .family-class-card__text {
|
||||
color: var(--color-text-muted);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.page-family-classes .family-class-card__places {
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
font-size: .875rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
/* Подходит / не подходит */
|
||||
.page-family-classes .family-fit {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-fit__col {
|
||||
border-radius: 16px;
|
||||
padding: 20px;
|
||||
border: 1px solid var(--color-border, #e6e8eb);
|
||||
}
|
||||
|
||||
.page-family-classes .family-fit__head {
|
||||
margin: 0 0 12px;
|
||||
font-size: 1.0625rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.page-family-classes .family-fit__list {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* Гео */
|
||||
.page-family-classes .family-geo__addr {
|
||||
font-weight: 600;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
.page-family-classes .family-geo__cities {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 16px 0 0;
|
||||
}
|
||||
|
||||
.page-family-classes .family-geo__cities li {
|
||||
background: var(--color-surface, #fff);
|
||||
border: 1px solid var(--color-border, #e6e8eb);
|
||||
border-radius: 999px;
|
||||
padding: 6px 14px;
|
||||
font-size: .9375rem;
|
||||
}
|
||||
|
||||
/* FAQ */
|
||||
.page-family-classes .family-faq__list {
|
||||
margin-top: 20px;
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-faq__item {
|
||||
border: 1px solid var(--color-border, #e6e8eb);
|
||||
border-radius: 12px;
|
||||
padding: 12px 16px;
|
||||
background: var(--color-surface, #fff);
|
||||
}
|
||||
|
||||
.page-family-classes .family-faq__q {
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.page-family-classes .family-faq__q::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page-family-classes .family-faq__a {
|
||||
margin-top: 10px;
|
||||
color: var(--color-text-muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* Шаги */
|
||||
.page-family-classes .family-steps {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 24px 0 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 20px;
|
||||
counter-reset: none;
|
||||
}
|
||||
|
||||
.page-family-classes .family-steps__item {
|
||||
border: 1px solid var(--color-border, #e6e8eb);
|
||||
border-radius: 16px;
|
||||
padding: 20px;
|
||||
background: var(--color-surface, #fff);
|
||||
}
|
||||
|
||||
.page-family-classes .family-steps__num {
|
||||
display: block;
|
||||
font-weight: 700;
|
||||
color: var(--color-accent, #FFD43E);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.page-family-classes .family-steps__title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 1.0625rem;
|
||||
}
|
||||
|
||||
.page-family-classes .family-steps__text {
|
||||
margin: 0;
|
||||
color: var(--color-text-muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.page-family-classes .family-price__note {
|
||||
margin-top: 16px;
|
||||
color: var(--color-text-muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
2
wp-content/themes/dekart/assets/css/page-semejnye-klassy.min.css
vendored
Normal file
2
wp-content/themes/dekart/assets/css/page-semejnye-klassy.min.css
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/*! page-semejnye-klassy.css (minified) */
|
||||
.page-family-classes .family-block{padding-block: clamp(32px,5vw,64px);}.page-family-classes .family-block__cta{margin-top: 24px;}.page-family-classes .family-hero{padding-block: clamp(40px,6vw,80px);}.page-family-classes .family-hero__h1{font-family: var(--font-display);font-size: clamp(1.75rem,3.4vw,2.75rem);font-weight: 700;line-height: 1.15;margin: 0 0 16px;text-wrap: balance;}.page-family-classes .family-hero__subtitle{font-size: clamp(1rem,1.4vw,1.125rem);line-height: 1.7;color: var(--color-text-muted);max-width: 70ch;margin: 0 0 20px;text-wrap: pretty;}.page-family-classes .family-hero__markers{display: flex;flex-wrap: wrap;gap: 10px 18px;list-style: none;padding: 0;margin: 0 0 24px;}.page-family-classes .family-hero__markers li{position: relative;padding-left: 22px;line-height: 1.5;}.page-family-classes .family-hero__markers li::before{content: "";position: absolute;left: 0;top: .45em;width: 12px;height: 7px;border-left: 2px solid var(--color-accent,#FFD43E);border-bottom: 2px solid var(--color-accent,#FFD43E);transform: rotate(-45deg);}.page-family-classes .family-hero__cta{display: flex;flex-wrap: wrap;align-items: center;gap: 16px;}.page-family-classes .family-hero__phone{font-weight: 600;text-decoration: none;}.page-family-classes .family-grid{display: grid;gap: 20px;margin-top: 24px;}.page-family-classes .family-grid--3{grid-template-columns: repeat(auto-fit,minmax(240px,1fr));}.page-family-classes .family-card,.page-family-classes .family-class-card{background: var(--color-surface,#fff);border: 1px solid var(--color-border,#e6e8eb);border-radius: 16px;padding: 20px;}.page-family-classes .family-card__title,.page-family-classes .family-class-card__name{font-size: 1.0625rem;font-weight: 700;margin: 0 0 8px;}.page-family-classes .family-card__text,.page-family-classes .family-class-card__text{color: var(--color-text-muted);line-height: 1.6;margin: 0;}.page-family-classes .family-class-card__places{display: inline-block;margin-top: 12px;font-size: .875rem;font-weight: 600;color: var(--color-text-muted);}.page-family-classes .family-fit{display: grid;grid-template-columns: repeat(auto-fit,minmax(280px,1fr));gap: 20px;margin-top: 24px;}.page-family-classes .family-fit__col{border-radius: 16px;padding: 20px;border: 1px solid var(--color-border,#e6e8eb);}.page-family-classes .family-fit__head{margin: 0 0 12px;font-size: 1.0625rem;font-weight: 700;}.page-family-classes .family-fit__list{margin: 0;padding-left: 20px;display: grid;gap: 8px;}.page-family-classes .family-geo__addr{font-weight: 600;margin: 12px 0;}.page-family-classes .family-geo__cities{display: flex;flex-wrap: wrap;gap: 10px;list-style: none;padding: 0;margin: 16px 0 0;}.page-family-classes .family-geo__cities li{background: var(--color-surface,#fff);border: 1px solid var(--color-border,#e6e8eb);border-radius: 999px;padding: 6px 14px;font-size: .9375rem;}.page-family-classes .family-faq__list{margin-top: 20px;display: grid;gap: 10px;}.page-family-classes .family-faq__item{border: 1px solid var(--color-border,#e6e8eb);border-radius: 12px;padding: 12px 16px;background: var(--color-surface,#fff);}.page-family-classes .family-faq__q{cursor: pointer;font-weight: 600;list-style: none;}.page-family-classes .family-faq__q::-webkit-details-marker{display: none;}.page-family-classes .family-faq__a{margin-top: 10px;color: var(--color-text-muted);line-height: 1.6;}.page-family-classes .family-steps{list-style: none;padding: 0;margin: 24px 0 0;display: grid;grid-template-columns: repeat(auto-fit,minmax(240px,1fr));gap: 20px;counter-reset: none;}.page-family-classes .family-steps__item{border: 1px solid var(--color-border,#e6e8eb);border-radius: 16px;padding: 20px;background: var(--color-surface,#fff);}.page-family-classes .family-steps__num{display: block;font-weight: 700;color: var(--color-accent,#FFD43E);margin-bottom: 8px;}.page-family-classes .family-steps__title{margin: 0 0 8px;font-size: 1.0625rem;}.page-family-classes .family-steps__text{margin: 0;color: var(--color-text-muted);line-height: 1.6;}.page-family-classes .family-price__note{margin-top: 16px;color: var(--color-text-muted);line-height: 1.6;}
|
||||
38
wp-content/themes/dekart/assets/js/semejnye-klassy.js
Normal file
38
wp-content/themes/dekart/assets/js/semejnye-klassy.js
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Семейные классы — reveal-анимации секций.
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var sections = document.querySelectorAll('.page-family-classes .reveal');
|
||||
if (!sections.length || !('IntersectionObserver' in window)) {
|
||||
sections.forEach(function (el) {
|
||||
el.classList.add('reveal--visible');
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var observer = new IntersectionObserver(function (entries) {
|
||||
entries.forEach(function (entry) {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('reveal--visible');
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
}, { threshold: 0.12 });
|
||||
|
||||
sections.forEach(function (el) {
|
||||
observer.observe(el);
|
||||
});
|
||||
|
||||
// Sticky CTA: показываем при уходе hero из вьюпорта
|
||||
var sticky = document.querySelector('.sticky-cta-desktop');
|
||||
var hero = document.querySelector('.page-family-classes .family-hero');
|
||||
if (sticky && hero && 'IntersectionObserver' in window) {
|
||||
new IntersectionObserver(function (entries) {
|
||||
entries.forEach(function (entry) {
|
||||
sticky.classList.toggle('visible', !entry.isIntersecting);
|
||||
});
|
||||
}, { threshold: 0 }).observe(hero);
|
||||
}
|
||||
})();
|
||||
@ -419,6 +419,114 @@ function add_carbon()
|
||||
->set_width(100)
|
||||
->set_help_text('Секрет: НЕ выводится в разметку и логи. Хранится в опциях, используется серверно/агентом для получения данных GSC.'),
|
||||
))
|
||||
->add_tab('👨👩👧 Семейные классы', array(
|
||||
Field::make('html', 'family_tab_desc', '')
|
||||
->set_html('<p style="color:#64748b;font-size:13px;margin:0 0 12px;">Контент страницы <code>/semejnye-klassy/</code>. Пустые поля не выводятся. Цены — из вкладки «💳 Цены курсов» (как в школе). Город/телефон/адрес — из филиала.</p>'),
|
||||
Field::make('textarea', 'family_hero_subtitle', 'Hero: подзаголовок (оффер)')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_hero_markers', 'Hero: маркеры')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'marker', 'Маркер')->set_width(100),
|
||||
)),
|
||||
Field::make('text', 'family_what_is_title', 'Что такое семейный класс: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_what_is_text', 'Что такое семейный класс: текст')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_what_is_items', 'Что такое: пункты')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'title', 'Заголовок')->set_width(40),
|
||||
Field::make('textarea', 'text', 'Текст')->set_width(60),
|
||||
)),
|
||||
Field::make('text', 'family_fit_title', 'Кому подходит: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_fit_yes', 'Кому подходит')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('textarea', 'text', 'Пункт')->set_width(100),
|
||||
)),
|
||||
Field::make('complex', 'family_fit_no', 'Кому НЕ подходит')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('textarea', 'text', 'Пункт')->set_width(100),
|
||||
)),
|
||||
Field::make('text', 'family_how_title', 'Как устроено: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_how_text', 'Как устроено: текст')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_how_items', 'Как устроено: пункты')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'title', 'Заголовок')->set_width(40),
|
||||
Field::make('textarea', 'text', 'Текст')->set_width(60),
|
||||
)),
|
||||
Field::make('text', 'family_attest_title', 'Аттестация: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_attest_text', 'Аттестация: текст')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_attest_items', 'Аттестация: пункты')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'title', 'Заголовок')->set_width(40),
|
||||
Field::make('textarea', 'text', 'Текст')->set_width(60),
|
||||
)),
|
||||
Field::make('text', 'family_attest_cta', 'Аттестация: текст CTA-кнопки')
|
||||
->set_width(50)
|
||||
->set_default_value('Задать вопрос'),
|
||||
Field::make('text', 'family_classes_title', 'Классы: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_classes_text', 'Классы: текст')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_classes', 'Классы')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'class_name', 'Класс')->set_width(30),
|
||||
Field::make('textarea', 'class_desc', 'Описание')->set_width(50),
|
||||
Field::make('text', 'class_places', 'Места')->set_width(20),
|
||||
)),
|
||||
Field::make('text', 'family_price_title', 'Стоимость: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_price_note', 'Стоимость: условия (мат.капитал/вычет)')
|
||||
->set_width(100),
|
||||
Field::make('text', 'family_steps_title', 'Поступление: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_steps', 'Поступление: шаги')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'step_title', 'Шаг')->set_width(40),
|
||||
Field::make('textarea', 'step_text', 'Текст')->set_width(60),
|
||||
)),
|
||||
Field::make('text', 'family_geo_title', 'Гео: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_geo_text', 'Гео: текст')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_geo_cities', 'Гео: города')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('text', 'city', 'Город')->set_width(100),
|
||||
)),
|
||||
Field::make('text', 'family_faq_title', 'FAQ: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('complex', 'family_faq', 'FAQ')
|
||||
->set_layout('tabbed-horizontal')
|
||||
->add_fields(array(
|
||||
Field::make('textarea', 'question', 'Вопрос')->set_width(35),
|
||||
Field::make('textarea', 'answer', 'Ответ')->set_width(65),
|
||||
)),
|
||||
Field::make('text', 'family_final_cta_title', 'Финальный CTA: заголовок')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_final_cta_text', 'Финальный CTA: текст')
|
||||
->set_width(100),
|
||||
Field::make('text', 'family_final_cta_btn', 'Финальный CTA: текст кнопки')
|
||||
->set_width(50),
|
||||
Field::make('image', 'family_og_image', 'OG-изображение страницы')
|
||||
->set_width(100),
|
||||
Field::make('text', 'family_meta_title', 'SEO: title (пусто — из Yoast)')
|
||||
->set_width(100),
|
||||
Field::make('textarea', 'family_meta_description', 'SEO: description (пусто — из Yoast)')
|
||||
->set_width(100),
|
||||
))
|
||||
->add_tab('💳 Цены курсов', array(
|
||||
Field::make('checkbox', 'early_bird_discount', 'Показывать "Скидка за раннюю запись"')
|
||||
->set_option_value('yes'),
|
||||
@ -1542,6 +1650,9 @@ function add_carbon()
|
||||
Field::make('text', 'teacher_badge', 'Бейдж на карточке (например: 👶 Работает с дошкольниками)')
|
||||
->set_width(30)
|
||||
->set_help_text('Текст бейджа на карточке преподавателя. Если пусто — бейдж скрыт.'),
|
||||
Field::make('checkbox', 'teacher_pin_first', 'Выводить первым')
|
||||
->set_width(40)
|
||||
->set_help_text('Показывать этого преподавателя первым во всех блоках карточек (список, главная, разделы) и в фото hero страницы преподавателей.'),
|
||||
Field::make('text', 'teacher_start_year', 'Год начала работы (только год, например: 1987)')
|
||||
->set_width(30)
|
||||
->set_attribute('placeholder', '1987')
|
||||
@ -2990,6 +3101,21 @@ function enqueue_template_specific_styles()
|
||||
'1.1'
|
||||
);
|
||||
}
|
||||
if (is_page_template('page-semejnye-klassy.php')) {
|
||||
wp_enqueue_style(
|
||||
'family-classes-style',
|
||||
get_template_directory_uri() . '/assets/css/page-semejnye-klassy.css',
|
||||
array(),
|
||||
filemtime(get_template_directory() . '/assets/css/page-semejnye-klassy.css')
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'family-classes-script',
|
||||
get_template_directory_uri() . '/assets/js/semejnye-klassy.js',
|
||||
array(),
|
||||
filemtime(get_template_directory() . '/assets/js/semejnye-klassy.js'),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// PKS: Подготовка к школе — CSS и JS
|
||||
if (is_page_template('page-podgotovka-k-shkole.php')) {
|
||||
@ -3607,6 +3733,56 @@ function dekart_teacher_directions_map(): array
|
||||
return $map;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID преподавателей с включённой галочкой «Выводить первым».
|
||||
*
|
||||
* @return array<int,int>
|
||||
*/
|
||||
function dekart_teacher_pinned_ids(): array
|
||||
{
|
||||
static $ids = null;
|
||||
if (null !== $ids) {
|
||||
return $ids;
|
||||
}
|
||||
$ids = get_posts(array(
|
||||
'post_type' => 'teacher',
|
||||
'post_status' => 'publish',
|
||||
'posts_per_page' => -1,
|
||||
'fields' => 'ids',
|
||||
'no_found_rows' => true,
|
||||
'meta_query' => array(
|
||||
array( 'key' => '_teacher_pin_first', 'value' => '1', 'compare' => '=' ),
|
||||
),
|
||||
));
|
||||
$ids = array_map('intval', (array) $ids);
|
||||
return $ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* Стабильно поднять отмеченных «первыми» преподавателей в начало списка.
|
||||
*
|
||||
* @param array<int,WP_Post> $posts
|
||||
* @return array<int,WP_Post>
|
||||
*/
|
||||
function dekart_teachers_reorder_pinned(array $posts): array
|
||||
{
|
||||
$pinned = dekart_teacher_pinned_ids();
|
||||
if (empty($pinned) || empty($posts)) {
|
||||
return $posts;
|
||||
}
|
||||
$is = array_flip($pinned);
|
||||
$on = array();
|
||||
$off = array();
|
||||
foreach ($posts as $p) {
|
||||
if (isset($is[ (int) $p->ID ])) {
|
||||
$on[] = $p;
|
||||
} else {
|
||||
$off[] = $p;
|
||||
}
|
||||
}
|
||||
return array_merge($on, $off);
|
||||
}
|
||||
|
||||
/**
|
||||
* Число отзывов конкретного преподавателя.
|
||||
*
|
||||
|
||||
65
wp-content/themes/dekart/page-semejnye-klassy.php
Normal file
65
wp-content/themes/dekart/page-semejnye-klassy.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/*
|
||||
* Template Name: Семейные классы
|
||||
*/
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// OG: website (не article) + изображение из CF
|
||||
add_filter('wpseo_opengraph_type', function ($type) {
|
||||
return is_page_template('page-semejnye-klassy.php') ? 'website' : $type;
|
||||
});
|
||||
add_filter('wpseo_opengraph_image', function ($img) {
|
||||
if (! is_page_template('page-semejnye-klassy.php')) {
|
||||
return $img;
|
||||
}
|
||||
$id = carbon_get_theme_option('family_og_image');
|
||||
return $id ? (string) wp_get_attachment_url((int) $id) : $img;
|
||||
});
|
||||
add_filter('wpseo_title', function ($title) {
|
||||
if (! is_page_template('page-semejnye-klassy.php')) {
|
||||
return $title;
|
||||
}
|
||||
return carbon_get_theme_option('family_meta_title') ?: $title;
|
||||
});
|
||||
add_filter('wpseo_metadesc', function ($desc) {
|
||||
if (! is_page_template('page-semejnye-klassy.php')) {
|
||||
return $desc;
|
||||
}
|
||||
return carbon_get_theme_option('family_meta_description') ?: $desc;
|
||||
});
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<main class="page page-family-classes">
|
||||
|
||||
<?php
|
||||
get_template_part('template-parts/family/breadcrumbs');
|
||||
get_template_part('template-parts/family/hero');
|
||||
get_template_part('template-parts/family/what-is');
|
||||
get_template_part('template-parts/family/fit');
|
||||
get_template_part('template-parts/family/how');
|
||||
get_template_part('template-parts/family/attestation');
|
||||
get_template_part('template-parts/family/classes');
|
||||
|
||||
// Педагоги — тот же блок, что на странице школы (все преподаватели)
|
||||
get_template_part('template-parts/teachers-cards');
|
||||
|
||||
get_template_part('template-parts/family/price');
|
||||
get_template_part('template-parts/reviews-link');
|
||||
get_template_part('template-parts/family/steps');
|
||||
get_template_part('template-parts/family/geo');
|
||||
get_template_part('template-parts/family/faq');
|
||||
get_template_part('template-parts/family/final-cta');
|
||||
get_template_part('template-parts/author-eaat');
|
||||
get_template_part('template-parts/sticky-cta');
|
||||
?>
|
||||
|
||||
</main>
|
||||
|
||||
<?php
|
||||
get_template_part('template-parts/family/schema');
|
||||
get_footer();
|
||||
@ -74,6 +74,7 @@ if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|
|
||||
);
|
||||
|
||||
$query = new WP_Query($args);
|
||||
$query->posts = dekart_teachers_reorder_pinned($query->posts);
|
||||
|
||||
if ($query->have_posts()) {
|
||||
global $post;
|
||||
|
||||
@ -16,7 +16,7 @@ if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'teacher',
|
||||
);
|
||||
$teachers = get_posts($teachers_args); ?>
|
||||
$teachers = dekart_teachers_reorder_pinned(get_posts($teachers_args)); ?>
|
||||
<div class="teachers-wrapper">
|
||||
<?php
|
||||
$count = 1;
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
// Аттестация и документы
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_attest_title');
|
||||
$f_text = carbon_get_theme_option('family_attest_text');
|
||||
$f_items = (array) carbon_get_theme_option('family_attest_items');
|
||||
$f_cta = carbon_get_theme_option('family_attest_cta');
|
||||
$f_btn = $f_cta ?: 'Задать вопрос';
|
||||
|
||||
if (! $f_title && ! $f_text && ! $f_items) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block family-attest" data-bg="family-attest">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($f_text) : ?>
|
||||
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_items) : ?>
|
||||
<div class="family-grid family-grid--3">
|
||||
<?php foreach ($f_items as $f_it) : ?>
|
||||
<div class="family-card">
|
||||
<?php if (! empty($f_it['title'])) : ?>
|
||||
<h3 class="family-card__title"><?php echo esc_html($f_it['title']); ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php if (! empty($f_it['text'])) : ?>
|
||||
<p class="family-card__text"><?php echo esc_html($f_it['text']); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="family-block__cta">
|
||||
<button type="button" class="btn-write btn-primary open-bitrix-form" data-goal="family_classes_cta"><?php echo esc_html($f_btn); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
// Хлебные крошки
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$crumb_city = get_option('branch_city') ?: carbon_get_theme_option('site_city');
|
||||
$crumb_name = 'Семейные классы' . ($crumb_city ? ' в ' . $crumb_city : '');
|
||||
?>
|
||||
<div class="container breadcrumbs-wrapper">
|
||||
<ul class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList" role="navigation" aria-label="Breadcrumb">
|
||||
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a href="<?php echo esc_url(home_url('/')); ?>" itemprop="item" title="Главная">
|
||||
<span itemprop="name">Главная</span>
|
||||
</a>
|
||||
<meta itemprop="position" content="1">
|
||||
</li>
|
||||
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<span class="last_item" itemprop="name"><?php echo esc_html($crumb_name); ?></span>
|
||||
<meta itemprop="position" content="2">
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
44
wp-content/themes/dekart/template-parts/family/classes.php
Normal file
44
wp-content/themes/dekart/template-parts/family/classes.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
// Классы и форматы
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_classes_title');
|
||||
$f_text = carbon_get_theme_option('family_classes_text');
|
||||
$f_items = (array) carbon_get_theme_option('family_classes');
|
||||
|
||||
if (! $f_title && ! $f_text && ! $f_items) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block" data-bg="family-classes">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($f_text) : ?>
|
||||
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_items) : ?>
|
||||
<div class="family-grid family-grid--3">
|
||||
<?php foreach ($f_items as $f_it) : ?>
|
||||
<div class="family-class-card">
|
||||
<?php if (! empty($f_it['class_name'])) : ?>
|
||||
<h3 class="family-class-card__name"><?php echo esc_html($f_it['class_name']); ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php if (! empty($f_it['class_desc'])) : ?>
|
||||
<p class="family-class-card__text"><?php echo esc_html($f_it['class_desc']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (! empty($f_it['class_places'])) : ?>
|
||||
<span class="family-class-card__places"><?php echo esc_html($f_it['class_places']); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
40
wp-content/themes/dekart/template-parts/family/faq.php
Normal file
40
wp-content/themes/dekart/template-parts/family/faq.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
// FAQ
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_faq_title');
|
||||
$f_items = (array) carbon_get_theme_option('family_faq');
|
||||
|
||||
if (! $f_items) {
|
||||
return;
|
||||
}
|
||||
|
||||
// только заполненные
|
||||
$f_items = array_values(array_filter($f_items, function ($it) {
|
||||
return ! empty($it['question']) && ! empty($it['answer']);
|
||||
}));
|
||||
|
||||
if (! $f_items) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block family-faq" data-bg="family-faq" id="faq">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="family-faq__list">
|
||||
<?php foreach ($f_items as $f_it) : ?>
|
||||
<details class="family-faq__item">
|
||||
<summary class="family-faq__q"><?php echo esc_html($f_it['question']); ?></summary>
|
||||
<div class="family-faq__a"><?php echo wp_kses_post(wpautop($f_it['answer'])); ?></div>
|
||||
</details>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
30
wp-content/themes/dekart/template-parts/family/final-cta.php
Normal file
30
wp-content/themes/dekart/template-parts/family/final-cta.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
// Финальный CTA
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_final_cta_title');
|
||||
$f_text = carbon_get_theme_option('family_final_cta_text');
|
||||
$f_btn = carbon_get_theme_option('family_final_cta_btn');
|
||||
|
||||
if (! $f_title && ! $f_text) {
|
||||
return;
|
||||
}
|
||||
$f_btn = $f_btn ?: 'Записаться';
|
||||
?>
|
||||
<section class="section-bg reveal family-block family-final-cta" data-bg="family-final-cta" id="final-cta">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($f_text) : ?>
|
||||
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
||||
<?php endif; ?>
|
||||
<div class="family-block__cta">
|
||||
<button type="button" class="btn-write btn-primary btn-primary--large open-bitrix-form" data-goal="family_classes_cta"><?php echo esc_html($f_btn); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
51
wp-content/themes/dekart/template-parts/family/fit.php
Normal file
51
wp-content/themes/dekart/template-parts/family/fit.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
// Кому подходит / не подходит
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_fit_title');
|
||||
$f_yes = (array) carbon_get_theme_option('family_fit_yes');
|
||||
$f_no = (array) carbon_get_theme_option('family_fit_no');
|
||||
|
||||
if (! $f_title && ! $f_yes && ! $f_no) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block" data-bg="family-fit">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="family-fit">
|
||||
<?php if ($f_yes) : ?>
|
||||
<div class="family-fit__col family-fit__col--yes">
|
||||
<h3 class="family-fit__head">Кому подходит</h3>
|
||||
<ul class="family-fit__list">
|
||||
<?php foreach ($f_yes as $f_y) : ?>
|
||||
<?php if (! empty($f_y['text'])) : ?><li><?php echo esc_html($f_y['text']); ?></li><?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_no) : ?>
|
||||
<div class="family-fit__col family-fit__col--no">
|
||||
<h3 class="family-fit__head">Кому не подходит</h3>
|
||||
<ul class="family-fit__list">
|
||||
<?php foreach ($f_no as $f_n) : ?>
|
||||
<?php if (! empty($f_n['text'])) : ?><li><?php echo esc_html($f_n['text']); ?></li><?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="family-block__cta">
|
||||
<button type="button" class="btn-write btn-primary open-bitrix-form" data-goal="family_classes_cta">Записаться на диагностику</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
50
wp-content/themes/dekart/template-parts/family/geo.php
Normal file
50
wp-content/themes/dekart/template-parts/family/geo.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// Гео / локация
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_geo_title');
|
||||
$f_text = carbon_get_theme_option('family_geo_text');
|
||||
$f_cities = (array) carbon_get_theme_option('family_geo_cities');
|
||||
$f_addr = get_option('branch_address') ?: carbon_get_theme_option('site_address');
|
||||
$f_city = get_option('branch_city') ?: carbon_get_theme_option('site_city');
|
||||
|
||||
if (! $f_title && ! $f_text && ! $f_cities && ! $f_addr) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block" data-bg="family-geo">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($f_text) : ?>
|
||||
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_addr || $f_city) : ?>
|
||||
<p class="family-geo__addr">
|
||||
<?php echo esc_html(trim($f_addr . ($f_addr && $f_city ? ', ' : '') . $f_city)); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$f_city_names = array();
|
||||
foreach ($f_cities as $f_c) {
|
||||
if (! empty($f_c['city'])) {
|
||||
$f_city_names[] = $f_c['city'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if ($f_city_names) : ?>
|
||||
<ul class="family-geo__cities">
|
||||
<?php foreach ($f_city_names as $f_cn) : ?>
|
||||
<li><?php echo esc_html($f_cn); ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
41
wp-content/themes/dekart/template-parts/family/hero.php
Normal file
41
wp-content/themes/dekart/template-parts/family/hero.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
// Hero
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_city = get_option('branch_city') ?: carbon_get_theme_option('site_city');
|
||||
$f_h1 = 'Семейные классы' . ($f_city ? ' в ' . $f_city : '');
|
||||
$f_sub = carbon_get_theme_option('family_hero_subtitle');
|
||||
$f_markers = (array) carbon_get_theme_option('family_hero_markers');
|
||||
$f_phone = get_option('branch_phone') ?: carbon_get_theme_option('site_phone');
|
||||
$f_phone_num = $f_phone ? preg_replace('/[^0-9+]/', '', $f_phone) : '';
|
||||
?>
|
||||
<section class="section-bg reveal family-hero" data-bg="family-hero" aria-labelledby="family-hero-title">
|
||||
<div class="container">
|
||||
<h1 id="family-hero-title" class="family-hero__h1"><?php echo esc_html($f_h1); ?></h1>
|
||||
|
||||
<?php if ($f_sub) : ?>
|
||||
<p class="family-hero__subtitle"><?php echo esc_html($f_sub); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_markers) : ?>
|
||||
<ul class="family-hero__markers">
|
||||
<?php foreach ($f_markers as $f_m) : ?>
|
||||
<?php if (! empty($f_m['marker'])) : ?>
|
||||
<li><?php echo esc_html($f_m['marker']); ?></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="family-hero__cta">
|
||||
<button type="button" class="btn-write btn-primary open-bitrix-form" data-goal="family_classes_cta">Записаться</button>
|
||||
<?php if ($f_phone && $f_phone_num) : ?>
|
||||
<a class="family-hero__phone" href="tel:<?php echo esc_attr($f_phone_num); ?>"><?php echo esc_html($f_phone); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
41
wp-content/themes/dekart/template-parts/family/how.php
Normal file
41
wp-content/themes/dekart/template-parts/family/how.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
// Как устроено обучение
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_how_title');
|
||||
$f_text = carbon_get_theme_option('family_how_text');
|
||||
$f_items = (array) carbon_get_theme_option('family_how_items');
|
||||
|
||||
if (! $f_title && ! $f_text && ! $f_items) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block" data-bg="family-how">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($f_text) : ?>
|
||||
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_items) : ?>
|
||||
<div class="family-grid family-grid--3">
|
||||
<?php foreach ($f_items as $f_it) : ?>
|
||||
<div class="family-card">
|
||||
<?php if (! empty($f_it['title'])) : ?>
|
||||
<h3 class="family-card__title"><?php echo esc_html($f_it['title']); ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php if (! empty($f_it['text'])) : ?>
|
||||
<p class="family-card__text"><?php echo esc_html($f_it['text']); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
24
wp-content/themes/dekart/template-parts/family/price.php
Normal file
24
wp-content/themes/dekart/template-parts/family/price.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
// Стоимость и условия (цены — из общих настроек курсов)
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_price_title');
|
||||
$f_note = carbon_get_theme_option('family_price_note');
|
||||
?>
|
||||
<section class="section-bg reveal family-block family-price" data-bg="family-price">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php get_template_part('template-parts/block-price'); ?>
|
||||
|
||||
<?php if ($f_note) : ?>
|
||||
<p class="family-price__note"><?php echo esc_html($f_note); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
83
wp-content/themes/dekart/template-parts/family/schema.php
Normal file
83
wp-content/themes/dekart/template-parts/family/schema.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
// Schema.org @graph (WebPage / BreadcrumbList / Organization / FAQPage)
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_city = get_option('branch_city') ?: carbon_get_theme_option('site_city');
|
||||
$f_h1 = 'Семейные классы' . ($f_city ? ' в ' . $f_city : '');
|
||||
$f_url = get_permalink();
|
||||
$f_graph = array();
|
||||
|
||||
$f_graph[] = array(
|
||||
'@type' => 'WebPage',
|
||||
'@id' => $f_url . '#webpage',
|
||||
'url' => $f_url,
|
||||
'name' => $f_h1,
|
||||
'inLanguage' => 'ru-RU',
|
||||
);
|
||||
|
||||
$f_graph[] = array(
|
||||
'@type' => 'BreadcrumbList',
|
||||
'@id' => $f_url . '#breadcrumb',
|
||||
'itemListElement' => array(
|
||||
array(
|
||||
'@type' => 'ListItem',
|
||||
'position' => 1,
|
||||
'name' => 'Главная',
|
||||
'item' => home_url('/'),
|
||||
),
|
||||
array(
|
||||
'@type' => 'ListItem',
|
||||
'position' => 2,
|
||||
'name' => $f_h1,
|
||||
'item' => $f_url,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Организация/филиал — из общих хелперов (данные филиала)
|
||||
if (function_exists('dekart_schema_organization')) {
|
||||
$f_org = dekart_schema_organization();
|
||||
if ($f_org) {
|
||||
$f_graph[] = $f_org;
|
||||
}
|
||||
}
|
||||
if (function_exists('dekart_schema_local_business')) {
|
||||
$f_lb = dekart_schema_local_business();
|
||||
if ($f_lb) {
|
||||
$f_graph[] = $f_lb;
|
||||
}
|
||||
}
|
||||
|
||||
// FAQPage
|
||||
$f_faq = (array) carbon_get_theme_option('family_faq');
|
||||
$f_q = array();
|
||||
foreach ($f_faq as $f_it) {
|
||||
if (! empty($f_it['question']) && ! empty($f_it['answer'])) {
|
||||
$f_q[] = array(
|
||||
'@type' => 'Question',
|
||||
'name' => wp_strip_all_tags($f_it['question']),
|
||||
'acceptedAnswer' => array(
|
||||
'@type' => 'Answer',
|
||||
'text' => wp_strip_all_tags($f_it['answer']),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($f_q) {
|
||||
$f_graph[] = array(
|
||||
'@type' => 'FAQPage',
|
||||
'@id' => $f_url . '#faq',
|
||||
'mainEntity' => $f_q,
|
||||
);
|
||||
}
|
||||
?>
|
||||
<script type="application/ld+json"><?php
|
||||
echo wp_json_encode(
|
||||
array( '@context' => 'https://schema.org', '@graph' => $f_graph ),
|
||||
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_HEX_TAG
|
||||
);
|
||||
?></script>
|
||||
37
wp-content/themes/dekart/template-parts/family/steps.php
Normal file
37
wp-content/themes/dekart/template-parts/family/steps.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
// Как поступить
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_steps_title');
|
||||
$f_items = (array) carbon_get_theme_option('family_steps');
|
||||
|
||||
if (! $f_title && ! $f_items) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block" data-bg="family-steps" id="enrollment">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_items) : ?>
|
||||
<ol class="family-steps">
|
||||
<?php $f_n = 0; foreach ($f_items as $f_it) : ?>
|
||||
<?php if (empty($f_it['step_title'])) { continue; } $f_n++; ?>
|
||||
<li class="family-steps__item">
|
||||
<span class="family-steps__num"><?php echo esc_html(sprintf('%02d', $f_n)); ?></span>
|
||||
<h3 class="family-steps__title"><?php echo esc_html($f_it['step_title']); ?></h3>
|
||||
<?php if (! empty($f_it['step_text'])) : ?>
|
||||
<p class="family-steps__text"><?php echo esc_html($f_it['step_text']); ?></p>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
41
wp-content/themes/dekart/template-parts/family/what-is.php
Normal file
41
wp-content/themes/dekart/template-parts/family/what-is.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
// Что такое семейный класс
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$f_title = carbon_get_theme_option('family_what_is_title');
|
||||
$f_text = carbon_get_theme_option('family_what_is_text');
|
||||
$f_items = (array) carbon_get_theme_option('family_what_is_items');
|
||||
|
||||
if (! $f_title && ! $f_text && ! $f_items) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section-bg reveal family-block" data-bg="family-what-is">
|
||||
<div class="container">
|
||||
<?php if ($f_title) : ?>
|
||||
<h2 class="bento-h2"><?php echo esc_html($f_title); ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($f_text) : ?>
|
||||
<p class="bento-p"><?php echo esc_html($f_text); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($f_items) : ?>
|
||||
<div class="family-grid family-grid--3">
|
||||
<?php foreach ($f_items as $f_it) : ?>
|
||||
<div class="family-card">
|
||||
<?php if (! empty($f_it['title'])) : ?>
|
||||
<h3 class="family-card__title"><?php echo esc_html($f_it['title']); ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php if (! empty($f_it['text'])) : ?>
|
||||
<p class="family-card__text"><?php echo esc_html($f_it['text']); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
@ -26,6 +26,8 @@ if (! empty($teacher_ids)) {
|
||||
}
|
||||
|
||||
$teachers_query = new WP_Query($query_args);
|
||||
// Отмеченные «первыми» — в начало
|
||||
$teachers_query->posts = dekart_teachers_reorder_pinned($teachers_query->posts);
|
||||
?>
|
||||
<section class="bento teachers-cards" id="teachers" aria-label="Преподаватели">
|
||||
<div class="bento__full section-header--centered">
|
||||
|
||||
@ -27,7 +27,7 @@ $sc_teachers = get_query_var('sc_teachers');
|
||||
);
|
||||
|
||||
// Получение списка преподавателей
|
||||
$teachers = get_posts($teachers_args);
|
||||
$teachers = dekart_teachers_reorder_pinned(get_posts($teachers_args));
|
||||
?>
|
||||
|
||||
<div class="teachers-owl-wrapper">
|
||||
|
||||
@ -9,13 +9,14 @@ if (! defined('ABSPATH')) {
|
||||
$teachers_list = get_posts(array(
|
||||
'posts_per_page' => -1,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'order' => 'DESC',
|
||||
'post_type' => 'teacher',
|
||||
'post_status' => 'publish',
|
||||
'no_found_rows' => true,
|
||||
'update_post_meta_cache' => true,
|
||||
'update_post_term_cache' => true,
|
||||
));
|
||||
$teachers_list = dekart_teachers_reorder_pinned($teachers_list);
|
||||
|
||||
if (empty($teachers_list)) {
|
||||
return;
|
||||
|
||||
@ -23,15 +23,21 @@ $school_year = $current_year . '/' . $next_year;
|
||||
// H1 с гео-ключом
|
||||
$teachers_h1 = trim('Преподаватели школы «' . $branch_name . '» ' . $branch_city_prep);
|
||||
|
||||
// Фото
|
||||
$first_teacher = get_posts(array(
|
||||
// Фото — преподаватель «выводить первым», иначе последний по дате
|
||||
$hero_args = array(
|
||||
'post_type' => 'teacher',
|
||||
'post_status' => 'publish',
|
||||
'posts_per_page' => 1,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'order' => 'DESC',
|
||||
'no_found_rows' => true,
|
||||
));
|
||||
);
|
||||
$pinned_ids = dekart_teacher_pinned_ids();
|
||||
if (! empty($pinned_ids)) {
|
||||
$hero_args['post__in'] = $pinned_ids;
|
||||
$hero_args['orderby'] = 'post__in';
|
||||
}
|
||||
$first_teacher = get_posts($hero_args);
|
||||
|
||||
$hero_photo = '';
|
||||
$hero_alt = 'Преподаватели школы «' . esc_html($branch_name) . '» ' . esc_html($branch_city);
|
||||
|
||||
@ -54,10 +54,11 @@ $schema_teachers = get_posts(array(
|
||||
'post_type' => 'teacher',
|
||||
'post_status' => 'publish',
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'order' => 'DESC',
|
||||
'no_found_rows' => true,
|
||||
'update_post_meta_cache' => true,
|
||||
));
|
||||
$schema_teachers = dekart_teachers_reorder_pinned($schema_teachers);
|
||||
|
||||
$item_list = array();
|
||||
$position = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user