<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
        integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <title>Admindek</title>
</head>

<body>
    <div class="jumbotron jumbotron-fluid">
        <div class="container">
            <h1 class="display-4">ðŸ“’ Your one point place for all Notes</h1>
            <a href="/user/1/notes-newnote" class="btn btn-success float-right">New Note</a>
            <a href="/user/1" class="btn btn-danger float-left">Back to dashboard</a>
        </div>
    </div>
    <div class="container">
        <% notes.forEach(note => { %>
        <div class="card mt-2">
            <div class="card-body">
                <h5 class="card-title"><%= note.title %></h5>
                <p class="text-muted">Posted On: <%= note.createdAt.toLocaleDateString() %></p>
                <p class="card-text"><%= note.description %></p>
                <form action="/<%= note._id %>" method="POST">
                    <button href="#" class="btn btn-danger float-right">Delete</button>
                </form>
            </div>
        </div>
        <%}) %>
    </div>
</body>

</html>