mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -06:00
Improve date element in page metadata
This commit is contained in:
parent
7bc8a4cb57
commit
17047babc0
@ -19,9 +19,6 @@ copy_to_clipboard:
|
|||||||
|
|
||||||
|
|
||||||
# Meta items
|
# Meta items
|
||||||
long_date:
|
|
||||||
other: "{{ .Date.Format `January 2, 2006` }}"
|
|
||||||
|
|
||||||
wordcount:
|
wordcount:
|
||||||
one: "{{ . }} word"
|
one: "{{ . }} word"
|
||||||
other: "{{ . }} words"
|
other: "{{ . }} words"
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
{{ if .Date }}
|
{{ if .Date }}
|
||||||
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}">
|
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}">
|
||||||
{{ partial "icon.html" "calendar" }}
|
{{ partial "icon.html" "calendar" }}
|
||||||
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
|
{{ partial "time-element.html" .Date }}
|
||||||
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
|
|
||||||
</time>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{/* TODO: make this be a tooltip */}}
|
{{/* TODO: make this be a tooltip */}}
|
||||||
@ -13,9 +11,7 @@
|
|||||||
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
|
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
|
||||||
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
|
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
|
||||||
{{ partial "icon.html" "pencil" }}
|
{{ partial "icon.html" "pencil" }}
|
||||||
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
|
{{ partial "time-element.html" .Lastmod }}
|
||||||
{{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }}
|
|
||||||
</time>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
*/}}
|
*/}}
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
{{ if .Date }}
|
{{ if .Date }}
|
||||||
<span class="page-metadata-item" aria-label="date">
|
<span class="page-metadata-item" aria-label="date">
|
||||||
{{ partial "icon.html" "calendar" }}
|
{{ partial "icon.html" "calendar" }}
|
||||||
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
|
{{ partial "time-element.html" .Date }}
|
||||||
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
|
|
||||||
</time>
|
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
3
layouts/partials/time-element.html
Normal file
3
layouts/partials/time-element.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}" title="{{ . }}">
|
||||||
|
{{ .Format "January 2, 2006" }}
|
||||||
|
</time>
|
Loading…
Reference in New Issue
Block a user