PaperModX/layouts/partials/post_meta.html

25 lines
645 B
HTML

{{- $scratch := newScratch }}
{{- if (.Param "ShowWordCount") -}}
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) -}}
{{- end }}
{{- if (.Param "ShowReadingTime") -}}
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) -}}
{{- end }}
{{- if (.Param "ShowAuthor") -}}
{{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }}
{{- end }}
{{- end }}
{{- with ($scratch.Get "meta") }}
{{ range $i, $e := . }}
{{ if $i }}
<span class="delimiter">&nbsp;·&nbsp;</span>
{{ end }}
<span>{{ $e }}</span>
{{- end -}}
{{- end -}}