Files
dostavka_vodi/wp-content/themes/twentytwentyfour/template-parts/test1-shared-header.php
2026-04-04 19:58:19 +03:00

77 lines
3.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Shared header for test1-related WooCommerce pages.
*
* @package Twenty_Twenty_Four
*/
$test1_header_action_url = isset( $test1_header_action_url ) ? $test1_header_action_url : '';
$test1_header_action_label = isset( $test1_header_action_label ) ? $test1_header_action_label : '';
$test1_header_mode = isset( $test1_header_mode ) ? $test1_header_mode : 'link';
?>
<header class="site-header">
<div class="container">
<div class="header-row">
<a class="brand" href="<?php echo esc_url( home_url( '/test1/' ) ); ?>" aria-label="Перейти на страницу test1">
<span class="brand-mark" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/>
</svg>
</span>
<span class="brand-text">
<strong>АкваЛиния</strong>
<span>доставка воды в Севастополе</span>
</span>
</a>
<nav class="nav" aria-label="Основная навигация">
<a href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>">Каталог</a>
<a href="<?php echo esc_url( home_url( '/test1/#delivery' ) ); ?>">Доставка</a>
<a href="<?php echo esc_url( home_url( '/test1/#business' ) ); ?>">Для дома и офиса</a>
<a href="<?php echo esc_url( home_url( '/test1/#faq' ) ); ?>">FAQ</a>
<a href="<?php echo esc_url( home_url( '/test1/#contacts' ) ); ?>">Контакты</a>
</nav>
<div class="header-actions">
<a class="header-phone" href="tel:+79781234567">
<span aria-hidden="true">+7 (978) 123-45-67</span>
</a>
<?php if ( 'cart' === $test1_header_mode ) : ?>
<button class="cart-button" id="cartOpenButton" aria-label="Открыть корзину">
<span aria-hidden="true">Корзина</span>
<span class="cart-count" id="cartCount" aria-live="polite" aria-atomic="true">0</span>
</button>
<button class="mobile-toggle" id="mobileToggle" aria-label="Открыть меню" aria-expanded="false" aria-controls="mobilePanel">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M4 7H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M4 12H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M4 17H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
<?php elseif ( $test1_header_action_url && $test1_header_action_label ) : ?>
<a class="cart-button checkout-back-link" href="<?php echo esc_url( $test1_header_action_url ); ?>"><span><?php echo esc_html( $test1_header_action_label ); ?></span></a>
<?php endif; ?>
</div>
</div>
<?php if ( 'cart' === $test1_header_mode ) : ?>
<div class="mobile-panel" id="mobilePanel">
<div class="mobile-card">
<nav class="mobile-nav" aria-label="Мобильная навигация">
<a href="#catalog">Каталог</a>
<a href="#delivery">Условия доставки</a>
<a href="#business">Для дома и офиса</a>
<a href="#faq">FAQ</a>
<a href="#contacts">Контакты</a>
</nav>
<a class="header-phone" href="tel:+79781234567">+7 (978) 123-45-67</a>
<button class="cart-button" id="mobileCartOpenButton" aria-label="Открыть корзину с мобильного меню">
<span>Корзина</span>
<span class="cart-count" id="mobileCartCount" aria-live="polite" aria-atomic="true">0</span>
</button>
</div>
</div>
<?php endif; ?>
</div>
</header>