<!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">
    <title>projeto pokedéx</title>
    <link rel="stylesheet" href="/css/style.css">
    <script src="/script.js"></script>
</head>
<body>
        
        <nav id="menu">
            <article>
                <img src="Pikachu on a pokeball by Naaraskettu on DeviantArt.jpg" alt="">
                <h1><a href="/">Pokedéx</a></h1>
            </article>
            
            <ul type="disc">
                <li><a href="/">Home</a></li>
                <li><a href="/cadastro">Cadastro</a></li>
            </ul>
        </nav>
        <% if (message !== "") {%>
            <section id="message">
                <p><%= message%></p> <span id="close">&times;</span>
            </section>
        <% } %>
        <header>
            <h1>Pokedéx</h1>
        </header>

        <section id="pokedex">

            <% for (let i = 0; i < pokemons.length; i++) { %>
                <a class="card" href="/detalhes/<%= i %>">
                    <img src="<%= pokemons[i].image %>" alt="">
                    <h2>
                        <%= pokemons[i].nome %>
                    </h2>
                    <h4>
                        <%= pokemons[i].type %>
                    </h4>
                </a>
            <% } %>
                
        </section>

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