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

<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="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.0/font/bootstrap-icons.css">
    <link rel="stylesheet" href="/style.css">
    <link rel="shortcut icon" href="#">
    <title>Playlist</title>
</head>

<body>
    <div id="container-principal">
        <nav>
            <ul>
                <li> <span class="material-icons"> music_note </span> </li>
                <li> <a href="/admin"><i class="bi bi-gear"></i></a> </li>
            </ul>
        </nav>
        <section id="player">
            <h1>Playlist</h1>
            <div> <img id="currentImg" src="/img/musicoff.jpg" alt="">
                <h2 id="currentName">Titulo</h2>
                <p id="currentArtist">Artista</p>
            </div>
            <div id="listMusic">
                <table>
                    <thead>
                        <tr>
                            <th>Capa</th>
                            <th>Nome</th>
                            <th>Artista</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <% playlist.forEach((music)=> { %> <tr class="musics">
                                <td id="cover"><img src="<%= music.linkImage %>" alt="Imagem da musica"></td>
                                <td class="musicDescription">
                                    <%= music.name %>
                                </td>
                                <td class="musicDescription">
                                    <%= music.author %>
                                </td>
                                <td>
                                    <audio src="<%= music.linkMusic %>"></audio>
                                </td>

                            </tr>
                            <% }) %>
                    </tbody>
                </table>
            </div>

            <section id="controls">
                <i id="prev-control" class="bi bi-skip-start-fill"></i>
                <i id="play-control" class="bi bi-play-fill"></i>
                <i id="next-control" class="bi bi-skip-end-fill"></i>

                <span id="current-duration">00:00</span>
                <input id="progressbar" type="range" min="0" max="0" step="1">
                <span id="total-duration">00:00</span>
                <i id="vol-icon" class="bi bi-volume-up-fill"></i>
                <input id="volume" type="range" min="0" max="100" step="1">

            </section>
        </section>
        <script src="/script.js"></script>

    </div>
</body>

</html>