Dimmer colors for night mode

This commit is contained in:
Rsl1122 2019-08-16 13:07:57 +03:00
parent 88628a35fd
commit 76aac972e7
3 changed files with 40 additions and 112 deletions

View File

@ -760,209 +760,104 @@ div.scrollbar {
color: #fff; color: #fff;
} }
.bg-red .content .text,
.bg-red .content .number {
color: #fff;
}
.bg-pink { .bg-pink {
background-color: #E91E63; background-color: #E91E63;
color: #fff; color: #fff;
} }
.bg-pink .content .text,
.bg-pink .content .number {
color: #fff;
}
.bg-purple { .bg-purple {
background-color: #9C27B0; background-color: #9C27B0;
color: #fff; color: #fff;
} }
.bg-purple .content .text,
.bg-purple .content .number {
color: #fff;
}
.bg-deep-purple { .bg-deep-purple {
background-color: #673AB7; background-color: #673AB7;
color: #fff; color: #fff;
} }
.bg-deep-purple .content .text,
.bg-deep-purple .content .number {
color: #fff;
}
.bg-indigo { .bg-indigo {
background-color: #3F51B5; background-color: #3F51B5;
color: #fff; color: #fff;
} }
.bg-indigo .content .text,
.bg-indigo .content .number {
color: #fff;
}
.bg-blue { .bg-blue {
background-color: #2196F3; background-color: #2196F3;
color: #fff; color: #fff;
} }
.bg-blue .content .text,
.bg-blue .content .number {
color: #fff;
}
.bg-light-blue { .bg-light-blue {
background-color: #03A9F4; background-color: #03A9F4;
color: #fff; color: #fff;
} }
.bg-light-blue .content .text,
.bg-light-blue .content .number {
color: #fff;
}
.bg-cyan { .bg-cyan {
background-color: #00BCD4; background-color: #00BCD4;
color: #fff; color: #fff;
} }
.bg-cyan .content .text,
.bg-cyan .content .number {
color: #fff;
}
.bg-teal { .bg-teal {
background-color: #009688; background-color: #009688;
color: #fff; color: #fff;
} }
.bg-teal .content .text,
.bg-teal .content .number {
color: #fff;
}
.bg-green { .bg-green {
background-color: #4CAF50; background-color: #4CAF50;
color: #fff; color: #fff;
} }
.bg-green .content .text,
.bg-green .content .number {
color: #fff;
}
.bg-light-green { .bg-light-green {
background-color: #8BC34A; background-color: #8BC34A;
color: #fff; color: #fff;
} }
.bg-light-green .content .text,
.bg-light-green .content .number {
color: #fff;
}
.bg-lime { .bg-lime {
background-color: #CDDC39; background-color: #CDDC39;
color: #fff; color: #fff;
} }
.bg-lime .content .text,
.bg-lime .content .number {
color: #fff;
}
.bg-yellow { .bg-yellow {
background-color: #ffe821; background-color: #ffe821;
color: #fff; color: #fff;
} }
.bg-yellow .content .text,
.bg-yellow .content .number {
color: #fff;
}
.bg-amber { .bg-amber {
background-color: #FFC107; background-color: #FFC107;
color: #fff; color: #fff;
} }
.bg-amber .content .text,
.bg-amber .content .number {
color: #fff;
}
.bg-orange { .bg-orange {
background-color: #FF9800; background-color: #FF9800;
color: #fff; color: #fff;
} }
.bg-orange .content .text,
.bg-orange .content .number {
color: #fff;
}
.bg-deep-orange { .bg-deep-orange {
background-color: #FF5722; background-color: #FF5722;
color: #fff; color: #fff;
} }
.bg-deep-orange .content .text,
.bg-deep-orange .content .number {
color: #fff;
}
.bg-brown { .bg-brown {
background-color: #795548; background-color: #795548;
color: #fff; color: #fff;
} }
.bg-brown .content .text,
.bg-brown .content .number {
color: #fff;
}
.bg-grey { .bg-grey {
background-color: #9E9E9E; background-color: #9E9E9E;
color: #fff; color: #fff;
} }
.bg-grey .content .text,
.bg-grey .content .number {
color: #fff;
}
.bg-blue-grey { .bg-blue-grey {
background-color: #607D8B; background-color: #607D8B;
color: #fff; color: #fff;
} }
.bg-blue-grey .content .text,
.bg-blue-grey .content .number {
color: #fff;
}
.bg-black { .bg-black {
background-color: #555555; background-color: #555555;
color: #fff; color: #fff;
} }
.bg-black .content .text,
.bg-black .content .number {
color: #fff;
}
.bg-white { .bg-white {
background-color: #ffffff; background-color: #ffffff;
color: #fff; color: #333;
}
.bg-white .content .text,
.bg-white .content .number {
color: #fff;
} }
.bg-plan { .bg-plan {

View File

@ -71,6 +71,42 @@
var nightMode = window.localStorage.getItem('nightMode') == 'true'; var nightMode = window.localStorage.getItem('nightMode') == 'true';
function nightModeColors() {
return '.bg-red {background-color: #D73B30;color: #eee8d5;}' +
'.bg-pink {background-color: #CD1A57;color: #eee8d5;}' +
'.bg-purple {background-color: #89229B;color: #eee8d5;}' +
'.bg-deep-purple {background-color: #5B33A1;color: #eee8d5;}' +
'.bg-indigo {background-color: #37479F;color: #eee8d5;}' +
'.bg-blue {background-color: #1D84D6;color: #eee8d5;}' +
'.bg-light-blue {background-color: #0395D7;color: #eee8d5;}' +
'.bg-cyan {background-color: #00A5BB;color: #eee8d5;}' +
'.bg-teal {background-color: #008478;color: #eee8d5;}' +
'.bg-green {background-color: #439A46;color: #eee8d5;}' +
'.bg-light-green {background-color: #7AAC41;color: #eee8d5;}' +
'.bg-lime {background-color: #B4C232;color: #eee8d5;}' +
'.bg-yellow {background-color: #E0CF34;color: #eee8d5;}' +
'.bg-amber {background-color: #E0AA06;color: #eee8d5;}' +
'.bg-orange {background-color: #E08600;color: #eee8d5;}' +
'.bg-deep-orange {background-color: #E04D1E;color: #eee8d5;}' +
'.bg-brown {background-color: #795548;color: #eee8d5;}' +
'.bg-grey {background-color: #9E9E9E;color: #eee8d5;}' +
'.bg-blue-grey {background-color: #546E7A;color: #eee8d5;}' +
'.bg-black {background-color: #555555;color: #eee8d5;}' +
'.bg-plan {background-color: #307E14;color: #eee8d5;}' +
'.bg-night {background-color: #44475a;color: #eee8d5;}' +
'.col-red {color: #D73B30;}.col-pink {color: #CD1A57;}' +
'.col-purple {color: #89229B;}.col-deep-purple {color: #5B33A1;}' +
'.col-indigo {color: #37479F;}.col-blue {color: #1D84D6;}' +
'.col-light-blue {color: #0395D7;}.col-cyan {color: #00A5BB;}' +
'.col-teal {color: #008478;}.col-green {color: #439A46;}' +
'.col-light-green {color: #7AAC41;}.col-lime {color: #B4C232;}' +
'.col-yellow {color: #E0CF34;}.col-amber {color: #E0AA06;}' +
'.col-orange {color: #E08600;}.col-deep-orange {color: #E04D1E;}' +
'.col-brown {color: #795548;}.col-grey {color: #9E9E9E;}' +
'.col-blue-grey {color: #546E7A;}' +
'.col-plan {color: #307E14;}'
}
function changeNightModeCSS() { function changeNightModeCSS() {
if (nightMode) { if (nightMode) {
// Background colors from dracula theme // Background colors from dracula theme
@ -83,6 +119,7 @@
'.collapse-item:hover,.nav-link.active {background-color: #606270 !important;}' + '.collapse-item:hover,.nav-link.active {background-color: #606270 !important;}' +
'.nav-tabs .nav-link.active {background-color: #44475a !important;border-color:#6272a4 #6272a4 #44475a !important;}' + '.nav-tabs .nav-link.active {background-color: #44475a !important;border-color:#6272a4 #6272a4 #44475a !important;}' +
'.fc-today {background:#646e8c !important}' + '.fc-today {background:#646e8c !important}' +
nightModeColors() +
'</style>'); '</style>');
// Turn bright tables to dark // Turn bright tables to dark
$('.table').addClass('table-dark'); $('.table').addClass('table-dark');
@ -338,11 +375,7 @@
changeHighChartsNightMode(); changeHighChartsNightMode();
function toggleNightMode() { function toggleNightMode() {
if (nightMode) { nightMode = !nightMode;
nightMode = false;
} else {
nightMode = true;
}
setTimeout(function () { setTimeout(function () {
window.localStorage.setItem('nightMode', nightMode); window.localStorage.setItem('nightMode', nightMode);
changeNightModeCSS(); changeNightModeCSS();

View File

@ -185,7 +185,7 @@ function onOpenServer(i, servers) {
var worldSeries = {name: 'World Playtime', colorByPoint: true, data: server.world_pie_series}; var worldSeries = {name: 'World Playtime', colorByPoint: true, data: server.world_pie_series};
var gmSeries = server.gm_series; var gmSeries = server.gm_series;
worldPie("worldpie_server_" + i, worldSeries, gmSeries); worldPie("worldpie_server_" + i, worldSeries, gmSeries, '#3A3B45');
}, 250); }, 250);
opened = true; opened = true;
} }