Repository navigation
Expand file tree
/
Copy pathcomments.html
More file actions
107 lines (102 loc) · 5.73 KB
/
Copy pathcomments.html
File metadata and controls
107 lines (102 loc) · 5.73 KB
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
#if(null != article)
<div id="${article.cid ?! 0}" class="comment-container">
<div id="comments" class="clearfix">
#if(article.allow_comment)
<span class="response">#if(null!=login_user) Hi,<a href="${login_user.home_url}" data-no-instant>${login_user.username}</a>
如果你想 <a href="/logout" title="注销" data-no-instant>注销</a> ? #end</span>
<form method="post" id="comment-form" class="comment-form" role="form" onsubmit="return TaleComment.subComment();">
<input type="hidden" name="coid" id="coid"/>
<input type="hidden" name="cid" id="cid" value="${article.cid}"/>
<input type="hidden" name="_csrf_token" value="${_csrf_token}"/>
<input type="text" name="author" maxlength="12" id="author" class="form-control input-control clearfix"
placeholder="姓名 (*)" value="${login_user.username ?! ''}" required/>
<input type="email" name="mail" id="mail" class="form-control input-control clearfix" placeholder="邮箱 (*)"
value="${login_user.email ?! ''}" required/>
<input type="url" name="url" id="url" class="form-control input-control clearfix" placeholder="网址 (http://)"
value="${login_user.home_url ?! ''}"/>
<textarea name="text" id="textarea" class="form-control" placeholder="基佬,留下你的评论." required minlength="5" maxlength="2000"></textarea>
<button type="submit" class="submit" id="misubmit">提交</button>
</form>
#else
<span class="response">评论已关闭.</span>
#end
#set( comments = comments(6) )
#if(!is_empty(comments))
<ol class="comment-list">
#for(comment : comments(6).list)
<li id="li-comment-${comment.coid}" class="comment-body comment-parent comment-odd">
<div id="comment-${comment.coid}">
<div class="comment-view" onclick="">
<div class="comment-header">
<img class="avatar" src="${gravatar(comment.mail)}?s=80&r=G&d=" title="${comment.author}"
width="80" height="80">
<span class="comment-author">
<a href="${comment.url}" target="_blank" rel="external nofollow">${comment.author}</a>
</span>
</div>
<div class="comment-content">
<span class="comment-author-at"></span>
<p>${article(comment.content)}</p>
</div>
<div class="comment-meta">
<time class="comment-time">${fmtdate(comment.created)}</time>
<span class="comment-reply">
<a rel="nofollow" onclick="TaleComment.reply('${comment.coid}');">回复</a>
</span>
</div>
</div>
</div>
#if(comment.levels > 0)
<div class="comment-children">
<ol class="comment-list">
#for(child : comment.children)
<li id="li-comment-${child.coid}"
class="comment-body comment-child comment-level-odd comment-odd">
<div id="comment-${child.coid}">
<div class="comment-view">
<div class="comment-header">
<img class="avatar" src="${gravatar(child.mail)}?s=80&r=G&d=" title="${child.author}" width="80" height="80">
<span class="comment-author comment-by-author">
<a href="${child.url}" target="_blank" rel="external nofollow">${child.author}</a>
</span>
</div>
<div class="comment-content">
<span class="comment-author-at">
${comment_at(child.parent)}
</span>
<p>${article(child.content)}</p>
</div>
<div class="comment-meta">
<time class="comment-time">${fmtdate(child.created)}</time>
<span class="comment-reply">
<a rel="nofollow" onclick="TaleComment.reply('${child.coid}');">回复</a>
</span>
</div>
</div>
</div>
</li>
#end
</ol>
</div>
#end
</li>
#end
</ol>
<div class="lists-navigator clearfix">
<ol class="page-navigator">
#if(comments.hasPrevPage)
<li class="prev"><a href="?cp=${comments.prevPage}#comments">←</a></li>
#end
#for(navIndex : comments.navPageNums)
<li #if(comments.pageNum== navIndex) class="current" #end><a href="?cp=${navIndex}#comments">${navIndex}</a></li>
#end
#if(comments.hasNextPage)
<li class="next"><a href="?cp=${comments.nextPage}#comments">→</a></li>
#end
</ol>
</div>
#end
</div>
</div>
#end
#include('/comm/tale_comment.html')