3 * @file view/theme/frio/php/modes/default.php
4 * @brief The default site template
11 require_once('view/theme/frio/php/frio_boot.php');
13 // $minimal = is_modal();
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"; ?>
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)
30 /// @todo Think about to move js stuff in the footer
32 if(x($page,'htmlhead')) echo $page['htmlhead'];
39 if(($_SERVER['REQUEST_URI'] != "/register") && ($_SERVER['REQUEST_URI'] != "/lostpass") && ($_SERVER['REQUEST_URI'] != "/login"))
41 echo"<body id=\"top\">";
45 echo"<body id=\"top\">";
48 <?php if($_SERVER['REQUEST_URI'] == "/"){header('Location: /login');} ?>
49 <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
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'),
57 // special minimal style for modal dialogs
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>
64 // the style for all other pages
67 <div class="container">
70 if(($_REQUEST['pagename'] != "register") && ($_REQUEST['pagename'] != "lostpass") && ($_REQUEST['pagename'] != "login") && ($_SERVER['REQUEST_URI'] != "/"))
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"
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"
86 </div><!--/.sidebar-offcanvas-->
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 -->
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"
107 </div><!-- container -->
109 <div id="back-to-top" title="back to top">⇧</div>
113 <span id="notifsound"></span>
115 $("#menu-toggle").click(function(e) {
117 $("#wrapper").toggleClass("toggled");
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'])) {
132 $('textarea').enterKey(function() {$(this).closest('form').submit(); }, 'ctrl')
133 $('input').enterKey(function() {$(this).closest('form').submit(); }, 'ctrl')
137 var pagetitle = null;
138 $("nav").bind('nav-update', function(e,data)
140 if (pagetitle==null) pagetitle = document.title;
141 var count = $(data).find('notif').attr('count');
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>'; */
149 document.title = pagetitle;
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/hovercard.js"></script>
167 <div id="modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="plan-info" aria-hidden="true">
168 <div class="modal-dialog modal-full-screen">
169 <div class="modal-content">
170 <div id="modal-header" class="modal-header">
171 <button id="modal-cloase" type="button" class="close" data-dismiss="modal" aria-hidden="true">
174 <h4 id="modal-title" class="modal-title"></h4>
176 <div id="modal-body" class="modal-body">
177 <!-- /# content goes here -->
183 <!-- Dummy div to append other div's when needed (e.g. used for js function editpost() -->
184 <div id="cache-container"></div>
187 <?php } ?> <!-- End of condition if $minal else the rest -->