From 872cd0c09287802eb52bf020a87f8ddfe6e74471 Mon Sep 17 00:00:00 2001 From: Kashif Rafique Date: Fri, 5 Oct 2018 21:24:17 +0500 Subject: Fix #28, #30 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Resolved after 0 minutes should just be resolved issue #28 * Submodules shouldn’t be in root repo * #31 - Remove themes/ * Delete test-issue-2.md * Delete test-issues.md * Fix indent --- layouts/issues/issue.html | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) (limited to 'layouts/issues/issue.html') diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html index acc3fb3..014a33a 100644 --- a/layouts/issues/issue.html +++ b/layouts/issues/issue.html @@ -7,23 +7,31 @@
{{ if .Params.Resolved }} - ✓ 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 }} + + + {{ $t := (time .Params.ResolvedWhen) }} + {{ $timeDiff := (sub $t.Unix .Date.Unix) }} + {{ $diffInMin := (div $timeDiff 60) }} + + + {{ if lt $timeDiff 60 }} + ✓ Resolved + {{ else }} + + ✓ Resolved after + {{ 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 }} + + {{ end }} {{ else }} Ongoing, services {{ if eq .Params.severity "notice" }}on notice{{ else }}{{ .Params.severity }}{{ end }} @@ -37,7 +45,6 @@
- {{ .Content }}
-- cgit v1.2.3-70-g09d2