etiquette/frontends/etiquette_flask/templates/header.html

13 lines
592 B
HTML

{% macro make_header(session) %}
<nav id="header">
<a class="header_element" href="/">Etiquette</a>
<a class="header_element" href="/search">Search</a>
<a class="header_element" href="/tags">Tags</a>
{% if session.user %}
<a class="header_element dynamic_user_display_name" href="/user/{{session.user.username}}">{{session.user.display_name}}</a>
<button class="header_element" onclick="return api.users.logout(common.refresh);" style="flex:0">Logout</button>
{% else %}
<a class="header_element" href="/login">Log in</a>
{% endif %}
</nav>
{% endmacro %}