what2watch/templates/header_with_user.html
2023-09-23 15:22:45 -07:00

26 lines
547 B
HTML

{% if self.has_optional_user() %}
{% match user %}
{% when Some with (usr) %}
<div class="header_logged_in">
Hello, {{ usr.username }}!
</div>
<div>
<form action="/logout" enctype="application/x-www-form-urlencoded" method="post">
<button class="warning">
<input type="submit" value="sign out?">
</button>
</form>
</div>
{% else %}
<div class="header_logged_out">
Heya, why don't you <a href="/login">log in</a> or <a href="/signup">sign up</a>?
</div>
{% endmatch %}
{% else %}
{% endif %}
<hr />