halo-theme-xinac-fantastic/search.ftl

39 lines
2.1 KiB
Plaintext
Raw Normal View History

2019-10-02 16:15:37 +00:00
<#include "layout/layout.ftl">
<#include "layout/common/article.ftl">
<@layout title="搜索:${keyword} - ${options.blog_title!}" keywords="${options.seo_keywords!}" description="${options.seo_description!}" canonical="${context!}/search?keyword=${keyword}">
<#list posts.content as post>
<@article post,'index','null',true />
</#list>
<#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>
2019-10-11 15:43:31 +00:00
<li><a class="pagination-link " href="${context!}/search/page/${r}?keyword=${keyword}">${r}</a></li>
2019-10-02 16:15:37 +00:00
</#if>
</#list>
</ul>
</nav>
</div>
<#else>
<div class="level">
<div class="level-item has-text-centered">
没有你要找的内容『${keyword}』
</div>
</div>
</#if>
</@layout>