diff options
author | Mantas <11616378+mistermantas@users.noreply.github.com> | 2019-01-24 19:23:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-24 19:23:35 +0200 |
commit | 4a968698e45ece04b25f41783298b9b397a191a1 (patch) | |
tree | 57ae06a3d7344f234ba71a12b7962144b8eb5472 /layouts/issues/issue.html | |
parent | 8a1aaf4737e90406119bdf5770937eea924729aa (diff) |
cState is now stable on v3.0 - 2019-01-24 (info: #41)
Diffstat (limited to 'layouts/issues/issue.html')
-rw-r--r-- | layouts/issues/issue.html | 96 |
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 }} |