<%- include ('components/header.ejs') %>


    <body>
        <%- include ('components/navbar.ejs') %>


            <div class="container dar">
                <hr>
                <h1 class="text-light">Perguntas</h1>
                <hr>
                <a href="/perguntar" class="btn btn-warning mb-5">Perguntar</a>

                <% questions.forEach(question=> { %>
                    <div class="card mb-2">
                        <div class="card-body ">
                            <h5 class="card-title">
                                <%= question.titulo %>
                            </h5>
                            <!-- <h6 class="card-subtitle mb-2 text-muted">Card subtitle</h6> -->
                            <p class="card-text">
                                <%= question.descricao %>
                            </p>

                            <!-- <a href="#" class="card-link">Another link</a> -->
                        </div>
                        <div class="card-footer">
                            <a href="/pergunta/<%= question.id %> ">

                                <button type="submit" class="btn btn-warning">Responder</button>
                            </a>
                        </div>
                    </div>


                    <% }) %>
            </div>

    </body>

    <%- include ('components/footer.ejs') %>