Fork, CE-style dates

This commit is contained in:
Marek Nečada 2022-04-06 14:31:04 +03:00
parent 084cc371e4
commit 3b5b934a6c
6 changed files with 7 additions and 8 deletions

2
go.mod
View File

@ -1,3 +1,3 @@
module github.com/alexandrevicenzi/soho
module github.com/texnokrates/soho
go 1.12

View File

@ -5,7 +5,7 @@
<li>
<div class="flex">
<a href="{{ .Permalink }}" class="truncate">{{ .Title }}</a>
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "2. 1. 2006" }}</time>
</div>
</li>
{{- end }}

View File

@ -6,7 +6,7 @@
<div class="flex">
<a href="{{ .Permalink }}" class="truncate">{{ .Title }}</a>
{{ if eq .Kind "page" }}
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "2. 1. 2006" }}</time>
{{ end }}
</div>
</li>

View File

@ -5,7 +5,7 @@
{{ if ne .Type "page" -}}
<div class="post-date">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> <span class="readtime">&middot; {{ .ReadingTime }} min read</span>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "2. 1. 2006" }}</time>
</div>
{{- end }}

View File

@ -5,7 +5,7 @@
<li>
<div class="flex">
<a href="{{ .Permalink }}" class="truncate">{{ .Title }}</a>
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "2. 1., 2006" }}</time>
</div>
</li>
{{- end }}

View File

@ -10,15 +10,14 @@
</h1>
<div class="post-date">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> &middot; {{ .ReadingTime }} min read
</div>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "2. 1. 2006" }}</time> </div>
<div>
{{ .Summary }}
</div>
<div class="read-more-link">
<a href="{{ .Permalink }}">Read More</a>
<a href="{{ .Permalink }}">...</a>
</div>
</article>
{{- end }}