templates/security/login.html.twig line 1

  1. {# templates/security/index.html.twig #}
  2. {% extends 'base.html.twig' %}
  3. {% block title %}Firma Vila Viniteca - Login
  4. {% endblock %}
  5. {% block body %}
  6.     
  7.     <style>
  8.         body {
  9.             font-family: Arial, sans-serif;
  10.             background-color: #f4f4f4;
  11.             margin: 0;
  12.             padding: 0;
  13.             display: flex;
  14.             flex-direction: column;
  15.             justify-content: center;
  16.             align-items: center;
  17.             height: 100vh;
  18.         }
  19.         .container {
  20.             display: flex;
  21.             flex-direction: column;
  22.             justify-content: center;
  23.             align-items: center;
  24.             margin: auto;
  25.         }
  26.         form {
  27.             background-color: #fff;
  28.             padding: 20px;
  29.             border-radius: 5px;
  30.             box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  31.             width: 300px;
  32.         }
  33.         form label {
  34.             display: block;
  35.             margin-bottom: 5px;
  36.         }
  37.         form input[type="text"],
  38.         form input[type="password"] {
  39.             width: 100%;
  40.             padding: 10px;
  41.             margin-bottom: 20px;
  42.             border-radius: 5px;
  43.             border: 1px solid #ccc;
  44.         }
  45.         form button {
  46.             padding: 10px 20px;
  47.             border: none;
  48.             background-color: #007BFF;
  49.             color: #fff;
  50.             border-radius: 5px;
  51.             cursor: pointer;
  52.         }
  53.         form button:hover {
  54.             background-color: #0056b3;
  55.         }
  56.         form div {
  57.             color: red;
  58.             margin-bottom: 15px;
  59.         }
  60.     </style>
  61.     <div class="container">
  62.         <div class="logo">
  63.             <h1>Firma Empresa</h1>
  64.             <img src="https://firma.vilaviniteca.es/uploads/logo.webp" alt="Vila Viniteca" class="large">
  65.         </div>
  66.         {% if error %}
  67.         <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  68.     {% endif %}
  69.         <form action="{{ path('app_admin_login') }}" method="post">
  70.             <label for="username">Email:</label>
  71.             <input type="text" id="username" name="_username" value="{{ last_username }}">
  72.             <label for="password">Password:</label>
  73.             <input
  74.             type="password" id="password" name="_password">
  75.             {# If you want to control the URL the user is redirected to on success #}
  76.             <input type="hidden" name="_target_path" value="/crud">
  77.             <button type="submit">login</button>
  78.         </form>
  79.     </div>
  80. {% endblock %}