mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
feat(article/details): better article time display
This commit is contained in:
parent
7f3d906f24
commit
3742a0775b
1 changed files with 3 additions and 1 deletions
|
@ -29,10 +29,12 @@
|
|||
</h3>
|
||||
{{ end }}
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
<footer class="article-time">
|
||||
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
|
||||
<time data-timeago="true" datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
<time class="article-time--published">
|
||||
{{- .Date.Format ( or .Site.Params.dateFormat "Jan 02, 2006" ) -}}
|
||||
</time>
|
||||
</footer>
|
||||
{{- end -}}
|
||||
</div>
|
Loading…
Reference in a new issue