2021-06-01 18:48:20 +02:00
|
|
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top navbar-top">
|
|
|
|
|
2021-06-10 19:16:30 +02:00
|
|
|
<a class="navbar-brand" href="{{ path('blogs') }}">
|
|
|
|
<img src="{{ asset('build/images/24unix/24_logo_bg_64x64.png') }}" alt="24unix.net" id="site-logo">
|
2021-06-01 18:48:20 +02:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<button class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#CollapsingNavbar">
|
|
|
|
☰
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<div class="collapse navbar-collapse" id="CollapsingNavbar">
|
|
|
|
<ul class="navbar-nav ml-auto">
|
2021-06-10 17:50:29 +02:00
|
|
|
<li class="nav-item dropdown my-2 my-lg-0">
|
2021-06-10 19:16:30 +02:00
|
|
|
<button type="button" id="navbar-dropdown" data-bs-target="#dropdown-menu" data-bs-toggle="dropdown"
|
2021-06-10 17:50:29 +02:00
|
|
|
class="btn btn-primary dropdown-toggle ml-auto button-login">
|
2021-06-10 19:16:30 +02:00
|
|
|
{{ app.user.username }}
|
2021-06-10 17:50:29 +02:00
|
|
|
</button>
|
|
|
|
|
2021-06-10 19:16:30 +02:00
|
|
|
{% if is_granted('ROLE_USER') %}
|
|
|
|
<div class="dropdown-menu dropdown-menu-dark dropdown-menu-end" id="dropdown-menu" aria-labelledby="navbar-dropdown">
|
|
|
|
<a class="dropdown-item" href="{{ path('user') }}">
|
2021-06-10 17:50:29 +02:00
|
|
|
<span class="fas fa-user" aria-hidden="true"></span>
|
|
|
|
Profile</a>
|
|
|
|
<a class="dropdown-item" href="#">
|
|
|
|
<span class="fas fa-cog" aria-hidden="true"></span>
|
|
|
|
Settings</a>
|
|
|
|
<div class="dropdown-divider"></div>
|
2021-06-10 19:16:30 +02:00
|
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
|
|
<a class="dropdown-item" href="{{ path('admin') }}">
|
|
|
|
<span class="fas fa-cog" aria-hidden="true"></span>
|
|
|
|
Administration
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
{% endif %}
|
2021-06-10 17:50:29 +02:00
|
|
|
|
2021-06-10 19:16:30 +02:00
|
|
|
<a class="dropdown-item" href="{{ path('app_logout') }}">
|
2021-06-10 17:50:29 +02:00
|
|
|
<span class="fas fa-sign-out-alt" aria-hidden="true"></span>
|
|
|
|
Logout
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</li>
|
2021-06-10 19:16:30 +02:00
|
|
|
{% else %}
|
2021-06-10 17:50:29 +02:00
|
|
|
<li class="nav-item">
|
2021-06-10 19:16:30 +02:00
|
|
|
<a class="btn btn-primary button-login" href="{{ path('app_login') }}" role="button"
|
|
|
|
id="buttonLogin">
|
|
|
|
Login
|
|
|
|
</a>
|
2021-06-10 17:50:29 +02:00
|
|
|
</li>
|
2021-06-10 19:16:30 +02:00
|
|
|
{% endif %}
|
2021-06-01 18:48:20 +02:00
|
|
|
|
2021-06-10 19:16:30 +02:00
|
|
|
</ul>
|
2021-06-01 18:48:20 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</nav>
|
2021-06-10 19:16:30 +02:00
|
|
|
|