home.tmpl: simplify layout
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
118c34dac6
commit
1f8bbf7ec6
@ -2,21 +2,24 @@
|
|||||||
<body class="h-screen bg-white dark:bg-gray-900">
|
<body class="h-screen bg-white dark:bg-gray-900">
|
||||||
{{ template "navbar.tmpl" . }}
|
{{ template "navbar.tmpl" . }}
|
||||||
<main class="grow">
|
<main class="grow">
|
||||||
<div class="place-items-center text-center">
|
<div class="px-2 md:px-0 place-items-center text-center">
|
||||||
|
{{ if .Name -}}
|
||||||
<h1 class="mt-20 text-2xl text-pink-400 font-bold">
|
<h1 class="mt-20 text-2xl text-pink-400 font-bold">
|
||||||
{{ if .Name -}}
|
Welcome, <code>{{.Name}}</code>!<br>
|
||||||
Welcome, <code>{{.Name}}</code>! TODO: find out whether user is an admin and show additional button redirecting to /admin/users, which lists all users, enables manipulating data sources, etc..
|
|
||||||
<div class="mt-8 md:flex md:items-center">
|
|
||||||
<form method="POST" class="w-full lg:max-w-xl" action="/logout">
|
|
||||||
<button
|
|
||||||
class="w-full px-6 py-3 text-sm font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-500 rounded-lg md:w-1/2 hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-50"
|
|
||||||
type="submit">Logout</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{- else }}
|
|
||||||
Please log in.
|
|
||||||
{{- end -}}
|
|
||||||
</h1>
|
</h1>
|
||||||
|
<div class="mt-8 md:flex md:items-center md:place-items-center md:justify-between">
|
||||||
|
<form method="POST" class="w-full md:w-5xl" action="/logout">
|
||||||
|
<input type="hidden" name="csrf" value="{{- .CSRF -}}">
|
||||||
|
<button
|
||||||
|
class="w-full py-3 text-sm font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-500 rounded-lg md:w-1/4 hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-50"
|
||||||
|
type="submit">Logout</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{- else }}
|
||||||
|
<h1 class="mt-20 text-2xl text-pink-400 font-bold">
|
||||||
|
Please log in.
|
||||||
|
</h1>
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{{ template "footer.tmpl" . }}
|
{{ template "footer.tmpl" . }}
|
||||||
|
Loading…
Reference in New Issue
Block a user