<?php
/**
 * Header action
 * @package Korik
 */

function korik_header_style_1(){ ?>
    <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'korik' ); ?></a>
    <header id="masthead" class="header-area <?php if(has_header_image() && is_front_page()): ?>korik-header-img<?php endif; ?>">
        <?php if(has_header_image() && is_front_page()): ?>
            <div class="header-img"> 
            	<?php the_header_image_tag(); ?>
            </div>
        <?php endif; ?>
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-4">
                    <ul class="social">
                        <?php
                        $fb_url = get_theme_mod('fb_url');
                        $tw_url = get_theme_mod('tw_url');
                        $link_url = get_theme_mod('link_url');
                        $instagram_url = get_theme_mod('instagram_url'); ?>
                        <li><a href="<?php echo esc_url($fb_url); ?>"><i class="fa fa-facebook"></i></a></li>
                        <li><a href="<?php echo esc_url($tw_url); ?>"><i class="fa fa-twitter"></i></a></li>
                        <li><a href="<?php echo esc_url($link_url); ?>"><i class="fa fa-linkedin"></i></a></li>
                        <li><a href="<?php echo esc_url($instagram_url); ?>"><i class="fa fa-instagram"></i></a></li>
                    </ul>	
                </div>
                <div class="col-lg-4">
                    <div class="site-branding">
                        <?php
                        the_custom_logo();
                        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;
                        $korik_description = get_bloginfo( 'description', 'display' );
                        if ( $korik_description || is_customize_preview() ) :
                            ?>
                            <p class="site-description"><?php echo esc_html($korik_description); ?></p>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="posted-on">
                        <i class="fa fa-calendar"></i>
                        <?php echo  date( 'M d, Y'); ?>
                    </div>
                </div>
            </div>
        </div>
    </header><!-- #masthead -->
    <section class="mainmenu-area">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="korik-responsive-menu"></div>
                    <button class="screen-reader-text menu-close"><?php esc_html_e( 'Close Menu', 'korik' ); ?></button>
                    <div class="mainmenu">
                        <?php
                            wp_nav_menu( array(
                                'theme_location' => 'menu-1',
                                'menu_id'        => 'primary-menu',
                            ) );
                        ?>
                    </div>
                </div>
            </div>
    </section>
<?php }
add_action('korik_header_style','korik_header_style_1');