ittech/w12/views/login.twig
2023-03-26 16:58:46 +07:00

52 lines
No EOL
1.6 KiB
Twig

{% extends "template.twig" %}
{% block title %}Вход{% endblock %}
{% block head %}
{{ parent() }}
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0;
margin: 0;
height: 100vh;
width: 100vw;
background: rgb(15 33 33);
}
.auth-holder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: rgb(185 255 245);
width: fit-content;
padding: 2rem;
border-radius: 1rem;
}
</style>
{% endblock %}
{% block content %}
<div class="auth-holder">
{% if message %}
<div id="message" style="padding: 1rem; border: 2px solid black; background-color: green; color: white">{{message}}</div>
{% endif %}
{% if error %}
<div id="error" style="padding: 1rem; border: 2px solid black; background-color: red; color: white">{{error}}</div>
{% endif %}
<h4>Вход</h4>
<form action="/login" method="post">
<input type="text" name="login" placeholder="Логин">
<input type="password" name="password" placeholder="Пароль">
<input type="submit" name="submit" value="Войти">
</form>
<hr>
<a href="/register">Зарегистрироваться</a>
<br>
<a href="/recover-password">Восстановить пароль</a>
</div>
{% endblock %}