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 $basepath = $a->getURLPath() ? "/" . $a->getURLPath() . "/" : "/";
23 $frio = "view/theme/frio";
24 $view_mode_class = ($a->is_mobile || $a->is_tablet) ? 'mobile-view' : 'desktop-view';
25 $is_singleuser = Config::get('system', 'singleuser');
26 $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
30 <title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
31 <meta request="<?php echo htmlspecialchars($_REQUEST['pagename'] ?? '') ?>">
32 <script type="text/javascript">var baseurl = "<?php echo System::baseUrl(); ?>";</script>
33 <script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
35 // Because we use minimal for modals the header and the included js stuff should be only loaded
36 // if the page is an standard page (so we don't have it twice for modals)
38 /// @todo Think about to move js stuff in the footer
39 if (!$minimal && !empty($page['htmlhead'])) {
40 echo $page['htmlhead'];
43 // Add the theme color meta
44 // It makes mobile Chrome UI match Frio's top bar color.
45 $uid = Profile::getThemeUid($a);
46 $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema'));
47 if ($scheme && is_string($scheme) && $scheme != '---') {
48 if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
49 $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
50 require_once $schemefile;
53 $nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
57 $nav_bg = Config::get('frio', 'nav_bg');
60 if (empty($nav_bg) || !is_string($nav_bg)) {
64 echo '<meta name="theme-color" content="' . $nav_bg . '" />';
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 (!empty($page['nav']) && !$minimal) {
74 Config::get('config', 'sitename'),
77 Config::get('system', 'banner'),
83 // special minimal style for modal dialogs
86 <!-- <?php echo __FILE__ ?> -->
87 <section class="minimal">
88 <?php if (!empty($page['content'])) echo $page['content']; ?>
89 <div id="page-footer"></div>
93 // the style for all other pages
96 <div class="container">
99 if ((empty($_REQUEST['pagename']) || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
101 <aside class="col-lg-3 col-md-3 offcanvas-sm offcanvas-xs">';
103 if (!empty($page['aside'])) {
107 if (!empty($page['right_aside'])) {
108 echo $page['right_aside'];
114 <div class="col-lg-7 col-md-7 col-sm-12 col-xs-12" id="content">
115 <section class="sectiontop ';
117 echo '-content-wrapper">';
118 if (!empty($page['content'])) {
119 echo $page['content'];
122 <div id="pause"></div> <!-- The pause/resume Ajax indicator -->
128 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
129 if (!empty($page['content'])) {
130 echo $page['content'];
138 </div><!-- container -->
140 <div id="back-to-top" title="back to top">⇧</div>
144 <?php echo $page['footer'] ?? ''; ?>
146 <?php } ?> <!-- End of condition if $minimal else the rest -->