aurweb/templates/partials/archdev-navbar.html
Kevin Morris 5d4a5deddf implement login + logout routes and templates
+ Added route: GET `/login` via `aurweb.routers.auth.login_get`
+ Added route: POST `/login` via `aurweb.routers.auth.login_post`
+ Added route: GET `/logout` via `aurweb.routers.auth.logout`
+ Added route: POST `/logout` via `aurweb.routers.auth.logout_post`
* Modify archdev-navbar.html template to toggle displays on auth state
+ Added login.html template

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-05 20:11:17 -07:00

22 lines
810 B
HTML

<div id="archdev-navbar">
<ul>
{% if request.user.is_authenticated() %}
<li><a href="/">{% trans %}Dashboard{% endtrans %}</a></li>
{% else %}
<li><a href="/">AUR {% trans %}Home{% endtrans %}</a></li>
{% endif %}
<li><a href="/packages/">{% trans %}Packages{% endtrans %}</a></li>
<li><a href="/register/">{% trans %}Register{% endtrans %}</a></li>
<li>
{% if request.user.is_authenticated() %}
<a href="/logout/?next={{ next }}">
{% trans %}Logout{% endtrans %}
</a>
{% else %}
<a href="/login/?next={{ next }}">
{% trans %}Login{% endtrans %}
</a>
{% endif %}
</li>
</ul>
</div>