1<?php
2/**
3 * DokuWiki Twitter Boostrap 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
10if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
11@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
12
13$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] );
14
15?><!DOCTYPE html>
16<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
17<head>
18    <meta charset="UTF-8" />
19    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
20    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
21    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
22    <?php tpl_metaheaders() ?>
23    <meta name="viewport" content="width=device-width,initial-scale=1" />
24    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
25    <?php tpl_includeFile('meta.html') ?>
26    <link href="<?php echo tpl_getMediaFile(array("css/modifications.css")); ?>" rel="stylesheet">
27    <link href="<?php echo tpl_getMediaFile(array("css/dokuwikicompatibility.css")); ?>" rel="stylesheet">
28    <link href="<?php echo tpl_getMediaFile(array("css/bootstrap.min.css")); ?>" rel="stylesheet">
29    <link href="<?php echo tpl_getMediaFile(array("css/bootstrap-theme.min.css")); ?>" rel="stylesheet">
30
31</head>
32
33<body data-spy="scroll" data-target="#sidetoc">
34    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
35             precede CSS rules by #IE6 for IE6, #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?>
36    <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
37
38    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
39    <?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode,
40         see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
41    <?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
42    <div id="dokuwiki__site"><div id="dokuwiki__top"
43        class="dokuwiki site mode_<?php echo $ACT ?>">
44
45    <div class="navbar navbar-default navbar-fixed-top">
46        <div class="container">
47            <div class="navbar-header">
48              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
49                <span class="sr-only">Toggle navigation</span>
50                <span class="icon-bar"></span>
51                <span class="icon-bar"></span>
52                <span class="icon-bar"></span>
53              </button>
54              <a class="navbar-brand" href="./"><?php echo $conf['title']; ?></a>
55            </div>
56          <div class="navbar-collapse collapse">
57            <div class="navbar-form pull-right">
58                <?php _tpl_output_search_bar(); ?>
59            </div>
60
61            <p class="navbar-text pull-right">
62                <?php
63                    if ($_SERVER['REMOTE_USER']) {
64                        echo '<span class="user">';
65                        tpl_userinfo();
66                        echo '</span>';
67                    }
68                    //TODO: If could link to user's profile? If so, wrap in:
69                    //echo 'Logged in as <a href="#" class="navbar-link">'.$username.'</a>';
70                ?>
71            </p>
72            <ul class="nav navbar-nav">
73              <?php
74                tpl_includeFile('nav.html');
75                _tpl_output_tools_twitter_bootstrap($conf['useacl'] && $showTools);
76              ?>
77            </ul>
78
79          </div><!--/.navbar-collapse -->
80        </div>
81    </div>
82
83
84    <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
85    <?php tpl_includeFile('header.html') ?>
86
87
88        <div class="container">
89        <!-- ********** ASIDE ********** -->
90          <div class="row">
91            <div class="col-md-3">
92              <?php if ($conf['sidebar']) { ?>
93
94                  <div class="sidebar" id="sidetoc" role="navigation">
95                    <div class="list-group">
96                        <?php _tpl_toc_to_twitter_bootstrap(); ?>
97                    </div>
98                  </div>
99
100              <?php } ?>
101            </div>
102            <div class="col-md-9">
103              <div class="row">
104
105                    <div class="col-md-9" id="dokuwiki__content">
106
107                        <div class="pad">
108
109                            <div class="page">
110
111                                <?php html_msgarea(); /* occasional error and info messages */ ?>
112                                <?php tpl_flush(); ?>
113                                <?php tpl_content(false); ?>
114                                <div class="clearer"></div>
115
116                            </div>
117
118                        </div>
119                    </div>
120              </div><!--/row-->
121            </div><!--/col-md-9-->
122          </div><!--/row-->
123        </div><!-- container -->
124
125        <div class="clearer"></div>
126        <hr class="a11y" />
127
128    <!-- ********** FOOTER ********** -->
129    <footer class="navbar navbar-static-bottom">
130      <div class="row">
131        <div class="col-md-12">
132              <?php _tpl_output_page_tools($showTools, 'li'); ?>
133              <br />
134              <div class="clearer"></div>
135              <div>
136              <?php tpl_pageinfo() /* 'Last modified' etc */ ?>
137
138              <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
139              <?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?>
140              <?php tpl_includeFile('footer.html') ?>
141              </div>
142              <div class="clearer"></div>
143              <div>
144                <p><a href="http://www.dokuwiki.org">DokuWiki</a>
145                    <a href="https://github.com/ryanwmoore/dokutwitterbootstrap">template</a>
146                    (released under <a href="http://www.gnu.org/licenses/gpl.html">GPLv2</a>)
147                    using <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>
148                    by <a href="http://rmoore.cs.pitt.edu/">Ryan W. Moore</a></p>
149              </div>
150        </div>
151      </div>
152    </footer>
153
154    </div></div><!-- /site -->
155
156    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
157    <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
158
159    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
160
161    <!-- load any scripts that may require a newer jQuery library than DokuWiki provides. -->
162    <script src="<?php echo tpl_getMediaFile(array("js/bootstrap.min.js")); ?>"></script>
163    <script src="<?php echo tpl_getMediaFile(array("js/change_dokuwiki_structure.js")); ?>"></script>
164
165    <!-- restore jQuery for DokuWiki -->
166    <script src="<?php echo tpl_getMediaFile(array("js/restore_dokuwikis_jquery.js")); ?>"></script>
167</body>
168</html>
169