{{define "content"}}
<section class="grid gap-6 md:grid-cols-3">
  <article class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm dark:border-gray-700 dark:bg-gray-800 md:col-span-2">
    <h1 class="mb-2 text-2xl font-bold text-gray-900 dark:text-white">welcome</h1>
    {{if .CurrentUser}}
    <p class="text-gray-600 dark:text-gray-300"><span data-i18n="welcome.back_prefix">Bentornato</span> {{if .CurrentUser.Name}}{{.CurrentUser.Name}}{{else}}{{.CurrentUser.Email}}{{end}}.</p>
    {{else}}
    <p class="text-gray-600 dark:text-gray-300" data-i18n="welcome.generic">Benvenuto.</p>
    {{end}}
  </article>

  <article class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm dark:border-gray-700 dark:bg-gray-800">
    <h2 class="mb-3 text-lg font-semibold text-gray-900 dark:text-white" data-i18n="welcome.quick_links">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 dark:text-gray-200 dark:hover:bg-gray-700">welcome</a>
      {{if and .CurrentUser (eq .CurrentUser.Role "admin")}}
      <a href="/admin/users" class="block rounded-lg px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700" data-i18n="nav.users">Users</a>
      {{end}}
    </div>
  </article>
</section>
{{end}}
