<!doctype html>

<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
        <link href="{{ url_for('static', filename='css/bootstrap-icons.css') }}" rel="stylesheet">
        <title>Login</title>
    </head>
    <body>
        <div class="container-sm">
            <div class="card mt-3">
                <form action="{{ url_for('auth.login') }}" method="post">
                    {{ form.csrf_token }}
                    <div class="card-body">
                        <div class="text-center mb-2 fs-2">
                            <i class="bi bi-flower1"></i>
                        </div>
                        <div class="text-center mb-2">
                            {% if form.errors | length %}
                            {{ form.username(class_="form-control is-invalid", placeholder="username") }}
                            {% else %}
                            {{ form.username(class_="form-control", placeholder="username") }}
                            {% endif %}
                            {% for field, errors in form.errors.items() %}
                            <div class="invalid-feedback">
                            {{ ', '.join(errors) }}
                            </div>
                            {% endfor %}

                        </div>
                        <div class="text-center mb-2">
                            {{ form.password(class_="form-control", placeholder="password") }}
                        </div>
                        <div class="text-center">
                            <button type="submit" class="btn btn-primary">Login</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </body>
</html>
