-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.ftl
35 lines (35 loc) · 1.34 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
<#include "module/page.ftl">
<@page title="${blog_title!}" pagetitle="${blog_title!}" slogn="${settings.index_slogn!}" cover="${settings.index_cover!'${theme_base!}/source/img/home-bg.jpg'}">
<#list posts.content as post>
<div class="post-preview">
<a href="${post.fullPath!}">
<h2 class="post-title">
${post.title!}
</h2>
<div class="post-content-preview">
${post.summary}
</div>
</a>
<p class="post-meta">
Posted by ${user.nickname!} on ${post.createTime?string("MM-dd,yyyy")}
</p>
</div>
<hr>
</#list>
<#if posts.totalPages gt 1>
<ul class="pager">
<@paginationTag method="index" page="${posts.number}" total="${posts.totalPages}" display="0">
<#if pagination.hasPrev>
<li class="previous">
<a href="${pagination.prevPageFullPath!}">← Newer Posts</a>
</li>
</#if>
<#if pagination.hasNext>
<li class="next">
<a href="${pagination.nextPageFullPath!}">Older Posts →</a>
</li>
</#if>
</@paginationTag>
</ul>
</#if>
</@page>