mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
update(FHC Color Themes): makes the css variables and color modes configurable through the config for different fh's
This commit is contained in:
@@ -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 ?? [])
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user