<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/style.css">
    <title>Index</title>
</head>

<body>
    <%- include('./partials/header.ejs') %> 
    <main>
    <h1 id="inicio">Cat√°logo de Filmes</h1>
    <div id="sub_header"></div>
    <section id="card_container">
        <% listFilmes.forEach(element => { %>
            <a href="/detalhes/<%= element.id %> ">
            <article class="cards">
           <div class="card_img">
               <img src="<%= element.img %>  " alt="<%= element.nome %> ">
           </div>
           <div class="card_nome">
               <%= element.nome %> 
           </div>
        </article>
    </a>
    <div class="btn_cont">
        <a href="/delete/<%= element.id %> "><i class="fa-solid fa-ban"></i></a>
        <a href="/editar/<%= element.id %> "><i class="fa-solid fa-pencil"></i></a>
    </div>
        <% }) %>   
    </section>
    </main>
    <%- include('./partials/footer.ejs') %> 
</body>
</html>