<!DOCTYPE html>
<html lang="pt-br">

<head>
    <%- include ("../elementos/head") %>    
</head>

<body>
    <div class="container bg-primary-subtle rounded border border-info mx-auto m-2">
        <%- include ("../elementos/menu") %>
    </div>
    <div class=" p-3 mt-2 container bg-primary-subtle rounded border border-info mx-auto m-2 ">
        <p class="text-center"> Bem vindo as Notícias</p>


        <table class="table table-sm table-hover table-info table-striped table-bordered border-primary">
            <thead class="thead-primary">
                <tr class="text-center">
                    <th scope="col">ID</th>
                    <th scope="col">Título</th>
                    <th scope="col">Contéudo</th>
                    <th scope="col">Data e Hora da Criação</th>
                </tr>
            </thead>
            <tbody>
                <% for (var i=0 ;i<noticias.length;i++) {%>
                    <tr>
                        <th scope="row" class="text-center">
                            <%=noticias[i].idnoticia%>
                        </th>
                        <td>
                            <%=noticias[i].titulo%>
                        </td>
                        <td>
                            <%=noticias[i].noticia%>
                        </td>
                        <td>
                            <%=noticias[i].dhnoticia.toUTCString()%>
                        </td>
                    </tr>
                    <% }%>
            </tbody>
        </table>
    </div>
    
    <%- include ("../elementos/footer") %>

</body>

</html>