From b0982f07a63749f5fc1e8c78c3dcab98945a86de Mon Sep 17 00:00:00 2001 From: tomleb Date: Thu, 11 May 2017 17:54:53 -0400 Subject: [PATCH] Change color for bg-danger and fix night theme flickering issue (#370) * Change color for bg-danger * Fix annoying flickering with night theme * use new class instead of overriding bootstrap's --- public/css/style-night.css | 7 ++++++- public/css/style.css | 5 +++++ public/js/main.js | 9 ++------- templates/_profile_edit.html | 14 +++++++------- templates/admin_index.html | 14 ++++++++++++-- templates/index.html | 14 +++++++++++++- templates/user/login.html | 4 ++-- templates/user/register.html | 10 +++++----- 8 files changed, 52 insertions(+), 25 deletions(-) diff --git a/public/css/style-night.css b/public/css/style-night.css index 4209c410..01e46b5a 100644 --- a/public/css/style-night.css +++ b/public/css/style-night.css @@ -143,4 +143,9 @@ a:hover { } .modal-content .close { color: #fff; -} \ No newline at end of file +} + +.text-error { + background: #29363d; + color: #cf9fff; +} diff --git a/public/css/style.css b/public/css/style.css index db605fde..4df26ba4 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -383,3 +383,8 @@ footer { font-size: smaller; width: auto; /* Undo bootstrap's fixed width */ } + +.text-error { + background: white; + color: #cf9fff; +} diff --git a/public/js/main.js b/public/js/main.js index 1cc1c7b7..5d985acf 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,15 +1,10 @@ -// Night mode var night = localStorage.getItem("night"); -if (night == "true") { - $("head").append(''); -} - function toggleNightMode() { var night = localStorage.getItem("night"); if(night == "true") { - $("#style-dark")[0].remove() + document.getElementById("style-dark").remove() } else { - $("head").append(''); + document.getElementsByTagName("head")[0].append(darkStyleLink); } localStorage.setItem("night", (night == "true") ? "false" : "true"); } diff --git a/templates/_profile_edit.html b/templates/_profile_edit.html index fa560084..0493ad72 100644 --- a/templates/_profile_edit.html +++ b/templates/_profile_edit.html @@ -14,7 +14,7 @@
{{ range (index $.FormErrors "email")}} -

{{ . }}

+

{{ . }}

{{end}}
@@ -30,7 +30,7 @@ {{ range (index $.FormErrors "language")}} -

{{ . }}

+

{{ . }}

{{end}} @@ -40,7 +40,7 @@
{{ range (index $.FormErrors "current_password")}} -

{{ . }}

+

{{ . }}

{{end}}
@@ -50,7 +50,7 @@
{{ range (index $.FormErrors "password")}} -

{{ . }}

+

{{ . }}

{{end}}
@@ -59,7 +59,7 @@
{{ range (index $.FormErrors "password_confirmation")}} -

{{ . }}

+

{{ . }}

{{end}}
@@ -70,7 +70,7 @@
{{ range (index $.FormErrors "username")}} -

{{ . }}

+

{{ . }}

{{end}}
@@ -88,7 +88,7 @@ {{ range (index $.FormErrors "status")}} -

{{ . }}

+

{{ . }}

{{end}} diff --git a/templates/admin_index.html b/templates/admin_index.html index 3943f9a3..11cb46c6 100644 --- a/templates/admin_index.html +++ b/templates/admin_index.html @@ -26,7 +26,18 @@ - +