2020-02-05 19:57:58 +01:00
|
|
|
<div>
|
2020-01-26 13:35:56 +01:00
|
|
|
{% capture mail %}{{ site.author.email }}{% endcapture %}
|
2017-02-13 19:25:54 +01:00
|
|
|
{% assign mail_substring = mail | split: '@' %}
|
|
|
|
{% assign mail_username = mail_substring[0] %}
|
|
|
|
{% assign mail_domain = mail_substring[1] %}
|
2017-04-15 16:33:36 +02:00
|
|
|
{% if page.is_post %}
|
|
|
|
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".md" | remove: "_posts/" }}{% endcapture %}
|
|
|
|
{% else %}
|
|
|
|
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".html" | remove: ".md" | remove: "_pages/" }}{% endcapture %}
|
|
|
|
{% endif %}
|
2020-02-05 19:57:58 +01:00
|
|
|
<div>
|
2018-04-23 18:30:16 +02:00
|
|
|
<h3>
|
|
|
|
<a href="mailto:{{ mailto_prefix }}@{{ mail_domain }}">
|
|
|
|
Post a new comment</a>
|
|
|
|
</h3>
|
|
|
|
</div>
|
2017-04-07 22:41:07 +02:00
|
|
|
|
2020-02-05 19:57:58 +01:00
|
|
|
<div>
|
2018-04-30 12:11:36 +02:00
|
|
|
{% assign comment_counter = 0 %}
|
2018-04-30 21:57:22 +02:00
|
|
|
{% assign comments = site.comments | sort | reverse %}
|
|
|
|
{% for comment in comments %}
|
2017-04-09 19:37:47 +02:00
|
|
|
{% assign page_path = page.path | replace: "_posts/", "" | remove: ".md" %}
|
|
|
|
{% assign comment_fullpath = comment.path | replace: "_comments/", "" | split: "/" %}
|
|
|
|
{% assign comment_path = comment_fullpath[0] %}
|
|
|
|
{% assign comment_id = comment_fullpath[1] | remove: ".md" %}
|
|
|
|
{% if comment_path == page_path %}
|
2018-04-30 12:11:36 +02:00
|
|
|
{% assign parity_check = comment_counter | modulo: 2 %}
|
|
|
|
{% if parity_check == 0 %}
|
|
|
|
{% assign parity = "even" %}
|
|
|
|
{% else %}
|
|
|
|
{% assign parity = "odd" %}
|
|
|
|
{% endif %}
|
2018-04-30 21:57:22 +02:00
|
|
|
<a href="#{{ comment_id }}" id="{{ comment_id }}" class="{{ parity }}">
|
2020-02-05 19:57:58 +01:00
|
|
|
<div>
|
2018-05-09 14:50:55 +02:00
|
|
|
<div class="from">{{ comment.from }}</div>
|
|
|
|
<div class="date">{{ comment.date | date: "%b %e %Y, %R %Z" }}</div>
|
2020-02-05 19:57:58 +01:00
|
|
|
<div></div>
|
|
|
|
<div><h3>{{ comment.subject }}</h3></div>
|
2018-04-30 21:57:22 +02:00
|
|
|
{{ comment.content | markdownify }}
|
|
|
|
</div>
|
|
|
|
</a>
|
2018-04-30 12:11:36 +02:00
|
|
|
{% assign comment_counter = comment_counter | plus: 1 %}
|
2018-04-23 18:30:16 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2017-02-13 19:25:54 +01:00
|
|
|
</div>
|
2018-04-30 21:57:22 +02:00
|
|
|
</div>
|