<?php
// Do not allow direct access to the file.
if( ! defined( 'ABSPATH' ) ) {
    exit;
}
/**
 * Header Top
 *
 */
function lotus_beauty_header () {
?>
<header id="masthead" class="site-header" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
<div id="grid-top" class="grid-top">
	<div class="header-right"itemprop="logo" itemscope itemtype="http://schema.org/Brand">
			<?php the_custom_logo(); ?>
	</div>	
	<!-- Site Navigation  -->
	<button id="s-button-menu"><img src="<?php echo esc_url(get_template_directory_uri() ) . '/images/mobile.jpg'; ?>"/></button>
	<nav id="site-navigation" class="main-navigation" role="navigation">
		<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Menu', 'lotus-beauty' ); ?></button>
		<?php wp_nav_menu( array( 
		'theme_location' => 'primary',
		'menu_id' => 'primary-menu',
		) ); ?>
	</nav><!-- #site-navigation -->
</div>
	<?php if (get_theme_mod( 'lotus_beauty_active_social')) { lotus_beauty_social_section (); } ?>	
	<!-- Header Image  -->
	<div class="all-header">
    	<div class="s-shadow"></div>
		<?php if (get_theme_mod( 'header_image_position' ) == 'default' ) { ?>
		<img id="masthead" class="header-image" src='<?php echo esc_url(get_template_directory_uri() ) . '/images/header.png'; ?>' alt="<?php esc_attr_e( 'header image','lotus-beauty' ); ?>"/>	
		<?php } ?>
		<?php if (get_theme_mod( 'header_image_position' ) == 'real' ) { ?>
		<img id="masthead" class="header-image" src='<?php if ( !is_home() and has_post_thumbnail() and get_post_meta( get_the_ID(), 'lotus_beauty_value_header_image', true ) ) { the_post_thumbnail_url(); } else { header_image(); } ?>' alt="<?php esc_attr_e( 'header image','lotus-beauty' ); ?>"/>	
		<?php } else { ?>
		<div id="masthead" class="header-image" style="background-image: url( '<?php if (  !is_home() and has_post_thumbnail() and get_post_meta( get_the_ID(), 'lotus_beauty_value_header_image', true ) ) { the_post_thumbnail_url(); } else { header_image(); } ?>' );"></div>
		<?php } ?>

		<div class="site-branding">
		
		<?php if ( display_header_text() == true ) { ?>
			<span class="ml15">
			<?php
			
			if ( is_front_page() && is_home() ) :
				?>
					<h1 class="site-title" itemscope itemtype="http://schema.org/Brand"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><span class="word"><?php bloginfo( 'name' ); ?></span></a></h1>

					<?php
				else :
					?>
					<p class="site-title" itemscope itemtype="http://schema.org/Brand"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><span class="word"><?php bloginfo( 'name' ); ?></span></a></p>
					
					<?php
				endif;
				$lotus_beauty_description = esc_html(get_bloginfo( 'description', 'display' ) );
				if ( $lotus_beauty_description || is_customize_preview() ) :
					?>    
					<p class="site-description" itemprop="headline">
						<span class="word"><?php echo esc_html($lotus_beauty_description); ?></span>
					</p>

				<?php endif; ?>	
			</span>
		<?php } ?>	
		</div>
		<!-- .site-branding -->
		
	</div>
	<!-- Recent Posts Slider  -->
	<?php if (( is_front_page() or is_home()) and  get_theme_mod('lotus_beauty_activate_conveyor_ticker_home')) { 
	 echo esc_html(lotus_beauty_slider_sticky ()); 
	 } ?>
	 <?php if (( !is_front_page() or !is_home()) and  get_theme_mod('lotus_beauty_activate_conveyor_ticker_all')) { 
	 echo esc_html(lotus_beauty_slider_sticky ()); 
	 } ?>

		 
</header>
<?php }