use new theme
This commit is contained in:
parent
05bc58562c
commit
ec1341fcd1
261 changed files with 23060 additions and 17 deletions
43
themes/beautifulhugo/layouts/partials/post_meta.html
Normal file
43
themes/beautifulhugo/layouts/partials/post_meta.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
<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> {{ $datestr | i18n "postedOnDate"}}
|
||||
{{ if ne $datestr $lastmodstr }}
|
||||
{{ $lastmodstr | i18n "lastModified" }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.readingTime }}
|
||||
| <i class="fas fa-clock"></i> {{ i18n "readingTime"}}{{ .ReadingTime }} {{ i18n "readTime" }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.wordCount }}
|
||||
| <i class="fas fa-book"></i> {{ .WordCount }} {{ i18n "words" }}
|
||||
{{ end }}
|
||||
{{ if .Params.author }}
|
||||
| <i class="fas fa-user"></i> {{ .Params.author | safeHTML }}
|
||||
{{ else }}
|
||||
| <i class="fas fa-user"></i> {{ .Site.Author.name | safeHTML }}
|
||||
{{ end }}
|
||||
{{- if .Site.Params.staticman -}}
|
||||
| <i class="fas fa-comment"></i>
|
||||
{{ $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") -}}
|
||||
• {{ i18n "translationsLabel" }}{{ $linksOutput }}
|
||||
{{- end }}
|
||||
</span>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue