From 79c6a7588e6723af74f94d1020ec6e80ea14c6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?= Date: Mon, 11 Jun 2018 15:04:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/yilia/layout/_partial/archive.ejs | 31 ++++++++----------- themes/yilia/layout/_partial/article.ejs | 2 +- themes/yilia/layout/_partial/left-col.ejs | 10 +++--- themes/yilia/layout/_partial/tools.ejs | 18 +++++------ themes/yilia/source-src/css/archive.scss | 13 +++----- .../yilia/source-src/css/article-inner.scss | 6 ---- themes/yilia/source-src/css/footer.scss | 2 -- themes/yilia/source-src/css/left.scss | 27 +++++++++------- themes/yilia/source/css/main.css | 2 +- themes/yilia/webpack.config.js | 2 +- 10 files changed, 50 insertions(+), 63 deletions(-) diff --git a/themes/yilia/layout/_partial/archive.ejs b/themes/yilia/layout/_partial/archive.ejs index 9f8226c..5238781 100644 --- a/themes/yilia/layout/_partial/archive.ejs +++ b/themes/yilia/layout/_partial/archive.ejs @@ -1,16 +1,14 @@ -<% if (pagination == 2){ %> - <% page.posts.each(function(post){ %> +<% if (pagination == 2){ + page.posts.each(function(post){ %> <%- partial('article', {post: post, index: true}) %> - <% }) %> -<% } else { %> - <% var last; %> - <% page.posts.each(function(post, i){ %> - <% var year = post.date.year(); %> - <% if (last != year){ %> - <% if (last != null){ %> - - <% } %> - <% last = year; %> + <% }) + } else { + var last; + page.posts.each(function(post, i){ + var year = post.date.year(); + if (last != year){ + if (last != null){ %><% } + last = year; %>
<%= year %> @@ -18,12 +16,9 @@
<% } %> <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> - <% }) %> - <% if (page.posts.length){ %> -
- <% } %> -<% } %> -<% if (page.total > 1){ %> + <% }) + if (page.posts.length){ %><% }} + if (page.total > 1){ %>