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;
13 use Friendica\Model\Profile;
15 require_once 'view/theme/frio/php/frio_boot.php';
17 // $minimal = is_modal();
18 if (!isset($minimal)) {
22 $view_mode_class = ($a->is_mobile || $a->is_tablet) ? 'mobile-view' : 'desktop-view';
26 <title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
27 <meta request="<?php echo htmlspecialchars(defaults($_REQUEST, 'pagename', '')) ?>">
28 <script type="text/javascript">var baseurl = "<?php echo System::baseUrl(); ?>";</script>
29 <script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
31 $basepath = $a->getURLPath() ? "/" . $a->getURLPath() . "/" : "/";
32 $frio = "view/theme/frio";
34 // Because we use minimal for modals the header and the included js stuff should be only loaded
35 // if the page is an standard page (so we don't have it twice for modals)
37 /// @todo Think about to move js stuff in the footer
38 if (!$minimal && x($page, 'htmlhead')) {
39 echo $page['htmlhead'];
42 // Add the theme color meta
43 // It makes mobile Chrome UI match Frio's top bar color.
44 $uid = $a->profile_uid;
46 $uid = Profile::getThemeUid();
48 $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema'));
49 if ($scheme && ($scheme != '---')) {
50 if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
51 $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
52 require_once $schemefile;
55 $nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
61 <meta name="theme-color" content="' . $nav_bg . '" />';
63 $is_singleuser = Config::get('system','singleuser');
64 $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
68 <body id="top" class="mod-<?php echo $a->module . " " . $is_singleuser_class . " " . $view_mode_class;?>">
69 <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
71 if (x($page, 'nav') && !$minimal) {
74 Config::get('config', 'sitename'),
77 Config::get('system', 'banner'),
83 // special minimal style for modal dialogs
86 <section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;">
87 <?php if (x($page, 'content')) echo $page['content']; ?>
88 <div id="page-footer"></div>
92 // the style for all other pages
95 <div class="container">
98 if ((!x($_REQUEST, 'pagename') || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
100 <aside class="col-lg-3 col-md-3 offcanvas-sm offcanvas-xs">';
102 if (x($page, 'aside')) {
106 if (x($page, 'right_aside')) {
107 echo $page['right_aside'];
113 <div class="col-lg-7 col-md-7 col-sm-12 col-xs-12" id="content">
114 <section class="sectiontop ';
116 echo '-content-wrapper">';
117 if (x($page, 'content')) {
118 echo $page['content'];
121 <div id="pause"></div> <!-- The pause/resume Ajax indicator -->
127 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
128 if (x($page, 'content')) {
129 echo $page['content'];
137 </div><!-- container -->
139 <div id="back-to-top" title="back to top">⇧</div>
143 <?php echo defaults($page, 'footer', ''); ?>
145 <?php } ?> <!-- End of condition if $minimal else the rest -->