login.html 1.61 KB
{% extends "website/baseline.html" %}

{% block content %}
<style type="text/css">
    .login-form {
        width: 340px;
        margin: 50px auto;
    }
    .login-form form {
        margin-bottom: 15px;
        background: #BCD8F2;
        box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
        padding: 30px;
    }
    .login-form h2 {
        margin: 0 0 15px;
        font-weight:bold;
    }
    .form-control, .btn {
        min-height: 38px;
        border-radius: 2px;
    }
    .btn {        
        font-size: 15px;
        font-weight: bold;
    }
    a {
        color: #3A5AC1;
    }
    table {
      border-spacing: 10px;
      border-collapse: separate;
    }
</style>
    <div class="login-form">
        <form action="{% url 'login' %}" method="post">
            {% csrf_token %}
            <h2 class="text-center">Log in</h2>
            <table>
                <tr>
                    <td>Username </td>
                    <td>{{ form.username }}</td>
                </tr>
                <tr>
                    <td>Password </td>
                    <td>{{ form.password }}</td>
                </tr>
            </table>
            <br>
                <input type="submit" class="btn btn-primary btn-block" value="Login"role="button"/>
                <input type="hidden" name="next" value="{{ next }}" />
            </div>    
        </form>
        <p class="text-center"><a href="{% url 'signup' %}">Create an Account</a></p>
    </div>
    {% if form.errors %}
        <p style="text-align: center">이름과 비밀번호가 일치하지 않습니다. 다시 시도해주세요.</p>
    {% endif %}
{% endblock %}