mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-14 04:15:07 +01:00
single and list - add last mod date display, float right
params - add .LastModDisplay string to enable/disable
This commit is contained in:
parent
1dd80e76b5
commit
d12d24411e
@ -17,6 +17,13 @@
|
||||
<span class="post-date">
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ if $.Site.Params.LastModDisplay}}
|
||||
{{ with .Lastmod }}
|
||||
<span class="post-moddate">
|
||||
{{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
|
@ -7,6 +7,17 @@
|
||||
{{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Site.Params.LastModDisplay}}
|
||||
{{ if .Date }}
|
||||
{{ with .Lastmod }}
|
||||
<span class="post-moddate">
|
||||
{{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
<span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user