Add a machine readable time representation to <time> tags

This commit is contained in:
Vojtěch Káně 2020-09-07 13:02:48 +02:00
parent bdfb146b76
commit 5d2fb163e9
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<div class="pageHeader">
<h2 class="title pageTitle"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<p class="has-text-grey">{{- T "published" -}}:&nbsp;<time>{{ .PublishDate.Format "02.01.2006 15:04" }}</time></p>
<p class="has-text-grey">{{- T "published" -}}:&nbsp;<time datetime="{{ .PublishDate.Format "2006-01-02T15:04:05.000-0700" }}">{{ .PublishDate.Format "02.01.2006 15:04" }}</time></p>
<p class="has-text-grey">
{{- T "author" -}}: {{ range .Params.authors }}{{ with $.Site.GetPage (printf "authors/%s" .) }}<a class="separateWithCommas" href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}{{ end }}
</p>

View File

@ -1,7 +1,7 @@
<div class="pageHeader">
<h2 class="title pageTitle"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<p class="has-text-grey-light">{{- T "published" -}}:&nbsp;<time>{{ .PublishDate.Format "02.01.2006 15:04" }}</time></p>
<p class="">{{- T "talks-when" -}}:&nbsp;<time>{{ dateFormat "02.01.2006 15:04" .Params.when }}</time></p>
<p class="has-text-grey-light">{{- T "published" -}}:&nbsp;<time datetime="{{ .PublishDate.Format "2006-01-02T15:04:05.000-0700" }}">{{ .PublishDate.Format "02.01.2006 15:04" }}</time></p>
<p class="">{{- T "talks-when" -}}:&nbsp;<time datetime="{{ dateFormat "2006-01-02T15:04:05.000-0700" .Params.when }}">{{ dateFormat "02.01.2006 15:04" .Params.when }}</time></p>
<p class="">
{{- T "presenter" -}}: {{ range .Params.authors }}{{ with $.Site.GetPage (printf "authors/%s" .) }}<a class="separateWithCommas" href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}{{ end }}
</p>