diff options
author | Mantas Vilčinskas <hi@mnts.lt> | 2021-08-23 17:08:34 +0300 |
---|---|---|
committer | Mantas Vilčinskas <hi@mnts.lt> | 2021-08-23 17:08:34 +0300 |
commit | e003ba462573c9b9445c168bc628f41a47e38721 (patch) | |
tree | c1cdfe98ee472c6e55297ea5beb16b2c8eb2cae3 /layouts/issues | |
parent | 90135521c8f3a25dd8e3ffc56418b76225e676cb (diff) |
Fix #199
Diffstat (limited to 'layouts/issues')
-rw-r--r-- | layouts/issues/small.html | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 115d5d0..51f5e67 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -68,11 +68,15 @@ {{ 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" }}"> - {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} + <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "Jan 2 15:04:05 2006 UTC" }}"> + + {{ if .Date.Before now }} + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} {{ else }} - {{ .Date.Format "January 2, 2006 at 3:04 PM" }} {{ end }} </small> @@ -80,13 +84,24 @@ {{ .Title }} </h3> + + <!-- Marker --> {{ if eq .Params.severity "notice" }} <strong class="warning"> ◆ - {{ T "downtimeOngoing" }} + {{ if .Date.Before now }} + {{ T "downtimeOngoing" }} + {{ else }} + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + {{ end }} </strong> {{ else }} + <strong class="error"> {{ if eq .Params.severity "down" }} ■ |