Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (73 sloc) 3.46 KB
<div class="entry-comments">
{% if site.repository and site.staticman.branch %}
{% if site.data.comments[page.slug] %}
<!-- Start static comments -->
<div id="comments" class="js-comments">
<header class="section-title">
<h3>{% if site.data.comments[page.slug].size > 1 %}{{ site.data.comments[page.slug] | size | append: ' ' }}{% endif %}Comments</h3>
</header>
{% assign count = 0 %}
{% assign comments = site.data.comments[page.slug] %}
{% assign comments = (comments | sort) %}
{% for comment in comments %}
{% if comment[1].replying_to == "" %}
<!-- Count = {{ count }} <br />
Index = {{ forloop.index }} <br />
IndexMath = {{ forloop.index | minus: count }} -->
{% assign index = (forloop.index | minus: count) %}
{% assign r = comment[1].replying_to %}
{% assign replying_to = r | to_integer %}
{% assign avatar = comment[1].avatar %}
{% assign email = comment[1].email %}
{% assign name = comment[1].name %}
{% assign url = comment[1].url %}
{% assign date = comment[1].date %}
{% assign message = comment[1].message %}
{% include comment.html index=index replying_to=replying_to avatar=avatar email=email name=name url=url date=date message=message %}
{% else %}
{% assign count = count | plus: 1 %}
{% endif %}
{% endfor %}
</div>
<!-- End static comments -->
<!-- <h1>Test</h1>
site.data.comments[page.slug] <br/>
{{ site.data.comments[page.slug] }}
<br /><br />
<h1>Test 2</h1>
(site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""' | sort: 'date') <br />
{{ (site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""' | sort: 'date') }}
<br /><br />
<h1>Test 3</h1>
(site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""' | sort: 'date' | reverse) <br />
{{ (site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""' | sort: 'date' | reverse) }}
<br /><br />
<h1>Test 4</h1>
((site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""' | sort: 'date') | reverse) <br />
{{ ((site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""' | sort: 'date') | reverse) }}
<br /><br />
<h1>Test 5</h1>
((site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""') <br />
{{ ((site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""') }}
<br /><br />
<h1>test 6</h1>
((site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""') | sort: 'date' | reverse) <br />
{{ ((site.data.comments[page.slug] | where_exp: 'item', 'item.replying_to == ""') | sort: 'date' | reverse) }}
<br /><br />
<h1>test 7</h1>
comments <br />
{{ comments }}
<br /><br />
<h1>test 8</h1>
comments | sort <br />
{{ comments | sort }}
<br /><br />
<h1>test 9</h1>
comments | sort | reverse <br />
{{ comments | sort | reverse }}
<br /><br />
<h2>Test 27</h2> -->
{% endif %}
{% include comment-form.html %}
{% endif %}
</div>