aboutsummaryrefslogblamecommitdiffstats
path: root/view/theme/redbasic/php/theme.php
blob: 5803198fd767362686970529906b22dd8ce5f09c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
     
 

                     
                                           
                   

                      

                                 
                              
                           
                                         

   

        
                             
 














                                                                                                       
 
<?php

/**
 *   * Name: Redbasic
 *   * Description: Hubzilla standard theme
 *   * Version: 2.2
 *   * MinVersion: 8.0
 *   * MaxVersion: 9.0
 *   * Author: Fabrixxm
 *   * Maintainer: Mike Macgirvin
 *   * Maintainer: Mario Vavti
 *   * 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 . '"';
}