{% extends "base.html" %}

{% block title %}{{ t(key="login-title", lang=lang | default(value='sk')) }}{% endblock title %}
{% block crumb %}admin/login{% endblock crumb %}

{% block content %}
<div class="mx-auto mt-8 max-w-sm">
  <div class="card">
    <div class="term-head">
      <span class="term-head-name">{{ t(key="nav-admin", lang=lang | default(value='sk')) }}</span>
      <span class="term-head-meta term-tag is-red">{{ t(key="auth", lang=lang | default(value='sk')) }}</span>
    </div>
    <div class="card-body">
      <h1 class="term-title">{{ t(key="login-auth", lang=lang | default(value='sk')) }}</h1>
      {% if error %}
      <div class="alert alert-error mt-2">
        <span>✗ {{ t(key="login-error", lang=lang | default(value='sk')) }}</span>
      </div>
      {% endif %}
      <form method="post" action="/admin/login" hx-boost="false" class="space-y-2">
        <div class="form-control">
          <label class="label"><span class="label-text t-green">{{ t(key="login-email", lang=lang | default(value='sk')) }}:</span></label>
          <input type="email" name="email" required autofocus class="input input-bordered w-full">
        </div>
        <div class="form-control">
          <label class="label"><span class="label-text t-green">{{ t(key="login-password", lang=lang | default(value='sk')) }}:</span></label>
          <input type="password" name="password" required class="input input-bordered w-full">
        </div>
        <button class="btn btn-primary mt-2 w-full">[ {{ t(key="login-auth", lang=lang | default(value='sk')) }} ]</button>
      </form>
    </div>
  </div>
</div>
{% endblock content %}
