nemhugo/layouts/partials/post_meta.html
Jack Taylor ff657d2db1 Add links to translated content
Links to translated content will appear next to the date, both on
the index page and on post pages. Also style the translation links
on post pages to be like those on the index page, although some
more thought about the design is probably in order.
2017-04-07 12:58:57 +09:00

11 lines
536 B
HTML

<span class="post-meta">
{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
{{ if .IsTranslated -}}
{{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}}
{{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}}
{{- $cleanLinks := apply $links "chomp" "." -}}
{{- $linksOutput := delimit $cleanLinks (i18n "translationsSeparator") -}}
&nbsp;&bull;&nbsp; {{ i18n "translationsLabel" }}{{ $linksOutput }}
{{- end }}
</span>