generated from halo-dev/halo-theme-quick-starter
-
Notifications
You must be signed in to change notification settings - Fork 19
/
post.ftl
111 lines (108 loc) · 6.51 KB
/
post.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<#include "layout/head.ftl">
<@head title="${post.title} | ${blog_title!}"/>
<div class="container sidebar-position-right page-home">
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner">
<#include "layout/navbar.ftl">
<#include "layout/brand_wrapper.ftl">
<#include "layout/master.ftl">
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<section id="posts" class="posts-expand">
<article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
<div class="post-date">
<div class="post-month"> ${post.createTime?string('MM')}月</div>
<div class="post-day"> ${post.createTime?string('dd')}</div>
</div>
<#if (post.categories?size gt 0 )>
<#list post.categories as category>
<div class="post-badge">
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="${category.fullPath}" itemprop="url" rel="index">
<span itemprop="name">${category.name}</span>
</a>
</span>
</div>
</#list>
</#if>
<div class="post-block">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="${post.fullPath}"
itemprop="url">${post.title}</a>
</h1>
<div class="post-meta">
<span class="post-time" style="color: #00a7e0">
<span class="post-meta-item-icon"><i class="fa fa-calendar"></i></span>
<span class="post-meta-item-text">发表于</span>
<time title="Post created" itemprop="dateCreated datePublished"
datetime="${post.createTime}">
${post.createTime?string('yyyy-MM-dd')}
</time>
</span>
<span class="post-wordcount">
<span class="post-meta-divider">•</span>
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">字数统计</span>
<span title="字数统计">${post.wordCount?c}</span>
</span>
<span class="leancloud_visitors" style="color:#ff3f1a">
<span class="post-meta-divider">•</span>
<span class="post-meta-item-icon"><i class="far fa-eye"></i></span>
<span class="post-meta-item-text">被</span>
<span class="leancloud-visitors-count">${post.visits}</span>
<span class="post-meta-item-text">人看爆</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
${post.formatContent!}
</div>
<div class="post-share">分享到:</div>
<footer class="post-footer">
<div class="post-nav">
<#if prevPost??>
<div class="post-nav-next post-nav-item">
<a href="${prevPost.fullPath!}" rel="next" title="${prevPost.title!}">
<i class="fas fa-angle-left"></i> ${prevPost.title!}</a>
</div>
</#if>
<#if nextPost??>
<span class="post-nav-divider"></span>
<div class="post-nav-prev post-nav-item">
<a href="${nextPost.fullPath!}" rel="prev"
title="${nextPost.title!}">${nextPost.title!}
<i class="fas fa-angle-right"></i></a>
</div>
</#if>
</div>
</footer>
</div>
</article>
</section>
</div>
<script>$('pre').addClass("line-numbers");</script>
<#if !post.disallowComment!false>
<div id="comments" class="comments">
<#include "layout/comment.ftl">
<@comment post=post type="post" />
</div>
<#else>
<div class="comments" style="text-align: center;font-size: 16px;padding: 16px">
<i class="fa fa-times" style="font-size: 18px"></i> 评论已关闭
</div>
</#if>
</div>
<#include "layout/post_sidebar.ftl">
</div>
</main>
<#include "layout/footer.ftl">
<#include "layout/back_to_top.ftl">
</div>
<#include "layout/tail.ftl">