From dccc5e9864bb8e5923d633848860d39e4d92e46c Mon Sep 17 00:00:00 2001
From: Mantas <11616378+mistermantas@users.noreply.github.com>
Date: Thu, 5 Jul 2018 14:45:24 +0300
Subject: v2 Dev Preview 1
---
layouts/index.html | 98 +++++++++++++++++++++++++++++++++---------------------
1 file changed, 61 insertions(+), 37 deletions(-)
(limited to 'layouts/index.html')
diff --git a/layouts/index.html b/layouts/index.html
index a09d429..eedb08d 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,4 +1,5 @@
{{ partial "meta" . }}
+
{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}
{{ $active := where $incidents "Params.resolved" "=" false }}
@@ -6,18 +7,8 @@
{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}
{{ $isDown := where $active "Params.severity" "=" "down" }}
-
-
+
+ {{ partial "header" . }}
@@ -32,7 +23,7 @@
{{ if $isDown }}
Experiencing major issues
{{ else }}
- {{ if $isDisrupted}}
+ {{ if $isDisrupted }}
Experiencing disruptions
{{ else }}
{{ if $isNotice }}
@@ -42,47 +33,80 @@
{{ end }}{{ end }}{{ end }}
-
+
+
+
+ {{ if $active }}
+
+ {{ range $active }}
+
+
{{ .Title }}
+ {{ .Content }}
+
+ {{ else }}{{ end }}
+ {{ end }}
- {{ range $active }}
-
- {{ .Date.Format "January 02, 2006 at 3:04 PM" }}
- {{ .Title }}
- {{ .Content }}
-
- {{ else }}{{ end }}
- {{ if not $active }}
{{ $systems := .Site.Params.systems }}
{{ range $index, $systems }}
-
+ {{ $activeComponentIssues := where $active "Params.affected" "intersect" (slice .) }}
+
+ {{ $thisIsNotice := where $activeComponentIssues "Params.severity" "=" "notice" }}
+ {{ $thisIsDisrupted := where $activeComponentIssues "Params.severity" "=" "disrupted" }}
+ {{ $thisIsDown := where $activeComponentIssues "Params.severity" "=" "down" }}
+
+
+ {{ $this := . }}
{{ . }}
- Operational
+
+ {{ if $thisIsDown }}
+ Down
+ {{ else }}
+ {{ if $thisIsDisrupted }}
+ Disrupted
+ {{ else }}
+ {{ if $thisIsNotice }}
+ Maintenance
+ {{ else }}
+ Operational
+ {{ end }}{{ end }}{{ end }}
+
{{ end }}
- {{ end }}
-
+
-
-
Incident history
- {{ if not .Data.Pages }}
-
Looks like we do not have any incidents logged.
- {{ else }}
- {{ range first 10 .Data.Pages }}
- {{ .Render "issue" }}
- {{ end }}
- {{ end }}
+
+
+
+
+
+ {{ if not .Data.Pages }}
+
Looks like we do not have any incidents logged.
+ {{ else }}
+ {{ range .Data.Pages }}
+ {{ .Render "issue" }}
+ {{ end }}
+ {{ end }}
+
- {{ partial "js" . }}
- {{ partial "footer" . }}
+ {{ partial "js" . }}
+ {{ partial "footer" . }}
--
cgit v1.2.3-70-g09d2