summaryrefslogtreecommitdiff
path: root/layout/index.ejs
blob: 9d0d7bd81649d4c36255e66af66ea6f502e92bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<section class="posts">
    <% page.posts.each(function (post) { %>
        <article class="post">
            <% if (post.thumbnail) { %> 
                <% if (theme.lazyload) { %>
                    <div class="post-thumbnail lazy" data-bg="<%= post.thumbnail %>"></div>
                <% } else { %>
                    <div class="post-thumbnail" style="background-image: url('<%= post.thumbnail %>');"></div>
                <% } %>
            <% } %>
            <h1 class="post-title"><%= post.title %></h1>
            <% if (post.excerpt) { %>
                <div class="post-excerpt"><%- post.excerpt %></div>
            <% } else { %>
                <div class="post-content"><%- post.content %></div>
            <% } %>
        </article>
    <% }) %>
</section>