File tree 2 files changed +48
-16
lines changed
2 files changed +48
-16
lines changed Original file line number Diff line number Diff line change
1
+ {% load blog_tags %}
2
+ < li class ="comment even thread-even depth-{{ depth }} parent " id ="comment-{{ comment_item.pk }} "
3
+ style ="margin-left: {% widthratio depth 1 3 %}rem ">
4
+ < div id ="div-comment-{{ comment_item.pk }} " class ="comment-body ">
5
+ < div class ="comment-author vcard ">
6
+ < img alt =""
7
+ src ="{{ comment_item.author.email|gravatar_url:150 }} "
8
+ srcset ="{{ comment_item.author.email|gravatar_url:150 }} "
9
+ class ="avatar avatar-96 photo " height ="96 " width ="96 ">
10
+ < cite class ="fn ">
11
+ < a rel ="nofollow "
12
+ {% if comment_item.author.is_superuser %}
13
+ href ="{{ comment_item.author.get_absolute_url }} "
14
+ {% else %}
15
+ href ="# "
16
+ {% endif %}
17
+ rel ="external nofollow "
18
+ class ="url "> {{ comment_item.author.username }}
19
+ </ a >
20
+ </ cite >
21
+ < span class ="says "> 说道:</ span >
22
+ </ div >
23
+
24
+ < div class ="comment-meta commentmetadata ">
25
+ {{ comment_item.created_time }}
26
+ </ div >
27
+
28
+ < p > {{ comment_item.body |escape|custom_markdown }}</ p >
29
+
30
+ < div class ="reply "> < a rel ="nofollow " class ="comment-reply-link "
31
+ href ="javascript:void(0) "
32
+ onclick ="do_reply({{ comment_item.pk }}) "
33
+ aria-label ="回复给{{ comment_item.author.username }} "> 回复</ a > </ div >
34
+ </ div >
35
+
36
+ </ li > <!-- #comment-## -->
37
+ {% query article_comments parent_comment=comment_item as cc_comments %}
38
+ {% for cc in cc_comments %}
39
+ {% with comment_item=cc template_name="comments/tags/comment_item_tree.html" %}
40
+ {% with depth=depth|add:1 %}
41
+ {% include template_name %}
42
+ {% endwith %}
43
+ {% endwith %}
44
+ {% endfor %}
Original file line number Diff line number Diff line change 11
11
{% if article_comments %}
12
12
{% cache 36000 article_comments article.id %}
13
13
< div id ="commentlist-container " class ="comment-tab " style ="display: block; ">
14
-
15
14
< ol class ="commentlist ">
16
15
{% query article_comments parent_comment=None as parent_comments %}
17
- {% for comment in parent_comments %}
18
- {% show_comment_item comment False %}
19
-
20
- {% parse_commenttree article_comments comment as childcomments %}
21
- {% if childcomments %}
22
- < ul class ="children ">
23
- {% for child in childcomments %}
24
- {% show_comment_item child True %}
25
-
26
- {% endfor %}
27
- </ ul > <!-- .children -->
28
- {% endif %}
29
-
30
-
16
+ {% for comment_item in parent_comments %}
17
+ {% with 0 as depth %}
18
+ {% include "comments/tags/comment_item_tree.html" %}
19
+ {% endwith %}
31
20
{% endfor %}
32
21
33
22
</ ol > <!--/.commentlist-->
34
23
35
-
36
24
</ div >
37
25
{% endcache %}
38
26
{% endif %}
You can’t perform that action at this time.
0 commit comments