diff --git a/view/theme/frio/php/default.php b/view/theme/frio/php/default.php index c78fdd265..62b98b79c 100644 --- a/view/theme/frio/php/default.php +++ b/view/theme/frio/php/default.php @@ -26,40 +26,43 @@ if (!isset($minimal)) { 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; - } - } else { - $nav_bg = PConfig::get($uid, 'frio', 'nav_bg'); - } - if (!$nav_bg) { - $nav_bg = "#708fa0"; - } - echo ' - '; + $basepath = $a->path ? "/" . $a->path . "/" : "/"; + $frio = "view/theme/frio"; - $is_singleuser = Config::get('system','singleuser'); - $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser"; + // 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; + } + } else { + $nav_bg = PConfig::get($uid, 'frio', 'nav_bg'); + } + if (!$nav_bg) { + $nav_bg = "#708fa0"; + } + echo ' + '; + + $is_singleuser = Config::get('system','singleuser'); + $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser"; ?> +
"> Skip to main content