aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKashif Rafique <logichub@users.noreply.github.com>2018-10-05 21:24:17 +0500
committerMantas <11616378+mistermantas@users.noreply.github.com>2018-10-05 19:24:17 +0300
commit872cd0c09287802eb52bf020a87f8ddfe6e74471 (patch)
treee36e143c1c8b31a89f98f4bcf57e41b08f1a39d5
parentc71ebf68ed0a65180b9dc5934eb747ee8da6c90a (diff)
Fix #28, #30
* 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
-rw-r--r--layouts/issues/issue.html43
1 files changed, 25 insertions, 18 deletions
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 @@
<div class="article">
{{ if .Params.Resolved }}
- <span class="ok">✓ 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
- <!-- {{ $secsForCalc }}s --> of downtime
- {{ end }}
+ <span class="ok">
+
+ {{ $t := (time .Params.ResolvedWhen) }}
+ {{ $timeDiff := (sub $t.Unix .Date.Unix) }}
+ {{ $diffInMin := (div $timeDiff 60) }}
+
+ <!-- Marker -->
+ {{ 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
+ <!-- {{ $secsForCalc }}s --> of downtime
+ {{ end }}
+
+ {{ end }}
</span>
{{ else }}
<em>Ongoing, services {{ if eq .Params.severity "notice" }}on notice{{ else }}{{ .Params.severity }}{{ end }}</em>
@@ -37,7 +45,6 @@
</small>
<hr>
-
{{ .Content }}
</div>
<div class="padding"></div>