<!DOCTYPE html>
<html lang="pt-BR">
  <%- include('./components/head') %>

  <body>
    <%- include('./components/nav') %>
    <header>
      <% if(message != "") { %> 
        <%- include('./components/alerts') %>
      <% } %>
    </header>

    <main>
      <section id="cards">
        <h2>Lista de Bandas</h2>

        <% catalogoBandas.forEach((bandas) =>{ %>

        <div class="card">
          <img src="<%= bandas.imagem %>" alt="foto banda" />
          <h3><%= bandas.nome %></h3>
          <p class="descricao"><%= bandas.descricao %></p>
          <p>Estilo:<%= bandas.estilo %></p>
          <!--botoes-->
          <a class="botoes" href="/getById/<%= bandas.id %>/put">Editar</a>
          <a class="botoes" href="/detalhes/<%= bandas.id %>">Detalhes</a>
          <a id="del" href="/getById/<%= bandas.id %>/delete">Apagar</a>
        </div>
        <% }) %>
      </section>
    </main>

    <% if(bandasPut != null) {%> <%- include('./components/modalPut') %> <% } %>
    <% if(bandasDel != null) {%> <%- include('./components/modalDel') %> <% } %>
    <%- include('./components/footer') %>

    <script src="/js/script.js"></script>
  </body>
</html>
