about summary refs log tree commit diff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/500.html6
-rw-r--r--public/background-cybre.pngbin0 -> 237414 bytes
-rw-r--r--public/browserconfig.xml2
-rw-r--r--public/clock.js54
-rw-r--r--public/logo-cybre-glitch.gifbin0 -> 837759 bytes
-rw-r--r--public/riot-glitch.pngbin0 -> 24926 bytes
6 files changed, 58 insertions, 4 deletions
diff --git a/public/500.html b/public/500.html
index d085d490b..5812bb476 100644
--- a/public/500.html
+++ b/public/500.html
@@ -8,8 +8,8 @@
   <style>
     body {
       font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
-      background: #282c37;
-      color: #9baec8;
+      background: #181818 url("/background-photo.png");
+      color: #1ea21e;
       text-align: center;
       margin: 0;
       padding: 20px;
@@ -33,7 +33,7 @@
 
 <body>
   <div class="dialog">
-    <img src="/oops.png" alt="Mastodon" />
+    <img src="/logo.png" alt="dev.glitch.social" />
 
     <div>
       <h1>We're sorry, but something went wrong.</h1>
diff --git a/public/background-cybre.png b/public/background-cybre.png
new file mode 100644
index 000000000..151fd5584
--- /dev/null
+++ b/public/background-cybre.png
Binary files differdiff --git a/public/browserconfig.xml b/public/browserconfig.xml
index 29c6ff581..fcf794bc2 100644
--- a/public/browserconfig.xml
+++ b/public/browserconfig.xml
@@ -3,7 +3,7 @@
   <msapplication>
     <tile>
       <square150x150logo src="/mstile-150x150.png"/>
-      <TileColor>#2b5797</TileColor>
+      <TileColor>#1ea21e</TileColor>
     </tile>
   </msapplication>
 </browserconfig>
diff --git a/public/clock.js b/public/clock.js
new file mode 100644
index 000000000..ffb9beae8
--- /dev/null
+++ b/public/clock.js
@@ -0,0 +1,54 @@
+document.addEventListener("DOMContentLoaded", function(event) { 
+  updateClock();
+  setInterval(updateClock, 1000);
+});
+
+function getNextOpen(now) {
+    var days = [[0, 14], [4, 18], [8, 22], [12], [2, 16], [6, 20], [10]]
+    var nowday = now.getUTCDay();
+    var nour = now.getUTCHours();
+
+    var open_hour = -1;
+    var d = 0;
+
+    while (open_hour == -1) {
+        var times = days[(nowday + d) % 7];
+        for (var i = 0; i < times.length; ++i) {
+            var time = times[i];
+            if (time == nour) {
+                return "refresh";
+            } else if (time > nour || d > 0) {
+                open_hour = time;
+                break;
+            }
+        }
+        if (open_hour == -1) {
+            d += 1;
+            nour = -1;
+        }
+    }
+
+    var open = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() + d));
+    var ts = open.setUTCHours(open_hour);
+    return open;
+}
+
+function updateClock() {
+    var clock = document.querySelector(".closed-registrations-message .clock");
+    var now = new Date();
+    var open = getNextOpen(now);
+
+    if (open == "refresh") {
+        location.reload();
+        return;
+    }
+
+    var until = open - now;
+    var ms = until % 1000;
+    var s =  Math.floor((until / 1000)) % 60;
+    var m =  Math.floor((until / 1000 / 60)) % 60;
+    var h =  Math.floor((until / 1000 / 60 / 60));
+    if (m < 10) m = "0" + m;
+    if (s < 10) s = "0" + s;
+    clock.innerHTML = h + ":" + m + ":" + s;
+}
diff --git a/public/logo-cybre-glitch.gif b/public/logo-cybre-glitch.gif
new file mode 100644
index 000000000..abe9b2a9a
--- /dev/null
+++ b/public/logo-cybre-glitch.gif
Binary files differdiff --git a/public/riot-glitch.png b/public/riot-glitch.png
new file mode 100644
index 000000000..1c97ce5f1
--- /dev/null
+++ b/public/riot-glitch.png
Binary files differ