Skip to content

Commit

Permalink
refactor: variable modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Mar 7, 2020
1 parent b1701a8 commit c0309ef
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions archives.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
</ul>
</div>
<#if posts.totalPages gt 1>
<@postTag method="pagination" page="${posts.number}" total="${posts.totalPages}" display="3" isArchives="true">
<@paginationTag method="archives" page="${posts.number}" total="${posts.totalPages}" display="3">
<div class="pagination">
<ul class="clearfix">
<#if pagination.hasPrev>
<li class="pre pagbuttons">
<a class="btn" role="navigation" href="${pagination.prePageFullPath!}">上一页</a>
<a class="btn" role="navigation" href="${pagination.prevPageFullPath!}">上一页</a>
</li>
</#if>
<#if pagination.hasNext>
Expand All @@ -40,7 +40,7 @@
</#if>
</ul>
</div>
</@postTag>
</@paginationTag>
</#if>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions category.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<div class="content">
<#include "module/post_entry.ftl">
<#if posts.totalPages gt 1>
<@categoryTag method="pagination" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
<div class="pagination">
<ul class="clearfix">
<#if pagination.hasPrev>
<li class="pre pagbuttons">
<a class="btn" role="navigation" href="${pagination.prePageFullPath!}">上一页</a>
<a class="btn" role="navigation" href="${pagination.prevPageFullPath!}">上一页</a>
</li>
</#if>
<#if pagination.hasNext>
Expand All @@ -22,7 +22,7 @@
</#if>
</ul>
</div>
</@categoryTag>
</@paginationTag>
</#if>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<div class="content">
<#include "module/post_entry.ftl">
<#if posts.totalPages gt 1>
<@postTag method="pagination" page="${posts.number}" total="${posts.totalPages}" display="3" isArchives="false">
<@paginationTag method="index" page="${posts.number}" total="${posts.totalPages}" display="3">
<div class="pagination">
<ul class="clearfix">
<#if pagination.hasPrev>
<li class="pre pagbuttons">
<a class="btn" role="navigation" href="${pagination.prePageFullPath!}">上一页</a>
<a class="btn" role="navigation" href="${pagination.prevPageFullPath!}">上一页</a>
</li>
</#if>
<#if pagination.hasNext>
Expand All @@ -22,7 +22,7 @@
</#if>
</ul>
</div>
</@postTag>
</@paginationTag>
</#if>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions post.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<a class="btn" role="navigation" href="${nextPost.fullPath!}" title="${nextPost.title}">下一篇</a>
</li>
</#if>
<#if prePost??>
<#if prevPost??>
<li class="pre pagbuttons">
<a class="btn" role="navigation" href="${prePost.fullPath!}" title="${prePost.title}">上一篇</a>
<a class="btn" role="navigation" href="${prevPost.fullPath!}" title="${prevPost.title}">上一篇</a>
</li>
</#if>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions tag.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<div class="content">
<#include "module/post_entry.ftl">
<#if posts.totalPages gt 1>
<@tagTag method="pagination" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${tag.slug!}">
<@paginationTag method="tagPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${tag.slug!}">
<div class="pagination">
<ul class="clearfix">
<#if pagination.hasPrev>
<li class="pre pagbuttons">
<a class="btn" role="navigation" href="${pagination.prePageFullPath!}">上一页</a>
<a class="btn" role="navigation" href="${pagination.prevPageFullPath!}">上一页</a>
</li>
</#if>
<#if pagination.hasNext>
Expand All @@ -22,7 +22,7 @@
</#if>
</ul>
</div>
</@tagTag>
</@paginationTag>
</#if>
</div>
</div>
Expand Down

0 comments on commit c0309ef

Please sign in to comment.