aboutsummaryrefslogtreecommitdiff
path: root/layouts/issues
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/issues
parent96394ffb854ec6b8f17aa1ef105eb9ff92e5e676 (diff)
parent12e885ad58d44d55603a64906d1dcf7f1d961b4c (diff)
cState v4.0 Final (#82)
cState v4.0 Final
Diffstat (limited to 'layouts/issues')
-rw-r--r--layouts/issues/issue.html13
-rw-r--r--layouts/issues/single.json13
-rw-r--r--layouts/issues/small.html52
3 files changed, 61 insertions, 17 deletions
diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html
index c344f57..62f3ab3 100644
--- a/layouts/issues/issue.html
+++ b/layouts/issues/issue.html
@@ -24,7 +24,8 @@
{{ end }}
</small></p>
- {{ if .Params.Resolved }}
+ {{ if .Params.informational }}
+ {{ else if .Params.Resolved }}
{{ $t := (time .Params.ResolvedWhen) }}
{{ $timeDiff := (sub $t.Unix .Date.Unix) }}
{{ $diffInMin := (div $timeDiff 60) }}
@@ -79,7 +80,15 @@
{{ end }}
{{ end }}
{{ else }}
- <strong class="error">{{ T "downtimeOngoing" }}</strong>
+ <strong class="error">
+ {{ if eq .Params.severity "down" }}
+ ■
+ {{ else if eq .Params.severity "disrupted" }}
+ ▲
+ {{ else }}
+ ◆
+ {{ end }}
+ {{ T "downtimeOngoing" }}</strong>
{{ end }}
<hr>
diff --git a/layouts/issues/single.json b/layouts/issues/single.json
new file mode 100644
index 0000000..36b0f67
--- /dev/null
+++ b/layouts/issues/single.json
@@ -0,0 +1,13 @@
+{
+ "is": "issue",
+ "title": "{{ .Title }}",
+ "createdAt": "{{ .Date }}",
+ "permalink": "{{ .Permalink }}",
+ "severity": "{{ .Params.severity }}",
+ "resolved": "{{ .Params.resolved }}",
+ "informational": "{{ .Params.informational }}",
+ "resolvedAt": "{{ .Params.resolvedWhen }}",
+ "affected": [{{ range $i, $e := .Params.Affected }}{{ if $i }}, {{ end }}"{{ . }}"{{ end }}],
+ "filename": "{{ .File.LogicalName }}",
+ "body": {{ jsonify .Content }}
+} \ No newline at end of file
diff --git a/layouts/issues/small.html b/layouts/issues/small.html
index ef30b75..0e1d5ed 100644
--- a/layouts/issues/small.html
+++ b/layouts/issues/small.html
@@ -6,7 +6,23 @@
{{ $isDown := where $active "Params.severity" "=" "down" }}
<a href="{{ .Permalink }}" class="issue no-underline">
- {{ if .Params.Resolved }}
+ {{ if .Params.informational }}
+
+ <small class="date float-right">
+ {{ if .Site.Params.dateFormat }}
+ {{ .Date.Format .Site.Params.dateFormat }}
+ {{ else }}
+ {{ .Date.Format "January 2, 2006 at 3:04 PM" }}
+ {{ end }}
+ </small>
+
+ <h3>
+ {{ .Title }} &nbsp;ℹ
+ </h3>
+ <span class="faded">{{ .Summary | truncate 200 }}
+ </span>
+
+ {{ else if .Params.Resolved }}
<small class="date float-right">
{{ if .Site.Params.dateFormat }}
{{ .Date.Format .Site.Params.dateFormat }}
@@ -49,24 +65,30 @@
</div>
{{ end }}
{{ end }}
-
-
{{ else }}
- <small class="date float-right">
- {{ if .Site.Params.dateFormat }}
- {{ .Date.Format .Site.Params.dateFormat }}
- {{ else }}
- {{ .Date.Format "January 2, 2006 at 3:04 PM" }}
- {{ end }}
- </small>
+ <small class="date float-right">
+ {{ if .Site.Params.dateFormat }}
+ {{ .Date.Format .Site.Params.dateFormat }}
+ {{ else }}
+ {{ .Date.Format "January 2, 2006 at 3:04 PM" }}
+ {{ end }}
+ </small>
- <h3>
- {{ .Title }}
- </h3>
+ <h3>
+ {{ .Title }}
+ </h3>
- <!-- Marker -->
- <div class="error">{{ T "downtimeOngoing" }}</div>
+ <!-- Marker -->
+ <strong class="error">
+ {{ if eq .Params.severity "down" }}
+ ■
+ {{ else if eq .Params.severity "disrupted" }}
+ ▲
+ {{ else }}
+ ◆
+ {{ end }}
+ {{ T "downtimeOngoing" }}</strong>
{{ end }}
</a>