<?php
/**
 * The header for our theme
 *
 * @package Revolution Video Vlog
 */

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'revolution-video-vlog' ); ?></a>

	 <?php
		$revolution_video_preloader_wrap = absint(get_theme_mod('revolution_video_vlog_enable_preloader', 0));
		if($revolution_video_preloader_wrap == 1){ ?>
			<div id="loader">
				<div class="loader-container">
					<div id="preloader" class="loader-2">
						<div class="dot"></div>
					</div>
				</div>
			</div>
	<?php } ?>

	<header id="masthead" class="site-header">
		<?php $revolution_video_vlog_has_header_image = has_header_image(); ?>

		<div class="header-menu-box">
			<div class="container <?php echo esc_attr( get_theme_mod( 'revolution_video_vlog_enable_sticky_header', false ) ? 'sticky-header' : '' ); ?>">
				<div class="flex-row">
					<div class="header-search">
							<?php if( get_theme_mod( 'revolution_video_vlog_header_search',true) == 1) { ?>
						        <div class="search-box">
				                  <span><a href="#"><i class="fas fa-search"></i></a></span>
				                </div>
					        <?php }?>
						</div>
					<div class="nav-box-header-left">
						
						<div class="header-button">
							<?php if ( get_theme_mod('revolution_video_vlog_header_button_link','#') ||  get_theme_mod('revolution_video_vlog_header_button_text','SUBMIT STORY' )) : ?><a href="<?php echo esc_url( get_theme_mod('revolution_video_vlog_header_button_link','#') ); ?>"><?php echo esc_html( get_theme_mod('revolution_video_vlog_header_button_text','SUBMIT STORY') ); ?></a><?php endif; ?>
						</div>
					</div>
					<div class="nav-box-header-middle">
						<nav id="site-navigation" class="main-navigation">
							<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><i class="fas fa-bars"></i></button>
							<?php
								wp_nav_menu(
									array(
										'theme_location' => 'menu-1',
										'menu_id'        => 'primary-menu',
									)
								);
							?>
						</nav>
					</div>
					<div class="nav-box-header-right">
						<?php if ( get_theme_mod('revolution_video_vlog_topbar_facebook_link','#')) : ?><a href="<?php echo esc_url( get_theme_mod('revolution_video_vlog_topbar_facebook_link','#') ); ?>"><i class="fab fa-facebook-f"></i></a><?php endif; ?>
						<?php if ( get_theme_mod('revolution_video_vlog_topbar_twitter_link','#')) : ?><a href="<?php echo esc_url( get_theme_mod('revolution_video_vlog_topbar_twitter_link','#') ); ?>"><i class="fab fa-twitter"></i></a><?php endif; ?>
						<?php if ( get_theme_mod('revolution_video_vlog_topbar_instagram_link','#')) : ?><a href="<?php echo esc_url( get_theme_mod('revolution_video_vlog_topbar_instagram_link','#') ); ?>"><i class="fab fa-instagram"></i></a><?php endif; ?>
						<?php if ( get_theme_mod('revolution_video_vlog_topbar_pinterest_link','#')) : ?><a href="<?php echo esc_url( get_theme_mod('revolution_video_vlog_topbar_pinterest_link','#') ); ?>"><i class="fab fa-pinterest-p"></i></a><?php endif; ?>
						<?php if ( get_theme_mod('revolution_video_vlog_topbar_whatsapp_link','#')) : ?><a href="<?php echo esc_url( get_theme_mod('revolution_video_vlog_topbar_whatsapp_link','#') ); ?>"><i class="fab fa-whatsapp"></i></a><?php endif; ?>
					</div>
				</div>
			</div>
		</div>
		
		<div class="header-info-box" <?php if (!empty($revolution_video_vlog_has_header_image)) { ?> style="background-image: url(<?php echo header_image(); ?>);" <?php } ?> >
			<div class="container">
				<div class="site-branding">
					<?php
					the_custom_logo();
					if ( is_front_page() && is_home() ) :
						?>
						<?php if( get_theme_mod('revolution_video_vlog_site_title_text',true)){ ?>
							<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
						<?php } ?>
						<?php
					else :
						?>
						<?php if( get_theme_mod('revolution_video_vlog_site_title_text',true)){ ?>
							<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
						<?php } ?>
						<?php
					endif; ?>
					<?php $revolution_video_vlog_description = get_bloginfo( 'description', 'display' );
						if ( $revolution_video_vlog_description || is_customize_preview() ) :
						?>
						<?php if( get_theme_mod('revolution_video_vlog_site_tagline_text',false)){ ?>
							<p class="site-description"><?php echo $revolution_video_vlog_description; ?></p>
						<?php } ?>
					<?php endif; ?>
				</div>
			</div>
		</div>
		<div class="serach_outer">
          <div class="closepop"><a href="#maincontent"><i class="fa fa-window-close"></i></a></div>
          <div class="serach_inner">
            <?php get_search_form(); ?>
          </div>
        </div>
	</header>