<header class="header">
    <div class="header__searchbar">
        <div class="header__searchbar__container">
            <form action="<?php echo e(action('PagesController@search')); ?>" method="get">
                <input class="header__searchbar__container__input" id="search" type="search" required="" name="q" placeholder="<?php echo e(trans('index.search')); ?>" autocomplete="off">
                <label class="header__searchbar__container__close material-button material-button--icon ripple" for="search"><i class="material-icons">&#xE5CD;</i></label>
            </form>
        </div>
    </div>
    <div class="header__appbar">
        <div class="container">
            <div class="header__appbar--left">
                <div class="header__appbar--left__nav visible-mobile">
                    <i class="material-icons" style="font-weight: 700;">menu</i>
                </div>
                <div class="header__appbar--left__logo"><a href="/"><img  class="site-logo" src="<?php echo e(url('/assets/img/logo.png')); ?>" alt=""></a></div>
                <div class="header__appbar--left__menu hide-mobile">
                    <ul class="header__appbar--left__menu__list">
                        <?php foreach(\App\Categories::where("main", '1')->where("disabled", '0')->orwhere("main", '2')->where("disabled", '0')->orderBy('order')->limit(9)->get() as $categorys): ?>
                            <li class="header__appbar--left__menu__list__item" ><a href="<?php echo e(url($categorys->name_slug)); ?>" class="ripple" data-type="<?php echo e($categorys->id); ?>"><?php echo e(trans('index.'.$categorys->name_slug) == 'index.'.$categorys->name_slug ? $categorys->name :  trans('index.'.$categorys->name_slug)); ?></a></li>
                        <?php endforeach; ?>
                            <li class="header__appbar--left__menu__list__item">
                                <a class="category-dropdown-button ripple has-dropdown" href="javascript:" data-target="category-dropdown" data-align="center">
                                    <i class="material-icons">&#xE5D3;</i>
                                </a>
                                    <div class="category-dropdown dropdown-container">
                                        <div class="category-dropdown_sec sec_cat1 clearfix">
                                            <div class="category-dropdown_community">
                                                <div class="community_title"><?php echo e(trans('updates.heycommunity')); ?></div>
                                                <div class="community_desc" >  <?php if(Auth::check()): ?> <?php echo trans('updates.heycommunitydesc2'); ?> <?php else: ?> <?php echo trans('updates.heycommunitydesc'); ?> <?php endif; ?></div>
                                            </div>

                                            <div class="reaction-emojis">
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'awesome'] )); ?>" title="<?php echo e(trans('updates.reaction.awesome')); ?>" ><img alt="<?php echo e(trans('updates.reaction.awesome')); ?>" src="<?php echo e(Theme::asset('img/reactions/awesome.gif', null, false)); ?> " width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'nice'] )); ?>" title="<?php echo e(trans('updates.reaction.nice')); ?>" ><img alt="<?php echo e(trans('updates.reaction.nice')); ?>" src="<?php echo e(Theme::asset('img/reactions/nice.png', null, false)); ?>" width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'loved'] )); ?>" title="<?php echo e(trans('updates.reaction.loved')); ?>" ><img alt="<?php echo e(trans('updates.reaction.loved')); ?>" src="<?php echo e(Theme::asset('img/reactions/loved.gif', null, false)); ?>" width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'lol'] )); ?>"  title="<?php echo e(trans('updates.reaction.lol')); ?>" ><img alt="<?php echo e(trans('updates.reaction.lol')); ?>" src="<?php echo e(Theme::asset('img/reactions/lol.gif', null, false)); ?>" width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'funny'] )); ?>" title="<?php echo e(trans('updates.reaction.funny')); ?>" ><img alt="<?php echo e(trans('updates.reaction.funny')); ?>" src="<?php echo e(Theme::asset('img/reactions/funny.gif', null, false)); ?>" width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'fail'] )); ?>" title="<?php echo e(trans('updates.reaction.fail')); ?>" ><img alt="<?php echo e(trans('updates.reaction.fail')); ?>" src="<?php echo e(Theme::asset('img/reactions/fail.gif', null, false)); ?>" width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'omg'] )); ?>"  title="<?php echo e(trans('updates.reaction.omg')); ?>" ><img alt="<?php echo e(trans('updates.reaction.omg')); ?>" src="<?php echo e(Theme::asset('img/reactions/wow.gif', null, false)); ?>" width="42"></a>
                                                <a href="<?php echo e(action('PagesController@showReaction', ['reaction' => 'ew'] )); ?>" title="<?php echo e(trans('updates.reaction.ew')); ?>" ><img alt="<?php echo e(trans('updates.reaction.ew')); ?>" src="<?php echo e(Theme::asset('img/reactions/cry.gif', null, false)); ?>" width="42"></a>
                                            </div>
                                        </div>
                                        <div class="category-dropdown_sec sec_cat2 clearfix">
                                            <ul >
                                                <?php foreach(\App\Categories::where("main", '0')->where('main', '!=', '3')->where('type', '!=', 'mailcat')->where('type', '!=', 'mailprivatecat')->where('type', '!=', 'maillabel')->groupBy('name')->orderBy('name')->get() as $cat): ?>
                                                    <li class="dropdown-container__item ripple" style="float:left;width:25%">
                                                        <a href="<?php echo e(url($cat->name_slug)); ?>" title="<?php echo e($cat->name); ?>"><?php echo e(trans('index.'.$cat->name_slug) == 'index.'.$cat->name_slug ? $cat->name :  trans('index.'.$cat->name_slug)); ?> </a>
                                                    </li>
                                                <?php endforeach; ?>
                                            </ul>
                                        </div>
                                        <div class="category-dropdown_sec sec_cat3 clearfix">
                                            <img class="footer-site-logo" src="/assets/img/flogo.png" width="60px" alt="">

                                            <?php if(\Config::get('app.language')!=null): ?>
                                                <div class="language-links hor">
                                                    <a class="button button-white" href="javascript:">
                                                        <i class="material-icons">&#xE8E2;</i> <b><?php echo e(\Config::get('app.language.'.$DB_USER_LANG)['name']); ?></b>
                                                    </a>
                                                    <ul class="sub-nav ">
                                                        <?php foreach(\Config::get('app.language') as $key => $lang): ?>
                                                            <li>
                                                                <a href="<?php echo e(url('/selectlanguge/'.$key)); ?>" class="sub-item"><?php echo e($lang['name']); ?></a>
                                                            </li>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                            <?php endif; ?>

                                            <div class="footer-left">
                                                <div class="footer-menu clearfix">
                                                    <?php foreach(\App\Pages::where('footer', '1')->get() as $page): ?>
                                                       <a  class="footer-menu__item " href="<?php echo e(action('PagesController@showpage', [$page->slug ])); ?>" title="<?php echo e($page->title); ?>"><?php echo e($page->title); ?></a>
                                                    <?php endforeach; ?>
                                                    <?php if(getenvcong('p-buzzycontact') == 'on'): ?>
                                                        <a class="footer-menu__item" href="<?php echo e(action('ContactController@index')); ?>"><?php echo e(trans('buzzycontact.contact')); ?></a>
                                                    <?php endif; ?>
                                                </div>
                                                <div class="footer-copyright clearfix">
                                                    <?php echo e(trans("updates.copyright")); ?>


                                                </div>
                                            </div>
                                        </div>
                                    </div>

                            </li>
                    </ul>
                </div>
            </div>
            <div class="header__appbar--right">
                <div class="header__appbar--right__search">
                    <div class="header__appbar--right__search__button material-button material-button--icon ripple"><i class="material-icons">&#xE8B6;</i></div>
                </div>
                <div class="header__appbar--right__notice">
                    <?php if(Auth::check() and Auth::user()->usertype=='Admin' or getenvcong('UserCanPost') !== "no"): ?>
                        <div class="create-links hor">
                            <?php
                            $posttpe=\App\Categories::where("main", '1')->where("disabled", '0')->first();
                                    ?>
                            <a class="header__appbar--right__settings__button  has-dropdown button button-create hide-mobile" style="margin:0 10px 0 8px" href="<?php echo e(action('PostsController@CreateNew', ['new'=>$posttpe->posturl_slug])); ?>" ><?php echo e(trans('index.create')); ?></a>
                            <a class="header__appbar--right__settings__button material-button material-button--icon ripple visible-mobile" href="<?php echo e(action('PostsController@CreateNew', ['new'=>$posttpe->posturl_slug])); ?>" ><i class="material-icons">&#xE148;</i></a>

                        </div>
                    <?php endif; ?>
                </div>


                <?php if(Auth::check()): ?>

                <div class="header__appbar--right__settings">
                    <div class="header__appbar--right__settings__button material-button material-button--icon ripple has-dropdown" data-target="settings-dropdown" data-align="right-bottom">
                        <img src="<?php echo e(makepreview(Auth::user()->icon, 's', 'members/avatar')); ?>" width="34" height="34"  alt="<?php echo e(Auth::user()->username); ?>">
                    </div>
                    <div class="settings-dropdown dropdown-container" style="width: 150px;">
                        <ul>
                            <li class="dropdown-container__item ripple">
                                <a href="<?php echo e(action('UsersController@index', [ Auth::user()->username_slug ])); ?>"><?php echo e(trans('index.myprofile')); ?></a>
                            </li>
                            <li class="dropdown-container__item ripple">
                                <a href="<?php echo e(action('UsersController@updatesettings', ['id' => Auth::user()->username_slug ])); ?>"><?php echo e(trans('index.settings')); ?></a>
                            </li>
                            <li class="dropdown-container__item ripple">
                                <a href="<?php echo e(action('UsersController@followfeed', ['id' => Auth::user()->username_slug ])); ?>"><?php echo e(trans('updates.feedposts')); ?></a>
                            </li>
                            <li class="dropdown-container__item ripple">
                                <a href="<?php echo e(action('UsersController@draftposts', ['id' => Auth::user()->username_slug ])); ?>"><?php echo e(trans('index.draft')); ?></a>
                            </li>
                            <li class="dropdown-container__item ripple">
                                <a href="<?php echo e(action('UsersController@deletedposts', ['id' => Auth::user()->username_slug ])); ?>"><?php echo e(trans('index.trash')); ?></a>
                            </li>
                            <?php if(Auth::user()->usertype=='Admin'): ?>
                            <li class="dropdown-container__item ripple">
                                <a href="/admin" target="_blank"><?php echo e(trans('index.adminp')); ?></a>
                            </li>
                            <?php endif; ?>
                            <li class="dropdown-container__item ripple">
                                <a href="<?php echo e(action('Auth\AuthController@logout')); ?>"><?php echo e(trans('index.logout')); ?></a>
                            </li>
                        </ul>
                    </div>
                </div>

                <?php else: ?>
                    <div class="header__appbar--right__settings">
                        <a class="header__appbar--right__settings__button material-button material-button--icon ripple"  href="<?php echo e(action('Auth\AuthController@login')); ?>" rel="get:Loginform">
                            <i class="material-icons">&#xE853;</i>
                        </a>
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>


</header>

<?php echo $__env->make('_particles.header_mobile', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

