<!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>to do list</title>
</head>

<body>
    <header>Todo list</header>
    <main>
        <h1>To do</h1>
        <section id="registroTarefas">

                <form action="/cadastro" method="POST">
                    <input type="text" id="nome_tarefa" name="nome_tarefa" required />
                    <button type="submit">Registrar</button>
                </form>
            
        </section>
        
        <section id="tarefas" >
            <ul>
            <% tarefas.forEach(element => { %>
                <div>
                    <input type="checkbox">
                    <li><%=element.nome_tarefa%></li>
                    <div class="acoes">
                        <p><a href="/delete/<%=element.id%>">Deletar</a></p>
                        <p><a href="/editar/<%=element.id%>">Editar</a></p>
                    </div>
                    
                </div>
            <% }) %>
        </ul>
        </section>
        
    </main>
    <footer>BlueEdTech 2022</footer>
</body>

</html>