Skip to content

Commit

Permalink
Enable Dark Mode on the logon page.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Nov 19, 2024
1 parent 04399cc commit d7abef0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Views/logon.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<script {csp-script-nonce}>
window.onload = function () {
$(document).ready(function () {
let prefers = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
let html = document.querySelector('html');
html.classList.add(prefers);
html.setAttribute('data-bs-theme', prefers);

var checkurl = "https://services.opmantek.com/api/versioncheck/Open-AudIT/<?= $config->display_version ?>";
$.getJSON(checkurl, function (data) {
Expand Down

0 comments on commit d7abef0

Please sign in to comment.