1
0

local.twig 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% extends "layout.twig" %}
  2. {% block content %}
  3. <section class="max-w-md mx-auto mt-6">
  4. <div class="flex justify-center mb-4">
  5. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="48" height="48" aria-hidden="true" class="block" fill="none">
  6. <defs>
  7. <radialGradient id="brand-cycle-glow-card" cx="32" cy="32" r="20" gradientUnits="userSpaceOnUse">
  8. <stop offset="0" stop-color="#6366f1" stop-opacity="0.55"/>
  9. <stop offset="0.6" stop-color="#6366f1" stop-opacity="0.12"/>
  10. <stop offset="1" stop-color="#6366f1" stop-opacity="0"/>
  11. </radialGradient>
  12. </defs>
  13. <circle cx="32" cy="32" r="20" fill="url(#brand-cycle-glow-card)"/>
  14. <path d="M52 32 A20 20 0 1 1 32 12" stroke="currentColor" stroke-width="3.5" stroke-linecap="round"/>
  15. <path d="M44 8 L52 12 L48 20" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
  16. <circle cx="32" cy="32" r="5" fill="#6366f1"/>
  17. <circle cx="48" cy="20" r="2.5" fill="currentColor" opacity="0.55"/>
  18. <circle cx="52" cy="40" r="2.5" fill="currentColor" opacity="0.55"/>
  19. <circle cx="40" cy="50" r="2.5" fill="currentColor" opacity="0.55"/>
  20. <circle cx="20" cy="48" r="2.5" fill="currentColor" opacity="0.55"/>
  21. <circle cx="14" cy="32" r="2.5" fill="#10b981"/>
  22. </svg>
  23. </div>
  24. <div class="rounded-lg border bg-white p-6 dark:bg-slate-800 dark:border-slate-700">
  25. <h1 class="text-xl font-semibold tracking-tight">Local admin sign-in</h1>
  26. <p class="text-slate-600 text-sm mt-1 dark:text-slate-400">
  27. Use this form only while Entra ID is not yet configured. Credentials
  28. come from the <code>LOCAL_ADMIN_*</code> environment variables.
  29. </p>
  30. {% if error %}
  31. <div class="mt-4 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800 dark:bg-red-900 dark:border-red-800 dark:text-red-200">
  32. Email or password did not match.
  33. </div>
  34. {% endif %}
  35. {% if throttled %}
  36. <div class="mt-4 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-900 dark:border-amber-800 dark:text-amber-200">
  37. Too many failed attempts. Please wait a few minutes before trying again.
  38. </div>
  39. {% endif %}
  40. <form method="post" action="/auth/local" hx-boost="true" hx-target="body"
  41. class="mt-4 space-y-3" autocomplete="off">
  42. <input type="hidden" name="_csrf" value="{{ csrfToken }}">
  43. <label class="block">
  44. <span class="text-sm text-slate-700 dark:text-slate-300">Email</span>
  45. <input type="email" name="email" required
  46. value="{{ email }}"
  47. class="mt-1 block w-full rounded-md border-slate-300 shadow-sm
  48. px-3 py-2 border focus:outline-none focus:ring-2
  49. focus:ring-slate-400 dark:bg-slate-800 dark:border-slate-600 dark:text-slate-100 dark:focus:ring-slate-500">
  50. </label>
  51. <label class="block">
  52. <span class="text-sm text-slate-700 dark:text-slate-300">Password</span>
  53. <input type="password" name="password" required autofocus
  54. class="mt-1 block w-full rounded-md border-slate-300 shadow-sm
  55. px-3 py-2 border focus:outline-none focus:ring-2
  56. focus:ring-slate-400 dark:bg-slate-800 dark:border-slate-600 dark:text-slate-100 dark:focus:ring-slate-500">
  57. </label>
  58. <button type="submit"
  59. class="w-full rounded-md bg-slate-900 text-white px-4 py-2 text-sm font-medium hover:bg-slate-800 dark:bg-slate-700 dark:hover:bg-slate-600">
  60. Sign in
  61. </button>
  62. </form>
  63. <p class="text-xs text-slate-500 mt-4 dark:text-slate-400">
  64. <a href="/" class="hover:underline">← Back</a>
  65. </p>
  66. </div>
  67. </section>
  68. {% endblock %}