Сделаны страницы входа и регистрации, сжата картинка intro.png

This commit is contained in:
vlados31 2022-10-09 13:44:48 +03:00
parent 47359a7932
commit c757646354
6 changed files with 94 additions and 27 deletions

View File

@ -2,6 +2,8 @@
body {
--text-color: #111;
--brand-color: #231765;
--bkg-color-blue: #0066e3;
--bkg-color: #fff;
--bkg-color2: #ccc;
--bkg-color3: #aaa;
@ -12,6 +14,8 @@ body {
body {
--text-color: #eee;
--brand-color: #654dea;
--bkg-color-blue: #003aac;
--bkg-color: #121212;
--bkg-color2: #202020;
--bkg-color3: #353435;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 246 KiB

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% block title %} Аккаунт | вход {% endblock %}
{% block title %} Аккаунт | профиль {% endblock %}
{% block content %}
<h1 class=deprecated-page-header"> Ваш аккаунт </h1>

View File

@ -92,7 +92,7 @@
line-height: 27px;
align-items: center;
color: #231765;
color: var(--brand-color);
}

View File

@ -3,22 +3,82 @@
{% block styles %}
<style>
.error_class {
border: red solid 2px;
#form-wrapper {
{#border: 1px dashed red;#}
overflow: hidden;
max-width: 27em;
margin: 5em auto;
height: auto;
text-align: center;
}
.form-row {
padding: 4px 0;
margin: 1.5em;
}
.form-row * {
font-size: 1em;
text-align: left;
display: block;
}
.form-row label {
line-height: 2em;
font-weight: bolder;
}
.form-row input {
padding: 8px;
width: 100%;
box-sizing: border-box;
border: none;
border-bottom: var(--brand-color) 2px solid;
background-color: var(--bkg-color2);
text-overflow: ellipsis;
min-height: 2em;
}
.form-row input:focus {
outline: none;
border: none;
border-bottom: var(--bkg-color-blue) 2px solid;
}
#submit {
border: none;
font-weight: bolder;
background: var(--bkg-color-blue);
text-align: center;
}
</style>
{% endblock %}
{% block content %}
<h1 class=deprecated-page-header"> Ваш аккаунт </h1>
<h3>Вход</h3>
<form action="{% url 'login' %}" method="POST">
<div id="form-wrapper">
<h1> {% block page-title %} Войти {% endblock %} </h1>
<form action="{% block form-action-url %}{% url 'login' %}{% endblock %}" method="POST">
{% csrf_token %}
<table>
<tbody>
{{ form.as_table }}
</tbody>
</table>
<button type="submit">Войти</button>
{% block form-pre-fields %}
<div>
Впервые на сайте? <a href="{% url 'register' %}">Зарегистрироваться</a>
</div>
{% endblock %}
{% for field in form %}
<div class="form-row">
{{ field.errors }}
{{ field.label_tag }} {{ field }}
</div>
{% endfor %}
{% block form-pre-submit %}{% endblock %}
<div class="form-row">
<input id="submit" type="submit" value="{% block submit-button-text %}Войти{% endblock %}">
</div>
</form>
</div>
{% endblock %}

View File

@ -1,20 +1,23 @@
{% extends 'base.html' %}
{% extends 'registration/login.html' %}
{% block title %} Аккаунт | регистрация {% endblock %}
{% block content %}
<h1 class=deprecated-page-header"> Ваш аккаунт </h1>
<h3>Регистрация</h3>
<form action="" method="POST">
{% csrf_token %}
<table>
<tbody>
{{ form.as_table }}
</tbody>
</table>
<button type="submit">Регистрация</button>
</form>
{% block page-title %} Регистрация {% endblock %}
{% block form-action-url %}{% url 'register' %}{% endblock %}
{# пустой блок #}
{% block form-pre-fields %}
<div>
Уже зарегистрированы? <a href="{% url 'login' %}">Войти</a>
</div>
{% endblock %}
{% block form-pre-submit %}
<div>
Уже зарегистрированы? <a href="{% url 'login' %}">Вход</a>
<input id="user-agreement-check" type="checkbox" required>
<label for="user-agreement-check">
Я принимаю <a href="{% url 'user-agreement' %}">пользовательское соглашение</a>
</label>
</div>
{% endblock %}
{% block submit-button-text %}Отправить{% endblock %}