Add a logout button

Add a button so users know if they're logged in.
This commit is contained in:
Robin Malley 2021-08-27 01:08:30 +00:00
parent 4913e7765e
commit eac2a38c6c
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@
<div class="container">
<div class="row">
<a href="/_paste" class="button column column-0">New paste</a>
<a href="/_login" class="button column column-0">Log in</a>
<% if loggedin then %>
<a href="/_login" class="button column column-0">Log in</a>
<% else %>
<a href="/_logout" class="button column column-0">Log out</a>
<% end %>
<a href="/_claim" class="button column column-0">Register</a>
<form action="https://<%= domain %>/_search" method="get" class="search column row">
<input class="column" type="text" name="q" placeholder="+greentext -dotr +hits>20"/>