From e065f6d050b4ba1d688180182553c170ebb7c17d Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Wed, 19 Sep 2018 10:48:27 -0400 Subject: [PATCH] Service worker should basically be ready --- brutaldon/static/offline.html | 108 +++++++++++++++++++++++++++++++--- brutaldon/templates/base.html | 10 ++-- 2 files changed, 106 insertions(+), 12 deletions(-) diff --git a/brutaldon/static/offline.html b/brutaldon/static/offline.html index ddc3b7c..27b6267 100644 --- a/brutaldon/static/offline.html +++ b/brutaldon/static/offline.html @@ -1,13 +1,105 @@ + - Brutaldon is offline + + + + brutaldon + + + + + + + + + + - -

Brutaldon is offline

-

- Your page request will be fulfilled the next time you are online. - We don't seem to have this particular page in the cache for you. - Terribly sorry. -

+ +
 
+ + + +
+
+ + +
+ + +

Brutaldon

+

a brutalist web interface for Mastodon

+
+ +

+ Either you are offline currently, or brutaldon is down. Please try again later. +

+ + +
+
+
+ + + + + + + + + + diff --git a/brutaldon/templates/base.html b/brutaldon/templates/base.html index bdf8fc9..f23e2d3 100644 --- a/brutaldon/templates/base.html +++ b/brutaldon/templates/base.html @@ -213,10 +213,6 @@ document.addEventListener('DOMContentLoaded', menuPrepare); $(document).on('handle.onpopstate.ic', restorePlace); - Intercooler.ready(function () - { - $(".attachments").photobox('a', { history: true }); - }); if (navigator.serviceWorker.controller) { console.log('[PWA Builder] active service worker found, no need to register') } else { @@ -228,6 +224,12 @@ console.log('Service worker has been registered for scope:'+ reg.scope); }); } + Intercooler.ready(function () + { + $(".attachments").photobox('a', { history: true }); + var refresh = new Event('refreshOffline'); + self.dispatchEvent(refresh); + }); {% block page_scripts_inline %} {% endblock %}