<!DOCTYPE html>
<html lang="en">
  <head>
    <%- include('./partials/head') %>
    <title>Homepage</title>
  </head>
  <body>
    <%- include('./partials/nav') %>

    <div class="container mt-3">
      <div class="row row-cols-4" style="margin-right: -90px;">
        <% blogs.forEach(blog => { %>
        <div class="col">
          <div class="card col" style="width: 18rem">
            <img src="<%= blog.coverImageURL %>" class="card-img-top" />
            <div class="card-body">
              <h5 class="card-title"><%= blog.title %></h5>
              <a href="/blog/<%= blog._id %>" class="btn btn-primary">View</a>
            </div>
          </div>
        </div>
        <% }) %>
      </div>
    </div>

    <%- include('./partials/scripts') %>
  </body>
</html>
