bobatheme/layouts/partials/post-metadata.html

70 lines
1.9 KiB
HTML
Raw Normal View History

2021-10-11 21:29:16 -05:00
{{ if or .Date .IsTranslated .Site.Params.wordcount .Site.Params.readingtime .Site.Params.repoURL }}
<div class="post-metadata">
{{ if .Date }}
2021-10-09 22:33:18 -05:00
<span class="post-meta-item">
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
</time>
</span>
2021-11-02 00:53:01 -05:00
{{ $gitinfo := false }}
{{ with .GitInfo }}
{{ $gitinfo = true }}
{{ end }}
{{ if not $gitinfo }}
{{ if ne .Lastmod .Date }}
<span class="post-meta-item">
{{ partial "icon.html" "pencil" }}
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }}
</time>
{{ end }}
</span>
{{ end }}
{{ end }}
2021-10-11 20:50:09 -05:00
{{ with .Params.authors }}
2021-10-26 14:27:37 -05:00
<span class="post-meta-item">
{{ partial "icon.html" "user-circle" }}
{{ delimit . ", " }}
2021-10-26 14:27:37 -05:00
</span>
{{ end }}
2021-10-11 20:50:09 -05:00
{{ if .IsTranslated }}
<span class="post-meta-item">
{{ partial "icon.html" "world" }}
2021-10-11 20:50:09 -05:00
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ .Language }}</a>
{{ end }}
</span>
{{ end }}
{{ if ne .Site.Params.readingtime false }}
2021-10-09 22:33:18 -05:00
<span class="post-meta-item">
{{ partial "icon.html" "clock" }}
{{ i18n "readingtime" .ReadingTime }}
</span>
{{ end }}
{{ with .Site.Params.historyURL }}
2021-10-09 22:33:18 -05:00
<span class="post-meta-item">
{{ partial "icon.html" "history" }}
<a href="{{ printf "%s/content/%s" . $.File.Path }}" target="_blank" rel="noopener">
View history
</a>
</span>
{{ end }}
2021-10-09 22:33:18 -05:00
<div class="tags">
{{ range (.GetTerms "tags") }}
<span class="post-meta-item">
{{ partial "icon.html" "tag" }}
2021-10-09 22:33:18 -05:00
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</span>
{{ end }}
</div>
</div>
{{ end }}