flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit b88a3d192ff31664c0b51a1ccadf88897b0e0ad6
parent cd4229413269e4ea5dc31bec7a4a2c5415c78fba
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Tue, 10 Nov 2020 17:24:37 -0800

Add dropdown menu on admin page

Diffstat:
Mtemplates/admin.html | 22++++++++++------------
Mtemplates/static/style.css | 5+++++
2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/templates/admin.html b/templates/admin.html @@ -3,15 +3,14 @@ <h1>{{.PageTitle}}</h1> {{template "nav.html" .}} <br> -<table> {{ range .Users }} -<tr> - <td> -<a href="//{{.Username}}.{{$domain}}">{{.Username}}</a> -<td><a href=mailto:{{.Email}}>{{.Email}}</a> -</td> -<td> +<details> + <summary><b>{{.Username}}</b> {{if not .Active}}<em>(inactive)</em>{{end}}</summary> + <div class="user-admin-details"> + <p>Home: <a href="//{{.Username}}.{{$domain}}">{{.Username}}</a> </p> + <p>Email: <a href=mailto:{{.Email}}>{{.Email}}</a></p> {{ if not .Active }} +<p> <form action="/admin/user/{{.Username}}/activate" method="POST" class="inline"> <input class="button" @@ -19,9 +18,9 @@ value="activate" /> </form> +</p> {{ end }} -</td> -<td> + <p> <form action="/admin/user/{{.Username}}/delete" method="POST" class="inline"> <input class="button delete" @@ -30,9 +29,8 @@ value="delete" /> </form> -</td> -</tr> +</div> +</details> {{end}} -</table> {{template "footer" .}} diff --git a/templates/static/style.css b/templates/static/style.css @@ -58,6 +58,11 @@ img { .nav { color: blue; } + +.user-admin-details { + margin-left: 1em; + margin-bottom: 1em; +} a:visited { color:blue }