mirror of https://github.com/lukechilds/docs.git
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.
51 lines
3.3 KiB
51 lines
3.3 KiB
6 years ago
|
<article id="comment{% unless include.r %}{{ index | prepend: '-' }}{% else %}{{ include.index | prepend: '-' }}{% endunless %}" class="js-comment comment {% if include.name == site.author.name %}admin{% endif %} {% unless include.replying_to == 0 %}child{% endunless %}">
|
||
6 years ago
|
<div class="comment-avatar">
|
||
6 years ago
|
{% if include.avatar %}
|
||
6 years ago
|
<noscript><img src="{{ include.avatar }}" alt=""></noscript>
|
||
|
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="{{ include.avatar }}" alt="" class="lazyload blur-up">
|
||
6 years ago
|
{% elsif include.email %}
|
||
6 years ago
|
<noscript><img src="https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=60" alt=""></noscript>
|
||
|
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-srcset="https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=60 1x, https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=120 2x" alt="" class="lazyload blur-up">
|
||
6 years ago
|
{% else %}
|
||
6 years ago
|
<noscript><img src="/assets/images/avatar-60.png" alt=""></noscript>
|
||
|
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-srcset="https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=60 1x, /assets/images/avatar-120.png 2x" alt="" class="lazyload blur-up">
|
||
6 years ago
|
{% endif %}
|
||
|
</div>
|
||
6 years ago
|
<h3 class="comment-author-name">
|
||
6 years ago
|
{% unless include.url == blank %}
|
||
6 years ago
|
<a rel="external nofollow" href="{{ include.url }}">{{ include.name | strip_html }}</a>
|
||
6 years ago
|
{% else %}
|
||
6 years ago
|
{{ include.name | strip_html }}
|
||
6 years ago
|
{% endunless %}
|
||
|
</h3>
|
||
6 years ago
|
<div class="comment-timestamp">
|
||
6 years ago
|
{% if include.date %}
|
||
|
{% if include.index %}<a href="#comment{% if r %}{{ index | prepend: '-' }}{% else %}{{ include.index | prepend: '-' }}{% endif %}" title="Permalink to this comment">{% endif %}
|
||
6 years ago
|
<time datetime="{{ include.date | date_to_xmlschema }}">{{ include.date | date_to_long_string: 'ordinal', 'US' }}</time>
|
||
6 years ago
|
{% if include.index %}</a>{% endif %}
|
||
|
{% endif %}
|
||
|
</div>
|
||
6 years ago
|
<div class="comment-content">
|
||
6 years ago
|
{{ include.message | markdownify }}
|
||
|
</div>
|
||
|
{% unless include.replying_to != 0 or page.comments_locked == true %}
|
||
6 years ago
|
<div class="comment-reply">
|
||
|
<a rel="nofollow" href="#comment-{{ include.index }}" onclick="return addComment.moveForm('comment-{{ include.index }}', '{{ include.index }}', 'respond', '{{ page.slug }}')"><svg class="icon icon--reply" width="16px" height="16px"><use xlink:href="{{ 'icons.svg#icon-reply' | prepend: 'assets/icons/' | relative_url }}"></use></svg> Reply to {{ include.name }}</a>
|
||
6 years ago
|
</div>
|
||
|
{% endunless %}
|
||
|
</article>
|
||
|
|
||
|
{% capture i %}{{ include.index }}{% endcapture %}
|
||
|
{% assign replies = site.data.comments[page.slug] | sort | where_exp: 'comment', 'comment[1].replying_to == i' %}
|
||
|
{% for reply in replies %}
|
||
|
{% assign index = forloop.index | prepend: '-' | prepend: include.index %}
|
||
|
{% assign replying_to = reply[1].replying_to | to_integer %}
|
||
|
{% assign avatar = reply[1].avatar %}
|
||
|
{% assign email = reply[1].email %}
|
||
|
{% assign name = reply[1].name %}
|
||
|
{% assign url = reply[1].url %}
|
||
|
{% assign date = reply[1].date %}
|
||
|
{% assign message = reply[1].message %}
|
||
|
{% include comment.html index=index replying_to=replying_to avatar=avatar email=email name=name url=url date=date message=message %}
|
||
|
{% endfor %}
|