{% extends 'base.html' %}
{% block title %}Registrierung{% endblock %}
{% block content %}
<div class="grid place-content-center h-120 mt-12 mb-12">

        <div class="w-80 p-4 m-2 border-blue-600 border-2 rounded-xl shadow-md lg:w-90">
        <h2 class="text-2xl text-center p-4 font-black dark:text-white">Registrieren</h2>

        <form class=" space-y-4" method="post">
            {% if form.errors %}
            <div class="text-red-600 font-black overflow-hidden">
                <ul>
                    {% for field, errors in form.errors.items %}
                        {% for error in errors %}
                            <li>{{ error }}</li>
                        {% endfor %}
                    {% endfor %}
                </ul>
            </div>

    {% endif %}

            
            {% csrf_token %}
            <div class="register">

                {{ form.username }}

            </div>
            <div class="register">

                {{ form.password1 }}

            </div>
            <div class="register">
                
                {{ form.password2 }}

                </div>
                <div class="register">
                
                    {{ form.email }}
    
                    </div>
        <div class="text-center text-gray-600 text-sm dislay-flex align-bottom">
            <label class=''>Mit der Erstellung ihres Kontos stimmen Sie der <a class="text-blue-600" href="/privacy">Datenschutzerklärung </a> zu.</label>
        </div>
            <button class="w-full p-3 rounded-full bg-blue-600 text-white font-black hover:scale-105 transition duration-200" type="submit" class="login-button">Registrieren</button>
        </form>
        <button class="text-center text-sm w-full mt-2 font-light text-blue-600"><a href="{% url 'accounts:login' %}" class="register_link">Bereits ein Konto?</a></button>


            
 
        
    </div>
    </div>

    {% endblock %}

