Spookie/templates/_header.html.twig

64 lines
2.9 KiB
Twig
Raw Normal View History

2021-06-01 18:48:20 +02:00
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top navbar-top">
2022-04-11 17:50:55 +02:00
<a class="navbar-brand" href="{{ path('app_main') }}">
2021-06-10 19:16:30 +02:00
<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">
&#9776;
</button>
<div class="collapse navbar-collapse" id="CollapsingNavbar">
2021-06-13 13:23:56 +02:00
<ul class="navbar-nav ms-auto">
2022-04-11 17:50:55 +02:00
<!--
2021-06-14 19:20:55 +02:00
<li>
<form class="d-flex">
<input class="form-control me-2 my-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn" type="submit">Search</button>
</form>
</li>
2022-04-11 17:50:55 +02:00
-->
2021-06-13 13:23:56 +02:00
{% if is_granted('ROLE_USER') %}
2021-06-14 19:20:55 +02:00
<li class="nav-item dropdown me-auto">
2021-06-13 13:23:56 +02:00
<button type="button" id="navbar-dropdown" data-bs-target="#dropdown-menu" data-bs-toggle="dropdown"
2021-06-14 19:20:55 +02:00
class="btn btn-primary dropdown-toggle ml-auto mb-2 button-login">
2021-06-13 13:23:56 +02:00
{{ app.user.username }}
</button>
<div class="dropdown-menu dropdown-menu-dark dropdown-menu-end" id="dropdown-menu"
aria-labelledby="navbar-dropdown">
2022-04-11 17:50:55 +02:00
<a class="dropdown-item" href="{{ path('app_profile_edit') }}">
<span class="fa fa-lg fa-fw fa-user" aria-hidden="true"></span>
2021-06-13 13:23:56 +02:00
Profile</a>
<a class="dropdown-item" href="#">
2022-04-11 17:50:55 +02:00
<span class="fa fa-lg fa-fw fa-wrench" aria-hidden="true"></span>
2021-06-13 13:23:56 +02:00
Settings</a>
2021-06-10 19:16:30 +02:00
<div class="dropdown-divider"></div>
2021-06-13 13:23:56 +02:00
{% if is_granted('ROLE_ADMIN') %}
<a class="dropdown-item" href="{{ path('admin') }}">
2022-04-11 17:50:55 +02:00
<span class="fa fa-lg fa-fw fa-cog" aria-hidden="true"></span>
2021-06-13 13:23:56 +02:00
Administration
</a>
<div class="dropdown-divider"></div>
{% endif %}
<a class="dropdown-item" href="{{ path('app_logout') }}">
2022-04-11 17:50:55 +02:00
<span class="fa fa-lg fa-fw fa-sign-out" aria-hidden="true"></span>&nbsp;
2021-06-13 13:23:56 +02:00
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">
2022-04-11 17:50:55 +02:00
<span class="fa fa-sign-in fa-lg fa-fw" aria-hidden="true"></span>Log In
2021-06-10 19:16:30 +02:00
</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>