Remove: paginator 组件,优化 home-post 组件

This commit is contained in:
XPoet 2020-03-20 16:31:20 +08:00
parent 44d28e6ab3
commit 30a881eb4f
5 changed files with 34 additions and 31 deletions

View File

@ -21,9 +21,22 @@
</li>
<% }) %>
</ul>
<div class="paginator">
<% if (page.prev) { %>
<a class="prev btn"
href="<%- url_for(page.prev == 1 ? '':'/page/' + page.prev) %>"
role="navigation"
><%- __('prev') %></a>
<% } %>
<!-- 分页器 -->
<%- partial('paginator') %>
<% if (page.next) { %>
<a class="next btn"
href="<%- url_for('/page/' + page.next) %>"
role="navigation"
><%- __('next') %></a>
<% } %>
</div>
<% } %>
</div>

View File

@ -1,9 +0,0 @@
<!-- 分页器 -->
<!-- https://hexo.io/zh-cn/docs/helpers#paginator -->
<div class="paginator">
<%- paginator({
prev_text: __('prev'),
next_text: __('next'),
escape: false
}) %>
</div>

View File

@ -55,6 +55,24 @@
}
}
.paginator {
padding-bottom 40px
.page-number {
display none !important
}
a.prev {
float left
}
a.next {
float right
}
}
}

View File

@ -1,18 +0,0 @@
/* */
.paginator {
padding-bottom 40px
.page-number {
display none !important
}
a.prev {
float left
}
a.next {
float right
}
}

View File

@ -13,6 +13,5 @@
@import "common/category-post.styl"
@import "common/tag-post.styl"
@import "common/site-info.styl"
@import "common/paginator.styl"
@import "highlight"
@import "variables.styl"