aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.json
diff options
context:
space:
mode:
authorMantas Vilčinskas <11616378+mistermantas@users.noreply.github.com>2019-12-21 21:25:21 +0200
committerGitHub <noreply@github.com>2019-12-21 21:25:21 +0200
commita8f60c31b75fe5a3c91a6595585738523f1cad25 (patch)
tree7528a3042e37765e286c9490f5b321e6799acb41 /layouts/index.json
parent96394ffb854ec6b8f17aa1ef105eb9ff92e5e676 (diff)
parent12e885ad58d44d55603a64906d1dcf7f1d961b4c (diff)
cState v4.0 Final (#82)
cState v4.0 Final
Diffstat (limited to 'layouts/index.json')
-rw-r--r--layouts/index.json59
1 files changed, 59 insertions, 0 deletions
diff --git a/layouts/index.json b/layouts/index.json
new file mode 100644
index 0000000..3a2c299
--- /dev/null
+++ b/layouts/index.json
@@ -0,0 +1,59 @@
+{{ $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" }}
+{
+ "is": "index",
+ "cStateVersion": "4.0.0",
+ "apiVersion": "1.0.0",
+ "title": "{{ .Site.Title }}",
+ "languageCodeHTML": "{{ .Site.LanguageCode }}",
+ "languageCode": "{{ T "languageCode" }}",
+ "baseURL": "{{ .Site.BaseURL }}",
+ "description": "{{ .Site.Params.Description }}",
+ "logo": "{{ .Site.Params.logo | absURL }}",
+ "categories": [
+ {{ range $i, $e := .Site.Params.categories }}{{ if $i }},{{ end }}
+ {
+ "name": "{{ .name }}",{{ if .description }}
+ "description": "{{ .description }}",{{ end }}
+ "hideTitle": {{ if .untitled }}true{{ else }}false{{ end }},
+ "closedByDefault": {{ if .closed }}true{{ else }}false{{ end }}
+ }
+ {{ end }}
+ ],
+ "systems": [
+ {{ range $i, $e := .Site.Params.systems }}{{ if $i }},{{ end }}
+ {
+ "name": "{{ .name }}",{{ if .description }}
+ "description": "{{ .description }}",{{ end }}
+ "category": "{{ .category }}"
+ }
+ {{ end }}
+ ],
+
+
+ "buildDate": "{{ now.Format "2006-01-02" }}",
+ "buildTime": "{{ now.Format "15:04" }}",
+ "buildTimezone": "{{ now.Format "MST" }}",
+ "summaryStatus":{{ if $isDown }}
+ "down",
+ {{ else }}
+ {{ if $isDisrupted }}
+ "disrupted",
+ {{ else }}
+ {{ if $isNotice }}
+ "notice",
+ {{ else }}
+ "ok",
+ {{ end }}{{ end }}{{ end }}
+ "colorBrand": "{{ .Site.Params.Brand }}",
+ "colorOk": "{{ .Site.Params.Ok }}",
+ "colorDisrupted": "{{ .Site.Params.Disrupted }}",
+ "colorDown": "{{ .Site.Params.Down }}",
+ "colorNotice": "{{ .Site.Params.Notice }}",
+ "alwaysKeepBrandColor": "{{ .Site.Params.alwaysKeepBrandColor }}",
+
+ "googleAnalytics": "{{ .Site.Params.googleAnalytics }}"
+} \ No newline at end of file