<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Theia Lite
 */

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

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

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
	<?php 
	    $fixedmenu = get_theme_mod('theia_lite_theme_options_fixedmenu', '');
		$stickymenu = get_theme_mod('theia_lite_theme_options_stickymenu', '');
		$sidebarmenu = get_theme_mod('theia_lite_theme_options_sidebarmenu', '');
		$sidebarLogotheia = get_theme_mod('theia_pro_theme_options_sidebarLogotheia', '');
	?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'theia-lite' ); ?></a>		
		<?php if (is_singular() && '' != get_the_post_thumbnail() ) : ?>
		<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'theia-normal-post'); ?>
		<header id="masthead" class="site-header" role="banner" style="background: url(<?php echo esc_url($src[0]); ?>) 50% 20% / cover no-repeat;">
		<?php elseif( get_header_image()) : ?>
			<header id="masthead" class="site-header" role="banner" style="background: url(<?php header_image(); ?>) 50% 50% / cover no-repeat;">
		<?php else: ?>
			<header id="masthead" class="site-header" role="banner">
		<?php endif; ?>
			<div class="site-brand-main">
			<div class="site-branding">
				<?php if ( function_exists( 'has_custom_logo' ) && has_custom_logo() ): ?>
				<div class="theia-logo"><?php the_custom_logo()?></div>
				<?php else : ?>
					<?php if ( is_front_page() && is_home() ) : ?>
						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
					<?php else : ?>
						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
					<?php endif;

					$description = get_bloginfo( 'description', 'display' );
					if ( $description || is_customize_preview() ) : ?>
						<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
					<?php endif; ?>
				<?php endif; ?>	
			</div><!-- .site-branding -->
			</div><!-- .site-branding-main -->
	<div class="navigationOpen">
		<?php if ($sidebarLogotheia == 1) : ?>	
			<?php if ( function_exists( 'has_custom_logo' ) && has_custom_logo() ): ?>
				<div class="theia-logo"><?php the_custom_logo()?></div>
			<?php else : ?>
				<div class="theia-title">
					<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
					<?php $description = get_bloginfo( 'description', 'display' );
					if ( $description || is_customize_preview() ) : ?>
						<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
					<?php endif; ?>
				</div>	
			<?php endif; ?>	
		<?php endif; ?>	
		<nav id="site-navigation" class="main-navigation" role="navigation">
			<?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
		</nav><!-- #site-navigation -->
		<div class="socialHeader">
			<?php theia_lite_social_buttons(); ?>
		</div>
	</div>	
	</header><!-- #masthead -->
	<?php if ( ($stickymenu == 1) && ( has_nav_menu( 'menu-1' ) ) ) : ?>
	<div class="sticky-menu<?php if ($fixedmenu == '1') : ?> fixed<?php endif;?>">
		<nav id="site-navigation" class="navigation sticky" role="navigation">
			<?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
		</nav>
	</div><!-- #sticky-navigation -->
	<?php endif; ?>
	<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
	<div class="openNav<?php if ($sidebarmenu == 'value2') : ?> onlyMob<?php endif;?>">
		<i class="fa fa-bars" aria-hidden="true"></i>
	</div>
	<?php endif; ?>
	<div id="content" class="site-content">
