Omphaloskepsis-2/layouts/shortcodes/comment.html

17 lines
1007 B
HTML

<li class="comment">
<article class="comment__body" itemprop="comment" itemscope itemtype="https://schema.org/Comment">
<header class="comment__header">
<h3 class="comment__author" itemprop="author">{{ .Params.author }}</h3>
{{- $publishDate := time .Params.publishDate -}}
<p class="comment__publish-date">
<time class="dt-published" datetime="{{ $publishDate.Format "2006-01-02T15:04:05-07:00" }}" itemprop="datePublished">{{ $publishDate.Format "January 2" }}<sup>{{ if in (slice 1 21 31) $publishDate.Day }}st{{ else if in (slice 2 22) $publishDate.Day}}nd{{ else if in (slice 3 23) $publishDate.Day }}rd{{ else }}th{{ end }}</sup>, 1{{ $publishDate.Format "2006" | lang.NumFmt 0 }}&nbsp;<abbr style="font-variant: small-caps; font-size: 0.8em;" title="Holocene Era">HE</abbr></time>
</p>
{{- with .Params.source -}}
<p class="comment__source">Source: {{ . }}</p>
{{- end -}}
</header>
{{- .Inner | markdownify -}}
</article>
</li>