<?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 Oginer
 */

?>
<!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="http://gmpg.org/xfn/11">

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

<body <?php body_class(); ?>>
<?php if ( function_exists( 'wp_body_open' ) ) {
	wp_body_open();
	}else{
		do_action('wp_body_open');
	}
?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'oginer' ); ?></a>
	
	<header id="masthead" class="site-header header" role="banner">
		<div class="site-branding">

		</div><!-- .site-branding -->

		<nav id="site-navigation" class="main-navigation navbar navbar-default navbar-fixed-top bg-dark">
			<div class="container">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".example-navbar-collapse" aria-expanded="false">
						<span class="sr-only"><?php esc_html_e( 'Primary Menu', 'oginer' ); ?></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>

					<?php
					if ( has_custom_logo() ) {
						the_custom_logo();
					} else {
						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;
					}
					?>
				</div>
				
				<div id="mw-top-menu" class="collapse navbar-collapse example-navbar-collapse">
				<?php
					wp_nav_menu( array(
						'theme_location' => 'primary',
						//'container' => 'div',
						//'container_class' => '',
						//'container_id' => '',
						'menu_class' => 'nav navbar-nav navbar-right',
					) );
				?>
				</div>

			</div><!-- /.container -->
		</nav><!-- #site-navigation -->		
		
		<?php 
		$banner_show = get_theme_mod( 'oginer_show_banner' );
		if ( is_front_page() && $banner_show == 1 ) { 
			get_template_part( 'inc/main-header' );
		} ?>

	</header><!-- #masthead -->

	<div id="content" class="site-content">