<!-- header section -->
<style type="text/css">
    .nama{
        font-size: 20px;
        padding-top:10px;
        padding-left: 10px;
        position: absolute;
        color:black;
        width: 70%;
    }
    @media only screen and (max-width: 767px) {
        .nama{
            font-size: 14px;
        }
        small.wrap{
            word-wrap: break-word;
        }
    }
</style>
<header class="header-section">
    <div class="container">
        <!-- logo -->
        <a href="{{ url('/') }}"  style="">
            <img src="<?php if(Helper::web_config('logo') != NULL){ echo url('assets/files/logo').'/'.Helper::web_config('logo'); }else{ echo url('assets/frontend/img/no-picture.png'); } ?>" alt="{{ Helper::web_config('nama_sekolah') }}" width="80px">
            <label class="nama">{{ Helper::web_config('nama_sekolah') }} <br> <small class="wrap">{{ Helper::web_config('alamat_sekolah') }}</small></label>
        </a>

        <div class="nav-switch">
            <i class="fa fa-bars"></i>
        </div>
        <div class="header-info">
            <div class="hf-item">
                <i class="fa fa-envelope-o"></i>
                <p><span>Email:</span><a href="mailto:{{Helper::kontak_config('email', Helper::web_config('sekolah_id'))}}" target="_blank" class="text-dark">{{Helper::kontak_config('email', Helper::web_config('sekolah_id'))}}</a></p>
            </div>
            <div class="hf-item">
                <i class="fa fa-phone"></i>
                <p><span>Telepon:</span>{{Helper::kontak_config('nomor_telepon', Helper::web_config('sekolah_id'))}}</p>
            </div>
        </div>
    </div>
</header>
<!-- header section end-->


<!-- Header section  -->
<nav class="nav-section">
    <div class="container">
        <!-- <div class="nav-right">
            <a href=""><i class="fa fa-search"></i></a>
            <a href=""><i class="fa fa-shopping-cart"></i></a>
        </div> -->
        <ul class="main-menu">
            <?php $menu_0 = \App\MenuNavigasi::where('parent_id', 0)->get(); 
            foreach($menu_0 as $key){
                get_menu_child($key->id);
            }
            function get_menu_child($parent=0){
                $menu = \App\MenuNavigasi::where('parent_id', $parent)->get();
                $parent = \App\MenuNavigasi::where('id', $parent)->first();
            ?>
            @if(sizeof($menu)>0)
            <li class="dropdown">
            @else
            <li class="<?php if(Request::is($parent->slug)){ echo 'active'; } ?>">
            @endif
                <a href="{{url($parent->slug)}}">{{ $parent->nama }}</a>
                @if(sizeof($menu)>0)
                <ul class="menu-dropdown">
                    <?php
                    foreach ($menu as $key) {
                      get_menu_child($key->id);
                    }
                    ?>
                </ul>
                @endif
            </li>
            <?php } ?>
        </ul>
    </div>
</nav>
<!-- Header section end -->