Add more post information, if staticman used, it can show number comments

This commit is contained in:
badele 2017-11-18 09:05:36 +01:00
parent d68cf2e04d
commit 41667d46c3
10 changed files with 57 additions and 1 deletions

View File

@ -19,6 +19,11 @@
translation: "Letzter Post"
- id: nextPost
translation: "Nächster Post"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "Previous Post"
- id: nextPost
translation: "Next Post"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "Artículo anterior"
- id: nextPost
translation: "Artículo siguiente"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "Post précédent"
- id: nextPost
translation: "Post suivant"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "前ページ"
- id: nextPost
translation: "次ページ"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "Poprzedni"
- id: nextPost
translation: "Następny"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "Предыдущий"
- id: nextPost
translation: "Следующий"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -19,6 +19,11 @@
translation: "前一篇"
- id: nextPost
translation: "后一篇"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page
- id: pageNotFound

View File

@ -1,5 +1,20 @@
<span class="post-meta">
{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
<i class="fa fa-calendar-o"></i>&nbsp;{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
&nbsp;|&nbsp; <i class="fa fa-clock-o"></i>{{ i18n "readingTime"}} {{ .ReadingTime }} {{ i18n "readTime" }} ({{ .WordCount }} {{ i18n "words" }})
{{- if .Site.Params.staticman -}}
&nbsp;|&nbsp; <i class="fa fa-comment-o"></i>
{{ $slug := replace .URL "/" "" }}
{{ $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 }}
{{ if .IsTranslated -}}
{{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}}
{{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}}

View File

@ -362,6 +362,7 @@ footer .theme-by {
}
.post-entry {
width: 100%;
margin-top: 10px;
}
.post-image {
float: right;