This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.ftl
50 lines (47 loc) · 1.5 KB
/
index.ftl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<#include "module/macro.ftl">
<@layout title="${blog_title!}">
<h1>公告</h1>
<p>
${settings.index_notice!}
</p>
<h1>文章列表</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="index" page="${posts.number}" total="${posts.totalPages}" display="3">
<#if pagination.hasPrev>
<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>
</li>
</#list>
<#if pagination.hasNext>
<li>
<a href="${pagination.nextPageFullPath!}">
下一页
</a>
</li>
</#if>
</@paginationTag>
</ul>
<#else>
<span>当前只有一页</span>
</#if>
</@layout>