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

?>
<!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">
	<meta name="description" content="<?php bloginfo( 'description' ); ?>">

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

<body <?php body_class(); ?>>
	<?php if ( function_exists( 'wp_body_open' ) ) { wp_body_open(); } ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'blog-bank' ); ?></a>
	  
	      <!-- Header section start -->
        <header id="site-head"> 
            <!-- Navigation -->
            <nav class="navbar navbar-expand-lg navbar-light py-3 mb-4 border-bottom">
                <div class="container">
                    <?php if(has_custom_logo()): ?>
                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="navbar-brand">
                        <?php the_custom_logo(); ?>
                    </a>
                    <?php else: ?>
                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="navbar-brand fs-4"><?php bloginfo( 'name' ); ?></a>
                    <?php endif; ?>
                    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNavbar" aria-controls="mainNavbar" aria-expanded="false" aria-label="Toggle navigation">
                        <span class="navbar-toggler-icon"></span>
                    </button>
                    <div class="collapse navbar-collapse" id="mainNavbar">
                        <?php
                        wp_nav_menu( array(
                            'theme_location'  => 'menu-1',
                            'depth'           => 2,
                            'container'       => false,
                            'menu_class'      => 'navbar-nav ms-auto',
                            'fallback_cb'     => '__return_false',
                        ) );
                        ?>
                    </div>
                </div>
            </nav>
        </header>

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