All checks were successful
Build and Push Docker Image / build (push) Successful in 46s
- Added email templates for activation and password reset (`activation_email.html`, `password_reset_email.html`, etc.) - Created forms for registration (`RegisterForm`) and login (`LoginForm`) with custom validation - Developed new pages for account activation (`activation_success.html`, `activation_invalid.html`), password reset workflow, and profile - Configured email backend and environment file handling in settings - Updated header template to conditionally display profile or login links based on authentication status - Enhanced CSS styles for authentication-related pages and forms
84 lines
3.9 KiB
HTML
84 lines
3.9 KiB
HTML
{% extends '_layouts/base.html' %}
|
|
{% load static %}
|
|
|
|
{% block title %}Вход{% endblock %}
|
|
|
|
{% block add_css %}
|
|
<link rel="stylesheet" href="{% static 'css/login.css' %}">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="auth-page">
|
|
{% include "_fragments/header.html" %}
|
|
|
|
<main class="auth-section">
|
|
<div class="container auth-layout">
|
|
<section class="auth-intro auth-intro--login">
|
|
<p class="auth-kicker">Личный кабинет</p>
|
|
<h1 id="login-title" class="auth-title">Вход в аккаунт</h1>
|
|
<p class="auth-description">
|
|
Войдите, чтобы управлять заказами, сохранять избранные товары и быстрее оформлять покупки.
|
|
</p>
|
|
<a class="auth-side-link" href="/catalog/">Перейти в каталог</a>
|
|
</section>
|
|
|
|
<section class="auth-panel" aria-labelledby="login-title">
|
|
<form class="auth-form" action="" method="post">
|
|
{% csrf_token %}
|
|
{% if form.non_field_errors %}
|
|
<div class="auth-alert auth-alert--error">
|
|
{% for error in form.non_field_errors %}
|
|
<p>{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="auth-field">
|
|
<label for="{{ form.email.id_for_label }}">Электронная почта</label>
|
|
<input
|
|
id="{{ form.email.id_for_label }}"
|
|
name="{{ form.email.html_name }}"
|
|
type="email"
|
|
value="{{ form.email.value|default:'' }}"
|
|
placeholder="example@mail.ru"
|
|
autocomplete="email"
|
|
>
|
|
{% for error in form.email.errors %}
|
|
<p class="auth-field-error">{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="auth-field">
|
|
<label for="{{ form.password.id_for_label }}">Пароль</label>
|
|
<input
|
|
id="{{ form.password.id_for_label }}"
|
|
name="{{ form.password.html_name }}"
|
|
type="password"
|
|
placeholder="Введите пароль"
|
|
autocomplete="current-password"
|
|
>
|
|
{% for error in form.password.errors %}
|
|
<p class="auth-field-error">{{ error }}</p>
|
|
{% endfor %}
|
|
<a class="auth-secondary-link" href="{% url 'users:password_reset' %}">Сбросить пароль</a>
|
|
</div>
|
|
|
|
<div class="auth-actions">
|
|
<div class="auth-buttons">
|
|
<button class="auth-submit" type="submit">Войти</button>
|
|
|
|
</div>
|
|
<p class="auth-switch">
|
|
Нет аккаунта?
|
|
<a href="{% url 'users:register' %}">Зарегистрироваться</a>
|
|
</p>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
</main>
|
|
|
|
{% include "_fragments/footer.html" %}
|
|
</div>
|
|
{% endblock %}
|