aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.json4
-rw-r--r--layouts/_default/list.json32
-rw-r--r--layouts/affected/list.json37
-rw-r--r--layouts/index.json2
-rw-r--r--layouts/issues/single.html17
-rw-r--r--layouts/issues/single.json8
6 files changed, 94 insertions, 6 deletions
diff --git a/layouts/404.json b/layouts/404.json
new file mode 100644
index 0000000..82681f1
--- /dev/null
+++ b/layouts/404.json
@@ -0,0 +1,4 @@
+{
+ "is" : "404",
+ "title" : "Error - Not Found"
+} \ No newline at end of file
diff --git a/layouts/_default/list.json b/layouts/_default/list.json
new file mode 100644
index 0000000..f469523
--- /dev/null
+++ b/layouts/_default/list.json
@@ -0,0 +1,32 @@
+{{ $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": "{{ .Section }}",
+ "title": "{{ .Title }}",
+ "baseURL": "{{ .Site.BaseURL }}",
+ "description": "{{ if .Params.Description }}{{ .Params.description }}{{ else }}{{ end }}",
+ "pages": [{{ range $i, $e := .Pages }}{{ if $i }},{{ end }}{{ if eq .Section "issues" }}
+ {
+ "is": "issue",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
+ "permalink": "{{ .Permalink }}",
+ "severity": "{{ .Params.severity }}",
+ "resolved": {{ if .Params.resolved }}true{{ else }}false{{ end }},
+ "informational": {{ if .Params.informational }}true{{ else }}false{{ end }},
+ "resolvedAt": "{{ .Params.resolvedWhen }}",
+ "affected": [{{ range $i, $e := .Params.Affected }}{{ if $i }}, {{ end }}"{{ . }}"{{ end }}],
+ "filename": "{{ .File.LogicalName }}"
+ }
+ {{ else }}
+ {
+ "is": "page",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
+ "permalink": "{{ .Permalink }}",
+ "filename": "{{ .File.LogicalName }}",
+ "summary": {{ jsonify .Summary }}
+ }
+ {{ end }}{{ end }}
+ ],
+}
diff --git a/layouts/affected/list.json b/layouts/affected/list.json
new file mode 100644
index 0000000..1fde8d1
--- /dev/null
+++ b/layouts/affected/list.json
@@ -0,0 +1,37 @@
+{{ $incidents := .Pages }}{{ $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": "system",
+ "title": "{{ .Title }}",
+ "permalink": "{{ .Permalink }}",
+ "status": {{ if $isDown }}"down",{{ else }}{{ if $isDisrupted }}"disrupted",{{ else }}{{ if $isNotice }}"notice",{{ else }}"ok",{{ end }}{{ end }}{{ end }}
+ "pages": [{{ range $i, $e := .Pages }}{{ if $i }},{{ end }}{{ if eq .Section "issues" }}
+ {
+ "is": "issue",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
+ "permalink": "{{ .Permalink }}",
+ "severity": "{{ .Params.severity }}",
+ "resolved": {{ if .Params.resolved }}true{{ else }}false{{ end }},
+ "informational": {{ if .Params.informational }}true{{ else }}false{{ end }},
+ "resolvedAt": "{{ .Params.resolvedWhen }}",
+ "affected": [{{ range $i, $e := .Params.Affected }}{{ if $i }}, {{ end }}"{{ . }}"{{ end }}],
+ "filename": "{{ .File.LogicalName }}"
+ }
+ {{ else }}
+ {
+ "is": "page",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
+ "permalink": "{{ .Permalink }}",
+ "filename": "{{ .File.LogicalName }}",
+ "summary": {{ jsonify .Summary }}
+ }
+ {{ end }}{{ end }}
+ ],
+}
+
+
+
+
+
diff --git a/layouts/index.json b/layouts/index.json
index eea1926..9834cec 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -7,7 +7,7 @@
"languageCode": "{{ T "languageCode" }}",
"baseURL": "{{ .Site.BaseURL }}",
"description": "{{ .Site.Params.Description }}",
- "summaryStatus":{{ if $isDown }}"down",{{ else }}{{ if $isDisrupted }}"disrupted",{{ else }}{{ if $isNotice }}"notice",{{ else }}"ok",{{ end }}{{ end }}{{ end }}
+ "summaryStatus": {{ if $isDown }}"down",{{ else }}{{ if $isDisrupted }}"disrupted",{{ else }}{{ if $isNotice }}"notice",{{ else }}"ok",{{ end }}{{ end }}{{ end }}
"categories": [{{ range $i, $e := .Site.Params.categories }}{{ if $i }},{{ end }}
{
"name": "{{ .name }}",{{ if .description }}
diff --git a/layouts/issues/single.html b/layouts/issues/single.html
index 5761477..402c794 100644
--- a/layouts/issues/single.html
+++ b/layouts/issues/single.html
@@ -13,9 +13,24 @@
</div>
<div class="contain">
- {{ .Render "issue" }}
+ {{ .Render "issue" }}
</div>
+
+ {{ if .Site.Params.enableLastMod }}
+ <div class="contain center">
+ <p>{{ T "lastChecked" }}:
+ {{ if .Site.Params.dateFormat }}
+ {{ .Lastmod.UTC.Format .Site.Params.dateFormat }}
+ {{ else }}
+ {{ .Lastmod.Format "January 2, 2006 at 3:04 PM" }}
+ {{ end }}
+ </p>
+ </div>
+ {{ end }}
+
+
+
{{ partial "js" . }}
{{ partial "footer" . }}
diff --git a/layouts/issues/single.json b/layouts/issues/single.json
index 36b0f67..fb78ee7 100644
--- a/layouts/issues/single.json
+++ b/layouts/issues/single.json
@@ -2,12 +2,12 @@
"is": "issue",
"title": "{{ .Title }}",
"createdAt": "{{ .Date }}",
+ "lastMod": "{{ .Lastmod }}",
"permalink": "{{ .Permalink }}",
"severity": "{{ .Params.severity }}",
- "resolved": "{{ .Params.resolved }}",
- "informational": "{{ .Params.informational }}",
+ "resolved": {{ if .Params.resolved }}true{{ else }}false{{ end }},
+ "informational": {{ if .Params.informational }}true{{ else }}false{{ end }},
"resolvedAt": "{{ .Params.resolvedWhen }}",
"affected": [{{ range $i, $e := .Params.Affected }}{{ if $i }}, {{ end }}"{{ . }}"{{ end }}],
- "filename": "{{ .File.LogicalName }}",
- "body": {{ jsonify .Content }}
+ "filename": "{{ .File.LogicalName }}"
} \ No newline at end of file