-
Notifications
You must be signed in to change notification settings - Fork 0
/
comment-trail.html
59 lines (58 loc) · 2.47 KB
/
comment-trail.html
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
{% capture src %}{{ include.src }}{% endcapture %}
<div
class="
comments"
id="{{ include.id }}">
{% if page.[src] %}
<div
id="comment-trail-{{ include.id }}"
class="comment-trail {% if page.[src] %}has-comments{% else %}no-comments{% endif %}">
{% assign count == 1 %}
{% for comment in page.[src] %}
{% if comment.older %}
<p
class="older-comments"
id="older-comments-{{ include.id }}">
<a
href="/feedback/older-comments.html#comment-trail-{{ include.id }}"
class="pat-inject"
data-pat-inject="
url: /feedback/older-comments.html;
source: #comment-trail-{{ include.id }};
target: #comment-trail-{{ include.id }}">Show older comments</a>
<span
class="counter">{{ comment.older }}</span>
</p>
{% else %}
{% include patterns/comment.html %}
{% endif %}
{% endfor %}
{% unless layout.auto_refresh_discussions == false %}
<!-- The link below refresh the comment trail at an interval of 30 seconds. The URL may be the page URL or a URL of a page that only contains the comment for perforamce optimisation. -->
<a
hidden href="{{ page.url }}"
class="pat-inject"
data-pat-inject="
source: #{{ include.id }}-size::element;
target: #{{ include.id }}-size::element;
trigger: autoload;
delay: 30s
&&
source: #comment-trail-{{ include.id }}::element;
target: #comment-trail-{{ include.id }}::element;
trigger: autoload;
delay: 30s">Refresh feed</a>
{% endunless %}
</div>
{% endif %}
{% capture local_action %}{{ field_action }}{% endcapture %}
{% unless page.url contains '-revisie' %}
{% unless page.url contains '-compare' %}
{% include patterns/message-box.html
id=include.id
visibility="false"
action=include.action
has-comments=include.has-comments %}
{% endunless %}
{% endunless %}
</div>