<%- include ('partials/header.ejs') %>
<%- include ('partials/navbar.ejs') %>
<main>
    <div class="container">
        <hr>
        <h1>Questions and Answers</h1>
        <hr>
        <a href="/ask" class="btn btn-primary">Ask a question</a>
        <% questions.forEach( question=> { %>
            <div class="card my-4">
                <div class="card-body">
                    <h3><%= question.title %></h3>
                </div>
                <div class="card-footer">
                    <a href="/question/<%= question.id %>" class="btn btn-primary">Responder</a>
                </div>
            </div>
        <% }) %>
    </div>
</main>
<%- include ('partials/footer.ejs') %>