From dccc5e9864bb8e5923d633848860d39e4d92e46c Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Thu, 5 Jul 2018 14:45:24 +0300 Subject: v2 Dev Preview 1 --- layouts/issues/issue.html | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'layouts/issues') diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html index 9b63b78..c4d5ab6 100644 --- a/layouts/issues/issue.html +++ b/layouts/issues/issue.html @@ -6,24 +6,38 @@ {{ $isDown := where $active "Params.severity" "=" "down" }}
- - {{ .Params.severity }} - -   - - {{ .Date.Format "January 02, 2006 at 3:04 PM" }} - -   {{ if .Params.Resolved }} - - {{ end }} + ✓ Resolved after + + {{ $t := (time .Params.ResolvedWhen) }} + {{ $timeDiff := (sub $t.Unix .Date.Unix) }} + {{ $diffInMin := (div $timeDiff 60) }} + + {{ if gt $timeDiff 3600 }} + {{ $minutesForCalc := (mod $diffInMin 60) }} + {{ div (sub $diffInMin $minutesForCalc) 60 }}h + {{ $minutesForCalc }}m of downtime + {{ else }} + {{ $secsForCalc := (mod $timeDiff 60) }} + {{ div (sub $timeDiff $secsForCalc) 60 }}m + of downtime + {{ end }} + + {{ else }} + Ongoing, services {{ .Params.severity }} + {{ end }}

{{ .Title }}

+ + {{ .Date.Format "January 02, 2006 at 3:04 PM" }} + +
{{ .Content }}
+
-- cgit v1.2.3-70-g09d2