<%- include('partials/head.ejs') %>
<%- include('partials/navbar.ejs') %>

  <main class="container">
  
    <div class="container white-text" style="margin: auto; min-width:50%; max-width:max-content;">
      <h1 class="center white-text"><%= titulo %></h1>
      
        <form class="passcontent grey-text text-lighten-1" action="/users/login" method="POST">
          <% if (error) { %> 
            <strong><span class="red-text text-darken-1"><%= error %></span><br></strong>
          <% } %>
          <input type="hidden" name="_csrf" value="<%= csrfToken %>" >
          Nombre de usuario <br>
          <input class="white-text" type="text" name="usuario">
          <br><br>
          Contraseña<br> 
          <input class="white-text" type="password" name="password">
          <br><br>
          <input type="hidden" name="rol" value="rol">
          <br>
          <div class="center">
            <button class="waves-effect waves-light green darken-1 btn-large" type="submit"> 
              <i class="material-icons left">login</i>Iniciar sesión
            </button>
          </div>
          <br>
        </form>

    </div>

  </main>

<%- include('partials/footer.ejs') %>