halo-theme-Single/module/module_post.ftl

54 lines
2.4 KiB
Plaintext
Raw Normal View History

2022-06-22 00:55:06 +08:00
<#include "module_homeSocial.ftl" />
<#--判断页面显示标题-->
<#if is_tag??>
2022-04-15 13:11:12 +08:00
<section class="home-title">
2022-06-22 00:55:06 +08:00
<h1>包含“${tag.name}”标签的文章</h1>
2022-04-15 13:11:12 +08:00
</section>
</#if>
2022-05-27 01:33:50 +08:00
<#if is_category??>
2022-06-22 00:55:06 +08:00
<section class="home-title">
<h1>“${category.name}”分类下的文章</h1>
</section>
2022-05-27 01:33:50 +08:00
</#if>
<#if is_search??>
2022-06-22 00:55:06 +08:00
<section class="home-title">
<h1>包含“${keyword!}”关键字的文章</h1>
</section>
2022-05-27 01:33:50 +08:00
</#if>
2022-06-19 00:31:24 +08:00
<#--显示文章-->
2022-06-22 00:55:06 +08:00
<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>
2022-04-15 13:11:12 +08:00
</div>
2022-06-22 00:55:06 +08:00
</#list>
2022-06-19 00:31:24 +08:00
</section>