update(FHC Color Themes): makes the css variables and color modes configurable through the config for different fh's

This commit is contained in:
SimonGschnell
2025-03-24 11:59:03 +01:00
parent 3f605e7051
commit 80c326360f
8 changed files with 46 additions and 26 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
// changing the color theme
$config['theme_name']='default';
$config['theme_css']= "public/css/theme/default.css";
$config['theme_modes']=['light','dark'];
@@ -88,6 +88,7 @@ function generateCSSsInclude($CSSs)
function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
{
$ci =& get_instance();
$ci->load->config('theme');
$ci->load->model('system/Sprache_model','SpracheModel');
$server_language = getData($ci->SpracheModel->loadWhere(['content' => true]));
$server_language = array_map(function($language){
@@ -103,6 +104,10 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
'server_languages' => $server_language,
'user_language' => $user_language,
'timezone' => date_default_timezone_get(),
'theme' => [
'name'=>$ci->config->item('theme_name'),
'modes'=>$ci->config->item('theme_modes'),
]
);
$toPrint = "\n";
@@ -1,4 +1,5 @@
<?php
$this->load->config('theme');
$includesArray = array(
'title' => $title ?? 'FH-Complete',
'vue3' => true,
@@ -10,7 +11,8 @@ $includesArray = array(
'public/js/apps/Cis.js'
], $customJSModules ?? []),
'customCSSs' => array_merge([
'public/css/Cis4/Cis.css'
'public/css/Cis4/Cis.css',
$this->config->item('theme_css'),
], $customCSSs ?? [])
);