<div class="archives">
    <h1><%= page.tag %></h1>
    <div class="archive-grid">
        <% page.posts.forEach(function(post) { %>
            <div class="archive-card">
                <div class="card-dates">
                    <div class="card-date">
                        <img src="<%= url_for('images/date.svg')%>" alt="Date Icon" width="16" height="16">
                        <time datetime="<%= post.date.format('YYYY-MM-DD HH:mm:ss') %>">
                            <%= post.date.format('YYYY-MM-DD HH:mm:ss') %>
                        </time>
                    </div>
                    <div class="card-update">
                        <img src="<%= url_for('images/update.svg')%>" alt="Update Icon" width="16" height="16">
                        <time datetime="<%= post.updated.format('YYYY-MM-DD HH:mm:ss') %>">
                            <%= post.updated.format('YYYY-MM-DD HH:mm:ss') %>
                        </time>
                    </div>
                </div>
                <h2 class="card-title">
                    <a href="<%= url_for(post.path) %>"><%= post.title %></a>
                </h2>
                <% if(post.excerpt) { %>
                    <div class="card-excerpt">
                        <%- post.excerpt %>
                    </div>
                <% } %>
                <% if(post.tags && post.tags.length) { %>
                    <div class="card-tags">
                        <% post.tags.forEach(function(tag) { %>
                            <a href="<%= url_for(tag.path) %>" class="tag">#<%= tag.name %></a>
                        <% }) %>
                    </div>
                <% } %>
            </div>
        <% }); %>
    </div>
</div>
<%- partial('partials/paginator') %>