]> git.mxchange.org Git - friendica.git/blob - php/modes/default.php
182dcfa9830e8704cf87905f8d9ef26f3bc97059
[friendica.git] / 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 name="viewport" content="initial-scale=1.0">
21         <meta request="<?php echo $_REQUEST['pagename'] ?> ">
22         <script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
23         <script>var frio="<?php echo "view/theme/frio"; ?>";</script>
24         <?php $baseurl = $a->get_baseurl(); ?>
25         <?php $frio = "view/theme/frio"; ?>
26         <?php 
27                 // Because we use minimal for modals the header and the included js stuff should be only loaded
28                 // if the page is an standard page (so we don't have it twice for modals)
29                 // 
30                 /// @todo Think about to move js stuff in the footer
31                 if(!$minimal) {
32                         if(x($page,'htmlhead')) echo $page['htmlhead'];
33                 }
34         ?>
35         
36
37 </head>
38 <?php
39 if(($_SERVER['REQUEST_URI'] != "/register") && ($_SERVER['REQUEST_URI'] != "/lostpass") && ($_SERVER['REQUEST_URI'] != "/login"))
40 {
41         echo"<body id=\"top\">";
42 }
43 else
44 {
45         echo"<body id=\"top\">";
46 }
47 ?>
48 <?php if($_SERVER['REQUEST_URI'] == "/"){header('Location: /login');} ?>
49 <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
50 <?php
51         if(x($page,'nav') && (!$minimal)){
52         echo    str_replace("~config.sitename~",get_config('config','sitename'),
53                         str_replace("~system.banner~",get_config('system','banner'),
54                         $page['nav']
55         ));};
56
57         // special minimal style for modal dialogs
58         if($minimal) {
59 ?>
60                 <section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>
61                         <div id="page-footer"></div>
62                 </section>
63 <?php   }
64         // the style for all other pages
65         else {
66 ?>      <main>
67                 <div class="container">
68                         <div class="row">
69 <?php
70                                 if(($_REQUEST['pagename'] != "register") && ($_REQUEST['pagename'] != "lostpass") && ($_REQUEST['pagename'] != "login") && ($_SERVER['REQUEST_URI'] != "/"))
71                                 {
72                                         echo"
73                                         <aside class=\"col-lg-3 col-md-3 offcanvas-sm offcanvas-xs\">
74                                                 "; if(x($page,'aside')) echo $page['aside']; echo"
75                                                 "; if(x($page,'right_aside')) echo $page['right_aside']; echo"
76                                         </aside>
77
78                                         <!-- The following paragraph can maybe deleted because we don't need it anymore -->
79                                         <div id=\"NavAside\" class=\"navmenu navmenu-default navmenu-fixed-left offcanvas hidden-lg hidden-md\">
80                                                 <div class=\"nav-container\">
81                                                         <div class=\"list-group\">
82                                                                 "; if(x($page,'aside')) echo $page['aside']; echo"
83                                                                 "; if(x($page,'right_aside')) echo $page['right_aside']; echo"
84                                                         </div>
85                                                 </div>
86                                         </div><!--/.sidebar-offcanvas-->
87
88                                         <div class=\"col-lg-7 col-md-7 col-sm-12 col-xs-12\" id=\"content\">
89                                                 <section class=\"sectiontop "; echo $a->argv[0]; echo "-content-wrapper\">";
90                                                                 if(x($page,'content')) echo $page['content']; echo"
91                                                                 <div id=\"pause\"></div> <!-- The pause/resume Ajax indicator -->
92                                                 </section>
93                                         </div>
94                                                 ";
95                                 }
96                                 else
97                                 {
98                                         echo"
99                                         <div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\" id=\"content\" style=\"margin-top:50px;\" >
100                                                 "; if(x($page,'content')) echo $page['content']; echo"
101                                         </div>
102                                         ";
103                                 }
104 ?>
105                 
106                         </div><!--row-->
107                 </div><!-- container -->
108
109                 <div id="back-to-top" title="back to top">&#8679;</div>
110         </main>
111
112 <footer>
113 <span id="notifsound"></span>
114 <script>
115         $("#menu-toggle").click(function(e) {
116                 e.preventDefault();
117                 $("#wrapper").toggleClass("toggled");
118         });
119 </script>
120 <script type="text/javascript">
121         $.fn.enterKey = function (fnc, mod) {
122                 return this.each(function () {
123                         $(this).keypress(function (ev) {
124                                 var keycode = (ev.keyCode ? ev.keyCode : ev.which);
125                                 if ((keycode == '13' || keycode == '10') && (!mod || ev[mod + 'Key'])) {
126                                         fnc.call(this, ev);
127                                 }
128                         })
129                 })
130         }
131         
132         $('textarea').enterKey(function() {$(this).closest('form').submit(); }, 'ctrl')
133         $('input').enterKey(function() {$(this).closest('form').submit(); }, 'ctrl')
134 </script>
135
136 <script>
137 var pagetitle = null;
138 $("nav").bind('nav-update', function(e,data)
139 {
140         if (pagetitle==null) pagetitle = document.title;
141         var count = $(data).find('notif').attr('count');
142         if (count>0)
143         {
144                 document.title = "("+count+") "+pagetitle;
145                 /* document.getElementById('notifsound').innerHTML='<object type="audio/mpeg" width="0" height="0" data="<?=$frio?>/audios/901.mp3"><param name="notif" value="<?=$frio?>/audios/901.mp3" /><param name="autostart" value="true" /><param name="loop" value="false" /></object>'; */
146         }
147         else
148         {
149                 document.title = pagetitle;
150         }
151 });
152 </script>
153
154 <script src="<?=$frio?>/frameworks/bootstrap/js/bootstrap.min.js"></script>
155 <script src="<?=$frio?>/frameworks/jasny/js/jasny-bootstrap.custom.js"></script>
156 <script src="<?=$frio?>/frameworks/bootstrap-select/js/bootstrap-select.min.js"></script>
157 <script src="<?=$frio?>/frameworks/ekko-lightbox/ekko-lightbox.min.js"></script>
158 <script src="<?=$frio?>/frameworks/justifiedGallery/jquery.justifiedGallery.min.js"></script>
159 <script src="<?=$frio?>/frameworks/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
160 <script src="<?=$frio?>/frameworks/flexMenu/flexmenu.custom.js"></script>
161 <script src="<?=$frio?>/frameworks/jsmart/jsmart.custom.js"></script>
162 <script src="<?=$frio?>/js/theme.js"></script>
163 <script src="<?=$frio?>/js/modal.js"></script>
164 <script src="<?=$frio?>/js/hovercard.js"></script>
165
166
167 <!-- Modal  -->
168 <div id="modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="plan-info" aria-hidden="true">
169         <div class="modal-dialog modal-full-screen">
170                 <div class="modal-content">
171                         <div id="modal-header" class="modal-header">
172                                 <button id="modal-cloase" type="button" class="close" data-dismiss="modal" aria-hidden="true">
173                                         &times;
174                                 </button>
175                                 <h4 id="modal-title" class="modal-title"></h4>
176                         </div>
177                         <div id="modal-body" class="modal-body">
178                                 <!-- /# content goes here -->
179                         </div>
180                 </div>
181         </div>
182 </div>
183
184 <!-- Dummy div to append other div's when needed (e.g. used for js function editpost() -->
185 <div id="cache-container"></div>
186
187 </footer>
188 <?php } ?> <!-- End of condition if $minal else the rest -->
189 </body>