Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit cada92e

Browse files
committed
Dark Mode
1 parent bd27a35 commit cada92e

File tree

7 files changed

+61
-8
lines changed

7 files changed

+61
-8
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
latest
2-
0.4.3
2+
0.4.4
33
0.4
44
0

php/core/templates/main_en.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
<link rel="apple-touch-icon" href="%%SERVERURL%%/load/icon.png">
2424

2525
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/jquery-ui.min.css?%%VERSIONSEED%%">
26-
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/jquery-ui-light.theme.min.css?%%VERSIONSEED%%">
26+
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/jquery-ui-light.theme.min.css?%%VERSIONSEED%%" media="screen and (prefers-color-scheme: light)">
27+
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/jquery-ui-dark.theme.min.css?%%VERSIONSEED%%" media="screen and (prefers-color-scheme: dark)">
2728
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/bootstrap.min.css?%%VERSIONSEED%%">
29+
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/bootstrap-dark.min.css?%%VERSIONSEED%%" media="screen and (prefers-color-scheme: dark)">
2830
<link rel="stylesheet" type="text/css" href="%%SERVERURL%%/load/main.css?%%VERSIONSEED%%">
2931

3032
<script src="%%SERVERURL%%/load/jquery.min.js?%%VERSIONSEED%%"></script>

php/core/templates/stats_en.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ <h3>Graph</h3>
198198
if(chart !== null){
199199
chart.destroy();
200200
}
201+
Chart.defaults.global.legend.labels.fontColor = getComputedStyle(document.documentElement).getPropertyValue('--main-text-color');
201202
chart = createGraph(
202203
combiData,
203204
plainData,

php/load/bootstrap-dark.min.css

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/load/jquery-ui-dark.theme.min.css

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/load/main.css

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
1+
/* Colors */
2+
:root {
3+
--main-text-color: black;
4+
--main-bg-color: white;
5+
--main-link-color: blue;
6+
--main-border-color: black;
7+
8+
--body-bg: #777;
9+
}
10+
11+
@media (prefers-color-scheme: dark) {
12+
:root {
13+
--main-text-color: #eee;
14+
--main-bg-color: #111;
15+
--main-link-color: lightblue;
16+
--main-border-color: #aaa;
17+
18+
--body-bg: black;
19+
}
20+
21+
input, select, textarea {
22+
background-color: var(--main-bg-color) !important;
23+
color: var(--main-text-color) !important;
24+
}
25+
}
26+
127
body{
228
font-family:Ubuntu,sans-serif;
329
font-size:100%;
4-
background-color:#777;
30+
background-color: var(--body-bg);
531
}
632
h1{
7-
color:black;
33+
color: var(--main-text-color);
834
border-bottom: 1px solid #5d7;
935
text-align:center;
1036
font-type: bold;
1137
}
1238
h2{
13-
color:black;
39+
color:var(--main-text-color);
1440
border-bottom: 1px solid #5d7;
1541
text-align:left;
1642
font-type: bold;
@@ -20,11 +46,11 @@ h1,h2,h3,h4{
2046
}
2147

2248
div#main{
23-
border: 1px solid black;
49+
border: 1px solid var(--main-border-color);
2450
margin:auto;
2551
min-width: 350px;
2652
max-width: 1600px;
27-
background-color: white;
53+
background-color: var(--main-bg-color);
2854
padding: 5px;
2955
border-radius: 4px;
3056
min-height: 300px;

php/load/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $(() => {
1616
$("div#confirmDialog").dialog('close');
1717
ok();
1818
},
19-
"Abbrechen" : () => {
19+
"Cancel" : () => {
2020
$("div#confirmDialog").dialog('close');
2121
}
2222
}

0 commit comments

Comments
 (0)