Skip to content

Commit aacc15d

Browse files
committed
update
1 parent 59e0a9a commit aacc15d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

layout/_partial/archive.ejs

+8-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@
1313
<% } %>
1414

1515
<section class="post-list">
16-
<% page.posts.each(function(post){ %>
17-
<% if (post.top == true) { %>
16+
<% if (page.prev == 0) { %>
17+
<% site.posts.each(function(post){ %>
18+
<% if (post.top) { %>
1819
<div class='post-wrapper'>
19-
<%- partial('post', {post: post}) %>
20+
<%- partial('post', {post: post}) %>
2021
</div>
2122
<% } %>
22-
<% }) %>
23+
<% }) %>
24+
<% } %>
2325
<% page.posts.each(function(post){ %>
24-
<% if (!post.top || post.top != true) { %>
26+
<% if (!post.top) { %>
2527
<div class='post-wrapper'>
26-
<%- partial('post', {post: post}) %>
28+
<%- partial('post', {post: post}) %>
2729
</div>
2830
<% } %>
2931
<% }) %>

layout/_partial/meta.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
<% } %>
5454
<% } %>
5555

56-
<% if(isPostList && post.top == true && (!post.meta || post.meta.top != false)){ %>
56+
<% if(isPostList && post.top && (!post.meta || post.meta.top != false)){ %>
5757
<div class="metatag top">
58-
<i class="fas fa-angle-double-up fa-fw" aria-hidden="true"></i>&nbsp;<%- __('post.top') %>
58+
<i class="fas fa-angle-double-up fa-fw" aria-hidden="true"></i>&nbsp;<%- post.top != true ? post.top : __('post.top') %>
5959
</div>
6060
<% } %>
6161

0 commit comments

Comments
 (0)