summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoge <[email protected]>2021-05-03 18:36:27 +0800
committerDoge <[email protected]>2021-05-03 18:36:27 +0800
commit8e1d8e76a89785746dda94b609dba4f38e7f69cb (patch)
treeafbd22735839464e12c7bdb0dd8c6a35bc7a9e05
parentaffca0d5e31f862b3a5022bd49f40cea227707a2 (diff)
downloadchromate-8e1d8e76a89785746dda94b609dba4f38e7f69cb.tar.gz
chromate-8e1d8e76a89785746dda94b609dba4f38e7f69cb.tar.bz2
chromate-8e1d8e76a89785746dda94b609dba4f38e7f69cb.zip
Show index page
-rw-r--r--.DS_Storebin6148 -> 0 bytes
-rw-r--r--layout/index.ejs20
2 files changed, 19 insertions, 1 deletions
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 73f67c2..0000000
--- a/.DS_Store
+++ /dev/null
Binary files differ
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