pcmt/templates/home.tmpl
leo f129606b8f
All checks were successful
continuous-integration/drone/push Build is passing
add bulk changes
* add handlers for signin,singup,logout...
* introduce ent ORM and add user schema
* add live mode, devel mode to selectively turn on features via
  config/flags
* add templates, handle embedding moar smarter:
  * live mode uses live folder structure, else embedded templates are
    used
* start using tailwindcss to style stuff
* add development goodies for hot-reloading (browser-sync - bs.js)
* pimp-up config.dhall with actual custom config Type (enables remote
  schema and local values only as needed)
* add justfile (alternative to makefile for process automation)
2023-04-13 00:07:08 +02:00

23 lines
1008 B
Go HTML Template

{{ template "head.tmpl" . }}
<body class="h-screen bg-white dark:bg-gray-900">
{{ template "navbar.tmpl" . }}
<main class="grow">
<div class="place-items-center text-center">
<h1 class="mt-20 text-2xl text-pink-400 font-bold">
{{ if .Name -}}
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>
</div>
</main>
{{ template "footer.tmpl" . }}