From aacc15d242a2107474b7e01f2925a759d9e75fb9 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Wed, 2 Jan 2019 10:09:38 +0800 Subject: [PATCH] update --- layout/_partial/archive.ejs | 14 ++++++++------ layout/_partial/meta.ejs | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/layout/_partial/archive.ejs b/layout/_partial/archive.ejs index 93c3bf3..83314a1 100755 --- a/layout/_partial/archive.ejs +++ b/layout/_partial/archive.ejs @@ -13,17 +13,19 @@ <% } %>
- <% page.posts.each(function(post){ %> - <% if (post.top == true) { %> + <% if (page.prev == 0) { %> + <% site.posts.each(function(post){ %> + <% if (post.top) { %>
- <%- partial('post', {post: post}) %> + <%- partial('post', {post: post}) %>
<% } %> - <% }) %> + <% }) %> + <% } %> <% page.posts.each(function(post){ %> - <% if (!post.top || post.top != true) { %> + <% if (!post.top) { %>
- <%- partial('post', {post: post}) %> + <%- partial('post', {post: post}) %>
<% } %> <% }) %> diff --git a/layout/_partial/meta.ejs b/layout/_partial/meta.ejs index c41a6fa..0b7b317 100644 --- a/layout/_partial/meta.ejs +++ b/layout/_partial/meta.ejs @@ -53,9 +53,9 @@ <% } %> <% } %> - <% if(isPostList && post.top == true && (!post.meta || post.meta.top != false)){ %> + <% if(isPostList && post.top && (!post.meta || post.meta.top != false)){ %>
-  <%- __('post.top') %> +  <%- post.top != true ? post.top : __('post.top') %>
<% } %>