|
| 1 | +<span class="post-meta"> |
| 2 | + {{ $format := default (i18n "dateFormat") .Site.Params.dateformat }} |
| 3 | + {{ $datestr := .Date.Format $format }} |
| 4 | + {{ $lastmodstr := .Lastmod.Format $format }} |
| 5 | + <i class="fas fa-calendar"></i> {{ $datestr | i18n "postedOnDate"}} |
| 6 | + {{ if ne $datestr $lastmodstr }} |
| 7 | + ({{ $lastmodstr | i18n "lastModified" }}) |
| 8 | + {{ end }} |
| 9 | + {{ if .Site.Params.readingTime }} |
| 10 | + | <i class="fas fa-clock"></i> {{ i18n "readingTime"}}{{ .ReadingTime }} {{ i18n "readTime" }} |
| 11 | + {{ end }} |
| 12 | + {{ if .Site.Params.wordCount }} |
| 13 | + | <i class="fas fa-book"></i> {{ .WordCount }} {{ i18n "words" }} |
| 14 | + {{ end }} |
| 15 | + {{ if not .Site.Params.hideAuthor }} |
| 16 | + {{ if .Params.authors }} |
| 17 | + {{ range .Params.authors }} |
| 18 | + {{ $authorPage := $.Site.GetPage (printf "/authors/%s" .) }} |
| 19 | + {{ if $authorPage }} |
| 20 | + | <i class="fas fa-user"></i> <a href="{{ $authorPage.RelPermalink }}">{{ $authorPage.Title }}</a> |
| 21 | + {{ else }} |
| 22 | + | <i class="fas fa-user"></i> {{ . }} |
| 23 | + {{ end }} |
| 24 | + {{ end }} |
| 25 | + {{ else if .Params.author }} |
| 26 | + {{ if reflect.IsSlice .Params.author }} |
| 27 | + {{ range .Params.author }} |
| 28 | + | <i class="fas fa-user"></i> {{ . | safeHTML }} |
| 29 | + {{ end }} |
| 30 | + {{ else }} |
| 31 | + | <i class="fas fa-user"></i> {{ .Params.author | safeHTML }} |
| 32 | + {{ end }} |
| 33 | + {{ else }} |
| 34 | + | <i class="fas fa-user"></i> {{ .Site.Params.author.name | safeHTML }} |
| 35 | + {{ end }} |
| 36 | + {{ end }} |
| 37 | + {{- if .Site.Params.staticman -}} |
| 38 | + | <i class="fas fa-comment"></i> |
| 39 | + {{ $slug := replace .RelPermalink "/" "" }} |
| 40 | + {{ if .Site.Data.comments }} |
| 41 | + {{ $comments := index $.Site.Data.comments $slug }} |
| 42 | + {{ if $comments }} |
| 43 | + {{ if gt (len $comments) 1 }} |
| 44 | + {{ len $comments }} {{ i18n "moreComment" }} |
| 45 | + {{ else }} |
| 46 | + {{ len $comments }} {{ i18n "oneComment" }} |
| 47 | + {{ end }} |
| 48 | + {{ else }} |
| 49 | + 0 {{ i18n "oneComment" }} |
| 50 | + {{ end }} |
| 51 | + {{ end }} |
| 52 | + {{ end }} |
| 53 | + {{ if .IsTranslated -}} |
| 54 | + {{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}} |
| 55 | + {{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}} |
| 56 | + {{- $cleanLinks := apply $links "chomp" "." -}} |
| 57 | + {{- $linksOutput := delimit $cleanLinks (i18n "translationsSeparator") -}} |
| 58 | + • {{ i18n "translationsLabel" }}{{ $linksOutput | safeHTML }} |
| 59 | + {{- end }} |
| 60 | +</span> |
0 commit comments