<!DOCTYPE html>
<html lang="en">
  <head>
    <title></title>
    <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="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
      crossorigin="anonymous"
    />
  </head>
  <body>
    <div class="row m-4">
      <div class="col-12">
        <div class="card">
          <div class="card-header">
            <div class="text-center">
              <h1>Products</h1>
            </div>
          </div>
          <div class="card-body">
            <ul>
              <% for(let product of productList) {%>
              <li>
                <a
                  href="/product/<%= product.id %> "
                  class="text-dark text-decoration-none"
                >
                  <%= product.name %>
                </a>
              </li>
              <% } %>
            </ul>
          </div>
          <div class="card-footer">
            <div class="row">
              <span class="col-1"></span>
              <a
                href="/product/new"
                class="text-decoration-none text-white col btn btn-success"
              >
                Add Product
              </a>
              <span class="col-4"></span>
              <a
                href="/"
                class="text-decoration-none text-white col btn btn-dark"
              >
                Home
              </a>
              <span class="col-1"></span>

            </div>
          </div>
        </div>
      </div>
    </div>

    <script
      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
      integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
      crossorigin="anonymous"
    ></script>
  </body>
</html>
