forked from xzhuz/halo-theme-xue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archives.ftl
49 lines (49 loc) · 2.76 KB
/
archives.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<#include "module/macro.ftl">
<@layout title="${settings.achieve_title!'归档'} | ${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 settings.archives_patternimg?? && settings.archives_patternimg!=''>
<div class="cover-bg bottom-0 left-0 right-0 top-0 opacity-30 absolute">
<img src="${settings.archives_patternimg!}"
class="h-full w-full left-0 object-cover absolute top-0 dark:filter-60 no-zoom"
alt="${settings.achieve_title!'归档'}">
</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">
${settings.achieve_title!'归档'}
</h2>
<#-- <hr class="text-center bg-red-300 h-0.5 border-none w-20 mx-auto -mt-5 mb-3"/>-->
</div>
</header>
<div class="mx-auto px-10 my-16 max-w-5xl tracking-wider md:leading-relaxed sm:leading-normal fade-up" id="pageContainer">
<@postTag method="archiveMonth">
<#assign year="">
<#list archives as archive>
<section class="archive-year pt-0.5 pb-0.5 px-0 relative border-transparent">
<#if archive.year?c != year>
<h1 class="m-0 leading-9 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-900 relative">${archive.year?c}</h1>
<#assign year="${archive.year?c}">
</#if>
<div class="relative pl-12">
<header class="absolute archive-hd py-0 pl-2.5 pr-2.5 rounded left-6 text-white uppercase font-semibold leading-loose mt-6 af-bg-fff bg-gray-400 dark:bg-gray-700 dark:text-gray-100">
${archive.month!} 月
</header>
<span class="">
<#list archive.posts?sort_by("createTime")?reverse as post>
<a class="archive-info transition-colors relative block ml-6 px-0 pt-2 pb-2 leading-8" href="${post.fullPath!}">
<span class="archive-date float-left pr-2 whitespace-nowrap tracking-wide text-sm opacity-60 dark:text-gray-300" style="line-height: inherit !important;">${post.createTime?string('MM-dd')}</span>
<span class="archive-title bg-box-shadow table-cell text-lg dark:text-gray-300" style="line-height: inherit !important; position: relative">${post.title!}</span>
</a>
</#list>
</span>
</div>
</section>
</#list>
</@postTag>
</div>
</main>
</@layout>