<header class="ub-header-b">
    <div class="ub-container">
        <div class="menu">
            @if(\ModStart\Module\ModuleManager::isModuleEnabled('Member') && \Module\Member\Auth\MemberUser::id())
{{--                <a class="ub-color-vip" href="/member_vip">--}}
{{--                    <i class="iconfont icon-vip"></i>--}}
{{--                    {{\Module\Member\Auth\MemberVip::get('title')}}--}}
{{--                </a>--}}
                <a href="{{modstart_web_url('member_message')}}">
                    <i class="iconfont icon-bell"></i>
                    <?php $count = \Module\Member\Util\MemberMessageUtil::getUnreadMessageCount(\Module\Member\Auth\MemberUser::id()); ?>
                    @if($count)
                        <span class="badge" data-member-unread-message-count>{{$count}}</span>
                    @endif
                </a>
                <a href="{{modstart_web_url('member')}}"><i class="iconfont icon-user"></i> {{\Module\Member\Auth\MemberUser::get('username')}}</a>
                <a href="javascript:;" data-confirm="确认退出？" data-href="/logout">退出</a>
            @else
                <a href="{{modstart_web_url('login')}}">登录</a>
                <a href="{{modstart_web_url('register')}}">注册</a>
            @endif
        </div>
        <div class="logo">
            <a href="{{modstart_web_url('')}}">
                <img src="{{\ModStart\Core\Assets\AssetsUtil::fix(modstart_config('siteLogo'))}}"/>
            </a>
        </div>
        <div class="nav-mask" onclick="MS.header.hide()"></div>
        <div class="nav">
            @if(modstart_module_enabled('Nav'))
                {!! \Module\Nav\Render\NavRender::position('head') !!}
            @endif
        </div>
        <a class="nav-toggle" href="javascript:;" onclick="MS.header.trigger()">
            <i class="show iconfont icon-list"></i>
            <i class="close iconfont icon-close"></i>
        </a>
    </div>
</header>
