<?php
/**
 * The template for displaying the header
 *
 * Displays all of the head element and everything up until the "main" div.
 *
 * @package WordPress
 * @subpackage blazeblog
 * @since BlazeBlog 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<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 if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php endif; ?>
    <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
    <!-- ## page-wrapper start ## -->
    <div class="page-wrapper">

        <!-- ## header start ## -->
        <header id="header-wrapper">
            <!-- ## navbar-wrapper start ## -->
            <div class="navbar-wrapper">
                <div id="navbar-container" class="container">
                    <div class="gg-dropmenu row" id="gg-dropmenu-1">
                        <!-- ## dropmenu start ## -->
                        <div class="navbar navbar-inverse" role="banner">
                            <div class="container-fluid nav-container">
                                <div class="navbar-header">
                                    <!-- ## navbar-toggle start ## -->
                                    <button class="navbar-toggle" data-target="#nav-dropdown-menu1" data-toggle="collapse" type="button">
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </button>
                                    <!-- ## navbar-toggle end ## -->
                                    <a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>">
                                        <?php blazeblog_get_custom_logo_img(); ?>
                                        <?php blazeblog_get_icon_logo(); ?>
                                        <span class="site-title">
                                            <?php bloginfo( 'name' ); ?>
                                        </span>
                                        <?php $description = get_bloginfo( 'description', 'display' ); ?>
                                        <?php if ( $description || is_customize_preview() ) : ?>
                                        <span class="site-description">
                                            <?php echo $description; ?>
                                        </span>
                                        <?php endif; ?>
                                    </a>
                                </div>
                                <nav class="nav-dropdown-menu collapse navbar-collapse" id="nav-dropdown-menu1">
                                    <?php
                                    if ( has_nav_menu('primary') ) :
                                        wp_nav_menu( array(
                                            'menu'              => '',
                                            'theme_location'    => 'primary',
                                            'depth'             => 2,
                                            'container'         => '',
                                            'container_class'   => '',
                                            'container_id'      => '',
                                            'menu_class'        => 'nav navbar-nav navbar-right',
                                            'walker'            => new wp_bootstrap_navwalker()
                                         ) );
                                    else :
                                        if( current_user_can( 'edit_theme_options' ) ) :
                                    ?>
                                    <ul class="nav navbar-nav navbar-right">
                                        <li class="menu-item menu dropdown">
                                            <a class="dropdown-toggle" href="<?php echo esc_url( admin_url( '/nav-menus.php' ) ); ?>"><?php _e( 'Add A Primary Menu', 'blazeblog' ); ?></a>
                                        </li>
                                    </ul>
                                    <?php
                                        endif;
                                    endif;
                                    ?>
                                </nav>
                            </div>
                        </div>
                        <!-- ## dropmenu end ## -->
                    </div>
                </div>
            </div>
            <!-- ## navbar-wrapper end ## -->
        </header>
        <!-- ## header end ## -->

        <?php if ( get_header_image() ) : ?>
        <?php
            /**
            * Filter the default blaze custom header sizes attribute.
            *
            * @since BlazeBlog 1.0
            *
            * @param string $custom_header_sizes sizes attribute
            * for Custom Header. Default '(max-width: 709px) 85vw,
            * (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px'.
            */
            $custom_header_sizes = apply_filters( 'blazeblog_custom_header_sizes', '(max-width: 709px) 85vw, (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px' );
        ?>
        <div id="header-image" class="header-image">
            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
                <img class="img-responsive" src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
            </a>
        </div>
        <?php endif; // End header image check. ?>

        <!-- ## main container start ## -->
        <div id="main-container">
            <!-- ## main start ## -->
            <div id="main">