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

?>
<!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', 'ismoderna' ); ?></a>
	<!-- Menu-start-area -->
  <header>
      <div class="header-fixed header-one">
         <div class="container">
            <div class="row">
               <div class="col-lg-3 col-sm-12">
                  <div class="nav-brand">
                    <?php if(has_custom_logo())  { ?>
                      <?php the_custom_logo(); ?>
                    <?php } 
                    if (display_header_text() == true) {?>
                      <div class="logo">
                          <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 
                          <?php
                          $ismoderna_description = get_bloginfo( 'description', 'display' );
                          if ( $ismoderna_description || is_customize_preview() ) :
                          ?>
                             <p class="site-description"> <?php bloginfo('description'); ?></p>
                          <?php endif; ?>
                      </div>
                    <?php } ?>
                  </div>
               </div>
               <div class="col-lg-9">
                  <nav class="navbar navbar-expand-lg navbar-light">
                     <div class="collapse navbar-collapse my-lg-0" id="navbarNav">
                        <?php 
                        wp_nav_menu( array (
                           'container'      => 'ul',
                           'theme_location' => 'primary',
                           'before'         => '',
                           'items_wrap'     => '<ul class="navbar-nav mr-auto text-left">%3$s</ul>',
                           'walker'         =>  new ismodernaCustomNavWalker(),
                           'fallback_cb'    => 'ismoderna_primary_navigation_fallback',
                        ) 
                        );
                        ?>             
                     </div>
                  </nav>
               </div>
               <?php $custom_logo_id = get_theme_mod( 'custom_logo' ); 
               $logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
               if ( has_custom_logo() ) { 
               ?>
                  <div class="mobile-menu" data-type="logo" data-link="<?php echo esc_attr( home_url('/') ); ?>" data-logo="<?php echo esc_attr( $logo[0] ); ?>"> </div>
               <?php } else{ ?>
                  <div class="mobile-menu" data-type="text" data-link="<?php echo esc_attr( home_url('/') ); ?>" data-logo="<?php bloginfo( 'name' ); ?>"> </div>
               <?php } ?>
            </div>
         </div>
      </div>
  </header>
  <div id="primary">