blessing-skin-server/resources/views/common/user-menu.blade.php
2019-04-04 11:40:18 +08:00

49 lines
2.0 KiB
PHP

<!-- User Account Menu -->
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@if (app('request')->is('skinlib*') || app('request')->is('/'))
<!-- The user image in the navbar-->
<img src="{{ url("avatar/25/".base64_encode($user->email).'.png?tid='.$user->avatar) }}" class="user-image" alt="User Image">
@else
<i class="fas fa-user"></i>
@endif
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">{{ $user->nickname ?? $user->email }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="{{ url("avatar/128/".base64_encode($user->email).'.png?tid='.$user->avatar) }}" alt="User Image">
<p>{{ $user->email }}</p>
</li>
@admin($user)
<!-- Menu Body -->
<li class="user-body">
<div class="row">
<div class="col-xs-4 text-center">
<a href="{{ url('admin') }}">@lang('general.admin-panel')</a>
</div>
<div class="col-xs-4 text-center">
<a href="{{ url('admin/users') }}">@lang('general.user-manage')</a>
</div>
<div class="col-xs-4 text-center">
<a href="{{ url('admin/options') }}">@lang('general.options')</a>
</div>
</div>
</li>
<style>li.user-header { height: initial !important; }</style>
@endadmin
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('user') }}" class="btn btn-default btn-flat">@lang('general.user-center')</a>
</div>
<div class="pull-right">
<button id="logout-button" class="btn btn-default btn-flat">@lang('general.logout')</button>
</div>
</li>
</ul>
</li>