<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Balliston Online Shop</title>
    <link rel="stylesheet" href="/styles/style.css">
</head>
<body>
    <nav>
        <div class="site-title">
            <a href="/">Balliston</a>
            <p>Balliston.com website</p>
        </div>
        <ul>
            <li><a href="/">Blogs</a></li>
            <li><a href="/about">About</a></li>
            <li><a href="/blogs/create">New Blog</a></li>
        </ul>
    </nav>
    <section class="blogs">
        <ul>
            <% images.forEach(image => { %>
                <li>
                  <a class="single" href="/gallery/<%= image._id %>">
                    <% const url = '/images/' + image.imageUrl + '.jpg'; %>
                    <div class="img-con">
                        <h2><%= image.title %></h2>
                        <img src="<%= url %>" alt="<%= image.title %>" />  
                    </div>
                  </a>
                </li>
            <% }); %>
        </ul>
    </section>
    
</body>
</html>