<div class="archives">
    <h1><%= __('Archives') %></h1>
    <div class="archive-grid">
        <% page.posts.forEach(function(post) { %>
            <article class="archive-card">
                <div class="card-dates">
                    <div class="card-date">
                        <img src="<%= url_for('images/date.svg')%>" alt="Post Date" width="16" height="16">
                        <time datetime="<%= post.date.toISOString() %>">
                            <%= post.date.format('YYYY-MM-DD HH:mm:ss') %>
                        </time>
                    </div>
                    <div class="card-update">
                        <img src="<%= url_for('images/update.svg')%>" alt="Post Update Date" width="16" height="16">
                        <time datetime="<%= post.updated.toISOString() %>">
                            <%= 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>
                <% } %>
            </article>
        <% }); %>
    </div>
</div>
<%- partial('partials/paginator') %>
