header.php 6.39 KB
<?php
/**
 * Шаблон отображения шипки сайта
 *
 * @package WordPress
 * @subpackage FenixMedicaCatheter
 * @since 1.0.0
 */
?><!doctype html>
<html <?php language_attributes(); ?>>
	<head>
		<meta charset="<?php bloginfo( 'charset' ); ?>" />
		<meta name="viewport" content="width=device-width, initial-scale=1"/>
		<meta name="author" content="SANS" />
		<?php wp_head(); ?>
	</head>
	<body <?php body_class(); ?>>

		<?php wp_body_open(); ?>

		<!--Шапка-->  
		<header class="header shadow-0 bg-custom-1 d-flex position-relative">
			<nav class="navbar navbar-expand-md align-self-center w-100 py-0">
				<div class="container">
					<a class="navbar-brand mx-auto" href="<?php echo get_home_url(); ?>">
						<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/logo_header.svg" alt="Fenix Medical Catheter" class="d-inline-block align-text-top img-fluid" />
					</a>
					<div class="collapse navbar-collapse justify-content-between" id="maim-menu-wrap">
						<div></div>
						<?php
							wp_nav_menu(
								array(
									'theme_location'  => 'menu_up',
									'menu_class'	  => 'navbar-nav fw-bold',
									'list_item_class' => 'nav-item',
									'link_class'   	  => 'nav-link',
									'container'       => false,
									'echo'            => true
								)
							);
						?>
						<a href="tel:88652991199" class="btn btn-lg btn-style-0 rounded-pill me-md-4 mx-auto" role="button">+7 (8652) 22-25-09</a>
					</div>
					<button class="btn btn-lg btn-style-1 rounded-pill" role="button" data-icon="phone" data-bs-toggle="modal" data-bs-target="#backvoicesModal"></button>
					<button class="navbar-toggler p-0" type="button" data-bs-toggle="collapse" data-bs-target="#maim-menu-wrap" aria-controls="maim-menu-wrap" aria-expanded="false" aria-label="Меню" data-icon="burger"></button>
				</div>
			</nav>
		</header>

		<!-- Modal -->
		<div class="modal fade" id="backvoicesModal" tabindex="-1" aria-labelledby="backvoicesModalLabel" aria-hidden="true">
			<div class="modal-dialog modal-dialog-centered">
				<div class="modal-content rounded-4 text-color-1 bg-custom-9 shadow-2">
					<div class="modal-header">
						<p id="backvoicesModalLabel" class="text-center text-md-start modal-title m-0" style="font-family: 'Fontin Sans CR';color: var(--m-blue);font-weight: 700;line-height: 1em;margin-bottom: 1.5rem;font-size: 33px;">Обратный звонок</p>
						<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
					</div>
					<div class="modal-body">

						<div class="container text-gray">
							<div class="row">
								<div class="col-12 my-mb-0">		
		<?php
								$args = array(
									'id_form'=>'form_backvoices',
									'fields'=>array(
										'author' => '<div class="form-floating mb-3" style="order:-2;">'.
											'<input type="text" class="form-control form-control-lg rounded-4 border-0" name="author" id="author" placeholder="Ваше имя" value="" size="30" required/>'.
											'<label for="author" class="form-label">Ваше имя:</label>'.
											'<div class="invalid-feedback">Пожалуйста, укажите имя пользователя</div>'.
										'</div>',
										'phone' => '<div class="form-floating mb-3" style="order:-1;">'.
											'<input type="text" class="form-control form-control-lg rounded-4 border-0" name="phone" id="phone" placeholder="Номер телефона" value="" required />'.
											'<label for="phone" class="form-label">Номер телефона:</label>'.
											'<div class="invalid-feedback">Пожалуйста, укажите телефон</div>'.
										'</div>',
										'cookies' => '<div class="form-check mb-3 ps-0">'.
											'<input type="checkbox" name="accept" class="form-check-input d-none" id="accept" value="accept" required="required" checked="checked"/>'.
											'<label class="form-check-label" for="accept">
												<span>Я даю согласие на <a href="'.get_permalink( get_page_by_path( 'privacy-policy' ) ).'" class="text-blue">обработку персональных данных</a>.</span>
											</label>'.
											'<div class="invalid-feedback">Вы должны принять перед отправкой</div>'.
										'</div>'
									),
									'comment_field' => '<div class="form-floating mb-3" >'.
										'<textarea class="form-control form-control-lg rounded-4 border-0" placeholder="Комментарий" name="comment" id="comment" rows="8" aria-required="true" style="height: 100px" required></textarea>'.
										'<label for="comment" class="form-label">Комментарий</label>'.
										'<div class="invalid-feedback">Пожалуйста, введите комментарий</div>'.
									'</div>',
									'submit_button'=> '<button name="%1$s" type="submit" class="btn btn-lg btn-style-1 rounded-pill mx-auto w-100 %3$s" value="%4$s" id="%2$s">Отправить заявку</button>',
									'comment_notes_before' => '',
									'title_reply'=> ''.
										'<div class="form-preloader align-items-center justify-content-center d-flex d-none text-center position-absolute top-0 bottom-0 start-0 end-0 m-auto" style="z-index:1; background-color: rgba(255,255,255,0.8)">'.
											'<div class="spinner-border" role="status">'.
												'<span class="visually-hidden">Обработка...</span>'.
											'</div>'.
										'</div>',
									'class_form'=>'d-flex flex-column needs-validation ajax-submit'
								);
								comment_form($args, url_to_postid('backvoices'));
		?>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>

		<!-- Modal -->
		<div class="modal fade" id="alertModal" tabindex="-1" aria-labelledby="alertModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-dialog-centered">
			<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title m-0" id="alertModalLabel">Уведомление</h5>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div id="alertModalBody"  class="modal-body text-center">
				<!--
					Заявка на звонок принята
					Спасибо за отзыв!
				-->
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-lg btn-default btn-style-5 rounded-pill mx-auto" data-bs-dismiss="modal">OK</button>
			</div>
			</div>
		</div>
		</div>