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