diff options
author | Doge <[email protected]> | 2021-05-03 18:36:27 +0800 |
---|---|---|
committer | Doge <[email protected]> | 2021-05-03 18:36:27 +0800 |
commit | 8e1d8e76a89785746dda94b609dba4f38e7f69cb (patch) | |
tree | afbd22735839464e12c7bdb0dd8c6a35bc7a9e05 /layout/index.ejs | |
parent | affca0d5e31f862b3a5022bd49f40cea227707a2 (diff) | |
download | chromate-8e1d8e76a89785746dda94b609dba4f38e7f69cb.tar.gz chromate-8e1d8e76a89785746dda94b609dba4f38e7f69cb.tar.bz2 chromate-8e1d8e76a89785746dda94b609dba4f38e7f69cb.zip |
Show index page
Diffstat (limited to 'layout/index.ejs')
-rw-r--r-- | layout/index.ejs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/layout/index.ejs b/layout/index.ejs index 5e1c309..9d0d7bd 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -1 +1,19 @@ -Hello World
\ No newline at end of file +<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>
\ No newline at end of file |