aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/php/theme.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-20 11:05:15 +0000
committerMario <mario@mariovavti.com>2023-01-20 11:05:15 +0000
commit9dc949b62c6b5e3c8872211f71b11714d9d22b22 (patch)
tree38c06e7a128742e219eb74d6adb035f2f106918a /view/theme/redbasic/php/theme.php
parent40394b94d7c8a8bf1f61f5482195164fff434b90 (diff)
downloadvolse-hubzilla-9dc949b62c6b5e3c8872211f71b11714d9d22b22.tar.gz
volse-hubzilla-9dc949b62c6b5e3c8872211f71b11714d9d22b22.tar.bz2
volse-hubzilla-9dc949b62c6b5e3c8872211f71b11714d9d22b22.zip
native dark theme initial checkin
Diffstat (limited to 'view/theme/redbasic/php/theme.php')
-rw-r--r--view/theme/redbasic/php/theme.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php
index fefd7d26c..5803198fd 100644
--- a/view/theme/redbasic/php/theme.php
+++ b/view/theme/redbasic/php/theme.php
@@ -9,10 +9,27 @@
* * Author: Fabrixxm
* * Maintainer: Mike Macgirvin
* * Maintainer: Mario Vavti
- * * Theme_Color: #343a40
+ * * Theme_Color: #212529
* * Background_Color: rgb(254,254,254)
*/
+use App;
+
function redbasic_init(&$a) {
+ $mode = '';
+
+ if (local_channel()) {
+ $mode = ((get_pconfig(local_channel(), 'redbasic', 'dark_mode')) ? 'dark' : 'light');
+ }
+
+ if (App::$profile_uid) {
+ $mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'dark_mode')) ? 'dark' : 'light');
+ }
+
+ if (!$mode) {
+ $mode = ((get_config('redbasic', 'dark_mode')) ? 'dark' : 'light');
+ }
+
+ App::$page['color_mode'] = 'data-bs-theme="' . $mode . '"';
}