feature(pages): first draft
This commit is contained in:
66
tag.ftl
66
tag.ftl
@@ -1,45 +1,35 @@
|
||||
<#include "module/macro.ftl">
|
||||
<@layout title="标签:${tag.name} - ${blog_title!}">
|
||||
<h1>标签:${tag.name}</h1>
|
||||
<ul>
|
||||
<#list posts.content as post>
|
||||
<li>
|
||||
<a href="${post.fullPath!}">${post.title}</a>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
<h1>分页</h1>
|
||||
|
||||
<#if posts.totalPages gt 1>
|
||||
<ul>
|
||||
<@paginationTag method="tagPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${tag.slug!}">
|
||||
<#if pagination.hasPrev>
|
||||
<main>
|
||||
<#include "module/header.ftl">
|
||||
<div class="tag">
|
||||
<ul id="${tag.slug}">
|
||||
<div class="name">
|
||||
${tag.name}
|
||||
</div>
|
||||
<#list posts.content as post>
|
||||
<li>
|
||||
<a href="${pagination.prevPageFullPath!}">
|
||||
上一页
|
||||
</a>
|
||||
</li>
|
||||
</#if>
|
||||
<#list pagination.rainbowPages as number>
|
||||
<li>
|
||||
<#if number.isCurrent>
|
||||
<span class="current">第 ${number.page!} 页</span>
|
||||
<#else>
|
||||
<a href="${number.fullPath!}">第 ${number.page!} 页</a>
|
||||
</#if>
|
||||
<a href="${post.fullPath!}">${post.title}</a>
|
||||
<span>${post.createTime?string('MM-dd')}</span>
|
||||
</li>
|
||||
</#list>
|
||||
<#if pagination.hasNext>
|
||||
<li>
|
||||
<a href="${pagination.nextPageFullPath!}">
|
||||
下一页
|
||||
</ul>
|
||||
</div>
|
||||
<#if posts.totalPages gt 1>
|
||||
<@paginationTag method="tagPosts" page="${posts.number}" total="${posts.totalPages}" display="3">
|
||||
<div class="pagenav">
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}" class="pre">
|
||||
返回上页
|
||||
</a>
|
||||
</li>
|
||||
</#if>
|
||||
</@paginationTag>
|
||||
</ul>
|
||||
<#else>
|
||||
<span>当前只有一页</span>
|
||||
</#if>
|
||||
</#if>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}" class="next">
|
||||
更多文章
|
||||
</a>
|
||||
</#if>
|
||||
</div>
|
||||
</@paginationTag>
|
||||
</#if>
|
||||
</main>
|
||||
</@layout>
|
||||
|
||||
Reference in New Issue
Block a user