3 * @file view/theme/frio/php/modes/default.php
4 * @brief The default site template
10 use Friendica\Core\Config;
11 use Friendica\Core\PConfig;
12 use Friendica\Core\System;
14 use Friendica\Model\Profile;
16 require_once 'view/theme/frio/php/frio_boot.php';
18 // $minimal = is_modal();
19 if (!isset($minimal)) {
23 $basepath = DI::baseUrl()->getUrlPath() ? "/" . DI::baseUrl()->getUrlPath() . "/" : "/";
24 $frio = "view/theme/frio";
25 $view_mode_class = (DI::mode()->isMobile() || DI::mode()->isMobile()) ? 'mobile-view' : 'desktop-view';
26 $is_singleuser = Config::get('system', 'singleuser');
27 $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
31 <title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
32 <meta request="<?php echo htmlspecialchars($_REQUEST['pagename'] ?? '') ?>">
33 <script type="text/javascript">var baseurl = "<?php echo DI::baseUrl(); ?>";</script>
34 <script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
36 // Because we use minimal for modals the header and the included js stuff should be only loaded
37 // if the page is an standard page (so we don't have it twice for modals)
39 /// @todo Think about to move js stuff in the footer
40 if (!$minimal && !empty($page['htmlhead'])) {
41 echo $page['htmlhead'];
44 // Add the theme color meta
45 // It makes mobile Chrome UI match Frio's top bar color.
46 $uid = Profile::getThemeUid($a);
47 $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema'));
48 if ($scheme && is_string($scheme) && $scheme != '---') {
49 if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
50 $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
51 require_once $schemefile;
54 $nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
58 $nav_bg = Config::get('frio', 'nav_bg');
61 if (empty($nav_bg) || !is_string($nav_bg)) {
65 echo '<meta name="theme-color" content="' . $nav_bg . '" />';
69 <body id="top" class="mod-<?php echo DI::module()->getName() . " " . $is_singleuser_class . " " . $view_mode_class;?>">
70 <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
72 if (!empty($page['nav']) && !$minimal) {
75 Config::get('config', 'sitename'),
78 Config::get('system', 'banner'),
84 // special minimal style for modal dialogs
87 <!-- <?php echo __FILE__ ?> -->
88 <section class="minimal">
89 <?php if (!empty($page['content'])) echo $page['content']; ?>
90 <div id="page-footer"></div>
94 // the style for all other pages
97 <div class="container">
100 if ((empty($_REQUEST['pagename']) || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
102 <aside class="col-lg-3 col-md-3 offcanvas-sm offcanvas-xs">';
104 if (!empty($page['aside'])) {
108 if (!empty($page['right_aside'])) {
109 echo $page['right_aside'];
115 <div class="col-lg-7 col-md-7 col-sm-12 col-xs-12" id="content">
116 <section class="sectiontop ';
118 echo '-content-wrapper">';
119 if (!empty($page['content'])) {
120 echo $page['content'];
123 <div id="pause"></div> <!-- The pause/resume Ajax indicator -->
129 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
130 if (!empty($page['content'])) {
131 echo $page['content'];
139 </div><!-- container -->
141 <div id="back-to-top" title="back to top">⇧</div>
145 <?php echo $page['footer'] ?? ''; ?>
147 <?php } ?> <!-- End of condition if $minimal else the rest -->