pcmt/templates/manage/user-details.tmpl
leo 5f8548958f
All checks were successful
continuous-integration/drone/push Build is passing
go: add usr updating [wip]
2023-06-02 20:00:14 +02:00

57 lines
2.7 KiB
Go HTML Template

{{ template "head.tmpl" . }}
<body class="h-screen bg-white dark:bg-gray-900">
{{ template "navbar.tmpl" . }}
<main class="grow">
<div class="container mx-auto place-items-center px-8 md:px-12 lg:px-14">
<div class="flex justify-between place-items-center">
<h1 class="text-xl font-bold text-fuchsia-600 dark:text-fuchsia-400 capitalize py-2">
User details
</h1>
<a href="/manage/users" class="w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 md:mx-6 lg:mx-4 hover:underline dark:text-blue-400">
⏎ All users
</a>
</div>
{{if and .Data .Data.user -}}
<div class="flex justify-end gap-2 lg:gap-0 place-items-center">
<a href="/manage/users/{{- .Data.user.ID -}}/edit" class="w-auto py-1 mt-0 text-center text-blue-500 dark:text-blue-400 md:mx-2 lg:mx-4 hover:underline hover:text-blue-600 dark:hover:text-blue-300">
Edit
</a>
</div>
<div class="p-2 mt-3 lg:mx-auto border-2 dark:border-slate-500 rounded-sm space-y-0">
<div class="flex max-h-14 place-items-baseline justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
<span class="w-24 md:w-32 text-purple-500 dark:text-purple-300">ID:</span>
<h3 class="text-lg text-fuchsia-500 dark:text-fuchsia-400 px-2 overflow-x-auto text-ellipsis">
{{- .Data.user.ID -}}
</h3>
</div><!-- id -->
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
<span class="w-24 md:w-32 text-purple-500 dark:text-purple-300">Username:</span>
<h3 class="text-lg text-fuchsia-500 dark:text-fuchsia-400 px-2">
{{- .Data.user.Username -}}
</h3>
</div><!-- username -->
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
<span class="w-24 md:w-32 text-purple-500 dark:text-purple-300">Admin:</span>
<h3 class="text-lg text-fuchsia-500 dark:text-fuchsia-400 px-2">
{{- .Data.user.IsAdmin -}}
</h3>
</div><!-- isAdmin -->
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
<span class="w-24 md:w-32 text-purple-500 dark:text-purple-300">Active:</span>
<h3 class="text-lg text-fuchsia-500 dark:text-fuchsia-400 px-2">
{{- .Data.user.IsActive -}}
</h3>
</div><!-- isActive -->
</div>
{{- end -}}
{{- if and .Data .Data.flash -}}
<div class="place-items-center">
<h1 class="text-2xl text-pink-600 dark:text-pink-500 capitalize py-2">
Error: {{ .Data.flash -}}
</h1>
</div>
{{- end}}
</div>
</main>
{{ template "footer.tmpl" . }}