2026-10-08 GLOBAL

This commit is contained in:
Dekart Deploy Bot 2026-10-08 14:00:21 +00:00
parent 28b5c3590e
commit a2ec373251
5 changed files with 183 additions and 33 deletions

View File

@ -624,6 +624,7 @@ main {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: clamp(10px, 1vw, 14px);
}
.header-logo {
@ -639,11 +640,18 @@ main {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: clamp(10px, 1.3vw, 20px);
font-size: clamp(14px, 1.05vw, 16px);
gap: 0;
font-size: clamp(13px, 1.15vw, 16px);
white-space: nowrap;
}
/* Разделители пунктов меню (десктоп) */
@media (min-width: 861px) {
.header-menu > li { padding-left: clamp(10px, 1.1vw, 18px); }
.header-menu > li:first-child { padding-left: 0; }
.header-menu > li + li { border-left: 1px solid rgba(255, 255, 255, .18); }
}
.header-menu_link a {
white-space: nowrap;
}
@ -5739,8 +5747,8 @@ footer a:hover,
}
.header-menu {
gap: 1.56vw;
font-size: 1.25vw;
gap: 0;
font-size: clamp(13px, 1.15vw, 16px);
}
.header-menu__item_link {
@ -12417,16 +12425,8 @@ main > .pksh-section:first-child {
.header .menu-wrapper button:focus-visible,
.header .btn-close-header-menu:focus-visible { outline: 3px solid #6FB6E8; outline-offset: 2px; }
/* Личный кабинет в главном меню (десктоп) */
.header-menu .menu-item-lk { display: flex; align-items: center; }
.header-menu .menu-item-lk a { display: flex; align-items: center; gap: 6px; color: #fff; white-space: nowrap; transition: .3s; }
.header-menu .menu-item-lk a:hover { color: #BBBBBB; }
.header-menu .menu-item-lk .menu-lk__icon { flex: 0 0 auto; }
@media (max-width: 860px) { .header-menu .menu-item-lk { display: none; } }
/* Узкий десктоп: главное меню в одну строку */
@media (min-width: 861px) and (max-width: 1366px) {
.header-menu { gap: 10px; font-size: 13px; }
.header-menu .menu-item-lk a { gap: 4px; }
.header-menu .menu-lk__icon { width: 16px; height: 16px; }
}
/* Личный кабинет над кнопкой записи (десктоп), по центру кнопки */
.add-menu__cta { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.header-lk { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; line-height: 1; text-decoration: none; opacity: .85; transition: .3s; }
.header-lk:hover { opacity: 1; }
.header-lk svg { flex: 0 0 auto; }

File diff suppressed because one or more lines are too long

View File

@ -3679,17 +3679,6 @@ function dekart_assoc_ids($val): array
return array_values(array_filter($out));
}
// ─── Пункт «Личный кабинет» в главное меню шапки ───
add_filter('wp_nav_menu_items', function ($items, $args) {
if (empty($args->theme_location) || $args->theme_location !== 'top') {
return $items;
}
$url = carbon_get_theme_option('site_lk_url') ?: 'https://lk.dekart-school.ru/';
$ico = '<svg class="menu-lk__icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>';
$items .= '<li class="menu-item menu-item-lk"><a href="' . esc_url($url) . '" target="_blank" rel="noopener noreferrer">' . $ico . '<span>' . esc_html__('Личный кабинет', 'dekart') . '</span></a></li>';
return $items;
}, 10, 2);
// Лендинг «Семейные классы»: снять конкурирующий head-скрипт Custom CSS & JS (open-bitrix-form)
add_action('wp', function () {
if (! is_page_template('page-semejnye-klassy.php')) {

View File

@ -149,9 +149,15 @@ if (is_front_page()) {
href="tel:<?php echo preg_replace('/[^0-9+]/', '', carbon_get_theme_option('site_phone')); ?>">
<span><?php echo esc_html(carbon_get_theme_option('site_phone')); ?></span>
</a>
<button class="btn-free-lesson-header btn-primary desktop btn-write">
<?php esc_html_e('Записаться на бесплатное', 'dekart'); ?>
</button>
<div class="add-menu__cta">
<a class="header-lk" href="<?php echo esc_url(carbon_get_theme_option('site_lk_url') ?: 'https://lk.dekart-school.ru/'); ?>" target="_blank" rel="noopener noreferrer" aria-label="<?php esc_attr_e('Личный кабинет', 'dekart'); ?>">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
<span><?php esc_html_e('Кабинет', 'dekart'); ?></span>
</a>
<button class="btn-free-lesson-header btn-primary desktop btn-write">
<?php esc_html_e('Записаться на экскурсию', 'dekart'); ?>
</button>
</div>
</div>
</div>
@ -171,7 +177,7 @@ if (is_front_page()) {
));
?>
<button class="btn-free-lesson-header btn-primary mobile btn-write">
<?php esc_html_e('Записаться на бесплатное', 'dekart'); ?>
<?php esc_html_e('Записаться на экскурсию', 'dekart'); ?>
</button>
<button class="btn-close-menu btn-close-header-menu mobile">
<?php esc_html_e('ЗАКРЫТЬ МЕНЮ', 'dekart'); ?>

View File

@ -17,6 +17,7 @@ $f_graph[] = array(
'url' => $f_url,
'name' => $f_h1,
'inLanguage' => 'ru-RU',
'mainEntity' => array( '@id' => $f_url . '#course' ),
);
$f_graph[] = array(
@ -52,6 +53,160 @@ if (function_exists('dekart_schema_local_business')) {
}
}
// Course + Offer (цены из CF школы), CourseInstance (Onsite, адрес филиала)
$f_price_cards = array();
$f_school_id = function_exists('dekart_page_id_by_template') ? dekart_page_id_by_template('page-elementary-school.php') : 0;
if ($f_school_id) {
$f_price_cards = (array) carbon_get_post_meta($f_school_id, 'price_cards');
}
if (! $f_price_cards) {
$f_home = (int) get_option('page_on_front');
if ($f_home) {
$f_price_cards = (array) carbon_get_post_meta($f_home, 'price_cards');
}
}
$f_offers = array();
foreach ($f_price_cards as $f_pc) {
$f_num = (int) preg_replace('/[^0-9]/', '', (string) ( $f_pc['price'] ?? '' ));
if ($f_num <= 0) {
continue;
}
$f_offer = array(
'@type' => 'Offer',
'price' => $f_num,
'priceCurrency' => 'RUB',
'availability' => 'https://schema.org/InStock',
'url' => $f_url,
'priceSpecification' => array(
'@type' => 'PriceSpecification',
'price' => $f_num,
'priceCurrency' => 'RUB',
'valueAddedTaxIncluded' => true,
),
);
if (! empty($f_pc['class_name'])) {
$f_offer['name'] = wp_strip_all_tags($f_pc['class_name']);
}
$f_offers[] = $f_offer;
}
$f_org_id = null;
if (function_exists('dekart_schema_organization')) {
$f_org = dekart_schema_organization();
if (! empty($f_org['@id'])) {
$f_org_id = $f_org['@id'];
}
}
$f_addr = get_option('branch_address') ?: carbon_get_theme_option('site_address');
$f_course_instance = array(
'@type' => 'CourseInstance',
'courseMode' => 'Onsite',
'name' => $f_h1,
);
if ($f_addr || $f_city) {
$f_course_instance['location'] = array(
'@type' => 'Place',
'name' => get_option('branch_name') ?: carbon_get_theme_option('site_name') ?: 'Частная школа «Декарт»',
'address' => array(
'@type' => 'PostalAddress',
'streetAddress' => $f_addr,
'addressLocality' => $f_city,
'addressCountry' => 'RU',
),
);
}
$f_course_id = $f_url . '#course';
$f_course = array(
'@type' => 'Course',
'@id' => $f_course_id,
'name' => $f_h1,
'description' => wp_strip_all_tags((string) carbon_get_theme_option('family_what_is_text')) ?: $f_h1,
'inLanguage' => 'ru-RU',
'hasCourseInstance' => array( $f_course_instance ),
);
if ($f_org_id) {
$f_course['provider'] = array( '@id' => $f_org_id );
}
if ($f_offers) {
$f_course['offers'] = $f_offers;
}
// Отзывы — те же, что видны на странице (CF лендинга или школьные)
$f_reviews = array();
$f_review_ids = function_exists('dekart_assoc_ids') ? dekart_assoc_ids(carbon_get_theme_option('family_review_ids')) : array();
if ($f_review_ids) {
foreach ($f_review_ids as $f_rid) {
if (get_post_status($f_rid) !== 'publish') {
continue;
}
$f_reviews[] = array(
'author' => get_the_title($f_rid),
'body' => (string) carbon_get_post_meta($f_rid, 'review_text'),
'date' => get_the_date('c', $f_rid),
'rating' => (int) carbon_get_post_meta($f_rid, 'review_star'),
);
}
} else {
$f_school_cards = carbon_get_post_meta(91, 'reviews_cards');
if (is_array($f_school_cards) && $f_school_cards) {
// Тот же набор, что виден в блоке: сортировка по дате + лимит 3
if (function_exists('dekart_reviews_sort_desc')) {
$f_school_cards = dekart_reviews_sort_desc($f_school_cards);
}
$f_school_cards = array_slice($f_school_cards, 0, 3);
foreach ($f_school_cards as $f_rc_item) {
$f_reviews[] = array(
'author' => $f_rc_item['review_author'] ?? '',
'body' => $f_rc_item['review_text'] ?? '',
'date' => ! empty($f_rc_item['review_date']) ? date('c', strtotime($f_rc_item['review_date'])) : '',
'rating' => (int) ( $f_rc_item['review_rating'] ?? 0 ),
);
}
}
}
$f_review_items = array();
$f_rc_count = 0;
$f_rc_sum = 0;
foreach ($f_reviews as $f_rev) {
if (($f_rev['body'] ?? '') === '') {
continue;
}
$f_item = array(
'@type' => 'Review',
'reviewBody' => wp_strip_all_tags($f_rev['body']),
);
if (! empty($f_rev['author'])) {
$f_item['author'] = array( '@type' => 'Person', 'name' => wp_strip_all_tags($f_rev['author']) );
}
if (! empty($f_rev['date'])) {
$f_item['datePublished'] = $f_rev['date'];
}
if (! empty($f_rev['rating']) && $f_rev['rating'] > 0) {
$f_item['reviewRating'] = array( '@type' => 'Rating', 'ratingValue' => (int) $f_rev['rating'], 'bestRating' => 5, 'worstRating' => 1 );
$f_rc_count++;
$f_rc_sum += (int) $f_rev['rating'];
}
$f_review_items[] = $f_item;
}
if ($f_review_items) {
$f_course['review'] = $f_review_items;
if ($f_rc_count > 0) {
$f_course['aggregateRating'] = array(
'@type' => 'AggregateRating',
'ratingValue' => round($f_rc_sum / $f_rc_count, 1),
'reviewCount' => count($f_review_items),
'bestRating' => 5,
'worstRating' => 1,
);
}
}
$f_graph[] = $f_course;
// FAQPage
$f_faq = (array) carbon_get_theme_option('family_faq');
$f_q = array();