etiquette/frontends/etiquette_flask/templates/header.html
Ethan Dalool 0ea9f19592 Import api.js into the rest of the pages.
Now we can do anything from anywhere!
2018-09-23 16:53:49 -07:00

13 lines
559 B
HTML

{% macro make_header(session) %}
<div 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" href="/user/{{session.user.username}}">{{session.user.display_name}}</a>
<button class="header_element" onclick="api.users.logout(common.refresh);" style="flex:0">Logout</button>
{% else %}
<a class="header_element" href="/login">Log in</a>
{% endif %}
</div>
{% endmacro %}