Added Logout

This commit is contained in:
Michael Rodin 2023-10-20 15:27:25 +02:00
parent 3c79c3c688
commit 76d43d57d9
8 changed files with 106 additions and 38 deletions

View file

@ -13,17 +13,16 @@
<a href="/"><img src="/static/favicon.ico" alt="favicon"></a>
<span id="title">{{title}}</span>
<div id="container">
<!-- BUTTONS IF USER LOGGED IN -->
{% if login %}
<a href="/add"><button class="big-button"><b>&#x2B</b></button></a>
{% endif %}
<!------------------------------->
<form action="/search" method="get">
<input type="text" name="q" placeholder="search">
<input type="submit" value="&#x1F50E;" class="big-button" id="search-button">
</form>
{% if login %}
<a href="/user/{{userdata[0]}}"><button class="big-button">{{userdata[2]}}</button></a>
<a href="/logout"><button class="big-button">Logout</button></a>
{% else %}
<a href="/login"><button class="big-button">Login</button></a>
{% endif %}