<!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 href="/css/style.css" rel="stylesheet">
    <title> Favorite Playlist </title>
</head>

<body> 

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

    <main class="main__container">
        <%- include('./partials/logo.ejs') %>
        <section id="card__container">
            <% playlist.forEach(element => { %>
            <a href="/detalhes/<%= element.id %> ">
                <article class="iframes">
                   <div class="card_iframe">
                        <iframe
                            width="560"
                            height="315"
                            src="https://www.youtube.com/embed/<%= element.iframe %>"
                            title="YouTube video player"
                            frameborder="0"
                            allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
                            allowfullscreen
                        ></iframe>
                    </div>
                    <fieldset>
                        <div class="name_music">
                            <i class="fa-solid fa-angles-right"></i>
                            <%= element.nome %>
                            <p>-</p>
                            <%= element.cantor %>
                            <i class="fa-solid fa-angles-left"></i>
                        </div>
                        </fieldset>
                </article>
            </a>
            <div class="btn__container">
                <a href="/deletar/<%= element.id %> "> <i class="fa-solid fa-trash"></i> </a>
                <a href="/editar/<%= element.id %> "> <i class="fa-solid fa-pencil"></i> </a>
            </div>
            <% }) %>
        </section>
    </main>
    <%- include('./partials/footer.ejs') %>
</body>

</html>