From 3208df6352c0e05208bce95f8d9e9f16769a57ed Mon Sep 17 00:00:00 2001 From: Mantas Date: Sat, 25 Nov 2017 12:05:33 +0200 Subject: cState goes stable 1.0; fix #4 & fix #5 --- layouts/_default/single.html | 10 ++ layouts/incident/post.html | 8 -- layouts/incident/single.html | 13 -- layouts/index.html | 275 ++++++++------------------------------ layouts/issues/issue.html | 29 ++++ layouts/issues/single.html | 17 +++ layouts/partials/footer.html | 20 ++- layouts/partials/header-mini.html | 7 + layouts/partials/js.html | 62 +++++++++ layouts/partials/meta.html | 194 +++++++++++++++------------ layouts/shortcodes/track.html | 1 + 11 files changed, 296 insertions(+), 340 deletions(-) create mode 100644 layouts/_default/single.html delete mode 100644 layouts/incident/post.html delete mode 100644 layouts/incident/single.html create mode 100644 layouts/issues/issue.html create mode 100644 layouts/issues/single.html create mode 100644 layouts/partials/header-mini.html create mode 100644 layouts/partials/js.html create mode 100644 layouts/shortcodes/track.html (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..c0a9070 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ partial "meta" . }} + + +
+ ← Go back +
+ {{ .Render "post" }} +
+ +{{ partial "footer" . }} diff --git a/layouts/incident/post.html b/layouts/incident/post.html deleted file mode 100644 index 593481a..0000000 --- a/layouts/incident/post.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

- {{ .Title }} {{ if .Draft }}[DRAFT]{{ end }} -

-

Began on {{ .Date }} ({{ .ReadingTime }} min read)

- - {{ .Content }} -
diff --git a/layouts/incident/single.html b/layouts/incident/single.html deleted file mode 100644 index 92ead19..0000000 --- a/layouts/incident/single.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ partial "meta" . }} - - - -
- ← Go back - -


- - {{ .Render "post"}} -
- -{{ partial "footer" . }} diff --git a/layouts/index.html b/layouts/index.html index 85b800a..68a1265 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,244 +1,83 @@ {{ partial "meta" . }} - - -
-
-
-
-
-
- Notifications - - Close - -
-
- -
-

Users of modern browsers such as Chrome and Firefox get access to web notifications, a feature that shows alerts for things such as Facebook mentions, new emails, or in our case, status updates. These updates can be seen even if the user is not actively looking at this status page, however, the tab has to stay open.

- -

Only some users may be able to use this feature. This feature does not work on mobile devices and is not fully tested.

- -
- - -
- -

You have not enabled notifications.

-
+ +
+ + {{ if $isDown }} + Experiencing major issues + {{ else }} + {{ if $isDisrupted}} + Experiencing disruptions + {{ else }} + {{ if $isNotice }} + Please read announcement + {{ else }} + All systems operational + {{ end }}{{ end }}{{ end }} + + +
- -
-
- Checking status… + {{ range $active }} +
+ {{ .Date.Format "January 02, 2006 at 3:04 PM" }}
+ {{ .Title }} + {{ .Content }} +
+ {{ else }}{{ end }} - -
-
-

{{ .Site.Params.announcement }}

-
-

+
-
- API Pinging… -
-
- Website Pinging… -
+ {{ $systems := .Site.Params.systems }} + {{ range $index, $systems }} +
+ {{ . }} + Operational +
+ {{ end }}
-
- Disclaimer - -
+

-

Incident history



+

Incident history

{{ range first 10 .Data.Pages }} - {{ .Render "post" }} + {{ .Render "issue" }} {{ end }} - -
- - -{{ partial "footer" . }} + {{ partial "js" . }} + {{ partial "footer" . }} + + diff --git a/layouts/issues/issue.html b/layouts/issues/issue.html new file mode 100644 index 0000000..9b63b78 --- /dev/null +++ b/layouts/issues/issue.html @@ -0,0 +1,29 @@ +{{ $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" }} + +
+ + {{ .Params.severity }} + +   + + {{ .Date.Format "January 02, 2006 at 3:04 PM" }} + +   + {{ if .Params.Resolved }} + + {{ end }} + + +

+ {{ .Title }} +

+ +
+ + {{ .Content }} +
diff --git a/layouts/issues/single.html b/layouts/issues/single.html new file mode 100644 index 0000000..52c4145 --- /dev/null +++ b/layouts/issues/single.html @@ -0,0 +1,17 @@ +{{ partial "meta" . }} + +{{ $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" }} + + + {{ partial "header-mini" . }} + +
+ {{ .Render "issue" }} +
+ +{{ partial "footer" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1773af9..e1314ce 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,14 +1,10 @@ - diff --git a/layouts/partials/header-mini.html b/layouts/partials/header-mini.html new file mode 100644 index 0000000..93a26c2 --- /dev/null +++ b/layouts/partials/header-mini.html @@ -0,0 +1,7 @@ + diff --git a/layouts/partials/js.html b/layouts/partials/js.html new file mode 100644 index 0000000..9ef2a23 --- /dev/null +++ b/layouts/partials/js.html @@ -0,0 +1,62 @@ + diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index cea1571..e3ebbf1 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -1,5 +1,5 @@ - + @@ -9,13 +9,22 @@ {{ .Site.Title }} - + {{ .Hugo.Generator }} + + diff --git a/layouts/shortcodes/track.html b/layouts/shortcodes/track.html new file mode 100644 index 0000000..0c0c67f --- /dev/null +++ b/layouts/shortcodes/track.html @@ -0,0 +1 @@ +

{{ dateFormat "02 Jan 2006 15:04" (.Get 0) }}

-- cgit v1.2.3-70-g09d2