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