diff options
author | Mantas <mistermantas@users.noreply.github.com> | 2017-08-13 18:19:54 +0300 |
---|---|---|
committer | Mantas <mistermantas@users.noreply.github.com> | 2017-08-13 18:19:54 +0300 |
commit | 8d36c3cf2dd9b209aa6003ba19e983371ba670ec (patch) | |
tree | 3e6bf5dd061ce65eb07f58bef24cb54504f08653 /layouts | |
parent | 27de71669d43e6846ae48e53bdd40ea6e77245aa (diff) |
Prepare for status.choraleapp.com, fix minor issues
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/index.html | 33 | ||||
-rw-r--r-- | layouts/partials/footer.html | 5 | ||||
-rw-r--r-- | layouts/partials/meta.html | 1 |
3 files changed, 5 insertions, 34 deletions
diff --git a/layouts/index.html b/layouts/index.html index 3853120..85b800a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -145,7 +145,6 @@ document.querySelector('.component[data-id=forums]').setAttribute('data-status', 'ok'); document.querySelector('.component[data-id=website]').setAttribute('data-status', 'ok'); - document.querySelector('.component[data-id=gameserver]').setAttribute('data-status', 'notice'); /** * Get elements @@ -214,8 +213,7 @@ */ const status = document.querySelector('.component[data-id=forums]').getAttribute('data-status') === 'ok' && - document.querySelector('.component[data-id=website]').getAttribute('data-status') === 'ok' && - document.querySelector('.component[data-id=gameserver]').getAttribute('data-status') === 'ok' + document.querySelector('.component[data-id=website]').getAttribute('data-status') === 'ok' if (status) { // Change text @@ -241,35 +239,6 @@ } ) } - - - /** - * Check ping - */ - - // Links - const forumPingURL = 'https://api.choraleapp.com'; - const websiteURL = 'https://www.choraleapp.com'; - - // Lib - !function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof module&&module.exports?module.exports=b():a.ping=b()}(this,function(){function a(a){return new Promise(function(b,c){var d=new Image;d.onload=function(){b(d)},d.onerror=function(){c(a)},d.src=a+"?random-no-cache="+Math.floor(65536*(1+Math.random())).toString(16)})}function b(b,c){return new Promise(function(d,e){var f=(new Date).getTime(),g=function(){var a=(new Date).getTime()-f;a*=c||1,d(a)};a(b).then(g).catch(g),setTimeout(function(){e(Error("Timeout"))},5e3)})}return b}); - - // Check ping for everything - ping(forumPingURL).then(function(delta) { - document.querySelector('.component[data-id="forums"] .ping').innerHTML = String(delta) + 'ms'; - document.querySelector('.component[data-id="forums"] .ping').className = 'ping done'; - }).catch(function(err) { - document.querySelector('.component[data-id="forums"] .ping').innerHTML = 'Can’t ping'; - document.querySelector('.component[data-id="forums"] .ping').className = 'ping error'; - }) - - ping(websiteURL).then(function(delta) { - document.querySelector('.component[data-id="website"] .ping').innerHTML = String(delta) + 'ms'; - document.querySelector('.component[data-id="website"] .ping').className = 'ping done'; - }).catch(function(err) { - document.querySelector('.component[data-id="website"] .ping').innerHTML = 'Can’t ping'; - document.querySelector('.component[data-id="website"] .ping').className = 'ping error'; - }) </script> {{ partial "footer" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 62ea1b5..1773af9 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,9 +3,12 @@ <p id="disclaimer">{{ .Site.Params.description }}</p> - <small class="copyright">Powered by <a href="https://github.com/onlinemantas/cstate">cState</a></small> + <small class="copyright">Powered by <a href="https://github.com/mistermantas/cstate">cState</a></small> </div> </div> + + + <script defer>window.$crisp=[];window.CRISP_WEBSITE_ID="1456a9bd-7292-4dee-b61d-5d9946f925b5";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script> </body> </html> diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 8237757..cea1571 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -9,7 +9,6 @@ <meta name="description" content="{{ if .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}"> <title>{{ .Site.Title }}</title> <link rel="canonical" href="{{ .Permalink }}"> - <link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"> <meta name="theme-color" content="#000000"> <!-- Sources --> <style> |