<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- Fontawesome -->
    <script
      src="https://kit.fontawesome.com/42a182743f.js"
      crossorigin="anonymous"
    ></script>
    <!-- CSS -->
    <link rel="stylesheet" href="/css/form.css" />
    <title>Login</title>
  </head>
  <body>
    <!-- nav -->
    <%-include('../partials/navbar.ejs') %>

    <div class="form-container">
      <!-- icon -->
      <h1>Login Into Your Account</h1>
      <p>
        <!-- lock icon -->
        <i class="fas fa-lock"></i>
      </p>
      <%if(error){%>
      <small class="error">
        <i class="fas fa-exclamation-circle"></i>
        <%=error%>
      </small>
      <%}%>
      <form action="/api/v1/users/login" method="POST">
        <label for="email">Email</label>
        <input type="email" name="email" id="email" />

        <label for="password">Password</label>
        <input type="password" name="password" id="password" />

        <button type="submit">Login</button>

        <p>Don't have an account? <a href="/register">Register</a></p>
      </form>
    </div>
    <!-- footer -->
    <%-include('../partials/footer.ejs') %>
  </body>
</html>
