Skip to content

Commit

Permalink
Merge pull request #2 from halo-dev/require-1.3.0
Browse files Browse the repository at this point in the history
Require 1.3.0
  • Loading branch information
ruibaby authored Mar 25, 2020
2 parents ba9b1db + e0088b2 commit 7bc82e6
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 88 deletions.
32 changes: 17 additions & 15 deletions archives.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,23 @@
<#if posts.getTotalPages() gt 0>
<div class="card card-transparent">
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<div class="pagination-previous<#if posts.number gt 0><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${prePageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if posts.getTotalPages() gt posts.number+1><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list rainbow as r>
<#if r == posts.number+1>
<li><a class="pagination-link is-current" href="${context!}/page/${posts.number+1}">${posts.number+1}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${context!}/page/${r}">${r}</a></li>
</#if>
</#list>
</ul>
<@paginationTag method="archives" page="${posts.number}" total="${posts.totalPages}" display="3">
<div class="pagination-previous<#if pagination.hasPrev><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.prevPageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if pagination.hasNext><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<li><a class="pagination-link is-current" href="${number.fullPath!}">${number.page!}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${number.fullPath!}">${number.page!}</a></li>
</#if>
</#list>
</ul>
</@paginationTag>
</nav>
</div>
</#if>
Expand Down
32 changes: 17 additions & 15 deletions index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@
<#if posts.getTotalPages() gt 0>
<div class="card card-transparent">
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<div class="pagination-previous<#if posts.number gt 0><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${prePageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if posts.getTotalPages() gt posts.number+1><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list rainbow as r>
<#if r == posts.number+1>
<li><a class="pagination-link is-current" href="${context!}/page/${posts.number+1}">${posts.number+1}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${context!}/page/${r}">${r}</a></li>
</#if>
</#list>
</ul>
<@paginationTag method="index" page="${posts.number}" total="${posts.totalPages}" display="3">
<div class="pagination-previous<#if pagination.hasPrev><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.prevPageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if pagination.hasNext><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<li><a class="pagination-link is-current" href="${number.fullPath!}">${number.page!}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${number.fullPath!}">${number.page!}</a></li>
</#if>
</#list>
</ul>
</@paginationTag>
</nav>
</div>
</#if>
Expand Down
32 changes: 17 additions & 15 deletions layout/category.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@
<#if posts.getTotalPages() gt 0>
<div class="card card-transparent">
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<div class="pagination-previous<#if posts.number gt 0><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${prePageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if posts.getTotalPages() gt posts.number+1><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list rainbow as r>
<#if r == posts.number+1>
<li><a class="pagination-link is-current" href="${context!}/categories/${category.slugName!}/page/${posts.number+1}">${posts.number+1}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${context!}/categories/${category.slugName!}/page/${r}">${r}</a></li>
</#if>
</#list>
</ul>
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
<div class="pagination-previous<#if pagination.hasPrev><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.prevPageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if pagination.hasNext><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<li><a class="pagination-link is-current" href="${number.fullPath!}">${number.page!}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${number.fullPath!}">${number.page!}</a></li>
</#if>
</#list>
</ul>
</@paginationTag>
</nav>
</div>
</#if>
8 changes: 4 additions & 4 deletions layout/common/article.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@
</#if>
</#if>

<#if !index && nextPost?? && prePost??>
<#if !index && (nextPost?? || prevPost??)>
<div class="card card-transparent">
<div class="level post-navigation is-flex-wrap is-mobile">
<#if prePost??>
<#if prevPost??>
<div class="level-start">
<a class="level level-item has-link-grey article-nav-prev" href="${prePost.fullPath!}">
<a class="level level-item has-link-grey article-nav-prev" href="${prevPost.fullPath!}">
<i class="level-item fas fa-chevron-left"></i>
<span class="level-item">${prePost.title!}</span>
<span class="level-item">${prevPost.title!}</span>
</a>
</div>
</#if>
Expand Down
2 changes: 1 addition & 1 deletion layout/layout.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<@global.head />

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="//use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.4.1/css/all.min.css">
<link rel="stylesheet" href="//fonts.loli.net/css?family=Ubuntu:400,600|Source+Code+Pro">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/styles/atom-one-light.css">

Expand Down
32 changes: 17 additions & 15 deletions layout/tag.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@
<#if posts.getTotalPages() gt 0>
<div class="card card-transparent">
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<div class="pagination-previous<#if posts.number gt 0><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${prePageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if posts.getTotalPages() gt posts.number+1><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list rainbow as r>
<#if r == posts.number+1>
<li><a class="pagination-link is-current" href="${context!}/tags/${tag.slugName!}/page/${posts.number+1}">${posts.number+1}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${context!}/tags/${tag.slugName!}/page/${r}">${r}</a></li>
</#if>
</#list>
</ul>
<@paginationTag method="tagPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${tag.slug!}">
<div class="pagination-previous<#if pagination.hasPrev><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.prevPageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if pagination.hasNext><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<li><a class="pagination-link is-current" href="${number.fullPath!}">${number.page!}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${number.fullPath!}">${number.page!}</a></li>
</#if>
</#list>
</ul>
</@paginationTag>
</nav>
</div>
</#if>
2 changes: 1 addition & 1 deletion layout/widget/profile.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</div>
</nav>
<div class="level">
<a class="level-item button is-link is-rounded" href="${settings.profile_follow_url!'${context!}'}" target="_blank">关注我</a>
<a class="level-item button is-link is-rounded" href="${settings.profile_follow_url!'${blog_url!}'}" target="_blank">关注我</a>
</div>
<div class="level is-mobile">
<#if settings.social_github?? && settings.social_github!=''>
Expand Down
2 changes: 1 addition & 1 deletion layout/widget/recent_comments.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="media-content">
<div class="content">
<div><time class="has-text-grey is-size-7 is-uppercase" datetime="${comment.createTime!}">${comment.createTime?string('yyyy-MM-dd')}</time></div>
${comment.author!} : <a href="${context!}/archives/${comment.post.url!}#comment-wrapper" class="title has-link-black-ter is-size-6 has-text-weight-normal">${comment.content!}</a>
${comment.author!} : <a href="${comment.post.fullPath!}#comment-wrapper" class="title has-link-black-ter is-size-6 has-text-weight-normal">${comment.content!}</a>
</div>
</div>
</article>
Expand Down
2 changes: 1 addition & 1 deletion layout/widget/tagcloud.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
标签云
</h3>
<#list tags as tag>
<a href="${tag.fullPath!}" style="font-size:${tag.postCount+tag.name?length}px">${tag.name!}</a>
<a href="${tag.fullPath!}" style="font-size:${tag.postCount+tag.name?length+tag.slug?length}px">${tag.name!}</a>
</#list>
</div>
</div>
Expand Down
36 changes: 17 additions & 19 deletions search.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,23 @@
<#if posts.getTotalPages() gt 0>
<div class="card card-transparent">
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<div class="pagination-previous<#if posts.number gt 0><#else > is-invisible is-hidden-mobile</#if>">
<#if posts.number == 1>
<a class="is-flex-grow has-text-black-ter" href="${context!}/search?keyword=${keyword}">上一页</a>
<#else>
<a class="is-flex-grow has-text-black-ter" href="${context!}/search/page/${posts.number}?keyword=${keyword}">上一页</a>
</#if>
</div>
<div class="pagination-next<#if posts.getTotalPages() gt posts.number+1><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${context!}/search/page/${posts.number+2}?keyword=${keyword}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list rainbow as r>
<#if r == posts.number+1>
<li><a class="pagination-link is-current" href="${context!}/search/page/${posts.number+1}?keyword=${keyword}">${posts.number+1}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${context!}/search/page/${r}?keyword=${keyword}">${r}</a></li>
</#if>
</#list>
</ul>
<@paginationTag method="search" page="${posts.number}" total="${posts.totalPages}" display="3" keyword="${keyword!}">
<div class="pagination-previous<#if pagination.hasPrev><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.prevPageFullPath!}">上一页</a>
</div>
<div class="pagination-next<#if pagination.hasNext><#else > is-invisible is-hidden-mobile</#if>">
<a class="is-flex-grow has-text-black-ter" href="${pagination.nextPageFullPath!}">下一页</a>
</div>
<ul class="pagination-list is-hidden-mobile">
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<li><a class="pagination-link is-current" href="${number.fullPath!}">${number.page!}</a></li>
<#else>
<li><a class="pagination-link has-text-black-ter" href="${number.fullPath!}">${number.page!}</a></li>
</#if>
</#list>
</ul>
</@paginationTag>
</nav>
</div>
</#if>
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ description:
logo:
website: https://github.com/ppoffice/hexo-theme-icarus
repo: https://github.com/halo-dev/halo-theme-icarus
version: 2.6.1
version: 2.6.2
require: 1.3.0

0 comments on commit 7bc82e6

Please sign in to comment.