<%- include('./include/_head.ejs') %>
<body>
    <%- include('./include/_navbar.ejs') %>
    <div class="container">
        <div class="row mt-1 mh-85">
            <div class="col-lg-6 col-10 m-auto">
                <div class="card card-body p-5 mx-auto">
                    <h1 class="text-center mb-3">
                        Register
                    </h1>
    
                    <%- include('./include/_message.ejs') %>
    
                    <form action="/register" method="POST" novalidate>
                        <div class="form-group">
                            <label for="name">Name</label>
                            <input type="name" id="name" name="name" class="form-control form-control-sm"
                                value="<%= typeof name != 'undefined' ? name : '' %>"/>
                        </div>
                        <div class="form-group">
                            <label for="email">Email</label>
                            <input type="email" id="email" name="email" class="form-control form-control-sm"
                                value="<%= typeof email != 'undefined' ? email : '' %>"/>
                        </div>
                        <div class="form-group">
                            <label for="password">Password</label>
                            <input type="password" id="password" name="password" class="form-control form-control-sm"
                                value="<%= typeof password != 'undefined' ? password : '' %>"/>
                        </div>
                        <div class="form-group">
                            <label for="password2">Confirm Password</label>
                            <input type="password" id="password2" name="password2" class="form-control form-control-sm"
                                value="<%= typeof password2 != 'undefined' ? password2 : '' %>"/>
                        </div>
                        <button type="submit" class="btn btn-primary float-right">
                            Register
                        </button>
                    </form>
                    <p class="lead mt-4">Have An Account? <a href="/login">Login</a></p>
                </div>
            </div>
        </div>
    </div>
    
    <%- include('./include/_footer.ejs') %>
</body>

</html>