1<?php
2/**
3 * DokuWiki Twitter Bootstrap Template
4 *
5 * @link     https://github.com/ryanwmoore/dokutwitterbootstrap
6 * @author   Ryan Moore <rwmoore07@gmail.com>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10// error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE); ini_set('display_errors', '1');  // Switch on for error reporting
11
12if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
13@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
14
15$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] );
16# calling tpl_toc() here returns null if the toc wouldn't normally be rendered
17# so $showTOC will be true if TOC would be rendered, false if not
18# this affects our grid layout later ( see 'if ($showTOC)' )
19$showTOC = ($ACT == "show") && tpl_toc(true);
20
21?><!DOCTYPE html>
22<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
23<head>
24    <meta charset="UTF-8" />
25    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
26    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
27    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
28    <?php tpl_metaheaders() ?>
29    <meta name="viewport" content="width=device-width,initial-scale=1" />
30    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
31    <?php tpl_includeFile('meta.html') ?>
32    <link href="<?php echo tpl_getMediaFile(array("css/bootstrap-".tpl_getConf('bootswatch').".min.css")); ?>" rel="stylesheet">
33    <link href="<?php echo tpl_getMediaFile(array("css/modifications.css")); ?>" rel="stylesheet">
34    <script src="<?php echo tpl_getMediaFile(array("js/bootstrap.min.js")); ?>"></script>
35	<script src="<?php echo tpl_getMediaFile(array("js/modifications.js")); ?>"></script>
36
37</head>
38
39<body>
40    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
41             precede CSS rules by #IE6 for IE6, #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?>
42    <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
43
44    <?php
45	/* 	The "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to
46    	classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode,
47        See http://www.dokuwiki.org/devel:action_modes for a list of action modes
48     	.dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
49	<div id="dokuwiki__site">
50		<div id="dokuwiki__top" class="dokuwiki site mode_<?php echo $ACT ?>"></div>
51    	<nav class="navbar navbar-inverse navbar-fixed-top">
52    		<div class="container">
53				<div class="navbar-header">
54          <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
55            <span class="icon-bar"></span>
56            <span class="icon-bar"></span>
57            <span class="icon-bar"></span>
58          </button>
59					<a class="navbar-brand" href="./"><?php echo $conf['title']; ?></a>
60 				</div>
61           		<div class="collapse navbar-collapse">
62           			<ul class="nav navbar-nav navbar-left">
63						<?php tpl_includeFile('nav.html');?>
64					</ul>
65					<ul class="nav navbar-nav navbar-right">
66						<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Options<b class="caret"></b></a>
67           					<?php _tpl_output_page_tools($showTools, 'li'); ?>
68						</li>
69						<?php _tpl_userinfo(); ?>
70						<li>
71							<div class="navbar-form form-group" role="search">
72								<?php _tpl_output_search_bar(); ?>
73							</div>
74						</li>
75					</ul>
76				</div>
77           	</div> <!-- container -->
78		</nav> <!-- navbar -->
79
80	    <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
81    	<?php tpl_includeFile('header.html') ?>
82
83	<!-- Breadcrumbs -->
84        <?php if( ($conf['breadcrumbs']) || ($conf['youarehere']) ) {?>
85        	<div class="container">
86        		<?php
87	       			if($conf['breadcrumbs']){
88	       				?><div class="breadcrumbs"><?php
89        				tpl_breadcrumbs();
90        				?></div><?php
91        			}
92        			if($conf['youarehere']){
93        				?><div class="breadcrumbs"><?php
94        				tpl_youarehere();
95        				?></div><?php
96        			}
97        		?>
98        	</div>
99        <?php }?>
100        <!-- End Breadcrumbs -->
101
102        <div class="container">
103        <!-- ********** SIDE BAR for TOCIFY ********** -->
104        	<div class="row">
105
106
107				<?php /* when in Show Mode we render the TOC, if not, use full width for content */
108				if ($showTOC) { ?>
109					<!-- Make side bar 3 "md's" wide -->
110            		<div class="col-md-3">
111             			<?php _tpl_toc_to_twitter_bootstrap(); ?>
112           			</div>
113           			<div class="col-md-8" id="dokuwiki__content">
114				<?php } else { ?>
115            		<div class="col-md-11" id="dokuwiki__content">
116				<?php } ?>
117                	<div class="page">
118						<?php tpl_flush(); ?>
119						<?php tpl_content(false); ?>
120						<div class="clearer"></div>
121                    </div>
122				</div>
123			</div><!-- row -->
124        </div><!-- container -->
125
126        <div class="clearer"></div>
127        <hr class="a11y" />
128
129		<!-- ********** FOOTER ********** -->
130		<footer>
131			<div class="clearer"></div>
132			<div class="container">
133				<div class="row">
134        			<div class="col-md-11 text-muted text-right">
135						<?php tpl_flush(); ?>
136            	  		<?php tpl_pageinfo() /* 'Last modified' etc */ ?>
137              			<?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
138	     	       	  	<?php tpl_includeFile('footer.html') ?>
139    	    		</div>
140				</div>
141			</div>
142		</footer>
143
144    </div><!-- dokuwiki__site -->
145
146    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
147    <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
148
149</body>
150</html>
151