Dynamic theme color support

This commit is contained in:
billz
2020-06-30 16:54:30 +01:00
parent 9fef770143
commit 2916bd1998
4 changed files with 8 additions and 249 deletions

View File

@@ -3,7 +3,7 @@
*
*
*/
function DisplayThemeConfig()
function DisplayThemeConfig(&$extraFooterScripts)
{
$themes = [
"default" => "RaspAP (default)",
@@ -11,11 +11,14 @@ function DisplayThemeConfig()
"lightsout" => "Lights Out"
];
$themeFiles = [
"default" => "custom.css",
"default" => "custom.php",
"hackernews" => "hackernews.css",
"lightsout" => "lightsout.css"
];
$selectedTheme = array_search($_COOKIE['theme'], $themeFiles);
echo renderTemplate("themes", compact("themes", "selectedTheme"));
$extraFooterScripts[] = array('src'=>'dist/huebee/huebee.pkgd.min.js', 'defer'=>false);
$extraFooterScripts[] = array('src'=>'app/js/huebee.js', 'defer'=>false);
}