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>
<a class="u-url" href="">#</a>
Published:
<time class="dt-published" datetime="{{.Entry.PublishedAt}}">
{{.Entry.PublishedAt}}
</time>
{{ if .Entry.PublishedAt }}
<time class="dt-published" datetime="{{.Entry.PublishedAt.Format "2006-01-02T15:04:05" }}">
{{.Entry.PublishedAt.Format "2006-01-02" }}
</time>
{{ end }}
{{ if .Author.Name }}
by
<a class="p-author h-card" href="{{.Author.FullUrl}}">

View File

@ -16,7 +16,11 @@
</a>
</h3>
<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>
</hgroup>
{{ .Content }}

View File

@ -16,7 +16,11 @@
</a>
</h3>
<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>
</hgroup>
{{ .Content }}