summaryrefslogtreecommitdiff
path: root/themes/theme/layout/partials/post_gallery.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'themes/theme/layout/partials/post_gallery.ejs')
-rw-r--r--themes/theme/layout/partials/post_gallery.ejs42
1 files changed, 42 insertions, 0 deletions
diff --git a/themes/theme/layout/partials/post_gallery.ejs b/themes/theme/layout/partials/post_gallery.ejs
new file mode 100644
index 00000000..488270d3
--- /dev/null
+++ b/themes/theme/layout/partials/post_gallery.ejs
@@ -0,0 +1,42 @@
+<div class="post-gallery">
+ <div class="post-gallery-list">
+ <% page.posts.each(function (post) { %>
+ <div class="post-gallery-item">
+ <div class="post-info">
+ <div class="tag-list">
+ <% if (post.tags && post.tags.data && post.tags.data.length > 0) {%>
+ <% post.tags.data.forEach(function(tag) { %>
+ <span class="post-tag">
+ <a href="<%-url_for(tag.path)%>">
+ <%=tag.name%>
+ </a>
+ </span>
+ <% }) %>
+ <% } %>
+ </div>
+ <div class="post-title">
+ <a href="<%=url_for(post.path)%>"</a>
+ <% if (post.title) {%>
+ <%= post.title %>
+ <% } else {%>
+ *Untitled
+ <% } %>
+ </a>
+ </div>
+ <span class="post-date">
+ <%- date(post.date, theme.date_format) %>
+ </span>
+ </div>
+ <div class="post-img">
+ <% if (post.featured_image) {%>
+ <img src="<%= url_for(post.featured_image)%>" alt="featured_image">
+ <% } %>
+ </div>
+ </div>
+ <div class="h-line-secondary"></div>
+ <% }) %>
+ </div>
+ <div id="paginator">
+ <%- partial('partials/paginator') %>
+ </div>
+</div>