mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 09:47:29 -05:00
Update post-metadata to use a partial, and add word count
This commit is contained in:
34
layouts/partials/post-metadata.html
Normal file
34
layouts/partials/post-metadata.html
Normal file
@ -0,0 +1,34 @@
|
||||
{{ if or .Date (.GetTerms "tags") }}
|
||||
<div class="post-metadata">
|
||||
{{ if .Date }}
|
||||
|
||||
<span class="date">
|
||||
{{ partial "icon.html" "calendar" }}
|
||||
<time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
|
||||
{{ .Date.Format "January 2, 2006" }}
|
||||
</time>
|
||||
|
||||
{{ if ne .Lastmod .Date }}
|
||||
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
|
||||
(Modified {{ .Lastmod.Format "January 2, 2006" }})
|
||||
</time>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</span>
|
||||
|
||||
<span class="wordcount">
|
||||
{{ partial "icon.html" "type" }}
|
||||
{{ .WordCount }} words
|
||||
</span>
|
||||
|
||||
<div class="tags">
|
||||
{{ range (.GetTerms "tags") }}
|
||||
<span class="tag">
|
||||
{{ partial "icon.html" "tag" }}
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user