From a07a3ccb6d76f3bacc85eddf0c132aa29a1a610c Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Fri, 4 Oct 2019 18:59:16 +0300 Subject: Added symbols for severity, informational posts, yearly layout default --- layouts/issues/issue.html | 13 +++++-- layouts/issues/small.html | 52 ++++++++++++++++++++-------- layouts/partials/index/incidents-yearly.html | 4 ++- 3 files changed, 51 insertions(+), 18 deletions(-) (limited to 'layouts') diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html index c344f57..24cadd8 100644 --- a/layouts/issues/issue.html +++ b/layouts/issues/issue.html @@ -24,7 +24,8 @@ {{ end }}

- {{ if .Params.Resolved }} + {{ if .Params.informational }} + {{ else if .Params.Resolved }} {{ $t := (time .Params.ResolvedWhen) }} {{ $timeDiff := (sub $t.Unix .Date.Unix) }} {{ $diffInMin := (div $timeDiff 60) }} @@ -79,7 +80,15 @@ {{ end }} {{ end }} {{ else }} - {{ T "downtimeOngoing" }} + + {{ if eq .Params.severity "down" }} + ◼ + {{ else if eq .Params.severity "disrupted" }} + ▲ + {{ else }} + ◆ + {{ end }} + {{ T "downtimeOngoing" }} {{ end }}
diff --git a/layouts/issues/small.html b/layouts/issues/small.html index ef30b75..9349046 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -6,7 +6,23 @@ {{ $isDown := where $active "Params.severity" "=" "down" }} - {{ if .Params.Resolved }} + {{ if .Params.informational }} + + + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + + +

+ {{ .Title }}  ℹ +

+ {{ .Summary | truncate 200 }} + + + {{ else if .Params.Resolved }} {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} @@ -49,24 +65,30 @@ {{ end }} {{ end }} - - {{ else }} - - {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} - {{ else }} - {{ .Date.Format "January 2, 2006 at 3:04 PM" }} - {{ end }} - + + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + -

- {{ .Title }} -

+

+ {{ .Title }} +

- -
{{ T "downtimeOngoing" }}
+ + + {{ if eq .Params.severity "down" }} + ◼ + {{ else if eq .Params.severity "disrupted" }} + ▲ + {{ else }} + ◆ + {{ end }} + {{ T "downtimeOngoing" }} {{ end }}
diff --git a/layouts/partials/index/incidents-yearly.html b/layouts/partials/index/incidents-yearly.html index 36f6e44..5cc323a 100644 --- a/layouts/partials/index/incidents-yearly.html +++ b/layouts/partials/index/incidents-yearly.html @@ -1,7 +1,9 @@ {{ $incidents := where .Site.RegularPages "Params.section" "issue" }} {{ range ((where .Site.RegularPages "Params.section" "issue").GroupByDate "2006") }} -

{{ .Key }}

+

{{ .Key }} + ({{ len .Pages }}) +

{{ range .Pages }} {{ .Render "small" }} -- cgit v1.2.3-70-g09d2