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.     <div class="login-page">
  5.         <div class="form">
  6.             <style>
  7.                 .login-page {
  8.                     width: 360px;
  9.                     padding: 8% 0 0;
  10.                     margin: auto;
  11.                 }
  12.                 .form {
  13.                     position: relative;
  14.                     z-index: 1;
  15.                     background: #FFFFFF;
  16.                     max-width: 360px;
  17.                     margin: 0 auto 100px;
  18.                     padding: 45px;
  19.                     text-align: center;
  20.                     box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
  21.                 }
  22.                 .form input {
  23.                     font-family: "Roboto", sans-serif;
  24.                     outline: 0;
  25.                     background: #f2f2f2;
  26.                     width: 100%;
  27.                     border: 0;
  28.                     margin: 0 0 15px;
  29.                     padding: 15px;
  30.                     box-sizing: border-box;
  31.                     font-size: 14px;
  32.                 }
  33.                 .form button {
  34.                     font-family: "Roboto", sans-serif;
  35.                     text-transform: uppercase;
  36.                     outline: 0;
  37.                     background: #4CAF50;
  38.                     width: 100%;
  39.                     border: 0;
  40.                     padding: 15px;
  41.                     color: #FFFFFF;
  42.                     font-size: 14px;
  43.                     -webkit-transition: all 0.3 ease;
  44.                     transition: all 0.3 ease;
  45.                     cursor: pointer;
  46.                 }
  47.                 .form button:hover,.form button:active,.form button:focus {
  48.                     background: #43A047;
  49.                 }
  50.                 .form .message {
  51.                     margin: 15px 0 0;
  52.                     color: #b3b3b3;
  53.                     font-size: 12px;
  54.                 }
  55.                 .form .message a {
  56.                     color: #4CAF50;
  57.                     text-decoration: none;
  58.                 }
  59.                 .container .info h1 {
  60.                     margin: 0 0 15px;
  61.                     padding: 0;
  62.                     font-size: 36px;
  63.                     font-weight: 300;
  64.                     color: #1a1a1a;
  65.                 }
  66.                 .container .info span {
  67.                     color: #4d4d4d;
  68.                     font-size: 12px;
  69.                 }
  70.                 .container .info span a {
  71.                     color: #000000;
  72.                     text-decoration: none;
  73.                 }
  74.                 body {
  75.                     background: #76b852;
  76.                     background: -webkit-linear-gradient(right, #76b852, #8DC26F);
  77.                     background: -moz-linear-gradient(right, #76b852, #8DC26F);
  78.                     background: -o-linear-gradient(right, #76b852, #8DC26F);
  79.                     background: linear-gradient(to left, #76b852, #8DC26F);
  80.                     font-family: "Roboto", sans-serif;
  81.                     -webkit-font-smoothing: antialiased;
  82.                     -moz-osx-font-smoothing: grayscale;
  83.                 }
  84.             </style>
  85.             {% if error %}
  86.                 <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  87.             {% endif %}
  88.             {% if app.user %}
  89.                 <div class="mb-3">
  90.                     You are logged in as {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
  91.                 </div>
  92.             {% endif %}
  93.             <form method="post" class="login-form">
  94.                 <input type="email" value="{{ last_username }}" placeholder="email" name="email" id="inputEmail" class="form-control" autocomplete="email" required autofocus>
  95.                 <input type="password" name="password" placeholder="password" id="inputPassword" class="form-control" autocomplete="current-password" required>
  96.                 <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  97.                 <button type="submit">login</button>
  98.                 {#
  99.                     Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  100.                     See https://symfony.com/doc/current/security/remember_me.html
  101.                     <div class="checkbox mb-3">
  102.                         <label>
  103.                             <input type="checkbox" name="_remember_me"> Remember me
  104.                         </label>
  105.                     </div>
  106.                 #}
  107.             </form>
  108.         </div>
  109.     </div>
  110. {% endblock %}