<!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>Register</title>
  </head>
  <body>
    <!-- nav -->
    <%-include('../partials/navbar.ejs') %>
    <div class="form-container">
      <!-- icon -->
      <h1>
        Register
        <i class="fas fa-user-plus"></i>
      </h1>

      <%if(error){%>
      <small class="error">
        <i class="fas fa-exclamation-circle"></i>
        <%=error%>
      </small>
      <%}%>

      <form action="/api/v1/users/register" method="POST">
        <!-- full name -->
        <label for="name">Full Name</label>
        <input type="text" name="fullname" />
        <!-- email -->
        <label for="email">Email</label>
        <input type="email" name="email" />

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

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

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