- $baseurl = System::baseUrl();
- $frio = "view/theme/frio";
- // Because we use minimal for modals the header and the included js stuff should be only loaded
- // if the page is an standard page (so we don't have it twice for modals)
- //
- /// @todo Think about to move js stuff in the footer
- if (!$minimal && x($page, 'htmlhead')) {
- echo $page['htmlhead'];
- }
- // Add the theme color meta
- // It makes mobile Chrome UI match Frio's top bar color.
- $uid = $a->profile_uid;
- if (is_null($uid)) {
- $uid = Profile::getThemeUid();
- }
- $schema = PConfig::get($uid, 'frio', 'schema');
- if (($schema) && ($schema != '---')) {
- if (file_exists('view/theme/frio/schema/' . $schema . '.php')) {
- $schemefile = 'view/theme/frio/schema/' . $schema . '.php';
- require_once $schemefile;
+ // Because we use minimal for modals the header and the included js stuff should be only loaded
+ // if the page is an standard page (so we don't have it twice for modals)
+ //
+ /// @todo Think about to move js stuff in the footer
+ if (!$minimal && !empty($page['htmlhead'])) {
+ echo $page['htmlhead'];
+ }
+
+ // Add the theme color meta
+ // It makes mobile Chrome UI match Frio's top bar color.
+ $uid = $a->profile_uid;
+ if (is_null($uid)) {
+ $uid = Profile::getThemeUid();
+ }
+ $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema'));
+ if ($scheme && ($scheme != '---')) {
+ if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
+ $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
+ require_once $schemefile;
+ }
+ } else {
+ $nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
+ }
+
+ if (empty($nav_bg)) {
+ $nav_bg = "#708fa0";