3 * @file view/theme/frio/php/modes/default.php
4 * The default site template
11 use Friendica\Model\Profile;
13 require_once 'view/theme/frio/php/frio_boot.php';
15 // $minimal = is_modal();
16 if (!isset($minimal)) {
20 $basepath = DI::baseUrl()->getUrlPath() ? "/" . DI::baseUrl()->getUrlPath() . "/" : "/";
21 $frio = "view/theme/frio";
22 $view_mode_class = (DI::mode()->isMobile() || DI::mode()->isMobile()) ? 'mobile-view' : 'desktop-view';
23 $is_singleuser = DI::config()->get('system', 'singleuser');
24 $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
28 <title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
29 <meta request="<?php echo htmlspecialchars($_REQUEST['pagename'] ?? '') ?>">
30 <script type="text/javascript">var baseurl = "<?php echo DI::baseUrl(); ?>";</script>
31 <script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
33 // Because we use minimal for modals the header and the included js stuff should be only loaded
34 // if the page is an standard page (so we don't have it twice for modals)
36 /// @todo Think about to move js stuff in the footer
37 if (!$minimal && !empty($page['htmlhead'])) {
38 echo $page['htmlhead'];
41 // Add the theme color meta
42 // It makes mobile Chrome UI match Frio's top bar color.
43 $uid = Profile::getThemeUid($a);
44 $scheme = DI::pConfig()->get($uid, 'frio', 'scheme', DI::pConfig()->get($uid, 'frio', 'schema'));
45 if ($scheme && is_string($scheme) && $scheme != '---') {
46 if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
47 $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
48 require_once $schemefile;
51 $nav_bg = DI::pConfig()->get($uid, 'frio', 'nav_bg');
55 $nav_bg = DI::config()->get('frio', 'nav_bg');
58 if (empty($nav_bg) || !is_string($nav_bg)) {
62 echo '<meta name="theme-color" content="' . $nav_bg . '" />';
66 <body id="top" class="mod-<?php echo DI::module()->getName() . " " . $is_singleuser_class . " " . $view_mode_class;?>">
67 <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
69 if (!empty($page['nav']) && !$minimal) {
72 DI::config()->get('config', 'sitename'),
75 DI::config()->get('system', 'banner'),
81 // special minimal style for modal dialogs
84 <!-- <?php echo __FILE__ ?> -->
85 <section class="minimal">
86 <?php if (!empty($page['content'])) echo $page['content']; ?>
87 <div id="page-footer"></div>
91 // the style for all other pages
94 <div class="container">
97 if ((empty($_REQUEST['pagename']) || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
99 <aside class="col-lg-3 col-md-3 offcanvas-sm offcanvas-xs">';
101 if (!empty($page['aside'])) {
105 if (!empty($page['right_aside'])) {
106 echo $page['right_aside'];
112 <div class="col-lg-7 col-md-7 col-sm-12 col-xs-12" id="content">
113 <section class="sectiontop ';
115 echo '-content-wrapper">';
116 if (!empty($page['content'])) {
117 echo $page['content'];
120 <div id="pause"></div> <!-- The pause/resume Ajax indicator -->
126 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
127 if (!empty($page['content'])) {
128 echo $page['content'];
136 </div><!-- container -->
138 <div id="back-to-top" title="back to top">⇧</div>
142 <?php echo $page['footer'] ?? ''; ?>
144 <?php } ?> <!-- End of condition if $minimal else the rest -->