aboutsummaryrefslogtreecommitdiff
path: root/layouts/issues/small.html
diff options
context:
space:
mode:
authorMM <14907823+MirMiz@users.noreply.github.com>2023-04-23 23:36:34 +0200
committerGitHub <noreply@github.com>2023-04-23 23:36:34 +0200
commit510dbe065b267d49e64666b810b6d148ae26c41f (patch)
tree66d5532bc0b7184098d90d26aa47b6d16300ea44 /layouts/issues/small.html
parentfea94cf3390954ad25cc12104991193adddb2632 (diff)
added Dateformat localization to `relative-time`
`relative-time` didn't respected the dateformat, but defaultet on UTC. The Title-Attribute (hover) now displays time in the chosen dateformat. an additional Attribut `data-date` contains the UTC-Format for calculating the relative times using JavaScript
Diffstat (limited to 'layouts/issues/small.html')
-rw-r--r--layouts/issues/small.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/layouts/issues/small.html b/layouts/issues/small.html
index 9c21cfb..94fede3 100644
--- a/layouts/issues/small.html
+++ b/layouts/issues/small.html
@@ -8,7 +8,7 @@
<a href="{{ .Permalink }}" class="issue no-underline">
{{ if .Params.informational }}
- <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ dateFormat .Site.Params.dateFormat .Params.date }}" data-date="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
{{ if .Site.Params.dateFormat }}
{{ dateFormat .Site.Params.dateFormat .Params.date }}
{{ else }}
@@ -23,7 +23,7 @@
</span>
{{ else if .Params.Resolved }}
- <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ dateFormat .Site.Params.dateFormat .Params.date }}" data-date="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
{{ if .Site.Params.dateFormat }}
{{ dateFormat .Site.Params.dateFormat .Params.date }}
{{ else }}
@@ -68,11 +68,11 @@
{{ else }}
<!-- If not resolved -->
- <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ dateFormat .Site.Params.dateFormat .Params.date }}" data-date="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}">
{{ if .Date.Before now }}
{{ if .Site.Params.dateFormat }}
- {{ .Date.Format .Site.Params.dateFormat }}
+ {{ dateFormat .Site.Params.dateFormat .Params.date }}
{{ else }}
{{ .Date.Format "January 2, 2006 at 3:04 PM" }}
{{ end }}
@@ -94,7 +94,7 @@
{{ T "downtimeOngoing" }}
{{ else }}
{{ if .Site.Params.dateFormat }}
- {{ .Date.Format .Site.Params.dateFormat }}
+ {{ dateFormat .Site.Params.dateFormat .Params.date }}
{{ else }}
{{ .Date.Format "January 2, 2006 at 3:04 PM" }}
{{ end }}