forked from xzhuz/halo-theme-xue
-
Notifications
You must be signed in to change notification settings - Fork 1
/
category.ftl
34 lines (34 loc) · 1.61 KB
/
category.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
<#include "module/macro.ftl">
<@layout title="分类:${category.name} | ${options.blog_title!} ">
<main class="mx-auto" id="container">
<header class="bg-gray-900 table fade-down relative w-full opacity-95 z-10 h-1/2">
<#if category.thumbnail?? && category.thumbnail != ''>
<div class="cover-bg bottom-0 left-0 right-0 top-0 opacity-30 absolute">
<img src="${category.thumbnail!}"
class="h-full w-full left-0 object-cover absolute top-0 dark:filter-60 no-zoom"
alt="${category.name}">
</div>
<#else>
<div class="placeholder-bg"></div>
</#if>
<div class="h-96 align-middle table-cell relative w-full index flex justify-center">
<h2 class="text-white mb-5 mt-4 leading-loose relative w-full text-4xl text-center dark:text-gray-300">
${category.name} <sup>${posts.totalElements}</sup>
</h2>
</div>
</header>
<div class="mx-auto fade-up pt-4 <#if settings.posts_style!true>px-5 md:px-0 max-w-xl sm:max-w-2xl md:max-w-3xl lg:max-w-5xl <#else> px-5 max-w-4xl</#if>">
<#if settings.posts_style!true>
<#include "module/widget/post_cards.ftl">
<#else>
<#include "module/widget/post_list.ftl">
</#if>
<#-- 分页-->
<nav class="pagination flex flex-row justify-center my-8" role="navigation" aria-label="pagination">
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
<#include "module/widget/pagination.ftl">
</@paginationTag>
</nav>
</div>
</main>
</@layout>