<?php
/*
* Display topbar details
*/
?>
<div class="topbar">
  <div class="container">
    <div class="row">
      <div class="col-lg-2 col-md-4 col-sm-4 align-self-center text-lg-left">
         <div class="social-media">
          <?php                 
            $stylish_blog_header_fb_new_tab = esc_attr(get_theme_mod('stylish_blog_header_fb_new_tab','true'));
            $stylish_blog_header_twt_new_tab = esc_attr(get_theme_mod('stylish_blog_header_twt_new_tab','true'));
            $stylish_blog_header_ins_new_tab = esc_attr(get_theme_mod('stylish_blog_header_ins_new_tab','true'));
            $stylish_blog_header_ut_new_tab = esc_attr(get_theme_mod('stylish_blog_header_ut_new_tab','true'));
            $stylish_blog_header_pint_new_tab = esc_attr(get_theme_mod('stylish_blog_header_pint_new_tab','true'));
            ?>
          <?php if( get_theme_mod( 'stylish_blog_facebook_url' ) != '') { ?>
            <a <?php if($stylish_blog_header_fb_new_tab != false ) { ?>target="_blank" <?php } ?>href="<?php echo esc_url( get_theme_mod( 'stylish_blog_facebook_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('stylish_blog_facebook_icon','fab fa-facebook-f')); ?>"></i></a>
          <?php } ?>
          <?php if( get_theme_mod( 'stylish_blog_twitter_url' ) != '') { ?>
            <a <?php if($stylish_blog_header_twt_new_tab != false ) { ?>target="_blank" <?php } ?>href="<?php echo esc_url( get_theme_mod( 'stylish_blog_twitter_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('stylish_blog_twitter_icon','fab fa-twitter')); ?>"></i></a>
          <?php } ?>
          <?php if( get_theme_mod( 'stylish_blog_instagram_url' ) != '') { ?>
            <a <?php if($stylish_blog_header_ins_new_tab != false ) { ?>target="_blank" <?php } ?>href="<?php echo esc_url( get_theme_mod( 'stylish_blog_instagram_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('stylish_blog_instagram_icon','fab fa-instagram')); ?>"></i></a>
          <?php } ?>
          <?php if( get_theme_mod( 'stylish_blog_youtube_url' ) != '') { ?>
            <a <?php if($stylish_blog_header_ut_new_tab != false ) { ?>target="_blank" <?php } ?>href="<?php echo esc_url( get_theme_mod( 'stylish_blog_youtube_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('stylish_blog_youtube_icon','fab fa-youtube')); ?>"></i></a>
          <?php } ?>
          <?php if( get_theme_mod( 'stylish_blog_pint_url' ) != '') { ?>
            <a <?php if($stylish_blog_header_pint_new_tab != false ) { ?>target="_blank" <?php } ?>href="<?php echo esc_url( get_theme_mod( 'stylish_blog_pint_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('stylish_blog_pinterest_icon','fab fa-pinterest')); ?>"></i></a>
          <?php } ?>
        </div>
      </div>
      
      <div class="col-lg-8 col-md-4 col-sm-4 align-self-center">
       <?php $stylish_blog_logo_settings = get_theme_mod( 'stylish_blog_logo_settings','Different Line');
          if($stylish_blog_logo_settings == 'Different Line'){ ?>
            <div class="logo">
              <?php if( has_custom_logo() ) stylish_blog_the_custom_logo(); ?>
              <?php if(get_theme_mod('stylish_blog_site_title',true) == 1){ ?>
                <h1><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
              <?php }?>
              <?php $stylish_blog_description = get_bloginfo( 'description', 'display' );
              if ( $stylish_blog_description || is_customize_preview() ) : ?>
                <?php if(get_theme_mod('stylish_blog_site_tagline',false)){ ?>
                  <p class="site-description mb-0"><?php echo esc_html($stylish_blog_description); ?></p>
                <?php }?>
              <?php endif; ?>
            </div>
          <?php }else if($stylish_blog_logo_settings == 'Same Line'){ ?>
            <div class="logo logo-same-line mb-md-0 text-center text-lg-left">
              <div class="row">
                <div class="col-lg-5 col-md-5 align-self-md-center">
                  <?php if( has_custom_logo() ) stylish_blog_the_custom_logo(); ?>
                </div>
                <div class="col-lg-7 col-md-7 align-self-md-center">
                  <?php if(get_theme_mod('stylish_blog_site_title',true) == 1){ ?>
                    <h1><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                    <?php }?>
                    <?php $stylish_blog_description = get_bloginfo( 'description', 'display' );
                    if ( $stylish_blog_description || is_customize_preview() ) : ?>
                    <?php if(get_theme_mod('stylish_blog_site_tagline',false)){ ?>
                      <p class="site-description mb-0"><?php echo esc_html($stylish_blog_description); ?></p>
                    <?php }?>
                  <?php endif; ?>
                </div>
              </div>
            </div>
          <?php }?>
      </div>

      <div class="col-lg-2 col-md-4 col-sm-4 align-self-center text-lg-end position-relative">
         <div class="search_inner">
            <?php get_search_form(); ?>
          </div>
      </div>
    </div>
  </div>
</div>


