better time format

This commit is contained in:
Niko Abeler 2023-08-11 17:37:22 +02:00
parent ad8cbbf556
commit b0a6a0d417
3 changed files with 15 additions and 5 deletions

View File

@ -18,9 +18,11 @@
<small> <small>
<a class="u-url" href="">#</a> <a class="u-url" href="">#</a>
Published: Published:
<time class="dt-published" datetime="{{.Entry.PublishedAt}}"> {{ if .Entry.PublishedAt }}
{{.Entry.PublishedAt}} <time class="dt-published" datetime="{{.Entry.PublishedAt.Format "2006-01-02T15:04:05" }}">
</time> {{.Entry.PublishedAt.Format "2006-01-02" }}
</time>
{{ end }}
{{ if .Author.Name }} {{ if .Author.Name }}
by by
<a class="p-author h-card" href="{{.Author.FullUrl}}"> <a class="p-author h-card" href="{{.Author.FullUrl}}">

View File

@ -16,7 +16,11 @@
</a> </a>
</h3> </h3>
<small style="font-size: 0.75em;"> <small style="font-size: 0.75em;">
<time class="dt-published" datetime="{{ .PublishedAt }}">{{ .PublishedAt }}</time> {{ if .PublishedAt }}
<time class="dt-published" datetime="{{.PublishedAt.Format "2006-01-02T15:04:05" }}">
{{.PublishedAt.Format "2006-01-02" }}
</time>
{{ end }}
</small> </small>
</hgroup> </hgroup>
{{ .Content }} {{ .Content }}

View File

@ -16,7 +16,11 @@
</a> </a>
</h3> </h3>
<small style="font-size: 0.75em;"> <small style="font-size: 0.75em;">
<time class="dt-published" datetime="{{ .PublishedAt }}">{{ .PublishedAt }}</time> {{ if .PublishedAt }}
<time class="dt-published" datetime="{{.PublishedAt.Format "2006-01-02T15:04:05" }}">
{{.PublishedAt.Format "2006-01-02" }}
</time>
{{ end }}
</small> </small>
</hgroup> </hgroup>
{{ .Content }} {{ .Content }}