add logout button to contrl panel

This commit is contained in:
ed 2021-10-27 01:27:59 +02:00
parent 6dade82d2c
commit f93212a665
2 changed files with 17 additions and 2 deletions

View file

@ -25,10 +25,20 @@ a {
color: #047;
background: #fff;
text-decoration: none;
border-bottom: 1px solid #aaa;
border-bottom: 1px solid #8ab;
border-radius: .2em;
padding: .2em .8em;
}
.refresh,
.logout {
float: right;
margin-top: -.2em;
}
.logout {
color: #c04;
border-color: #c7a;
margin-right: .5em;
}
#repl {
border: none;
background: none;
@ -81,6 +91,10 @@ html.dark a {
background: #057;
border-color: #37a;
}
html.dark .logout {
background: #804;
border-color: #c28;
}
html.dark input {
color: #fff;
background: #626;

View file

@ -12,11 +12,12 @@
<body>
<div id="wrap">
<a href="/?h" style="float:right">refresh</a>
<a href="/?h" class="refresh">refresh</a>
{%- if this.uname == '*' %}
<p>howdy stranger &nbsp; <small>(you're not logged in)</small></p>
{%- else %}
<a href="/?pw=x" class="logout">logout</a>
<p>welcome back, <strong>{{ this.uname }}</strong></p>
{%- endif %}