style(post_meta): adjust indentation for better readability

This commit is contained in:
Aditya Telange
2026-05-03 13:01:06 +05:30
parent 4bf8893adc
commit ecd0d4f8f4
+9 -7
View File
@@ -1,23 +1,25 @@
{{- $scratch := newScratch }} {{- $scratch := newScratch }}
{{- if not .Date.IsZero -}} {{- if not .Date.IsZero -}}
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default ":date_long" site.Params.DateFormat)))) }} {{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default ":date_long" site.Params.DateFormat)))) }}
{{- end }} {{- end }}
{{- if (.Param "ShowReadingTime") -}} {{- if (.Param "ShowReadingTime") -}}
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }} {{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }}
{{- end }} {{- end }}
{{- if (.Param "ShowWordCount") -}} {{- if (.Param "ShowWordCount") -}}
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }} {{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }}
{{- end }} {{- end }}
{{- if not (.Param "hideAuthor") -}} {{- if not (.Param "hideAuthor") -}}
{{- with (partial "author.html" .) }} {{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" .)) }} {{- $scratch.Add "meta" (slice (printf "<span>%s</span>" .)) }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{/* Combine all meta information into a single string with separators and render it as HTML.*/}}
{{- with ($scratch.Get "meta") }} {{- with ($scratch.Get "meta") }}
{{- delimit . "&nbsp;·&nbsp;" | safeHTML -}} {{- delimit . "&nbsp;·&nbsp;" | safeHTML -}}
{{- end -}} {{- end -}}