Welcome to mirror list, hosted at ThFree Co, Russian Federation.

post_meta.html « partials « layouts - github.com/halogenica/beautifulhugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a44976795decd06ce373a75fd7c0b73f972c99d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<span class="post-meta">
  {{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }}
  {{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }}
  <i class="fas fa-calendar"></i>&nbsp;{{ $datestr | i18n "postedOnDate"}}
  {{ if ne $datestr $lastmodstr }}
    &nbsp;{{ $lastmodstr | i18n "lastModified"  }}
  {{ end }}
  {{ if .Site.Params.readingTime }}
    &nbsp;|&nbsp;<i class="fas fa-clock"></i>&nbsp;{{ i18n "readingTime"}}{{ .ReadingTime }}&nbsp;{{ i18n "readTime" }}
  {{ end }}
  {{ if .Site.Params.wordCount }}
    &nbsp;|&nbsp;<i class="fas fa-book"></i>&nbsp;{{ .WordCount }}&nbsp;{{ i18n "words" }}
  {{ end }}
  {{ if not .Site.Params.hideAuthor }}
    {{ if .Params.author }}
      &nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Params.author | safeHTML }}
    {{ else }}
      &nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Site.Author.name | safeHTML }}
    {{ end }}
  {{ end }}
  {{- if .Site.Params.staticman -}}
    &nbsp;|&nbsp;<i class="fas fa-comment"></i>&nbsp;
    {{ $slug := replace .RelPermalink "/" "" }}
    {{ if .Site.Data.comments }}
      {{ $comments := index $.Site.Data.comments $slug }}
      {{ if $comments }}
        {{ if gt (len $comments) 1  }}
          {{ len $comments  }} {{ i18n "moreComment" }}
        {{ else }}
          {{ len $comments  }} {{ i18n "oneComment" }}
        {{ end }}
      {{ else }}
        0 {{ i18n "oneComment" }}
      {{ end }}
    {{ end }}
  {{ end }}
  {{ 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>