Skip to content

Commit

Permalink
Merge pull request DivinumOfficium#4107 from FAJ-Munich/master
Browse files Browse the repository at this point in the history
Adding non-dark mode option via "Contrast background"
  • Loading branch information
APMarcello3 authored Oct 18, 2024
2 parents b2aa41d + 39f17a8 commit 73e9da2
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion web/cgi-bin/horas/webdia.pl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ sub htmlHead {
background: $dialogbackground;
}
.contrastbg { background: white; }
PrintTag

if (our $whitebground) {
print << "PrintTag";
\@media (prefers-color-scheme: dark) {
body {
background: black;
Expand All @@ -72,7 +76,35 @@ sub htmlHead {
background: #3F3F3F;
color: white;
}
}
}
PrintTag
} else {
print << "PrintTag";
\@media (prefers-color-scheme: dark) {
body {
background: $dialogbackground;
color: black;
}
select {
background: lightgrey;
color: black;
}
input[type="select"] {
background: lightgrey;
color: black;
}
input[type="submit"] {
background: grey;
color: black;
}
input[type="text"] {
background: white;
color: black;
}
PrintTag
}

print << "PrintTag";
</STYLE>
<TITLE>$title</TITLE>
$horasjs
Expand Down

0 comments on commit 73e9da2

Please sign in to comment.