nopaque/app/templates/_base/navbar.html.j2

45 lines
2.1 KiB
Plaintext
Raw Normal View History

<div class="navbar-fixed">
<nav>
<div class="nav-wrapper primary-color">
{% if current_user.is_authenticated %}
2024-05-04 15:04:25 +00:00
<!-- menu icon -->
<!-- small/medium devices -->
<a href="#!" class="sidenav-trigger" data-target="sidenav"><i class="material-icons">menu</i></a>
{% endif %}
2024-05-04 15:04:25 +00:00
<!-- nopaque logo+wordmark -->
<!-- small/medium devices -->
<a href="{{ url_for('main.index') }}" class="brand-logo center hide-on-large-only" style="height: 100%;">
2024-05-03 13:08:57 +00:00
<img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark.png') }}" alt="" class="py-3" style="height: 100%;">
</a>
2024-05-04 15:04:25 +00:00
<!-- large devices -->
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%;">
<img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark.png') }}" alt="" class="p-3" style="height: 100%;">
</a>
2024-05-04 15:04:25 +00:00
<!-- right aligned navigation links -->
<!-- large devices -->
<ul class="right hide-on-med-and-down" style="height: 100%;">
{% if current_user.is_authenticated %}
2024-05-04 15:04:25 +00:00
<!-- avatar, username and email -->
2024-04-30 14:21:23 +00:00
<li style="height: 100%;">
2024-05-03 13:08:57 +00:00
<a href="#!" class="dropdown-trigger no-autoinit" data-target="nav-account-dropdown-content" id="nav-account-dropdown-trigger" style="height: 100%;">
2024-05-04 15:04:25 +00:00
<img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="" class="left circle py-3" style="height: 100%;">
<span class="ml-1">{{ current_user.username }} ({{ current_user.email }})</span>
2023-11-16 14:57:27 +00:00
</a>
2024-04-30 14:21:23 +00:00
</li>
{% else %}
2024-05-04 15:04:25 +00:00
<!-- log in -->
2024-05-03 13:08:57 +00:00
<li {% if request.path == url_for('auth.login') %}class="active"{% endif %}>
<a href="{{ url_for('auth.login') }}"><i class="material-icons left">login</i>Log in</a>
</li>
2024-05-04 15:04:25 +00:00
<!-- register -->
2024-05-03 13:08:57 +00:00
<li {% if request.path == url_for('auth.register') %}class="active"{% endif %}>
<a href="{{ url_for('auth.register') }}"><i class="material-icons left">assignment</i>Register</a>
</li>
{% endif %}
</ul>
</div>
</nav>
</div>