X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fphp%2Fdefault.php;h=22bb995804a474cd032d74f1bb479351fdf7577a;hb=0a82fe4211f73cf10107feb69fe38eaa85eb61f8;hp=bcd11cc62a6e7c812a83ec7b383e898fb19fc38b;hpb=1064da10522e1becf1f7852421933c7ba1fe4f0a;p=friendica.git diff --git a/view/theme/frio/php/default.php b/view/theme/frio/php/default.php index bcd11cc62a..22bb995804 100644 --- a/view/theme/frio/php/default.php +++ b/view/theme/frio/php/default.php @@ -10,6 +10,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\System; +use Friendica\Model\Profile; require_once 'view/theme/frio/php/frio_boot.php'; @@ -17,52 +18,57 @@ require_once 'view/theme/frio/php/frio_boot.php'; if (!isset($minimal)) { $minimal = false; } + +$basepath = $a->getURLPath() ? "/" . $a->getURLPath() . "/" : "/"; +$frio = "view/theme/frio"; +$view_mode_class = ($a->is_mobile || $a->is_tablet) ? 'mobile-view' : 'desktop-view'; +$is_singleuser = Config::get('system', 'singleuser'); +$is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser"; ?> - <?php if (x($page, 'title')) echo $page['title'] ?> - + <?php if (!empty($page['title'])) echo $page['title'] ?> + profile_uid; - if (is_null($uid)) { - $uid = get_theme_uid(); - } - $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']; } - } 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"; + + // Add the theme color meta + // It makes mobile Chrome UI match Frio's top bar color. + $uid = Profile::getThemeUid($a); + $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema')); + if ($scheme && is_string($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 = Config::get('frio', 'nav_bg'); + } + + if (empty($nav_bg) || !is_string($nav_bg)) { + $nav_bg = "#708fa0"; + } + + echo ''; ?> - "> + + "> Skip to main content -
- + +
+
'; - if (x($page, 'aside')) { + if (!empty($page['aside'])) { echo $page['aside']; } - if (x($page, 'right_aside')) { + if (!empty($page['right_aside'])) { echo $page['right_aside']; } @@ -106,26 +113,26 @@ if (!isset($minimal)) {
'; - if (x($page, 'content')) { - echo $page['content']; - } - echo ' -
+ echo $a->argv[0]; + echo '-content-wrapper">'; + if (!empty($page['content'])) { + echo $page['content']; + } + echo ' +
'; - } else { - echo ' + } else { + echo '
'; - if (x($page, 'content')) { + if (!empty($page['content'])) { echo $page['content']; } echo '
'; - } + } ?>
@@ -134,27 +141,7 @@ if (!isset($minimal)) {