hydra-sql/templates/login.html.twig

68 lines
1.9 KiB
Twig
Raw Normal View History

2022-05-03 08:54:45 +02:00
{% extends "base.html.twig" %}
{% block stylesheets %}
<style>
body{
min-height: 50vh;
display: flex;
justify-content: center;
align-items: center;
}
.wrapper{
display :flex;
justify-content: center;
align-items: center;
height: 100%;
}
form{
border: 1px solid grey;
border-radius: 5px;
padding: 15px;
box-shadow: 3px 3px 2px grey, -3px -3px 2px grey;
display:flex;
flex-direction: column;
}
2022-05-03 15:09:42 +02:00
.form-error{
2022-05-03 08:54:45 +02:00
color: red;
}
</style>
{% endblock %}
{% block body %}
<div class="login-wrapper">
<div class="login">
<form method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
2022-05-03 15:09:42 +02:00
{% endif %}
{% if app.user %}
<div class="mb-3">
You are logged in as {{ app.user.login }}
</div>
{% endif %}
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail">Email</label>
<input type="email" value="{{ last_username }}" name="login" id="inputEmail" class="form-control" required autofocus>
<label for="inputPassword">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" required>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
<!-- <div class="checkbox mb-3">
<label>
<input type="checkbox" name="_remember_me"> Remember me
</label>
</div> -->
<button class="btn btn-lg btn-primary" type="submit">
Sign in
</button>
</form>
2022-05-03 15:09:42 +02:00
</div>
2022-05-03 08:54:45 +02:00
</div>
{% endblock %}