From 01ce4bc6ad92732e4204d277621f6e4dc27d06b5 Mon Sep 17 00:00:00 2001 From: Verpz Date: Sun, 28 Feb 2016 09:19:37 +1100 Subject: [PATCH 1/4] Add Javascript Disabled Warning / Popup This displays a small lightweight popup when a user has Javascript disabled when they load the dashboard. This was tested on my local Pi Hole and worked perfectly. https://github.com/pi-hole/AdminLTE/issues/47 https://github.com/Verpz/Javascript-Disabled-Warning-Popup --- index.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index f70bac0e..332b1fd2 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,15 @@ - + +
+ + +

Javascript Is Disabled

Javascript seems to be disabled. This will break some site features.

+

To enable Javascript click here

+ +
+
From 55cc148e8e4e29a12e24d29a74d443f8d94198fd Mon Sep 17 00:00:00 2001 From: Verpz Date: Sun, 28 Feb 2016 11:31:11 +1100 Subject: [PATCH 2/4] CSS Fix --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 332b1fd2..7f360247 100644 --- a/index.php +++ b/index.php @@ -3,10 +3,10 @@ ?>
- - + +

Javascript Is Disabled

Javascript seems to be disabled. This will break some site features.

-

To enable Javascript click here

+

To enable Javascript click here

From f897770e637012fc4d49d8c8533adb42e4f08881 Mon Sep 17 00:00:00 2001 From: Verpz Date: Sun, 28 Feb 2016 14:42:12 +1100 Subject: [PATCH 3/4] Add Local CSS File --- css/js-warn.css | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 css/js-warn.css diff --git a/css/js-warn.css b/css/js-warn.css new file mode 100644 index 00000000..10cc44d9 --- /dev/null +++ b/css/js-warn.css @@ -0,0 +1,54 @@ +/* Made by Verpz https://github.com/Verpz/ Licensed Under Apache License 2.0 Details On GitHub */ +.js-warn { + background: #EEE; + color: #555; + display: block; + width: 30%; + right: 0; + left: 0; + margin-right: auto; + margin-left: auto; + margin-top: 50px; + border-radius: 10px; + box-shadow: 0px 10px 70px; + text-align: center; + position: fixed; + font-family: sans-serif, serif; + font-weight: 300; + z-index: 9999; +} +.js-warn h1 { + font-family: sans-serif, serif; + font-weight: 300; + padding: 10px 10px 0 10px; +} +.js-warn p { + padding: 0 10px 10px 10px; +} +.js-warn a { + color: #355980; + text-decoration: none; + transition: all 0.2s linear; +} +.js-warn a:hover { + color: #000; +} +#js-hide:checked ~ #js-warn-exit { + display: none; +} +#js-hide { + position: fixed; + left: 100%; +} +#js-warn-exit { + padding: 1em; + overflow: auto; +} +#js-warn-exit label { + background: #355980; + color: white; + padding: 0.5em 0.75em; + cursor: pointer; + border-radius: 3px; + float: right; +} From 2e36517240d11f1739517dba22dd1916a090a1ee Mon Sep 17 00:00:00 2001 From: Verpz Date: Sun, 28 Feb 2016 14:44:08 +1100 Subject: [PATCH 4/4] Use Local CSS Instead Of CDN --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 7f360247..ed1e772c 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,15 @@ - +
- +

Javascript Is Disabled

Javascript seems to be disabled. This will break some site features.

To enable Javascript click here

- +