<?php
$current_user = wp_get_current_user();
?>
<!-- sm >  header -->
<header class="dimag_homepage_mo d-block d-lg-none">
    <div class="container">
        <div class="row">
            <div class="col-7">
                <?php get_template_part('themeplat/responsive/header/menu-mobile', 'header'); ?>
                <div class="logo">
                    <a href="<?php echo get_home_url(); ?>">
                        <img src="<?php echo ot_get_option('logo_blog_barsa'); ?>">
                    </a>
                </div>
            </div>
            <div class="col-5">
                <ul class="item-head-respan">
                    <li>
                        <div class="search_mo search-btn">
                            <a href="#search">
                                <i class="fal fa-search"></i>
                            </a>
                        </div>
                    </li>
                    <li>
                        <div class="user-pane_mo">
                            <?php get_template_part('themeplat/login/blo-but-login', 'button'); ?>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="col-12">
                <div class="hashtag">
                    <div class="hashtag__title">
                        <?php
                        $locations = get_nav_menu_locations();
                        $menu = wp_get_nav_menu_object($locations['hashtag-menu']);
                        echo $menu->name; // name of the menu
                        ?>
                        :‌
                    </div>
                    <div class="hashtag__wrapper">
                        <?php
                        wp_nav_menu(array(
                            'menu'                 => '',
                            'container'            => '',
                            'container_class'      => '',
                            'container_id'         => '',
                            'container_aria_label' => '',
                            'menu_class'           => '',
                            'menu_id'              => '',
                            'echo'                 => true,
                            'fallback_cb'          => 'wp_page_menu',
                            'before'               => '',
                            'after'                => '',
                            'link_before'          => '#',
                            'link_after'           => '',
                            'items_wrap'           => '<ul id="%1$s" class="%2$s">%3$s</ul>',
                            'item_spacing'         => 'preserve',
                            'depth'                => 0,
                            'walker'               => '',
                            'theme_location'       => 'hashtag-menu',
                        ));
                        ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<div class="d-block d-lg-none" style="margin-bottom: 5rem;"></div>
<!-- lg > header -->
<header class="dimag_homepage d-none d-lg-block">
    <div class="container ">
        <div class="row">
            <div class="col-2 col-lg-2 col-xl-2">
                <?php if (ot_get_option('logo_blog_barsa')) : ?>
                    <div class="logo">
                        <a href="<?php echo get_home_url(); ?>" title="<?php echo bloginfo('name'); ?>">
                            <img src="<?php echo ot_get_option('logo_blog_barsa'); ?>">
                        </a>
                    </div>
                <?php endif ?>
            </div>
            <div class="col-7 col-lg-6 col-xl-7">
                <?php if (has_nav_menu('hashtag-menu')) : ?>
                    <div class="hashtag">
                        <div class="hashtag__title">
                            <?php
                            $locations = get_nav_menu_locations();
                            $menu = wp_get_nav_menu_object($locations['hashtag-menu']);
                            echo $menu->name; // name of the menu
                            ?>
                            :‌
                            ‌‌</div>
                        <div class="hashtag__wrapper">
                            <?php
                            wp_nav_menu(array(
                                'menu'                 => '',
                                'container'            => '',
                                'container_class'      => '',
                                'container_id'         => '',
                                'container_aria_label' => '',
                                'menu_class'           => '',
                                'menu_id'              => '',
                                'echo'                 => true,
                                'fallback_cb'          => 'wp_page_menu',
                                'before'               => '',
                                'after'                => '',
                                'link_before'          => '#',
                                'link_after'           => '',
                                'items_wrap'           => '<ul id="%1$s" class="%2$s">%3$s</ul>',
                                'item_spacing'         => 'preserve',
                                'depth'                => 0,
                                'walker'               => '',
                                'theme_location'       => 'hashtag-menu',
                            ));
                            ?>
                        </div>
                    </div>
                <?php endif; ?>
            </div>
            <div class="col-3 col-lg-4 col-xl-3">
                <div class="user-pane">
                    <?php
                    if (!0 == $current_user->ID) :
                        get_template_part('themeplat/login/blo-but-login', 'button');
                    else :
                    ?>
                        <div onclick="document.getElementById('id01').style.display='block'" style="width:auto;cursor:pointer;">
                            <i class="user-login-but fal fa-user-circle" onclick="document.getElementById('id01').style.display='block'" style="width:auto;" aria-hidden="true"></i>
                            <span class="login lsr login-popup-btn">
                                ورود </span>
                            <span class="slash lsr">/</span>
                            <a class="regist lsr" target="_blank" title="ثبت نام">ثبت نام </a>
                        </div>
                    <?php endif; ?>
                </div>
                <div class="dimag__top--sep"></div>
                <div class="search search-btn">
                    <a href="#search">
                        <i class="fal fa-search"></i>
                    </a>
                </div>
            </div>
        </div>
    </div>
</header>
<?php get_template_part('themeplat/search/search-pop', 'search'); ?>
<?php get_template_part('themeplat/login/register', 'header'); ?>