aboutsummaryrefslogtreecommitdiff
path: root/layouts/issues
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/issues')
-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>