mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
Show post count in series metadata
This commit is contained in:
parent
55bbfa90e4
commit
e982824031
@ -5,22 +5,7 @@
|
|||||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="post-metadata">
|
{{ partial "post-metadata/series.html" . }}
|
||||||
{{ partial "post-meta-item/translations.html" . }}
|
|
||||||
|
|
||||||
{{ if ne .Site.Params.readingtime false }}
|
|
||||||
<span class="post-meta-item">
|
|
||||||
{{ partial "icon.html" "clock" }}
|
|
||||||
{{ $readingtime := 0 }}
|
|
||||||
{{ range .Data.Pages }}
|
|
||||||
{{ $readingtime = (add $readingtime .ReadingTime) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ i18n "readingtime" $readingtime }}
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partial "post-meta-item/viewsource.html" . }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
||||||
|
20
layouts/partials/post-metadata/series.html
Normal file
20
layouts/partials/post-metadata/series.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<div class="post-metadata">
|
||||||
|
<span class="post-meta-item">
|
||||||
|
{{ partial "icon.html" "newspaper" }}
|
||||||
|
{{ i18n "post_count" (len .Data.Pages) }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{{ if ne .Site.Params.readingtime false }}
|
||||||
|
<span class="post-meta-item">
|
||||||
|
{{ partial "icon.html" "clock" }}
|
||||||
|
{{ $readingtime := 0 }}
|
||||||
|
{{ range .Data.Pages }}
|
||||||
|
{{ $readingtime = (add $readingtime .ReadingTime) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ i18n "readingtime" $readingtime }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partial "post-meta-item/translations.html" . }}
|
||||||
|
{{ partial "post-meta-item/viewsource.html" . }}
|
||||||
|
</div>
|
@ -5,6 +5,8 @@
|
|||||||
{{ partial "rss-link.html" . }}
|
{{ partial "rss-link.html" . }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
{{ partial "post-metadata/series.html" . }}
|
||||||
|
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
||||||
|
|
||||||
<div class="page-list">
|
<div class="page-list">
|
||||||
|
Loading…
Reference in New Issue
Block a user