dark mode made better to look at

This commit is contained in:
Thomas G 2022-08-08 22:11:16 +10:00
parent 2d2a7beef5
commit 5982a5e7c0
4 changed files with 16 additions and 14 deletions

View File

@ -440,7 +440,7 @@ body {
.content_signup a,
.content_special p a,
.content_special a {
color: black
color: black;
}
#footer {

View File

@ -67,12 +67,12 @@ body {
}
.content {
color: white;
color: rgb(167 167 167);
background: rgb(25, 25, 25);
}
.content_signup {
color: rgb(255, 255, 255);
color: rgb(167 167 167);
background: rgb(25, 25, 25);
}
@ -82,7 +82,7 @@ body {
.content_signup a,
.content_special p a,
.content_special a {
color: #d1d1d1;
color: #005587;
}
#footer {
@ -97,12 +97,12 @@ body {
#footer a,
#footer_signup p,
#footer_signup a {
color: white;
color: rgb(167 167 167);
}
a,
#navbarusername {
color: white;
color: rgb(200,200,200);
}
.logoutframe {
@ -127,8 +127,8 @@ a,
textarea,
select,
input {
background-color: black;
color: white;
background-color: rgb(25, 25, 25);
color: rgb(200,200,200);
}

View File

@ -42,9 +42,10 @@
@else
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
<script>
function getStylesheet() {
function getDarkMode() {
var currentTime = new Date().getHours();
if (7 >= currentTime && currentTime > 18) {} else {
if (6 >= currentTime && currentTime > 18) {} else {
// it is night time for the user, let's force dark mode.
var li = document.createElement('link');
var href = "{{ asset('css/appdark.css?id='.Str::random(8)) }}";
var rel = 'stylesheet';
@ -54,7 +55,7 @@
s.appendChild(li, s);
}
}
getStylesheet()
getDarkMode()
</script>
@endauth
@yield('extras')

View File

@ -33,9 +33,10 @@
@else
<link href="{{ asset('css/app.css?id=' . Str::random(8)) }}" rel="stylesheet">
<script>
function getStylesheet() {
function getDarkMode() {
var currentTime = new Date().getHours();
if (7 >= currentTime && currentTime > 18) {} else {
if (6 >= currentTime && currentTime > 18) {} else {
// it is night time for the user, let's force dark mode.
var li = document.createElement('link');
var href = "{{ asset('css/appdark.css?id='.Str::random(8)) }}";
var rel = 'stylesheet';
@ -45,7 +46,7 @@
s.appendChild(li, s);
}
}
getStylesheet()
getDarkMode()
</script>
@endauth
@yield('extras')