diff options
Diffstat (limited to 'roles/lounge/templates/error.html')
| -rw-r--r-- | roles/lounge/templates/error.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/lounge/templates/error.html b/roles/lounge/templates/error.html new file mode 100644 index 0000000..5e2a093 --- /dev/null +++ b/roles/lounge/templates/error.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>{{lounge_domain}} currently unavailable</title> + <style> + body { padding: 20px; font-family: Arial, sans-serif } + </style> +</head> +<body> + <h1>Web-based chat is currently unavailable (code 502)</h1> + + <p>The web-based IRC interface will be available during <a href="https://{{emacsconf_domain}}/{{emacsconf_year}}">{{emacsconf_name}} {{emacsconf_year}}</a>. Please check back then. In the meantime, you can also connect to {{irc_network}}:{{irc_port}} with your favorite IRC client and join {{irc_channels}}. + + <p>This page will refresh when the site is back. You can also check <a href="https://status.emacsconf.org">status.emacsconf.org</a> for updates.</p> + + <noscript>Your browser doesn’t support javascript. Please try refreshing the page manually every few minutes.</noscript> + + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> + <script> + var retryCurrent = 30, retryMax = 60 * 5; + async function check() { + let result = await fetch(window.location.href, { method: HEAD }).then(resp => { + if (resp.status == 200) { + window.location.reload(true); + } else if (resp.status == 502) { + if (retryCurrent < retryMax) { + retryCurrent = Math.min(retryCurrent * 2, retryMax); + } + setTimeout(check, retryCurrent * 1000); + } + }); + } + setTimeout(check_response, retryCurrent * 1000); + </script> +</body> +</html> |
