diff options
author | Mantas Vilčinskas <hi@mnts.lt> | 2019-10-04 18:59:16 +0300 |
---|---|---|
committer | Mantas Vilčinskas <hi@mnts.lt> | 2019-10-04 18:59:16 +0300 |
commit | a07a3ccb6d76f3bacc85eddf0c132aa29a1a610c (patch) | |
tree | 0ea974628610eeb779a2db625d6e3f772cf2f021 /layouts | |
parent | 15f03af4e678c0ab4a71af3d34ce3040102992ce (diff) |
Added symbols for severity, informational posts, yearly layout default
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/issues/issue.html | 13 | ||||
-rw-r--r-- | layouts/issues/small.html | 52 | ||||
-rw-r--r-- | layouts/partials/index/incidents-yearly.html | 4 |
3 files changed, 51 insertions, 18 deletions
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 }} </small></p> - {{ 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 }} - <strong class="error">{{ T "downtimeOngoing" }}</strong> + <strong class="error"> + {{ if eq .Params.severity "down" }} + ◼ + {{ else if eq .Params.severity "disrupted" }} + ▲ + {{ else }} + ◆ + {{ end }} + {{ T "downtimeOngoing" }}</strong> {{ end }} <hr> 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" }} <a href="{{ .Permalink }}" class="issue no-underline"> - {{ if .Params.Resolved }} + {{ if .Params.informational }} + + <small class="date float-right"> + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + </small> + + <h3> + {{ .Title }} ℹ + </h3> + <span class="faded">{{ .Summary | truncate 200 }} + </span> + + {{ else if .Params.Resolved }} <small class="date float-right"> {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} @@ -49,24 +65,30 @@ </div> {{ end }} {{ end }} - - {{ else }} - <small class="date float-right"> - {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} - {{ else }} - {{ .Date.Format "January 2, 2006 at 3:04 PM" }} - {{ end }} - </small> + <small class="date float-right"> + {{ if .Site.Params.dateFormat }} + {{ .Date.Format .Site.Params.dateFormat }} + {{ else }} + {{ .Date.Format "January 2, 2006 at 3:04 PM" }} + {{ end }} + </small> - <h3> - {{ .Title }} - </h3> + <h3> + {{ .Title }} + </h3> - <!-- Marker --> - <div class="error">{{ T "downtimeOngoing" }}</div> + <!-- Marker --> + <strong class="error"> + {{ if eq .Params.severity "down" }} + ◼ + {{ else if eq .Params.severity "disrupted" }} + ▲ + {{ else }} + ◆ + {{ end }} + {{ T "downtimeOngoing" }}</strong> {{ end }} </a> 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") }} - <p class="center" id="{{ .Key }}"><a href="#{{ .Key }}" class="no-underline"><strong>{{ .Key }}</strong></a></p> + <p class="center" id="{{ .Key }}"><a href="#{{ .Key }}" class="no-underline"><strong>{{ .Key }}</strong> + <span class="faded">({{ len .Pages }})</span> + </a></p> {{ range .Pages }} {{ .Render "small" }} |