feat: add contacts page template and custom footer
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Контакты
|
||||
*
|
||||
* Contacts page: two-column layout with contact info and contact form.
|
||||
*
|
||||
* @package bitwms-child
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
get_header();
|
||||
?>
|
||||
<main class="page-contacts">
|
||||
<div class="container">
|
||||
|
||||
<?php
|
||||
// Page title from WordPress
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
<h1 class="page-contacts__title"><?php the_title(); ?></h1>
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div class="contacts-grid">
|
||||
|
||||
<!-- Left column: contact info -->
|
||||
<div class="contacts-grid__info">
|
||||
<h2><?php esc_html_e( 'Екатеринбург Проектный центр', 'bitwms-child' ); ?></h2>
|
||||
|
||||
<ul class="contacts-list">
|
||||
<li class="contacts-list__item contacts-list__item--phone">
|
||||
<strong><?php esc_html_e( 'Телефон:', 'bitwms-child' ); ?></strong>
|
||||
<a href="<?php echo esc_url( 'tel:+73432000000' ); ?>">
|
||||
<?php esc_html_e( '+7 (343) 200-00-00', 'bitwms-child' ); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="contacts-list__item contacts-list__item--email">
|
||||
<strong><?php esc_html_e( 'Email:', 'bitwms-child' ); ?></strong>
|
||||
<a href="<?php echo esc_url( 'mailto:wms@1bit.ru' ); ?>">
|
||||
<?php esc_html_e( 'wms@1bit.ru', 'bitwms-child' ); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="contacts-list__item contacts-list__item--address">
|
||||
<strong><?php esc_html_e( 'Адрес:', 'bitwms-child' ); ?></strong>
|
||||
<address>
|
||||
<?php esc_html_e( 'г. Екатеринбург, ул. Хохрякова, 10, оф. 405', 'bitwms-child' ); ?>
|
||||
</address>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- .contacts-grid__info -->
|
||||
|
||||
<!-- Right column: contact form -->
|
||||
<div class="contacts-grid__form">
|
||||
<h2><?php esc_html_e( 'Напишите нам', 'bitwms-child' ); ?></h2>
|
||||
|
||||
<form class="contact-form" method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" novalidate>
|
||||
<?php wp_nonce_field( 'bitwms_contact_form', 'bitwms_contact_nonce' ); ?>
|
||||
<input type="hidden" name="action" value="bitwms_contact_form">
|
||||
|
||||
<div class="contact-form__field">
|
||||
<label for="contact-name" class="contact-form__label">
|
||||
<?php esc_html_e( 'Ваше имя', 'bitwms-child' ); ?>
|
||||
<span class="contact-form__required" aria-hidden="true">*</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="contact-name"
|
||||
name="contact_name"
|
||||
class="contact-form__input"
|
||||
placeholder="<?php esc_attr_e( 'Иван Иванов', 'bitwms-child' ); ?>"
|
||||
required
|
||||
autocomplete="name"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="contact-form__field">
|
||||
<label for="contact-email" class="contact-form__label">
|
||||
<?php esc_html_e( 'Email', 'bitwms-child' ); ?>
|
||||
<span class="contact-form__required" aria-hidden="true">*</span>
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
id="contact-email"
|
||||
name="contact_email"
|
||||
class="contact-form__input"
|
||||
placeholder="<?php esc_attr_e( 'ivan@company.ru', 'bitwms-child' ); ?>"
|
||||
required
|
||||
autocomplete="email"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="contact-form__field">
|
||||
<label for="contact-message" class="contact-form__label">
|
||||
<?php esc_html_e( 'Сообщение', 'bitwms-child' ); ?>
|
||||
</label>
|
||||
<textarea
|
||||
id="contact-message"
|
||||
name="contact_message"
|
||||
class="contact-form__textarea"
|
||||
rows="5"
|
||||
placeholder="<?php esc_attr_e( 'Опишите вашу задачу или вопрос...', 'bitwms-child' ); ?>"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="contact-form__field contact-form__field--checkbox">
|
||||
<label class="contact-form__checkbox-label">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="contact_consent"
|
||||
class="contact-form__checkbox"
|
||||
required
|
||||
>
|
||||
<span>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %1$s: open link tag, %2$s: close link tag */
|
||||
esc_html__( 'Я согласен(а) с %1$sполитикой конфиденциальности%2$s и даю согласие на обработку персональных данных', 'bitwms-child' ),
|
||||
'<a href="' . esc_url( '/privacy-policy/' ) . '" target="_blank" rel="noopener noreferrer">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="contact-form__submit">
|
||||
<button type="submit" class="btn btn--primary">
|
||||
<?php esc_html_e( 'Отправить сообщение', 'bitwms-child' ); ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- .contacts-grid__form -->
|
||||
|
||||
</div><!-- .contacts-grid -->
|
||||
|
||||
</div><!-- .container -->
|
||||
</main><!-- .page-contacts -->
|
||||
<?php get_footer();
|
||||
Reference in New Issue
Block a user