aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/index/components.html
diff options
context:
space:
mode:
authorMantas <11616378+mistermantas@users.noreply.github.com>2019-01-25 16:53:51 +0200
committerMantas <11616378+mistermantas@users.noreply.github.com>2019-01-25 16:53:51 +0200
commit290aa0df0204038b8c7b23c28d716755e468f169 (patch)
treef550e674805b3cc42b4b0c74ea7d78a8c59aca77 /layouts/partials/index/components.html
parent6a1fbad426c29b4f3fe4f6fa4d240735d5432b50 (diff)
fix #42, #51; v4-dev1 begins
Diffstat (limited to 'layouts/partials/index/components.html')
-rw-r--r--layouts/partials/index/components.html53
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..9424cd0
--- /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">
+ &nbsp; <span class="faded">(?)</span>
+
+ <span class="tooltip__text">
+ {{ . }}
+ </span>
+ </span>
+ {{ end }}
+
+ <span class="component-status">
+ {{ if $thisIsDown }}
+ {{ T "thisIsDown" }}
+ {{ else }}
+ {{ if $thisIsDisrupted }}
+ {{ T "thisIsDisrupted" }}
+ {{ else }}
+ {{ if $thisIsNotice }}
+ {{ T "thisIsNotice" }}
+ {{ else }}
+ {{ T "thisIsOk" }}
+ {{ end }}{{ end }}{{ end }}
+ </span>
+
+ {{ with .partial }}
+ <div>
+ {{ partial . . }}
+ </div>
+ {{ end }}
+ </div>
+ {{ end }}
+ </div> \ No newline at end of file