1 Star 0 Fork 4

Halo/halo-theme-anatole

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
categories.ftl 3.82 KB
一键复制 编辑 原始数据 按行查看 历史
Ryan Wang 提交于 2022-05-21 20:22 . refactor: code cleanup
<#include "./module/page-heading.ftl" />
<@layout.extends name="module/layout.ftl">
<@layout.put block="title">分类目录 - ${blog_title!}</@layout.put>
<@layout.put block="content">
<@categoryTag method="count">
<#assign count="${count!}" />
</@categoryTag>
<@page_heading title="分类目录" subtitle="${count!0}" />
<div class="post-page">
<div class="post animated fadeInDown">
<div class="grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2">
<@categoryTag method="list">
<#list categories?sort_by('postCount')?reverse as category>
<div>
<a href="${category.fullPath!}" class="hover:underline underline-offset-1">
<div class="inline-flex text-base font-medium text-gray-800 items-center">
<i class="iconify w-5 h-5" data-icon="mdi:folder-outline"></i>
<span class="ml-2">
${category.name!}
<sup class="text-gray-400 ml-1">${category.postCount!}</sup>
</span>
</div>
</a>
<div class="mt-3">
<@postTag method="listByCategoryId" categoryId="${category.id?c}">
<div class="flex flex-col pl-5 gap-y-2">
<#if posts?size gt 0>
<#list posts?sort_by("createTime")?reverse as post>
<#if post_index lt 10>
<div class="flex justify-between">
<a href="${post.fullPath!}"
class="text-sm text-black/80 hover:text-black hover:underline hover:font-medium">${post.title!}</a>
<span class="text-sm text-gray-300">${post.createTime?string("yyyy-MM-dd HH:mm")}</span>
</div>
</#if>
</#list>
<#if posts?size gt 10>
<div class="flex justify-end mt-2">
<a href="${category.fullPath!}"
class="text-sm text-black/60 hover:text-black hover:underline hover:font-medium inline-flex items-center">
<i class="iconify mr-2"
data-icon="mdi:unfold-more-vertical"></i>
更多
</a>
</div>
</#if>
<#else>
<div class="text-sm text-gray-300">此分类没有文章</div>
</#if>
</div>
</@postTag>
</div>
</div>
</#list>
</@categoryTag>
</div>
</div>
</div>
</@layout.put>
</@layout.extends>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
CSS
1
https://gitee.com/halo-dev/halo-theme-anatole.git
[email protected]:halo-dev/halo-theme-anatole.git
halo-dev
halo-theme-anatole
halo-theme-anatole
master

搜索帮助