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