summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/functions.php4
-rwxr-xr-xinclude/login_form.php5
2 files changed, 7 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index ae403ca84..24b5c8538 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -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 {
diff --git a/include/login_form.php b/include/login_form.php
index 8fa578c11..e601ca619 100755
--- a/include/login_form.php
+++ b/include/login_form.php
@@ -34,6 +34,11 @@
</script>
<script type="text/javascript">
+ const __default_light_theme = "<?= get_theme_path(Config::get(Config::DEFAULT_LIGHT_THEME), 'themes/light.css') ?>";
+ const __default_dark_theme = "<?= get_theme_path(Config::get(Config::DEFAULT_DARK_THEME), 'themes/night.css') ?>";
+ </script>
+
+ <script type="text/javascript">
/* exported Plugins */
const Plugins = {};