From 290aa0df0204038b8c7b23c28d716755e468f169 Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Fri, 25 Jan 2019 16:53:51 +0200 Subject: fix #42, #51; v4-dev1 begins --- layouts/partials/index/announcements.html | 14 +++++++ layouts/partials/index/autorefresh.html | 8 ++++ layouts/partials/index/components.html | 53 +++++++++++++++++++++++++++ layouts/partials/index/incidents.html | 61 +++++++++++++++++++++++++++++++ layouts/partials/index/noscript.html | 4 ++ layouts/partials/index/summary.html | 24 ++++++++++++ layouts/partials/index/tabs.html | 20 ++++++++++ 7 files changed, 184 insertions(+) create mode 100644 layouts/partials/index/announcements.html create mode 100644 layouts/partials/index/autorefresh.html create mode 100644 layouts/partials/index/components.html create mode 100644 layouts/partials/index/incidents.html create mode 100644 layouts/partials/index/noscript.html create mode 100644 layouts/partials/index/summary.html create mode 100644 layouts/partials/index/tabs.html (limited to 'layouts/partials/index') diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html new file mode 100644 index 0000000..a02045e --- /dev/null +++ b/layouts/partials/index/announcements.html @@ -0,0 +1,14 @@ +{{ $incidents := where .Site.RegularPages "Params.section" "issue" }} +{{ $active := where $incidents "Params.resolved" "=" false }} + +{{ if $active }} +
+ {{ range $active }} +
+

{{ .Title }}

+ {{ .Content | safeHTML | truncate 500 "…" }} +

{{ T "continueReading" }}

+
+ {{ else }}{{ end }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/index/autorefresh.html b/layouts/partials/index/autorefresh.html new file mode 100644 index 0000000..b419e2f --- /dev/null +++ b/layouts/partials/index/autorefresh.html @@ -0,0 +1,8 @@ +{{ if .Site.Params.autoRefresh }} +
+ {{ T "autoRefreshNotice" }} +
+
+ {{ else }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/index/components.html b/layouts/partials/index/components.html new file mode 100644 index 0000000..9424cd0 --- /dev/null +++ b/layouts/partials/index/components.html @@ -0,0 +1,53 @@ +{{ $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" }} + +
+ {{ $systems := .Site.Params.systems }} + {{ range $systems }} + {{ $activeComponentIssues := where $active "Params.affected" "intersect" (slice .name) }} + + {{ $thisIsNotice := where $activeComponentIssues "Params.severity" "=" "notice" }} + {{ $thisIsDisrupted := where $activeComponentIssues "Params.severity" "=" "disrupted" }} + {{ $thisIsDown := where $activeComponentIssues "Params.severity" "=" "down" }} + +
+ + {{ .name }} + + + {{ with .description }} + +   (?) + + + {{ . }} + + + {{ end }} + + + {{ if $thisIsDown }} + {{ T "thisIsDown" }} + {{ else }} + {{ if $thisIsDisrupted }} + {{ T "thisIsDisrupted" }} + {{ else }} + {{ if $thisIsNotice }} + {{ T "thisIsNotice" }} + {{ else }} + {{ T "thisIsOk" }} + {{ end }}{{ end }}{{ end }} + + + {{ with .partial }} +
+ {{ partial . . }} +
+ {{ end }} +
+ {{ end }} +
\ No newline at end of file diff --git a/layouts/partials/index/incidents.html b/layouts/partials/index/incidents.html new file mode 100644 index 0000000..bf312e9 --- /dev/null +++ b/layouts/partials/index/incidents.html @@ -0,0 +1,61 @@ +{{ $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" }} + + + +{{ if not $incidents }} +
+

{{ T "calmBeforeTheStorm" }}

+

{{ T "noIncidentsDesc" }}

+
+
+
+{{ else }} + {{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }} + {{ range $paginator.Pages }} + {{ .Render "small" }} + {{ end }} + + + {{ if gt $paginator.TotalPages 1 }} +
+ +
+ {{ if $paginator.HasPrev }} + + ⭠   + {{ T "prev" }} + + {{ else }} + + ⭠   + {{ T "prev" }} + + {{ end }} + + +     + {{ $paginator.PageNumber }} + / + {{ $paginator.TotalPages }} +     + + + {{ if $paginator.HasNext }} + + {{ T "next" }}   + ⭢ + + {{ else }} + + {{ T "next" }}   + ⭢ + + {{ end }} +
+ {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/index/noscript.html b/layouts/partials/index/noscript.html new file mode 100644 index 0000000..ebebe8c --- /dev/null +++ b/layouts/partials/index/noscript.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/layouts/partials/index/summary.html b/layouts/partials/index/summary.html new file mode 100644 index 0000000..d8e3108 --- /dev/null +++ b/layouts/partials/index/summary.html @@ -0,0 +1,24 @@ +{{ $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" }} + +
+ + {{ if $isDown }} + {{ T "isDown" }} + {{ else }} + {{ if $isDisrupted }} + {{ T "isDisrupted" }} + {{ else }} + {{ if $isNotice }} + {{ T "isNotice" }} + {{ else }} + {{ T "isOk" }} + {{ end }}{{ end }}{{ end }} + + + +
\ No newline at end of file diff --git a/layouts/partials/index/tabs.html b/layouts/partials/index/tabs.html new file mode 100644 index 0000000..e1fc986 --- /dev/null +++ b/layouts/partials/index/tabs.html @@ -0,0 +1,20 @@ +{{ if .Site.Params.customTabs }} +
+
+ + {{ T "incidents" }} + + + {{ range .Site.Params.customTabs }} + + {{ .name }} + + {{ end }} +
+
+{{ else }} +
+

{{ T "incidentHistory" }}

+
+
+{{ end }} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 8dd25fab185f5e1d7dc2db10a833b4977f801cd5 Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Sun, 27 Jan 2019 10:43:29 +0200 Subject: Fixing a11y, colors, UX, minor cleanup --- exampleSite/config.yml | 20 +++++++++---------- .../issues/2018-05-25-us-east-conn-issues.md | 2 +- .../issues/2018-06-13-maintenance-window.md | 2 +- layouts/partials/index/announcements.html | 18 +++++++++++++---- layouts/partials/index/components.html | 6 +++--- layouts/partials/meta.html | 23 +++++----------------- 6 files changed, 34 insertions(+), 37 deletions(-) (limited to 'layouts/partials/index') diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 5015890..f06609b 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -182,16 +182,16 @@ params: # # Defaults: # - # brand: #181818 - # ok: 228B22 - # warning: EE7600 - # down: DC143C - # notice: 708090 - brand: 181818 - ok: 228B22 - disrupted: EE7600 - down: DC143C - notice: 708090 + # brand: 080d11 + # ok: 008000 // EXCEPT IT'S BROKEN LOL + # warning: d33c0d + # down: e60000 + # notice: 3a5978 + brand: 080d11 + ok: 118000 + disrupted: d33c0d + down: e60000 + notice: 3a5978 # If the status page shows that # there are disruptions or outages diff --git a/exampleSite/content/issues/2018-05-25-us-east-conn-issues.md b/exampleSite/content/issues/2018-05-25-us-east-conn-issues.md index 96c228c..524035b 100644 --- a/exampleSite/content/issues/2018-05-25-us-east-conn-issues.md +++ b/exampleSite/content/issues/2018-05-25-us-east-conn-issues.md @@ -4,7 +4,7 @@ date: 2018-05-25 04:13:00 resolved: true resolvedWhen: 2018-05-25 04:13:59 # Possible severity levels: down, disrupted, notice -severity: disrupted +severity: down affected: - API - Media Proxy diff --git a/exampleSite/content/issues/2018-06-13-maintenance-window.md b/exampleSite/content/issues/2018-06-13-maintenance-window.md index e21ae4d..0610928 100644 --- a/exampleSite/content/issues/2018-06-13-maintenance-window.md +++ b/exampleSite/content/issues/2018-06-13-maintenance-window.md @@ -4,7 +4,7 @@ date: 2018-06-13 15:54:00 resolved: false resolvedWhen: 2018-06-13 17:30:00 # Possible severity levels: down, disrupted, notice -severity: notice +severity: disrupted affected: - API section: issue diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html index a02045e..0be3835 100644 --- a/layouts/partials/index/announcements.html +++ b/layouts/partials/index/announcements.html @@ -2,13 +2,23 @@ {{ $active := where $incidents "Params.resolved" "=" false }} {{ if $active }} -
+
{{ range $active }}
-

{{ .Title }}

+

+ {{ .Title }} → +

+ +

+ {{ range .Params.Affected }} + {{ . }} + {{ end }} +

+ {{ .Content | safeHTML | truncate 500 "…" }} -

{{ T "continueReading" }}

+

- {{ else }}{{ end }} +
+ {{ end }}
{{ end }} \ No newline at end of file diff --git a/layouts/partials/index/components.html b/layouts/partials/index/components.html index 9424cd0..128b887 100644 --- a/layouts/partials/index/components.html +++ b/layouts/partials/index/components.html @@ -31,13 +31,13 @@ {{ if $thisIsDown }} - {{ T "thisIsDown" }} + {{ T "thisIsDown" }} {{ else }} {{ if $thisIsDisrupted }} - {{ T "thisIsDisrupted" }} + {{ T "thisIsDisrupted" }} {{ else }} {{ if $thisIsNotice }} - {{ T "thisIsNotice" }} + {{ T "thisIsNotice" }} {{ else }} {{ T "thisIsOk" }} {{ end }}{{ end }}{{ end }} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index e2a5056..6544af8 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -23,23 +23,10 @@