]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/php/default.php
App::get_baseurl is now replaced with System::baseUrl
[friendica.git] / view / theme / frio / php / default.php
1 <?php
2 /**
3  * @file view/theme/frio/php/modes/default.php
4  * @brief The default site template
5  */
6 ?>
7 <!DOCTYPE html >
8 <?php
9         require_once('view/theme/frio/php/frio_boot.php');
10
11 //      $minimal = is_modal();
12         if (!isset($minimal)) {
13                 $minimal = false;
14         }
15 ?>
16 <html>
17 <head>
18         <title><?php if(x($page,'title')) echo $page['title'] ?></title>
19         <meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?>">
20         <script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
21         <script>var frio="<?php echo "view/theme/frio"; ?>";</script>
22         <?php $baseurl = Friendica\Core\System::baseUrl(); ?>
23         <?php $frio = "view/theme/frio"; ?>
24         <?php
25                 // Because we use minimal for modals the header and the included js stuff should be only loaded
26                 // if the page is an standard page (so we don't have it twice for modals)
27                 //
28                 /// @todo Think about to move js stuff in the footer
29                 if(!$minimal) {
30                         if(x($page,'htmlhead')) echo $page['htmlhead'];
31                 }
32         ?>
33         <?php
34                 // Add the theme color meta
35                 // It makes mobile Chrome UI match Frio's top bar color.
36                 $uid = $a->profile_uid;
37                 if (is_null($uid)) {
38                         $uid = get_theme_uid();
39                 }
40                 $schema = get_pconfig($uid, 'frio', 'schema');
41                 if (($schema) && ($schema != '---')) {
42                         if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
43                                 $schemefile = 'view/theme/frio/schema/'.$schema.'.php';
44                                 require_once($schemefile);
45                         }
46                 } else {
47                         $nav_bg = get_pconfig($uid, 'frio', 'nav_bg');
48                 }
49                 if (!$nav_bg) {
50                         $nav_bg = "#708fa0";
51                 }
52                 echo '<meta name="theme-color" content="'.$nav_bg.'" />';
53         ?>
54
55 </head>
56 <?php
57 if(($_SERVER['REQUEST_URI'] != "/register") && ($_SERVER['REQUEST_URI'] != "/lostpass") && ($_SERVER['REQUEST_URI'] != "/login"))
58 {
59         echo"<body id=\"top\">";
60 }
61 else
62 {
63         echo"<body id=\"top\">";
64 }
65 ?>
66 <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
67 <?php
68         if(x($page,'nav') && (!$minimal)){
69         echo    str_replace("~config.sitename~",get_config('config','sitename'),
70                         str_replace("~system.banner~",get_config('system','banner'),
71                         $page['nav']
72         ));};
73
74         // special minimal style for modal dialogs
75         if($minimal) {
76 ?>
77                 <section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>
78                         <div id="page-footer"></div>
79                 </section>
80 <?php   }
81         // the style for all other pages
82         else {
83 ?>      <main>
84                 <div class="container">
85                         <div class="row">
86 <?php
87                                 if(($_REQUEST['pagename'] != "register") && ($_REQUEST['pagename'] != "lostpass") && ($_REQUEST['pagename'] != "login") && ($_SERVER['REQUEST_URI'] != "/"))
88                                 {
89                                         echo"
90                                         <aside class=\"col-lg-3 col-md-3 offcanvas-sm offcanvas-xs\">
91                                                 "; if(x($page,'aside')) echo $page['aside']; echo"
92                                                 "; if(x($page,'right_aside')) echo $page['right_aside']; echo"
93                                         </aside>
94
95                                         <div class=\"col-lg-7 col-md-7 col-sm-12 col-xs-12\" id=\"content\">
96                                                 <section class=\"sectiontop "; echo $a->argv[0]; echo "-content-wrapper\">";
97                                                                 if(x($page,'content')) echo $page['content']; echo"
98                                                                 <div id=\"pause\"></div> <!-- The pause/resume Ajax indicator -->
99                                                 </section>
100                                         </div>
101                                                 ";
102                                 }
103                                 else
104                                 {
105                                         echo"
106                                         <div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\" id=\"content\" style=\"margin-top:50px;\" >
107                                                 "; if(x($page,'content')) echo $page['content']; echo"
108                                         </div>
109                                         ";
110                                 }
111 ?>
112                         </div><!--row-->
113                 </div><!-- container -->
114
115                 <div id="back-to-top" title="back to top">&#8679;</div>
116         </main>
117
118 <footer>
119 <?php if(x($page,'footer')) echo $page['footer']; ?>
120 <!-- Modal  -->
121 <div id="modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="plan-info" aria-hidden="true">
122         <div class="modal-dialog modal-full-screen">
123                 <div class="modal-content">
124                         <div id="modal-header" class="modal-header">
125                                 <button id="modal-cloase" type="button" class="close" data-dismiss="modal" aria-hidden="true">
126                                         &times;
127                                 </button>
128                                 <h4 id="modal-title" class="modal-title"></h4>
129                         </div>
130                         <div id="modal-body" class="modal-body">
131                                 <!-- /# content goes here -->
132                         </div>
133                 </div>
134         </div>
135 </div>
136
137 <!-- Dummy div to append other div's when needed (e.g. used for js function editpost() -->
138 <div id="cache-container"></div>
139
140 </footer>
141 <?php } ?> <!-- End of condition if $minal else the rest -->
142 </body>