My blog
https://blog.franco.net.eu.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.6 KiB
42 lines
1.6 KiB
<div> |
|
{% capture mail %}{{ site.author.email }}{% endcapture %} |
|
{% if page.is_post %} |
|
{% capture mailto_subject %}{{ page.path | remove: ".md" | remove: "_posts/" | urlencode }}{% endcapture %} |
|
{% else %} |
|
{% capture mailto_subject %}{{ page.path | remove: ".html" | remove: ".md" | remove: "_pages/" | urlencode }}{% endcapture %} |
|
{% endif %} |
|
<div> |
|
<h3> |
|
<a href="mailto:{{ mail }}?subject={{ mailto_subject }}"> |
|
Post a new comment</a> |
|
</h3> |
|
</div> |
|
|
|
<div> |
|
{% assign comment_counter = 0 %} |
|
{% assign comments = site.comments | sort | reverse %} |
|
{% for comment in comments %} |
|
{% 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 %} |
|
{% assign parity_check = comment_counter | modulo: 2 %} |
|
{% if parity_check == 0 %} |
|
{% assign parity = "even" %} |
|
{% else %} |
|
{% assign parity = "odd" %} |
|
{% endif %} |
|
<a href="#comment-{{ comment_id }}" id="comment-{{ comment_id }}" class="{{ parity }}"> |
|
<div> |
|
<div>Subject: {{ comment.subject }}</div> |
|
<div>From: {{ comment.from }}</div> |
|
<div>Arrived on: {{ comment.date | date: "%b %e %Y, %R %Z" }}</div> |
|
{{ comment.content | markdownify }} |
|
</div> |
|
</a> |
|
{% assign comment_counter = comment_counter | plus: 1 %} |
|
{% endif %} |
|
{% endfor %} |
|
</div> |
|
</div>
|
|
|