From 4a968698e45ece04b25f41783298b9b397a191a1 Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Thu, 24 Jan 2019 19:23:35 +0200 Subject: cState is now stable on v3.0 - 2019-01-24 (info: #41) --- layouts/issues/small.html | 76 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 layouts/issues/small.html (limited to 'layouts/issues/small.html') diff --git a/layouts/issues/small.html b/layouts/issues/small.html new file mode 100644 index 0000000..6833b68 --- /dev/null +++ b/layouts/issues/small.html @@ -0,0 +1,76 @@ +{{ $incidents := where .Site.RegularPages "Params.section" "issue" }} +{{ $active := where $incidents "Params.resolved" "=" false }} + +{{ $isNotice := where $active "Params.severity" "=" "notice" }} +{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }} +{{ $isDown := where $active "Params.severity" "=" "down" }} + + + {{ if .Params.Resolved }} + + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + + +

+ {{ .Title }} +

+ + {{ $t := (time .Params.ResolvedWhen) }} + {{ $timeDiff := (sub $t.Unix .Date.Unix) }} + {{ $diffInMin := (div $timeDiff 60) }} + + + {{ if lt $timeDiff 60 }} +
+ {{ T "resolved" }} {{ T "inUnderAMinute" }} +
+ {{ else }} + {{ if gt $timeDiff 3600 }} +
+ {{ T "resolvedAfter" }} + + {{ $minutesForCalc := (mod $diffInMin 60) }} + + {{ div (sub $diffInMin $minutesForCalc) 60 }}h + {{ $minutesForCalc }}m {{ T "ofDowntime" }} +
+ {{ else }} +
+ {{ T "resolvedAfter" }} + + {{ $secsForCalc := (mod $timeDiff 60) }} + + {{ div (sub $timeDiff $secsForCalc) 60 }}m + {{ T "ofDowntime" }} +
+ {{ end }} + {{ end }} + + + {{ else }} + + + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + + +

+ {{ .Title }} +

+ + {{ $t := (time .Params.ResolvedWhen) }} + {{ $timeDiff := (sub $t.Unix .Date.Unix) }} + {{ $diffInMin := (div $timeDiff 60) }} + + +
{{ T "downtimeOngoing" }}
+ + {{ end }} +
-- cgit v1.2.3-70-g09d2