make default light/dark themes configurable, add support for main application and login form

This commit is contained in:
Andrew Dolgov
2025-08-01 17:20:05 +03:00
parent 851ddf4bbe
commit 8eb340c3ca
7 changed files with 28 additions and 4 deletions

View File

@@ -464,14 +464,14 @@
return false;
}
function get_theme_path(string $theme): string {
function get_theme_path(string $theme, string $default = ""): string {
$check = "themes/$theme";
if (file_exists($check)) return $check;
$check = "themes.local/$theme";
if (file_exists($check)) return $check;
return "";
return $default;
}
function theme_exists(string $theme): bool {