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

11
includes/router.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
// URI Router
// Currently unused, but the idea is to dynamically prepend ../../ to asset paths (like includes, libraries, etc.)
// based on the current directory depth. This allows us to support deeply nested folder structures.
if ($_SERVER['REQUEST_URI'] === '/user/reports') {
$prepend_uri = "../";
} else {
$prepend_uri = '';
}