summaryrefslogtreecommitdiff
path: root/themes/theme/layout/partials/post_gallery.ejs
blob: 488270d3d08279b0416b4700465e5829bf28d92b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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>