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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">

    <title>Document</title>
</head>

<body>
    <nav>
        <div class="nav-wrapper container">
            <a href="/" class="brand-logo">CRUD </a>
            <ul id="nav-mobile" class="right hide-on-med-and-down">
                <li><a href="./add-item">Add Item</a></li>

            </ul>
        </div>
    </nav>
    <div class="container">
        <ul class="collection with-header">

            <% if (items.length>0) { %>

            <%  items.forEach(item => { %>
            <li class="collection-item">
                <div><%= item.name%> $<%= item.price%><a href="#!" class="secondary-content"><i
                            class="material-icons">delete</i><i class="material-icons">edit</i></a></div>
            </li>
            <%  }); %>


            <% }else{%>
            <li>There are no items</li>
            <%}%>
         
        </ul>
    </div>


</body>

</html>