Skip to content

Commit

Permalink
Add High contrast dark theme
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
  • Loading branch information
rdwebdesign committed Feb 9, 2023
1 parent c4b9a43 commit 9211920
Show file tree
Hide file tree
Showing 5 changed files with 919 additions and 13 deletions.
8 changes: 4 additions & 4 deletions scripts/pi-hole/js/db_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ function updateQueriesOverTime() {

$(function () {
var ctx = document.getElementById("queryOverTimeChart").getContext("2d");
var blockedColor = utils.getCSSval("queries-blocked","background-color");
var permittedColor = utils.getCSSval("queries-permitted","background-color");
var gridColor = utils.getCSSval("graphs-grid","background-color");
var ticksColor = utils.getCSSval("graphs-ticks","color");
var blockedColor = utils.getCSSval("queries-blocked", "background-color");
var permittedColor = utils.getCSSval("queries-permitted", "background-color");
var gridColor = utils.getCSSval("graphs-grid", "background-color");
var ticksColor = utils.getCSSval("graphs-ticks", "color");

timeLineChart = new Chart(ctx, {
type: utils.getGraphType(),
Expand Down
8 changes: 4 additions & 4 deletions scripts/pi-hole/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ function updateQueriesOverTime() {
timeLineChart.data.datasets = [];

var labels = ["Blocked DNS Queries", "Permitted DNS Queries"];
var blockedColor = utils.getCSSval("queries-blocked","background-color");
var permittedColor = utils.getCSSval("queries-permitted","background-color");
var blockedColor = utils.getCSSval("queries-blocked", "background-color");
var permittedColor = utils.getCSSval("queries-permitted", "background-color");
var colors = [blockedColor, permittedColor];

// Collect values and colors, and labels
Expand Down Expand Up @@ -862,8 +862,8 @@ $(function () {
getMaxlogage();
updateSummaryData();

var gridColor = utils.getCSSval("graphs-grid","background-color");
var ticksColor = utils.getCSSval("graphs-ticks","color");
var gridColor = utils.getCSSval("graphs-grid", "background-color");
var ticksColor = utils.getCSSval("graphs-ticks", "color");
var ctx = document.getElementById("queryOverTimeChart").getContext("2d");
timeLineChart = new Chart(ctx, {
type: utils.getGraphType(),
Expand Down
6 changes: 3 additions & 3 deletions scripts/pi-hole/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ function changeBulkDeleteStates(table) {

function getCSSval(cssclass, cssproperty) {
var elem = $("<div class='" + cssclass + "'></div>"),
val = elem.appendTo('body').css(cssproperty);
elem.remove();
return val;
val = elem.appendTo("body").css(cssproperty);
elem.remove();
return val;
}

window.utils = (function () {
Expand Down
Loading

0 comments on commit 9211920

Please sign in to comment.