diff options
author | Mantas Vilčinskas <hi@mnts.lt> | 2019-10-06 10:28:21 +0300 |
---|---|---|
committer | Mantas Vilčinskas <hi@mnts.lt> | 2019-10-06 10:28:21 +0300 |
commit | ae39ee1c2d48899e75acdecff7442b4ef8a4c49c (patch) | |
tree | 226e2d06ee3eea5f50a0712844e1388aadb9d9c6 /layouts/index.json | |
parent | 19d5be70f84c21011869b6c8340a0589f353beb8 (diff) |
Mostly finished API #27 for index, issue, page; remove autorefresh #80
Diffstat (limited to 'layouts/index.json')
-rw-r--r-- | layouts/index.json | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/layouts/index.json b/layouts/index.json index 2495f60..c2a2c49 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -1,9 +1,15 @@ +{{ $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" }} { - "version": "4.0", + "is": "index", + "cStateVersion": "4.0", + "apiVersion": "1.0", "title": "{{ .Site.Title }}", "languageCodeHTML": "{{ .Site.LanguageCode }}", "languageCode": "{{ T "languageCode" }}", - "languageCode": "{{ T "languageCode" }}", "baseURL": "{{ .Site.BaseURL }}", "description": "{{ .Site.Params.Description }}", "logo": "{{ .Site.Params.logo | absURL }}", @@ -12,8 +18,8 @@ { "name": "{{ .name }}",{{ if .description }} "description": "{{ .description }}",{{ end }} - "hideTitle": "{{ .untitled }}", - "closedByDefault": "{{ .closed }}" + "hideTitle": {{ if .untitled }}true{{ else }}false{{ end }}, + "closedByDefault": {{ if .closed }}true{{ else }}false{{ end }} } {{ end }} ], @@ -22,18 +28,32 @@ { "name": "{{ .name }}",{{ if .description }} "description": "{{ .description }}",{{ end }} - "category": "{{ .category }}", - "hideTitle": "{{ .untitled }}", - "closedByDefault": "{{ .closed }}" + "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 |