<!DOCTYPE html>
<html lang="en">
    <%- include("./partials/header.ejs") %>
<body class="d-flex flex-column vh-100">
    <div class="container-fluid">
        <div class="p-5">
            <h2>form per cambio e add user</h2>

                <form action="/user" method="post">
                <% users.forEach(user => { %>
                    <button type="submit" class="btn" name="userId" value="<%= (user.id)%>" id="<%= (user.id)%>" style="background-color: <%= user.color%>">
                        <%= user.name %>
                    </button>
                    <% }); %>
                    <button type="submit" class="btn btn-secondary ms-5" name="add" value="new">
                        Add new user
                    </button>
                    <button type="submit" class="btn btn-danger" name="remove" value="cancel">
                        Remove user
                    </button>
            </form>
        </div>
        <div class="d-flex flex-column justify-content-center text-center mt-5 pt-5 w-50 mx-auto">
            <h1>Descrizione</h1>
                <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore ratione minus quidem excepturi eum consectetur quis corporis adipisci culpa optio, assumenda quam similique, labore alias error ipsum a sint quas?</p>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
</body>
</html>
