{% extends 'base.html.twig' %}
{% block title %}Log in!{% endblock %}
{% block body %}
<style>
.back {
background: #e2e2e2;
width: 100%;
position: absolute;
top: 0;
bottom: 0;
}
.div-center {
width: 400px;
height: 400px;
background-color: #fff;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
max-width: 100%;
max-height: 100%;
overflow: auto;
padding: 1em 2em;
border-bottom: 2px solid #ccc;
display: table;
}
div.content {
display: table-cell;
vertical-align: middle;
}
.content img {
margin: 0 auto; /* Centrar la imagen horizontalmente */
display: block;
max-width: 100%; /* Asegurar que la imagen no exceda el ancho del contenedor */
}
.form-control, .btn {
min-height: 38px;
border-radius: 2px;
}
.btn {
font-size: 15px;
font-weight: bold;
}
</style>
<div class="back">
<div class="div-center">
<div class="content">
<img src="{{ asset('asset/images//LogoPNG.png') }}" alt="webFactura API" />
<h3>Login API-Multivende</h3>
<hr />
<form action="{{ path('app_login') }}" method="post">
{% if error %}
<div class="alert alert-danger" style="color:red;">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3" style="color:black;">
Conectado como {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<div class="form-group">
<label for="username">Email</label>
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" placeholder='Email' required autofocus>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" placeholder="********" required>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
</div>
<button type="submit" class="btn btn-primary btn-block">Login</button>
</form>
</div>
</div>
</div>
{% endblock %}