Only show vertical bar if necessary in post-meta (#193)

fixes unnecessary "|" shown when post-meta is empty but translations are available
This commit is contained in:
Florian Kohrt 2021-01-24 13:22:45 +01:00 committed by GitHub
parent 24afe952b2
commit b6842db0a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,8 @@
{{- if not (.Param "hideMeta") }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}
{{- if .IsTranslated -}}&nbsp;|&nbsp;
{{- if .IsTranslated -}}
{{- if or .Params.author $.Site.Params.author $.Site.Params.ShowReadingTime (not .Date.IsZero) }}&nbsp;|&nbsp;{{- end -}}
<ul class="i18n_list">
{{- i18n "translations" | default "Translations"}}:
{{- range .Translations }}