{{ $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 }} {{ $t := (time .Params.ResolvedWhen) }} {{ $timeDiff := (sub $t.Unix .Date.Unix) }} {{ $diffInMin := (div $timeDiff 60) }} {{ 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 of downtime {{ end }} {{ end }} {{ else }} Ongoing, services {{ if eq .Params.severity "notice" }}on notice{{ else }}{{ .Params.severity }}{{ end }} {{ end }}

{{ .Title }}

{{ .Date.Format "January 02, 2006 at 3:04 PM" }}
{{ .Content }}