diff options
author | Mantas <11616378+mistermantas@users.noreply.github.com> | 2019-04-08 21:46:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-08 21:46:03 +0300 |
commit | d69ebc475fc67c65c52c206b7cc1eb70e1633645 (patch) | |
tree | 4808b9ae6e28372ced486b1e827d8300406dcbe0 /layouts/partials/index/components.html | |
parent | 9c2eb26b5732e0a9087dd024f7fd0b10fec9ef74 (diff) | |
parent | 7f610d23ed696d050ed2d1e405f6bba339a497c4 (diff) |
cState v3.1.0 | #54 | here goes nothing
cState v3.1.0
Diffstat (limited to 'layouts/partials/index/components.html')
-rw-r--r-- | layouts/partials/index/components.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/layouts/partials/index/components.html b/layouts/partials/index/components.html new file mode 100644 index 0000000..128b887 --- /dev/null +++ b/layouts/partials/index/components.html @@ -0,0 +1,53 @@ +{{ $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" }} + +<div class="components"> + {{ $systems := .Site.Params.systems }} + {{ range $systems }} + {{ $activeComponentIssues := where $active "Params.affected" "intersect" (slice .name) }} + + {{ $thisIsNotice := where $activeComponentIssues "Params.severity" "=" "notice" }} + {{ $thisIsDisrupted := where $activeComponentIssues "Params.severity" "=" "disrupted" }} + {{ $thisIsDown := where $activeComponentIssues "Params.severity" "=" "down" }} + + <div class="component" data-status="{{ if $thisIsDown }}down{{ else }}{{ if $thisIsDisrupted }}disrupted{{ else }}{{ if $thisIsNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }}"> + <a href="/affected/{{ .name | urlize }}" class="no-underline"> + {{ .name }} + </a> + + {{ with .description }} + <span class="tooltip tooltip--small"> + <span class="faded">(?)</span> + + <span class="tooltip__text"> + {{ . }} + </span> + </span> + {{ end }} + + <span class="component-status"> + {{ if $thisIsDown }} + <b>{{ T "thisIsDown" }}</b> + {{ else }} + {{ if $thisIsDisrupted }} + <b>{{ T "thisIsDisrupted" }}</b> + {{ else }} + {{ if $thisIsNotice }} + <b>{{ T "thisIsNotice" }}</b> + {{ else }} + {{ T "thisIsOk" }} + {{ end }}{{ end }}{{ end }} + </span> + + {{ with .partial }} + <div> + {{ partial . . }} + </div> + {{ end }} + </div> + {{ end }} + </div>
\ No newline at end of file |