From 380237b24e0525de0f86308280329c8984a30e09 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 7 May 2017 21:28:35 +0200 Subject: [PATCH 1/3] Fix accidental duplicate css --- public/css/style-night.css | 4 ++-- public/css/style.css | 2 +- templates/index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/css/style-night.css b/public/css/style-night.css index ec5f2263..580c4280 100644 --- a/public/css/style-night.css +++ b/public/css/style-night.css @@ -2,7 +2,7 @@ .nightswitch { position: fixed; top: 12px; - right: 48px; + right: 12px; } .nightswitch > a > img { width: 24px; @@ -180,4 +180,4 @@ div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:last-of-typ .navbar { border-radius: 0px; -} \ No newline at end of file +} diff --git a/public/css/style.css b/public/css/style.css index 7877c119..f522ec6e 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -2,7 +2,7 @@ .nightswitch { position: fixed; top: 12px; - right: 48px; + right: 12px; } .nightswitch > a > img { width: 24px; diff --git a/templates/index.html b/templates/index.html index 112d8143..9b6c3391 100755 --- a/templates/index.html +++ b/templates/index.html @@ -55,7 +55,7 @@ {{block "search_button" .}}{{end}} -
+
From 725c6acca025918e28a82936b9f49f06e456300f Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 7 May 2017 21:36:59 +0200 Subject: [PATCH 2/3] Inline style-switching JS into --- public/js/main.js | 6 ------ templates/index.html | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 657a4909..4d5b47d7 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,10 +1,4 @@ // Night mode -var night = localStorage.getItem("night"); -if (night == "true") { - $("#style")[0].href = "/css/style-night.css"; - $("#nighticon")[0].src = "/img/sun.png"; -} - function toggleNightMode() { var night = localStorage.getItem("night"); if(night == "true") { diff --git a/templates/index.html b/templates/index.html index 9b6c3391..eef8f1d1 100755 --- a/templates/index.html +++ b/templates/index.html @@ -27,6 +27,15 @@ +