refactor templates layout
@see https://gohugo.io/templates/new-templatesystem-overview/
This commit is contained in:
parent
a83f339dc8
commit
230c46411b
102 changed files with 2 additions and 2 deletions
16
layouts/_shortcodes/comment.html
Normal file
16
layouts/_shortcodes/comment.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<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.FormatNumberCustom 0 }} <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>
|
Loading…
Add table
Add a link
Reference in a new issue