PaperModX/layouts/partials/post_meta.html

25 lines
645 B
HTML
Raw Normal View History

2021-03-30 13:37:36 +01:00
{{- $scratch := newScratch }}
{{- if (.Param "ShowWordCount") -}}
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) -}}
2021-03-30 13:37:36 +01:00
{{- end }}
{{- if (.Param "ShowReadingTime") -}}
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) -}}
{{- end }}
2022-04-21 10:32:29 +01:00
{{- if (.Param "ShowAuthor") -}}
2021-03-30 13:37:36 +01:00
{{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }}
{{- end }}
2022-04-21 10:32:29 +01:00
{{- end }}
2021-03-30 13:37:36 +01:00
{{- with ($scratch.Get "meta") }}
{{ range $i, $e := . }}
{{ if $i }}
<span class="delimiter">&nbsp;·&nbsp;</span>
{{ end }}
<span>{{ $e }}</span>
{{- end -}}
2021-03-30 13:37:36 +01:00
{{- end -}}