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" translation: "Letzter Post"
- id: nextPost - id: nextPost
translation: "Nächster Post" translation: "Nächster Post"
- id: readTime
translation: "min"
- id: words
translation: "mots"
# 404 page # 404 page
- id: pageNotFound - id: pageNotFound

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,20 @@
<span class="post-meta"> <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 -}} {{ if .IsTranslated -}}
{{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}} {{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}}
{{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}} {{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}}

View File

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