<?php

/**
 * @package dance-studio-lite
 */
?>
<!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="http://gmpg.org/xfn/11">
    <?php if (is_singular() && pings_open(get_queried_object())) : ?>
        <link rel="pingback" href="<?php echo esc_url(get_bloginfo('pingback_url')); ?>">
    <?php endif; ?>
    <?php wp_head(); ?>

</head>

<body <?php body_class(); ?>>
    <?php
    if (function_exists('wp_body_open')) {
        wp_body_open();
    } else {
        do_action('wp_body_open');
    }
    ?>
    <a class="skip-link screen-reader-text" href="#contentdiv">
        <?php esc_html_e('Skip to content', 'dance-studio-lite');
        ?>
    </a>
    <?php 
        $clogoclass='';
        $headerlogoclass ='';
        if (has_custom_logo()) {
            $clogoclass="clogoclass";
            $headerlogoclass = 'headerlogotop';
        }
    ?>
    <div class="mainheader LgoBX">
        <div class="header-top hdr-topstrip <?php echo esc_attr($headerlogoclass); ?>">

            <div class="container">
                <div class="hdrdetails">
                    <div class="infoBx">

                        <div class="featherheaderphone hdrtop-Info phonebX">
                            <?php
                            $dance_studio_lite_phone = get_theme_mod('dance_studio_lite_phone');
                            if (!empty($dance_studio_lite_phone)) {
                            ?>
                                <i class="fa fa-phone"></i>
                                <span class="phno">
                                    <a title="<?php echo esc_attr($dance_studio_lite_phone); ?>" href="tel:<?php echo esc_attr($dance_studio_lite_phone); ?>"><?php echo esc_html($dance_studio_lite_phone); ?></a>
                                </span>
                            <?php } ?>
                        </div>
                        
                        <div class="hdrtop-Info hdrsocial">
                            <ul class="list-inline header-social text-right ">
                                <?php if (get_theme_mod('dance_studio_lite_fb')) { ?>
                                    <li><a title="<?php esc_attr_e('Facebook', 'dance-studio-lite'); ?>" class="fa fa-facebook" target="_blank" href="<?php echo esc_url(get_theme_mod('dance_studio_lite_fb')); ?>"></a> </li>
                                <?php } ?>
                                <?php if (get_theme_mod('dance_studio_lite_twitter')) { ?>
                                    <li><a title="<?php esc_attr_e('twitter', 'dance-studio-lite'); ?>" class="fa fa-twitter" target="_blank" href="<?php echo esc_url(get_theme_mod('dance_studio_lite_twitter')); ?>"></a></li>
                                <?php } ?>
                                <?php if (get_theme_mod('dance_studio_lite_youtube')) { ?>
                                    <li><a title="<?php esc_attr_e('youtube', 'dance-studio-lite'); ?>" class="fa fa-youtube" target="_blank" href="<?php echo esc_url(get_theme_mod('dance_studio_lite_youtube')); ?>"></a></li>
                                <?php } ?>
                                <?php if (get_theme_mod('dance_studio_lite_in')) { ?>
                                    <li><a title="<?php esc_attr_e('linkedin', 'dance-studio-lite'); ?>" class="fa fa-linkedin" target="_blank" href="<?php echo esc_url(get_theme_mod('dance_studio_lite_in')); ?>"></a></li>
                                <?php } ?>
                            </ul>
                        </div>

                        <div class="featherheaderemail hdrtop-Info">
                            <?php
                            $dance_studio_lite_address = get_theme_mod('dance_studio_lite_address');
                            if (!empty($dance_studio_lite_address)) {
                            ?>
                                <i class="fa fa-envelope"></i>
                            <?php
                                echo '<a title="' . esc_attr($dance_studio_lite_address) . '" href="mailto:' . esc_attr($dance_studio_lite_address) . '">' . esc_html($dance_studio_lite_address) . '</a>';
                            } ?>
                        </div>
                        <div class="clear"></div>
                    </div><!--infoBx-->
                    <div class="clear"></div>
                </div><!--hdrdetails-->
                <div class="clear"></div>

            </div><!--container-->

        </div>
        <!--header-top-->

        <!-- <div class="header"> -->
            <div class="container">
                <!-- <div class="header-inner"> -->
                    
                    <div class="logo logo-left header-box <?php echo esc_attr($clogoclass);?>">
                    <?php
                    if (has_custom_logo()) {
                        $custom_logo_id = get_theme_mod('custom_logo');
                        $logo_image = wp_get_attachment_image_src($custom_logo_id, 'full');
                        $logo_url = esc_url(home_url('/'));
                        
                        $attachment_meta = wp_get_attachment_metadata($custom_logo_id);
                        $logo_alt = get_post_meta($custom_logo_id, '_wp_attachment_image_alt', true);
                        $logo_title = get_the_title($custom_logo_id);
                        
                        if ($logo_image) {
                            ?>
                            <a href="<?php echo esc_url($logo_url); ?>">
                                <img src="<?php echo esc_url($logo_image[0]); ?>" alt="<?php echo esc_attr($logo_alt); ?>" title="<?php echo esc_attr($logo_title); ?>">
                            </a>
                            <?php
                        }
                    }
                    else { ?>
                            <?php if (display_header_text() == true) { ?>
                                    <h1><a title="<?php bloginfo('name'); ?>" href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></h1>
                                    <span class="tagline"><?php bloginfo('description'); ?></span>
                            <?php } ?>
                        <?php } ?>

                    </div> <!-- logo -->
                    <div class="header-box header-right">
                        <section id="main_navigation">
                            <div class="main-navigation-inner rightmenu">
                                <div class="toggle">
                                    <a class="togglemenu" href="#"><?php esc_html_e('Menu', 'dance-studio-lite'); ?></a>
                                </div><!-- toggle -->
                                <div class="sitenav">
                                    <div class="nav">
                                        <?php
                                        wp_nav_menu(array(
                                            'theme_location' => 'primary'
                                        ));
                                        ?>
                                    </div>
                                </div><!-- site-nav -->
                            </div>
                            <!--<div class=""main-navigation-inner">-->
                        </section>
                        <!--header-navigation-->
                    </div>
                    <!--header-box header-right-->
                    <div class="clear"></div>

                <!-- </div>header-inner -->
            </div><!-- header -->
        <!-- </div> -->
    </div>
    <!--maintopdiv-->

    <section id="banner" class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <div class="row">
                    <?php if (is_front_page() || is_home()) { ?>
                        <?php if (get_header_image()) : ?>
                            <div class="homeslider">
                                <img class="img-responsive" src="<?php header_image(); ?>" alt="<?php echo esc_attr(get_bloginfo('name')); ?>">
                                <?php
                                $dance_studio_lite_banner_heading     = get_theme_mod('banner_heading');
                                $dance_studio_lite_banner_sub_heading = get_theme_mod('banner_sub_heading');
                                if (!empty($dance_studio_lite_banner_heading) || !empty($dance_studio_lite_banner_sub_heading)) {
                                ?>
                                    <div class="container">
                                        <div class="carousel-caption hidden-xs">
                                            <div class="slide_info">
                                                <div class="banner_heading">
                                                    <h3><?php echo esc_html($dance_studio_lite_banner_heading); ?></h3>
                                                </div>
                                                <!--banner_heading-->
                                                <div class="banner_sub_heading captiontext"><?php echo esc_html($dance_studio_lite_banner_sub_heading); ?></div>
                                                <!--banner_heading-->
                                            </div>
                                            <!--slide_info-->
                                        </div>
                                        <!--carousel-caption hidden-xs-->
                                    <?php } ?>
                                    </div>
                            </div>
                            <!--homeslider-->
                        <?php endif; ?>
                    <?php } else { ?>
                        <img class="img-responsive" src="<?php echo esc_url(get_template_directory_uri()); ?>/images/innerpage.jpg" alt="<?php echo esc_attr(get_bloginfo('name')); ?>">
                    <?php } ?>
                </div>
                <!--row-->
            </div>
            <!--col-sm-12-->
        </div>
        <!--row-->
    </section>
    <!--banner-->
    <?php if (is_front_page() && !is_home()) { ?>

        <?php get_template_part('template', 'home'); ?>

    <?php
    }
