actix-admin/templates/header.html

54 lines
1.8 KiB
HTML
Raw Normal View History

2022-08-06 21:49:52 +02:00
<nav class="navbar is-dark mb-4" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/admin/">
Actix Admin
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start">
{% for category, entities in entity_names %}
{% if category == "" %}
2022-09-13 15:04:07 +02:00
{% for name in entities %}
<a href="/admin/{{ name }}/list" class="navbar-item {% if entity_name and entity_name == name %}is-active{% endif %}">{{ name | title }}</a>
{%- endfor %}
{% else %}
<div class="navbar-item has-dropdown is-hoverable">
2022-09-13 15:45:20 +02:00
<a class="navbar-link {% if entity_name and entity_name in entities %}is-active{% endif %}">
{{ category }}
</a>
<div class="navbar-dropdown">
2022-09-13 15:04:07 +02:00
{% for name in entities %}
<a href="/admin/{{ name }}/list" class="navbar-item {% if entity_name and entity_name == name %}is-active{% endif %}">{{ name | title }}</a>
{%- endfor %}
</div>
</div>
{% endif %}
2022-08-06 21:49:52 +02:00
{%- endfor %}
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
{% if enable_auth %}
{% if user_is_logged_in %}
<a href="{{ logout_link }}" class="button is-light">
Log out
2022-08-04 09:21:40 +02:00
</a>
2022-08-06 21:49:52 +02:00
{% else %}
<a href="{{ login_link }}" class="button is-light">
Log in
2022-08-04 09:21:40 +02:00
</a>
2022-08-06 21:49:52 +02:00
{% endif %}
{% endif %}
2022-08-04 09:21:40 +02:00
</div>
2022-08-06 21:49:52 +02:00
</div>
</div>
</div>
</nav>