From 88a199b6c0576a35bae67a241c20370b629dd7cd Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Tue, 24 Jul 2018 13:47:45 +0300 Subject: v2-rc1 --- layouts/index.html | 77 ++++++++++++++++++++++++----- layouts/partials/footer.html | 2 +- layouts/partials/js.html | 114 +++++++------------------------------------ layouts/partials/meta.html | 7 ++- layouts/uptime/single.html | 86 -------------------------------- 5 files changed, 88 insertions(+), 198 deletions(-) delete mode 100644 layouts/uptime/single.html (limited to 'layouts') diff --git a/layouts/index.html b/layouts/index.html index b937777..f5fbb05 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -48,9 +48,16 @@ {{ end }} + {{ if .Site.Params.autoRefresh }} +
+ We auto-refresh every 5 minutes +
+
+ {{ else }} +
+ {{ end }} -
{{ $systems := .Site.Params.systems }} {{ range $index, $systems }} @@ -103,17 +110,12 @@
- + {{ if .Site.Params.customTabs }}
- + Incidents - {{ if .Site.Params.showUptime }} - - Uptime - - {{ end }} {{ range .Site.Params.customTabs }} @@ -122,19 +124,70 @@ {{ end }}
+ {{ else }} +
+

Incident history

+
+
+ {{ end }} -
+
- {{ if not .Data.Pages }} -

Looks like we do not have any incidents logged.

+ {{ if not $incidents }} +
+

Is it the calm before the storm?

+

This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime.

+
{{ else }} - {{ range .Data.Pages }} + {{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }} + {{ range $paginator.Pages }} {{ .Render "issue" }} {{ end }} + + + {{ if gt $paginator.TotalPages 1 }} +
+ +
+ {{ if $paginator.HasPrev }} + + ⭠   + Previuos + + {{ else }} + + ⭠   + Previuos + + {{ end }} + + +     + {{ $paginator.PageNumber }} + / + {{ $paginator.TotalPages }} +     + + + {{ if $paginator.HasNext }} + + Next   + ⭢ + + {{ else }} + + Next   + ⭢ + + {{ end }} +
+ {{ end }} {{ end }}
+ + {{ partial "js" . }} {{ partial "footer" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f9c49d8..55e512c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -11,7 +11,7 @@

{{ .Site.Params.description }}

- Powered by cState v2.0-rc1 + Powered by cState v2.0
diff --git a/layouts/partials/js.html b/layouts/partials/js.html index a26d36c..1896127 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -3,7 +3,7 @@ * Dev toolset */ - console.log('Welcome to cState! https://github.com/mistermantas/cstate'); + console.log('Welcome to cState v2.0! https://github.com/cstate/cstate'); document.querySelector('html').className = 'js'; @@ -11,20 +11,15 @@ * Make theme color pretty */ - if (document.body.className === 'status-down') { - document.querySelector('meta[name=theme-color]').setAttribute('content', themeDownColor); - } else if (document.body.className === 'status-disrupted') { - document.querySelector('meta[name=theme-color]').setAttribute('content', themeDisruptedColor); - } else { - document.querySelector('meta[name=theme-color]').setAttribute('content', themeNoticeColor); + if (document.body.className === 'change-header-color') { + if (document.body.className === 'status-down') { + document.querySelector('meta[name=theme-color]').setAttribute('content', themeDownColor); + } else if (document.body.className === 'status-disrupted') { + document.querySelector('meta[name=theme-color]').setAttribute('content', themeDisruptedColor); + } else { + document.querySelector('meta[name=theme-color]').setAttribute('content', themeNoticeColor); + } } - - - + {{ if ne .Site.Params.googleAnalytics "UA-00000000-1" }} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index b5b7568..ef9e3af 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -10,7 +10,7 @@ {{ if eq .Title .Site.Title }}{{ .Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }} {{ .Hugo.Generator }} - + -

- There have been {{ len $incidents }} incidents in total so far. - In total, this added up to {{ $scratchValue }}s (or {{ div $scratchValue 60 }} min) of downtime. Please note that the uptime statistics only counts resolved incidents, ongoing incidents are not included in these calculations. -

- - {{ else }} -
-

Uptime stats are not available during an outage. Sorry!

-
- {{ end }} - -{{ partial "js" . }} -{{ partial "footer" . }} -- cgit v1.2.3-70-g09d2