feat: add contacts page template and custom footer

This commit is contained in:
2026-04-03 01:16:50 +05:00
parent 7ff8d06780
commit fe22b37b0e
3 changed files with 742 additions and 0 deletions
@@ -71,3 +71,109 @@ add_action( 'generate_before_header', function () {
add_action( 'generate_before_header', function () {
get_template_part( 'templates/top-header' );
}, 20 );
// ---------------------------------------------------------------------------
// 5. Custom footer (before GeneratePress footer, priority 5)
// ---------------------------------------------------------------------------
add_action( 'generate_before_footer_content', function () {
$theme_uri = get_stylesheet_directory_uri();
$current_year = gmdate( 'Y' );
?>
<div class="custom-footer">
<div class="container">
<div class="custom-footer__grid">
<!-- Col 1: Logo + contacts -->
<div class="custom-footer__col custom-footer__col--brand">
<a href="/" class="custom-footer__logo-link" aria-label="<?php esc_attr_e( 'БИТ.WMS — на главную', 'bitwms-child' ); ?>">
<img
src="<?php echo esc_url( $theme_uri . '/img/logo.svg' ); ?>"
alt="<?php esc_attr_e( 'БИТ.WMS', 'bitwms-child' ); ?>"
width="140"
height="40"
class="custom-footer__logo"
loading="lazy"
>
</a>
<address class="custom-footer__address">
<p><?php esc_html_e( 'г. Екатеринбург, ул. Хохрякова, 10, оф. 405', 'bitwms-child' ); ?></p>
<p>
<a href="<?php echo esc_url( 'tel:+73432000000' ); ?>">
<?php esc_html_e( '+7 (343) 200-00-00', 'bitwms-child' ); ?>
</a>
</p>
<p>
<a href="<?php echo esc_url( 'mailto:wms@1bit.ru' ); ?>">
<?php esc_html_e( 'wms@1bit.ru', 'bitwms-child' ); ?>
</a>
</p>
</address>
</div>
<!-- Col 2: Разделы -->
<div class="custom-footer__col custom-footer__col--sections">
<h4><?php esc_html_e( 'Разделы', 'bitwms-child' ); ?></h4>
<ul>
<li><a href="<?php echo esc_url( '/cases/' ); ?>"><?php esc_html_e( 'Кейсы', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/articles/' ); ?>"><?php esc_html_e( 'Статьи', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/webinars/' ); ?>"><?php esc_html_e( 'Вебинары', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/courses/' ); ?>"><?php esc_html_e( 'Курсы', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/events/' ); ?>"><?php esc_html_e( 'Мероприятия', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/materials/' ); ?>"><?php esc_html_e( 'Материалы', 'bitwms-child' ); ?></a></li>
</ul>
</div>
<!-- Col 3: Продукты -->
<div class="custom-footer__col custom-footer__col--products">
<h4><?php esc_html_e( 'Продукты', 'bitwms-child' ); ?></h4>
<ul>
<li><a href="<?php echo esc_url( '/bitwms/' ); ?>"><?php esc_html_e( 'БИТ.WMS', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/1c-wms/' ); ?>"><?php esc_html_e( '1C:WMS', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/cleverence/' ); ?>"><?php esc_html_e( 'Клеверенс', 'bitwms-child' ); ?></a></li>
<li><a href="<?php echo esc_url( '/1c-tms/' ); ?>"><?php esc_html_e( '1C:TMS', 'bitwms-child' ); ?></a></li>
</ul>
</div>
<!-- Col 4: Подписка -->
<div class="custom-footer__col custom-footer__col--subscribe">
<h4><?php esc_html_e( 'Подписка', 'bitwms-child' ); ?></h4>
<p class="custom-footer__subscribe-desc">
<?php esc_html_e( 'Получайте новые материалы на email', 'bitwms-child' ); ?>
</p>
<form class="footer-subscribe" method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" novalidate>
<?php wp_nonce_field( 'bitwms_footer_subscribe', 'bitwms_subscribe_nonce' ); ?>
<input type="hidden" name="action" value="bitwms_footer_subscribe">
<input
type="email"
name="subscribe_email"
class="footer-subscribe__input"
placeholder="<?php esc_attr_e( 'ваш@email.ru', 'bitwms-child' ); ?>"
required
autocomplete="email"
aria-label="<?php esc_attr_e( 'Email для подписки', 'bitwms-child' ); ?>"
>
<button type="submit" class="btn btn--primary btn--sm footer-subscribe__btn">
<?php esc_html_e( 'OK', 'bitwms-child' ); ?>
</button>
</form>
</div>
</div><!-- .custom-footer__grid -->
<div class="custom-footer__bottom">
<p>&copy; <?php echo esc_html( $current_year ); ?> <?php esc_html_e( 'Первый Бит. Все права защищены.', 'bitwms-child' ); ?></p>
<div class="custom-footer__legal">
<a href="<?php echo esc_url( '/privacy-policy/' ); ?>">
<?php esc_html_e( 'Политика конфиденциальности', 'bitwms-child' ); ?>
</a>
<a href="<?php echo esc_url( '/consent/' ); ?>">
<?php esc_html_e( 'Согласие на обработку данных', 'bitwms-child' ); ?>
</a>
</div>
</div><!-- .custom-footer__bottom -->
</div><!-- .container -->
</div><!-- .custom-footer -->
<?php
}, 5 );