aboutsummaryrefslogtreecommitdiff
path: root/layouts/issues/issue.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/issues/issue.html')
-rw-r--r--layouts/issues/issue.html96
1 files changed, 67 insertions, 29 deletions
diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html
index 014a33a..c344f57 100644
--- a/layouts/issues/issue.html
+++ b/layouts/issues/issue.html
@@ -6,43 +6,81 @@
{{ $isDown := where $active "Params.severity" "=" "down" }}
<div class="article">
+ <h1 class="clean">
+ {{ .Title }}
+ </h1>
+
+ <small class="date">
+ {{ if .Site.Params.dateFormat }}
+ {{ .Date.Format .Site.Params.dateFormat }}
+ {{ else }}
+ {{ .Date.Format "January 2, 2006 at 3:04 PM" }}
+ {{ end }}
+ </small>
+
+ <p><small>
+ {{ range .Params.Affected }}
+ <a href="/affected/{{ . | urlize }}" class="tag no-underline">{{ . }}</a>
+ {{ end }}
+ </small></p>
+
{{ if .Params.Resolved }}
- <span class="ok">
-
- {{ $t := (time .Params.ResolvedWhen) }}
- {{ $timeDiff := (sub $t.Unix .Date.Unix) }}
- {{ $diffInMin := (div $timeDiff 60) }}
-
- <!-- Marker -->
- {{ if lt $timeDiff 60 }}
- ✓ Resolved
+ {{ $t := (time .Params.ResolvedWhen) }}
+ {{ $timeDiff := (sub $t.Unix .Date.Unix) }}
+ {{ $diffInMin := (div $timeDiff 60) }}
+
+
+ <!-- Marker -->
+ {{ if lt $timeDiff 60 }}
+ <div class="faded">
+ <strong>
+ {{ T "resolved" }} {{ T "inUnderAMinute" }}.
+ </strong>
+ </div>
+ {{ else }}
+ {{ if gt $timeDiff 3600 }}
+ <div class="warning tooltip">
+ <strong>
+ {{ T "resolvedAfter" }}
+
+ {{ $minutesForCalc := (mod $diffInMin 60) }}
+
+ {{ div (sub $diffInMin $minutesForCalc) 60 }}h
+ {{ $minutesForCalc }}m {{ T "ofDowntime" }}.
+ </strong>
+
+ <span class="tooltip__text">
+ {{ if .Site.Params.dateFormat }}
+ {{ dateFormat .Site.Params.dateFormat .Params.resolvedWhen }}
+ {{ else }}
+ {{ dateFormat "January 2, 2006 at 3:04 PM" .Params.resolvedWhen }}
+ {{ end }}
+ </span>
+ </div>
{{ else }}
+ <div class="ok tooltip">
+ <strong>
+ {{ T "resolvedAfter" }}
- ✓ Resolved after
- {{ if gt $timeDiff 3600 }}
- {{ $minutesForCalc := (mod $diffInMin 60) }}
+ {{ $secsForCalc := (mod $timeDiff 60) }}
- {{ div (sub $diffInMin $minutesForCalc) 60 }}h
- {{ $minutesForCalc }}m of downtime
- {{ else }}
- {{ $secsForCalc := (mod $timeDiff 60) }}
+ {{ div (sub $timeDiff $secsForCalc) 60 }}m
+ {{ T "ofDowntime" }}.
+ </strong>
- {{ div (sub $timeDiff $secsForCalc) 60 }}m
- <!-- {{ $secsForCalc }}s --> of downtime
- {{ end }}
-
+ <span class="tooltip__text">
+ {{ if .Site.Params.dateFormat }}
+ {{ dateFormat .Site.Params.dateFormat .Params.resolvedWhen }}
+ {{ else }}
+ {{ dateFormat "January 2, 2006 at 3:04 PM" .Params.resolvedWhen }}
+ {{ end }}
+ </span>
+ </div>
{{ end }}
- </span>
+ {{ end }}
{{ else }}
- <em>Ongoing, services {{ if eq .Params.severity "notice" }}on notice{{ else }}{{ .Params.severity }}{{ end }}</em>
+ <strong class="error">{{ T "downtimeOngoing" }}</strong>
{{ end }}
- <h3>
- <a href="{{ .Permalink }}">{{ .Title }}</a>
- </h3>
-
- <small class="date">
- {{ .Date.Format "January 02, 2006 at 3:04 PM" }}
- </small>
<hr>
{{ .Content }}