<!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 rel="stylesheet" href="/style.css" />
    <title>Pokédex</title>
    <link
      rel="icon"
      type="imagem/png"
      href="images/Pokemon-Pokeball-PNG-Photo.png"
    />
  </head>
  <body>
    <header>
      <div>
          <a href="/">
              <img id="logo" src="/images/pokemon-logo-8.png" alt="Logo Pokemon">
          </a>
      </div>
      
      <div id="dmenu">
          <nav>
              <ul id="menu">
                <a href="/"><li>Home</li></a>
                <a href="/cadastrar"><li>Cadastrar</li></a>
              </ul>
          </nav>
      
      </div>

  </header>

    <main>

        <section id="cards">
       
                    <div class="card" id="noclickcard">
                        <img src="<%= pokemon.imagem %>"/>
                        <h2><%= pokemon.nome %></h2>
                        <p><%= pokemon.tipo %></p>
                        <p><%= pokemon.descricao %></p>                       
                    </div>

        </section>

        <section id="cadastro">


          <div id="fundo">
            
            <form action="/update" method="post">
                <h2>Editar cadastro.</h2>
                <input type="hidden" id="id" name="id" value=<%= pokemon.id %>>

                <label for="nome">Nome:</label>
                <input type="text" id="nome" name="nome" required value=<%= pokemon.nome %>>
                
                <label for="tipo">Tipo:</label>
                <input type="text" id="tipo" name="tipo" required value=<%= pokemon.tipo %>>
                
                <label for="descricao">Descrição:</label>
                <input type="text" id="descricao" name="descricao" required value="<%= pokemon.descricao %>">

                <label for="imagem">Link</label>
                <input type="text" id="imagem" name="imagem" required value="<%= pokemon.imagem %>">

                <div id="button">
                  <button id="btnCadastro" type="submit">Alterar</button>
                  <a id="delete" href="/deletar/<%= pokemon.id %>"><button id="btnDelete" type="button">Deletar</button></a>                  
                </div>

            </form>

          </div>
        </section>

    </main>

    <footer></footer>
  </body>
</html>