{% extends "components/base.html" %}

{% block content %}
  <h2>Login</h2>

  <!-- 로그인 실패 메시지 표시 -->
  {% if messages %}
    {% for message in messages %}
      <div class="alert alert-danger" role="alert">
        {{ message }}
      </div>
    {% endfor %}
  {% endif %}

  <form method="post">
    {% csrf_token %}
    <div class="mb-3">
      <label for="username" class="form-label">Username</label>
      <input type="text" class="form-control" id="username" name="username" required="required">
    </div>
    <div class="mb-3">
      <label for="password" class="form-label">Password</label>
      <input type="password" class="form-control" id="password" name="password" required="required">
    </div>
    <button type="submit" class="btn btn-primary w-100">Login</button>
  </form>
{% endblock %}
