aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/affected/404.html21
-rw-r--r--layouts/index.html185
-rw-r--r--layouts/issues/small.html4
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/index/announcements.html24
-rw-r--r--layouts/partials/index/autorefresh.html8
-rw-r--r--layouts/partials/index/components.html53
-rw-r--r--layouts/partials/index/incidents.html61
-rw-r--r--layouts/partials/index/noscript.html4
-rw-r--r--layouts/partials/index/summary.html24
-rw-r--r--layouts/partials/index/tabs.html20
-rw-r--r--layouts/partials/js.html14
-rw-r--r--layouts/partials/meta.html43
14 files changed, 262 insertions, 203 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c1292b2..51a09e8 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,7 @@
{{ partial "meta" . }}
<body class="default single">
<div class="contain">
- <a href="{{ .Site.BaseURL }}">← {{ T "goBack" }} <em>{{ .Site.Title }}<em></a>
+ <a href="{{ .Site.BaseURL }}">← {{ T "goBack" }} <em>{{ .Site.Title }}</em></a>
<hr>
{{ .Content }}
</div>
diff --git a/layouts/affected/404.html b/layouts/affected/404.html
new file mode 100644
index 0000000..527c280
--- /dev/null
+++ b/layouts/affected/404.html
@@ -0,0 +1,21 @@
+{{ 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" }}
+
+ <body class="status-homepage status-{{ if $isDown }}down{{ else }}{{ if $isDisrupted}}disrupted{{ else }}{{ if $isNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }} {{ if not .Site.Params.alwaysKeepBrandColor }}change-header-color{{ end }}">
+ {{ partial "header" . }}
+
+ <div class="contain center">
+ <h1 class="bold">{{ T "notFoundAffected" }}</h1>
+ <p>{{ T "notFoundText" }}</p>
+ </div>
+
+ {{ partial "js" . }}
+ {{ partial "footer" . }}
+ </body>
+</html>
diff --git a/layouts/index.html b/layouts/index.html
index 2802ce1..be887c8 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -12,185 +12,36 @@
<!-- Main -->
<div class="contain">
- <noscript>
- <p class="error">{{ T "noScriptingIntro" }} <a href="//enable-javascript.com">{{ T "noScriptingLink" }}</a> {{ T "noScriptingOutro" }}</p>
- <div class="padding"></div>
- </noscript>
+ <!-- Enable JavaScript banner -->
+ {{ partial "index/noscript" . }}
- <!-- Main info -->
- <div class="summary">
- <strong>
- {{ if $isDown }}
- {{ T "isDown" }}
- {{ else }}
- {{ if $isDisrupted }}
- {{ T "isDisrupted" }}
- {{ else }}
- {{ if $isNotice }}
- {{ T "isNotice" }}
- {{ else }}
- {{ T "isOk" }}
- {{ end }}{{ end }}{{ end }}
- </strong>
+ <!-- "All systems operational" (or not) banner -->
+ {{ partial "index/summary" . }}
- <span class="summary__date float-right" onclick="location.reload()"></span>
- </div>
+ <!-- Announcement box (title and short summary) -->
+ {{ partial "index/announcements" . }}
- {{ if $active }}
- <div class="announcement-box">
- {{ range $active }}
- <div class="padding">
- <p><strong class="bold">{{ .Title }}</strong></p>
- {{ .Content | safeHTML | truncate 500 "…" }}
- <p><a href="{{ .Permalink }}">{{ T "continueReading" }}</a></p>
- </div>
- {{ else }}{{ end }}
- </div>
- {{ end }}
-
- {{ if .Site.Params.autoRefresh }}
- <div class="faded right">
- <small><em>{{ T "autoRefreshNotice" }}</em></small>
- </div>
- <div class="padding-s"></div>
- {{ else }}
- <div class="padding"></div>
- {{ end }}
-
- <!-- Individual info -->
- <div class="components">
- {{ $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" }}
-
- <div class="component" data-status="{{ if $thisIsDown }}down{{ else }}{{ if $thisIsDisrupted }}disrupted{{ else }}{{ if $thisIsNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }}">
- <a href="/affected/{{ .name | urlize }}" class="no-underline">
- {{ .name }}
- </a>
-
- {{ with .description }}
- <span class="tooltip tooltip--small">
- &nbsp; <span class="faded">(?)</span>
+ <!-- Auto refresh -->
+ {{ partial "index/autorefresh" . }}
- <span class="tooltip__text">
- {{ . }}
- </span>
- </span>
- {{ end }}
+ <!-- Individual component info -->
+ {{ partial "index/components" . }}
- <span class="component-status">
- {{ if $thisIsDown }}
- {{ T "thisIsDown" }}
- {{ else }}
- {{ if $thisIsDisrupted }}
- {{ T "thisIsDisrupted" }}
- {{ else }}
- {{ if $thisIsNotice }}
- {{ T "thisIsNotice" }}
- {{ else }}
- {{ T "thisIsOk" }}
- {{ end }}{{ end }}{{ end }}
- </span>
-
- {{ with .partial }}
- <div>
- {{ partial . . }}
- </div>
- {{ end }}
- </div>
- {{ end }}
- </div>
-
- {{ if .Site.Params.enableCustomHTML }}
- {{ partial "custom/homepage-summary" . }}
- {{ end }}
- <!-- End main -->
- </div>
-
- {{ if .Site.Params.customTabs }}
- <div class="tabs">
- <div class="contain tabs--inner">
- <a href="/#incidents" class="tab tab--current">
- {{ T "incidents" }}
- </a>
-
- {{ range .Site.Params.customTabs }}
- <a href="{{ .link }}" class="tab tab--other">
- {{ .name }}
- </a>
- {{ end }}
+ {{ if .Site.Params.enableCustomHTML }}
+ {{ partial "custom/homepage-summary" . }}
+ {{ end }}
+ <!-- End main -->
</div>
- </div>
- {{ else }}
- <div class="contain contain--more">
- <h2 class="center">{{ T "incidentHistory" }}</h2>
- <hr class="clean">
- </div>
- {{ end }}
+ <!-- Custom tabs -->
+ {{ partial "index/tabs" . }}
+ <!-- All incidents + pagination -->
<div class="contain contain--more" id="incidents">
- {{ if not $incidents }}
- <div class="padding"></div>
- <h3>{{ T "calmBeforeTheStorm" }}</h3>
- <p>{{ T "noIncidentsDesc" }}</p>
- <div class="padding"></div>
- <div class="padding"></div>
- <div class="padding"></div>
- {{ else }}
- {{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }}
- {{ range $paginator.Pages }}
- {{ .Render "small" }}
- {{ end }}
-
- <!-- If there are more than 2 pages, show pagination -->
- {{ if gt $paginator.TotalPages 1 }}
- <hr>
-
- <div class="center">
- {{ if $paginator.HasPrev }}
- <a href="{{ $paginator.Prev.URL }}#incidents">
- ⭠ &nbsp;
- {{ T "prev" }}
- </a>
- {{ else }}
- <span class="faded">
- ⭠ &nbsp;
- {{ T "prev" }}
- </span>
- {{ end }}
-
-
- &nbsp; &nbsp;
- {{ $paginator.PageNumber }}
- /
- {{ $paginator.TotalPages }}
- &nbsp; &nbsp;
-
-
- {{ if $paginator.HasNext }}
- <a href="{{ $paginator.Next.URL }}#incidents">
- {{ T "next" }} &nbsp;
- ⭢
- </a>
- {{ else }}
- <span class="faded">
- {{ T "next" }} &nbsp;
- ⭢
- </span>
- {{ end }}
- </div>
- {{ end }}
- {{ end }}
+ {{ partial "index/incidents" . }}
<div class="padding"></div>
</div>
-
-
{{ partial "js" . }}
{{ partial "footer" . }}
</body>
diff --git a/layouts/issues/small.html b/layouts/issues/small.html
index 6833b68..ef30b75 100644
--- a/layouts/issues/small.html
+++ b/layouts/issues/small.html
@@ -65,10 +65,6 @@
{{ .Title }}
</h3>
- {{ $t := (time .Params.ResolvedWhen) }}
- {{ $timeDiff := (sub $t.Unix .Date.Unix) }}
- {{ $diffInMin := (div $timeDiff 60) }}
-
<!-- Marker -->
<div class="error">{{ T "downtimeOngoing" }}</div>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 2dcea70..6187f61 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -4,7 +4,7 @@
<div class="footer">
<div class="contain">
- <p><strong class="bold">{{ now.Year }} &copy; {{ .Site.Title }}</strong>
+ <p><strong class="bold">&copy; {{ .Site.Title }}, {{ now.Year }}</strong>
&nbsp; • &nbsp; <a href="#">{{ T "backToTop" }}</a>
</p>
diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html
new file mode 100644
index 0000000..0be3835
--- /dev/null
+++ b/layouts/partials/index/announcements.html
@@ -0,0 +1,24 @@
+{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}
+{{ $active := where $incidents "Params.resolved" "=" false }}
+
+{{ if $active }}
+ <div class="announcement-box" style="border-bottom: 0">
+ {{ range $active }}
+ <div class="padding">
+ <p>
+ <a href="{{ .Permalink }}"><strong class="bold">{{ .Title }} →</strong></a>
+ </p>
+
+ <p><small>
+ {{ range .Params.Affected }}
+ <a href="/affected/{{ . | urlize }}" class="tag no-underline">{{ . }}</a>
+ {{ end }}
+ </small></p>
+
+ {{ .Content | safeHTML | truncate 500 "…" }}
+ <p></p>
+ </div>
+ <hr class="clean announcement-box">
+ {{ end }}
+ </div>
+{{ 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 }}
+ <div class="faded right">
+ <small><em>{{ T "autoRefreshNotice" }}</em></small>
+ </div>
+ <div class="padding-s"></div>
+ {{ else }}
+ <div class="padding"></div>
+{{ 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..128b887
--- /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" }}
+
+<div class="components">
+ {{ $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" }}
+
+ <div class="component" data-status="{{ if $thisIsDown }}down{{ else }}{{ if $thisIsDisrupted }}disrupted{{ else }}{{ if $thisIsNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }}">
+ <a href="/affected/{{ .name | urlize }}" class="no-underline">
+ {{ .name }}
+ </a>
+
+ {{ with .description }}
+ <span class="tooltip tooltip--small">
+ &nbsp; <span class="faded">(?)</span>
+
+ <span class="tooltip__text">
+ {{ . }}
+ </span>
+ </span>
+ {{ end }}
+
+ <span class="component-status">
+ {{ if $thisIsDown }}
+ <b>{{ T "thisIsDown" }}</b>
+ {{ else }}
+ {{ if $thisIsDisrupted }}
+ <b>{{ T "thisIsDisrupted" }}</b>
+ {{ else }}
+ {{ if $thisIsNotice }}
+ <b>{{ T "thisIsNotice" }}</b>
+ {{ else }}
+ {{ T "thisIsOk" }}
+ {{ end }}{{ end }}{{ end }}
+ </span>
+
+ {{ with .partial }}
+ <div>
+ {{ partial . . }}
+ </div>
+ {{ end }}
+ </div>
+ {{ end }}
+ </div> \ 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" }}
+
+<!-- Pagination is also included with incidents -->
+
+{{ if not $incidents }}
+ <div class="padding"></div>
+ <h3>{{ T "calmBeforeTheStorm" }}</h3>
+ <p>{{ T "noIncidentsDesc" }}</p>
+ <div class="padding"></div>
+ <div class="padding"></div>
+ <div class="padding"></div>
+{{ else }}
+ {{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }}
+ {{ range $paginator.Pages }}
+ {{ .Render "small" }}
+ {{ end }}
+
+ <!-- If there are more than 2 pages, show pagination -->
+ {{ if gt $paginator.TotalPages 1 }}
+ <hr>
+
+ <div class="center">
+ {{ if $paginator.HasPrev }}
+ <a href="{{ $paginator.Prev.URL }}#incidents">
+ ⭠ &nbsp;
+ {{ T "prev" }}
+ </a>
+ {{ else }}
+ <span class="faded">
+ ⭠ &nbsp;
+ {{ T "prev" }}
+ </span>
+ {{ end }}
+
+
+ &nbsp; &nbsp;
+ {{ $paginator.PageNumber }}
+ /
+ {{ $paginator.TotalPages }}
+ &nbsp; &nbsp;
+
+
+ {{ if $paginator.HasNext }}
+ <a href="{{ $paginator.Next.URL }}#incidents">
+ {{ T "next" }} &nbsp;
+ ⭢
+ </a>
+ {{ else }}
+ <span class="faded">
+ {{ T "next" }} &nbsp;
+ ⭢
+ </span>
+ {{ end }}
+ </div>
+ {{ 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 @@
+<noscript>
+ <p class="error">{{ T "noScriptingIntro" }} <a href="//enable-javascript.com">{{ T "noScriptingLink" }}</a> {{ T "noScriptingOutro" }}</p>
+ <div class="padding"></div>
+</noscript> \ 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" }}
+
+<div class="summary">
+ <strong>
+ {{ if $isDown }}
+ {{ T "isDown" }}
+ {{ else }}
+ {{ if $isDisrupted }}
+ {{ T "isDisrupted" }}
+ {{ else }}
+ {{ if $isNotice }}
+ {{ T "isNotice" }}
+ {{ else }}
+ {{ T "isOk" }}
+ {{ end }}{{ end }}{{ end }}
+ </strong>
+
+ <span class="summary__date float-right" onclick="location.reload()"></span>
+</div> \ 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 }}
+ <div class="tabs">
+ <div class="contain tabs--inner">
+ <a href="/#incidents" class="tab tab--current">
+ {{ T "incidents" }}
+ </a>
+
+ {{ range .Site.Params.customTabs }}
+ <a href="{{ .link }}" class="tab tab--other">
+ {{ .name }}
+ </a>
+ {{ end }}
+ </div>
+ </div>
+{{ else }}
+ <div class="contain contain--more">
+ <h2 class="center">{{ T "incidentHistory" }}</h2>
+ <hr class="clean">
+ </div>
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/js.html b/layouts/partials/js.html
index af3bb80..088cc44 100644
--- a/layouts/partials/js.html
+++ b/layouts/partials/js.html
@@ -3,7 +3,7 @@
* Dev toolset
*/
- console.log('cState v3.0.0 - Stable 2019-01-24 - https://github.com/cstate/cstate');
+ console.log('cState v3.1.0 - rc1 - https://github.com/cstate/cstate');
document.getElementsByTagName('html')[0].className = 'js';
/**
@@ -27,6 +27,18 @@
if (window.location.hash.match('access_token')) {
document.location.pathname = '/admin';
}
+ if (window.location.hash.match('invite_token')) {
+ document.location.pathname = '/admin';
+ }
+ if (window.location.hash.match('confirmation_token')) {
+ document.location.pathname = '/admin';
+ }
+ if (window.location.hash.match('email_change_token')) {
+ document.location.pathname = '/admin';
+ }
+ if (window.location.hash.match('recovery_token')) {
+ document.location.pathname = '/admin';
+ }
/**
* Timer
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
index df6b8d0..d0b32ce 100644
--- a/layouts/partials/meta.html
+++ b/layouts/partials/meta.html
@@ -6,13 +6,13 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Data -->
- <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
- <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} — {{ end }}{{ .Site.Title }}{{ end }}</title>
+ <meta name="description" content="{{ with .Summary }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
+ <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<link rel="canonical" href="{{ .Permalink }}">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
- <meta name="generator" content="cState v3.0.0 - Stable 2019-01-24">
+ <meta name="generator" content="cState v3.1.0 - rc1">
<meta name="theme-color" content="#{{ .Site.Params.brand }}">
<script>
var themeBrandColor = '#{{ .Site.Params.brand }}';
@@ -23,23 +23,10 @@
</script>
<!-- Sources -->
<style>
- /**
- * Color palette
- *
- * Defaults:
- * white: #fff;
- * whitesmoke: #f5f5f5;
- * forestgreen: #228B22;
- * crimson: #DC143C;
- * darkorange: #EE7600;
- * slategray: #708090;
- *
- */
-
html, body {
margin: 0;
background: #fff;
- color: #444;
+ color: #4d4d4d;
font: 100%/1.5 BlinkMacSystemFont, -apple-system, "San Francisco Text", "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0,0,0, 0.25);
@@ -100,8 +87,8 @@
.headline { font-size: 20px; }
.bold { color: #000; }
- .hinted { color: #777; }
- .faded { color: #999; }
+ .hinted { color: #6d6d6d; }
+ .faded { color: #6d6d6d; }
.clean { margin: 0; }
@@ -270,7 +257,7 @@
padding: 12px 18px;
position: relative;
top: 1px;
- color: #aaa;
+ color: #757575;
}
.tab--other:hover { color: #000; }
@@ -299,24 +286,22 @@
padding: 16px;
}
- .status-ok .announcement-box { border: 2px solid #{{ .Site.Params.ok }}; }
.status-disrupted .announcement-box { border: 2px solid #{{ .Site.Params.disrupted }}; }
.status-down .announcement-box { border: 2px solid #{{ .Site.Params.down }}; }
.status-notice .announcement-box { border: 2px solid #{{ .Site.Params.notice }}; }
-
-
- .status-ok .status-homepage .announcement-box { border-bottom-width: 1px; }
-
+ .status-disrupted .announcement-box,
+ .status-down .announcement-box,
+ .status-notice .announcement-box { border-top: 0; }
/**
* Dynamically show individual component statuses
*/
.component-status { float: right; }
- .component[data-status="ok"] .component-status { color: #{{ .Site.Params.ok }};; }
- .component[data-status="disrupted"] .component-status { color: #{{ .Site.Params.disrupted }};; }
- .component[data-status="down"] .component-status { color: #{{ .Site.Params.down }};; }
- .component[data-status="notice"] .component-status { color: #{{ .Site.Params.notice }};; }
+ .component[data-status="ok"] .component-status { color: #{{ .Site.Params.ok }}; }
+ .component[data-status="disrupted"] .component-status { color: #{{ .Site.Params.disrupted }}; }
+ .component[data-status="down"] .component-status { color: #{{ .Site.Params.down }}; }
+ .component[data-status="notice"] .component-status { color: #{{ .Site.Params.notice }}; }
/**
* Responsiveness