2016-12-18 13:12:14 +00:00
|
|
|
{% macro make_header(session) %}
|
2020-01-15 00:43:43 +00:00
|
|
|
<nav id="header">
|
2022-11-11 23:30:23 +00:00
|
|
|
<a class="header_element navigation_link" href="/">Etiquette</a>
|
|
|
|
<a class="header_element navigation_link" href="/search">Search</a>
|
|
|
|
<a class="header_element navigation_link" href="/tags">Tags</a>
|
2018-01-16 02:41:21 +00:00
|
|
|
{% if session.user %}
|
2022-11-11 23:30:23 +00:00
|
|
|
<a class="header_element navigation_link dynamic_user_display_name" href="/userid/{{session.user.id}}">{{session.user.display_name}}</a>
|
2022-09-28 00:53:54 +00:00
|
|
|
<button id="logout_button" class="header_element" onclick="return api.users.logout(common.go_to_root);" style="flex:0">Logout</button>
|
2016-12-18 13:12:14 +00:00
|
|
|
{% else %}
|
2022-11-11 23:30:23 +00:00
|
|
|
<a class="header_element navigation_link" href="/login">Log in</a>
|
2016-12-18 13:12:14 +00:00
|
|
|
{% endif %}
|
2020-01-15 00:43:43 +00:00
|
|
|
</nav>
|
2018-04-15 21:23:24 +00:00
|
|
|
{% endmacro %}
|