halo-theme-Single/module/module_post.ftl

54 lines
2.4 KiB
Plaintext

<#include "module_homeSocial.ftl" />
<#--判断页面显示标题-->
<#if is_tag??>
<section class="home-title">
<h1>包含“${tag.name}”标签的文章</h1>
</section>
</#if>
<#if is_category??>
<section class="home-title">
<h1>“${category.name}”分类下的文章</h1>
</section>
</#if>
<#if is_search??>
<section class="home-title">
<h1>包含“${keyword!}”关键字的文章</h1>
</section>
</#if>
<#--显示文章-->
<section class="home-posts">
<#list posts.content as post>
<div class="post-item">
<h2>
<a href="${post.fullPath!}">${post.title!}</a>
</h2>
<#--显示文章简介-->
<p>${post.summary!}</p>
<#--文章标签等-->
<div class="post-meta">
<time class="date">
${post.createTime?string('yyyy-MM-dd')!}
</time>
<span class="category">
<#list post.categories as category>
<a href="${category.fullPath!}">
${category.name!}
</a>
</#list>
</span>
<span class="tags">
<#list post.tags as tag>
<a href="${tag.fullPath}" class="tag">${tag.name}</a>
</#list>
</span>
<span class="comments">
${post.commentCount!}°C
</span>
<span class="visits">
${post.visits!}
</span>
</div>
</div>
</#list>
</section>