templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block body %}
  4. <style>
  5.     .back {
  6.         background: #e2e2e2;
  7.         width: 100%;
  8.         position: absolute;
  9.         top: 0;
  10.         bottom: 0;
  11.     }
  12.     .div-center {
  13.         width: 400px;
  14.         height: 400px;
  15.         background-color: #fff;
  16.         position: absolute;
  17.         left: 0;
  18.         right: 0;
  19.         top: 0;
  20.         bottom: 0;
  21.         margin: auto;
  22.         max-width: 100%;
  23.         max-height: 100%;
  24.         overflow: auto;
  25.         padding: 1em 2em;
  26.         border-bottom: 2px solid #ccc;
  27.         display: table;
  28.     }
  29.     div.content {
  30.         display: table-cell;
  31.         vertical-align: middle;
  32.     }
  33.     .content img {
  34.         margin: 0 auto; /* Centrar la imagen horizontalmente */
  35.         display: block;
  36.         max-width: 100%; /* Asegurar que la imagen no exceda el ancho del contenedor */
  37.     }
  38.     .form-control, .btn {
  39.         min-height: 38px;
  40.         border-radius: 2px;
  41.     }
  42.     .btn {        
  43.         font-size: 15px;
  44.         font-weight: bold;
  45.     }
  46. </style>
  47. <div class="back">
  48.     <div class="div-center">
  49.         <div class="content">
  50.             <img src="{{ asset('asset/images//LogoPNG.png') }}" alt="webFactura API" />
  51.             <h3>Login API-Multivende</h3>
  52.             <hr />
  53.             <form action="{{ path('app_login') }}" method="post">
  54.                 {% if error %}
  55.                     <div class="alert alert-danger" style="color:red;">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  56.                 {% endif %}
  57.                 {% if app.user %}
  58.                     <div class="mb-3" style="color:black;">
  59.                         Conectado como {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
  60.                     </div>
  61.                 {% endif %}
  62.                 <div class="form-group">
  63.                     <label for="username">Email</label>
  64.                     <input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" placeholder='Email' required autofocus>
  65.                 </div>
  66.                 <div class="form-group">
  67.                     <label for="password">Password</label>
  68.                     <input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" placeholder="********" required>
  69.                     <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  70.                 </div> 
  71.                 <button type="submit" class="btn btn-primary btn-block">Login</button>
  72.             </form>
  73.         </div> 
  74.     </div> 
  75. </div> 
  76. {% endblock %}