aggiornato per uso di taiwind
This commit is contained in:
49
web/templates/private/users/index.html
Normal file
49
web/templates/private/users/index.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{{define "content"}}
|
||||
<section class="space-y-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<h1 class="text-3xl font-bold text-gray-900">Users</h1>
|
||||
<button type="button" class="rounded-lg bg-blue-700 px-5 py-2.5 text-sm font-medium text-white hover:bg-blue-800" data-modal-target="privateUserModal" data-modal-toggle="privateUserModal">Nuovo Utente</button>
|
||||
</div>
|
||||
|
||||
<div class="rounded-lg border border-gray-200 bg-white p-4 shadow-sm">
|
||||
<label for="private-users-search" class="mb-2 block text-sm font-medium text-gray-900">Search</label>
|
||||
<input id="private-users-search" type="text" class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900" placeholder="Cerca utenti">
|
||||
</div>
|
||||
|
||||
<div class="relative overflow-x-auto rounded-lg border border-gray-200 bg-white shadow-sm">
|
||||
<table class="w-full text-left text-sm text-gray-500">
|
||||
<thead class="bg-gray-50 text-xs uppercase text-gray-700">
|
||||
<tr>
|
||||
<th class="px-6 py-3">Name</th>
|
||||
<th class="px-6 py-3">Email</th>
|
||||
<th class="px-6 py-3">Role</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="border-b bg-white hover:bg-gray-50">
|
||||
<td class="px-6 py-4">-</td>
|
||||
<td class="px-6 py-4">-</td>
|
||||
<td class="px-6 py-4"><span class="rounded-sm bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800">user</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="privateUserModal" tabindex="-1" aria-hidden="true" class="fixed left-0 right-0 top-0 z-50 hidden h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden p-4 md:inset-0">
|
||||
<div class="relative max-h-full w-full max-w-xl">
|
||||
<div class="relative rounded-lg bg-white shadow-sm">
|
||||
<div class="flex items-start justify-between rounded-t border-b p-4 md:p-5">
|
||||
<h3 class="text-xl font-semibold text-gray-900">Nuovo utente</h3>
|
||||
<button type="button" class="ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900" data-modal-hide="privateUserModal" aria-label="Close modal">
|
||||
<span class="sr-only">Close modal</span>
|
||||
<svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<p class="text-sm text-gray-600">Template Flowbite pronto per integrazione backend.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -1,16 +1,20 @@
|
||||
{{define "content"}}
|
||||
<div class="space-y-5">
|
||||
<div>
|
||||
<h1 class="text-2xl font-semibold">Welcome</h1>
|
||||
<section class="grid gap-6 md:grid-cols-3">
|
||||
<article class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm md:col-span-2">
|
||||
<h1 class="mb-2 text-2xl font-bold text-gray-900">Dashboard</h1>
|
||||
{{if .CurrentUser}}
|
||||
<p class="muted">Bentornato {{if .CurrentUser.Name}}{{.CurrentUser.Name}}{{else}}{{.CurrentUser.Email}}{{end}}.</p>
|
||||
<p class="text-gray-600">Bentornato {{if .CurrentUser.Name}}{{.CurrentUser.Name}}{{else}}{{.CurrentUser.Email}}{{end}}.</p>
|
||||
{{else}}
|
||||
<p class="muted">Benvenuto.</p>
|
||||
<p class="text-gray-600">Benvenuto.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{{if and .CurrentUser (ne .CurrentUser.Role "admin")}}
|
||||
<p class="muted">Non hai privilegi admin.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
<article class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
|
||||
<h2 class="mb-3 text-lg font-semibold text-gray-900">Quick Links</h2>
|
||||
<div class="space-y-2">
|
||||
<a href="/welcome" class="block rounded-lg px-3 py-2 text-sm text-gray-700 hover:bg-gray-100">Dashboard</a>
|
||||
<a href="/admin/users" class="block rounded-lg px-3 py-2 text-sm text-gray-700 hover:bg-gray-100">Users</a>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user