blessing-skin-server/resources/views/shared/sidebar.twig

54 lines
1.8 KiB
Twig
Raw Normal View History

2019-12-04 16:45:09 +08:00
<aside class="main-sidebar sidebar-{{ sidebar_color }} elevation-3">
2019-11-24 14:32:58 +08:00
<a href="{{ url('/') }}" class="brand-link text-center">
<span class="brand-text font-weight-light">{{ site_name }}</span>
</a>
<div class="sidebar">
2019-09-17 23:10:44 +08:00
{{ include('shared.user-panel') }}
2019-11-24 14:32:58 +08:00
<nav class="mt-2">
<ul
class="nav nav-pills nav-sidebar flex-column nav-child-indent"
data-widget="treeview"
role="menu"
>
2019-09-17 23:10:44 +08:00
2019-11-24 14:32:58 +08:00
{% if scope == 'user' %}
2019-09-17 23:10:44 +08:00
2019-11-24 14:32:58 +08:00
<li class="nav-header">{{ trans('general.user-center') }}</li>
{{ include('shared.side-menu', {type: 'user'}) }}
<li class="nav-header">{{ trans('general.explore') }}</li>
{{ include('shared.side-menu', {type: 'explore'}) }}
{% if auth_user().admin %}
<li class="nav-header">{{ trans('general.manage') }}</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('admin') }}">
<i class="nav-icon fas fa-cog"></i>
<p>{{ trans('general.admin-panel') }}</p>
</a>
</li>
{% endif %}
2019-09-17 23:10:44 +08:00
2019-11-24 14:32:58 +08:00
{% elseif scope == 'admin' %}
2019-09-17 23:10:44 +08:00
2019-11-24 14:32:58 +08:00
<li class="nav-header">{{ trans('general.admin-panel') }}</li>
{{ include('shared.side-menu', {type: 'admin'}) }}
<li class="nav-header">{{ trans('general.back') }}</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('user') }}">
<i class="nav-icon fas fa-user"></i> &nbsp;
<p>{{ trans('general.user-center') }}</p>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('skinlib') }}">
<i class="nav-icon fas fa-archive"></i> &nbsp;
<p>{{ trans('general.skinlib') }}</p>
</a>
</li>
2019-09-17 23:10:44 +08:00
2019-11-24 14:32:58 +08:00
{% endif %}
2019-09-17 23:10:44 +08:00
2019-11-24 14:32:58 +08:00
</ul>
</nav>
</div>
2019-09-17 23:10:44 +08:00
</aside>