forked from damieng/jekyll-blog-comments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
comment.html
30 lines (29 loc) · 1.39 KB
/
comment.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
{% if comment.url %}
<a href="{{ comment.url }}" rel="nofollow">
<img alt="Gravatar for {{ comment.name | xml_escape }}" src="https://secure.gravatar.com/avatar/{{ comment.gravatar }}?s=64&d=retro&r=pg" srcset="https://secure.gravatar.com/avatar/{{ comment.gravatar }}?s=128&d=retro&r=pg 2x" class="avatar avatar-64 photo" height="64" width="64">
</a>
{% else %}
<img alt="Gravatar for {{ comment.name | xml_escape }}" src="https://secure.gravatar.com/avatar/{{ comment.gravatar }}?s=64&d=retro&r=pg" srcset="https://secure.gravatar.com/avatar/{{ comment.gravatar }}?s=128&d=retro&r=pg 2x" class="avatar avatar-64 photo" height="64" width="64">
{% endif %}
<blockquote id="{{ comment.id }}">
<div class="comment-body">{{ comment.message | markdownify }}</div>
<cite>
{% if comment.url %}
<a href="{{ comment.url }}" rel="nofollow">{{ comment.name | xml_escape }}</a>
{% else %}
{{ comment.name | xml_escape }}
{% endif %}
–
<span class="muted" title="{{ comment.date | date_to_rfc822 }}">
{{ comment.date | date: '%B' }}
{% assign d = comment.date | date: "%-d" %}
{% case d %}
{% when '1' or '21' or '31' %}{{d}}st,
{% when '2' or '22' %}{{d}}nd,
{% when '3' or '23' %}{{d}}rd,
{% else %}{{d}}th,
{% endcase %}
{{ comment.date | date: '%Y' }}
</span>
</cite>
</blockquote>