Migrate Dark/light mode to a user settings instead of global setting, created new include called router.php to dynamically prepend ../../ to asset pathes based off currect directory depth

This commit is contained in:
johnnyq
2025-08-05 13:32:19 -04:00
parent 7e55808a05
commit 08dd6147f2
16 changed files with 48 additions and 26 deletions

View File

@@ -10,15 +10,6 @@ require_once "includes/inc_all_admin.php";
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
<h5>Dark Mode</h5>
<div class="form-group">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="dark_mode" <?php if ($config_theme_dark == 1) { echo "checked"; } ?> value="1" onchange="this.form.submit()" id="darkModeSwitch">
<label class="custom-control-label" for="darkModeSwitch">Enable Dark Mode</label>
</div>
</div>
<label>Select a Theme</label>
<div class="form-row">