FossilRepo
| c588255… | ragelink | 1 | {% extends "base.html" %} |
| c588255… | ragelink | 2 | {% load static %} |
| c588255… | ragelink | 3 | {% block title %}Sign In — Fossilrepo{% endblock %} |
| c588255… | ragelink | 4 | |
| 0c354ac… | ragelink | 5 | {% block extra_head %} |
| 0c354ac… | ragelink | 6 | {% if turnstile_enabled %} |
| 0c354ac… | ragelink | 7 | <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script> |
| 0c354ac… | ragelink | 8 | {% endif %} |
| 0c354ac… | ragelink | 9 | {% endblock %} |
| 0c354ac… | ragelink | 10 | |
| c588255… | ragelink | 11 | {% block content %} |
| c588255… | ragelink | 12 | <div class="flex min-h-[80vh] items-center justify-center"> |
| c588255… | ragelink | 13 | <div class="w-full max-w-sm space-y-8"> |
| c588255… | ragelink | 14 | <div class="flex flex-col items-center"> |
| c588255… | ragelink | 15 | <img src="{% static 'img/fossilrepo-logo-dark.png' %}" alt="Fossilrepo" class="h-12 w-auto mb-6"> |
| c588255… | ragelink | 16 | <h2 class="text-center text-3xl font-bold tracking-tight text-gray-100">Sign in</h2> |
| c588255… | ragelink | 17 | <p class="mt-2 text-center text-sm text-gray-400">Fossilrepo Django + HTMX</p> |
| c588255… | ragelink | 18 | </div> |
| c588255… | ragelink | 19 | |
| c588255… | ragelink | 20 | {% if form.errors %} |
| c588255… | ragelink | 21 | <div class="rounded-md bg-red-900/50 border border-red-700 p-4"> |
| c588255… | ragelink | 22 | <p class="text-sm text-red-300">Invalid username or password.</p> |
| c588255… | ragelink | 23 | </div> |
| c588255… | ragelink | 24 | {% endif %} |
| c588255… | ragelink | 25 | |
| 0c354ac… | ragelink | 26 | {% if turnstile_error %} |
| 0c354ac… | ragelink | 27 | <div class="rounded-md bg-red-900/50 border border-red-700 p-4"> |
| 0c354ac… | ragelink | 28 | <p class="text-sm text-red-300">Bot verification failed. Please try again.</p> |
| 0c354ac… | ragelink | 29 | </div> |
| 0c354ac… | ragelink | 30 | {% endif %} |
| 0c354ac… | ragelink | 31 | |
| c588255… | ragelink | 32 | <form method="post" class="space-y-6"> |
| c588255… | ragelink | 33 | {% csrf_token %} |
| c588255… | ragelink | 34 | <div> |
| c588255… | ragelink | 35 | <label for="id_username" class="block text-sm font-medium text-gray-300">Username</label> |
| c588255… | ragelink | 36 | <div class="mt-1">{{ form.username }}</div> |
| c588255… | ragelink | 37 | </div> |
| c588255… | ragelink | 38 | <div> |
| c588255… | ragelink | 39 | <label for="id_password" class="block text-sm font-medium text-gray-300">Password</label> |
| c588255… | ragelink | 40 | <div class="mt-1">{{ form.password }}</div> |
| c588255… | ragelink | 41 | </div> |
| 0c354ac… | ragelink | 42 | {% if turnstile_enabled %} |
| 0c354ac… | ragelink | 43 | <div class="cf-turnstile" data-sitekey="{{ turnstile_site_key }}" data-theme="dark"></div> |
| 0c354ac… | ragelink | 44 | {% endif %} |
| c588255… | ragelink | 45 | <button type="submit" |
| 2f13242… | ragelink | 46 | class="w-full rounded-md bg-brand px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover focus:outline-none focus:ring-2 focus:ring-brand focus:ring-offset-2 focus:ring-offset-gray-950 transition-colors"> |
| c588255… | ragelink | 47 | Sign in |
| c588255… | ragelink | 48 | </button> |
| c588255… | ragelink | 49 | </form> |
| c588255… | ragelink | 50 | </div> |
| c588255… | ragelink | 51 | </div> |
| c588255… | ragelink | 52 | {% endblock %} |