From 1f4de84b2c3cc4cf7d92d096d992900706746833 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 31 Dec 2022 09:26:36 +0200 Subject: [PATCH] fix offline.html --- files/assets/css/offline.css | 60 ++++++++++++++++++++++++++ files/assets/js/offline.js | 3 ++ files/assets/offline.html | 66 ++--------------------------- files/templates/errors/WPD/502.html | 4 +- 4 files changed, 68 insertions(+), 65 deletions(-) create mode 100644 files/assets/css/offline.css create mode 100644 files/assets/js/offline.js diff --git a/files/assets/css/offline.css b/files/assets/css/offline.css new file mode 100644 index 000000000..ac42e1e10 --- /dev/null +++ b/files/assets/css/offline.css @@ -0,0 +1,60 @@ +:root { + --background: 17, 34, 51; + --primary: #238dcf; +} + +body { + background: rgb(var(--background)); +} + +.center { + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} + +.center-text { + text-align: center; +} + +h1, h2, h3, h4, h5, h6 { + color: white; + font-family: sans-serif; +} + +.text-muted { + color: #6c757d; +} + +[role=button] { + cursor: pointer!important; +} + +.button { + background-color: rgb(var(--background))!important; + background: 0 0; + font-weight: 600; + font-size: 1rem; + border-radius: 0.2rem; + display: inline-block; + text-align: center; + vertical-align: middle; + cursor: pointer; + user-select: none; + background-color: transparent; + border: 1px solid transparent; + padding: 0.375rem 0.75rem; + font-size: 1rem; + line-height: 1.5; + border-radius: 0.35rem; + transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; + color: #fff; + background-color: var(--primary); + border-color: var(--primary); +} + +.button:hover { + color: var(--primary); +} diff --git a/files/assets/js/offline.js b/files/assets/js/offline.js new file mode 100644 index 000000000..9f8c9d019 --- /dev/null +++ b/files/assets/js/offline.js @@ -0,0 +1,3 @@ +const reload_page = document.getElementById('reload-page') +if (reload_page) + reload_page.onclick = ()=>{location.reload()}; diff --git a/files/assets/offline.html b/files/assets/offline.html index d98828f85..8591b1c8e 100644 --- a/files/assets/offline.html +++ b/files/assets/offline.html @@ -1,74 +1,14 @@ No Internet Connection - + +

No Internet

You need an internet connection to browse this site

- +
diff --git a/files/templates/errors/WPD/502.html b/files/templates/errors/WPD/502.html index c596c004a..a033a3b9f 100644 --- a/files/templates/errors/WPD/502.html +++ b/files/templates/errors/WPD/502.html @@ -3,8 +3,8 @@ - - + +