1<?php
2/**
3 * DokuWiki Dark Wood Template
4 * Based on the starter template
5 *
6 * @link     http://dokuwiki.org/template:darkwood
7 * @author   desbest <afaninthehouse@gmail.com>
8 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
9 */
10
11if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
12@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
13header('X-UA-Compatible: IE=edge,chrome=1');
14
15$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
16$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
17?><!DOCTYPE html>
18<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
19  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
20<head>
21    <meta charset="UTF-8" />
22    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
23    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
24    <?php tpl_metaheaders() ?>
25    <meta name="viewport" content="width=device-width,initial-scale=1" />
26    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
27    <?php tpl_includeFile('meta.html') ?>
28
29    <script defer type="text/javascript">
30    jQuery(window).load(function() { // web page has finished
31
32        function isMobile() {
33        var index = navigator.appVersion.indexOf("Mobile"); // detect chrome for android and ios safari
34        var index2 = navigator.appVersion.indexOf("Android"); // detect firefox for android
35        if (index2) { return (index2 > -1); }
36        return (index > -1);
37        }
38
39        usingmobile = isMobile();
40        if (usingmobile){
41            jQuery('input').filter(function(){
42            return !jQuery(this).attr('size');
43            }).attr('size',''); // change to a number if desired
44            jQuery('textarea').filter(function(){
45            return !jQuery(this).attr('size');
46            }).attr('cols',''); // change to a number if desired
47
48            jQuery("#edit__summary").attr('size', '');
49        }
50
51    });
52</script>
53</head>
54
55<body class=" <?php echo tpl_classes(); ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
56
57
58<!--[if IE]>  <div id="IEroot">  <![endif]-->
59<div id="dokuwiki__top" class="headercontainer">
60<?php tpl_includeFile('header.html') ?>
61<div class="header">
62
63
64    <div class="headerpadding">
65
66    <img src="<?php echo tpl_basedir();?>/images/logo.png" width="40" height="40" align="left"  style="margin-right: 1em;"/>
67    <?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?>
68
69    <?php if ($conf['tagline']): ?>
70        <p class="claim"><?php echo $conf['tagline'] ?></p>
71    <?php endif ?>
72
73    <ul class="a11y skip">
74        <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
75    </ul>
76    <?php /* how to insert logo instead (if no CSS image replacement technique is used):
77    upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
78    tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
79    </div></div>
80    <div class="headerbridge"></div>
81</div>
82<!--[if IE]>  </div>  <![endif]-->
83
84<!--[if IE]>  <div id="IEroot">  <![endif]-->
85<div class="container"><div class="allboxessameheight">
86
87    <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
88
89    <!-- BREADCRUMBS -->
90    <?php if($conf['breadcrumbs']){ ?>
91        <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
92    <?php } ?>
93    <?php if($conf['youarehere']){ ?>
94        <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
95    <?php } ?>
96
97<div class="left">
98
99
100
101   <!-- ********** ASIDE ********** -->
102    <?php if ($showSidebar): ?>
103        <div id="writtensidebar"><!-- <div class="pad aside include group"> -->
104            <?php tpl_includeFile('sidebarheader.html') ?>
105            <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
106            <?php tpl_includeFile('sidebarfooter.html') ?>
107            <div class="clearer"></div>
108        <!-- </div> --></div><!-- /aside -->
109    <?php endif; ?>
110
111    <div class="sideheader">Site Tools</div>
112    <div class="sidebox">
113        <div id="navcontainer">
114            <ul id="navlist">
115             <!-- SITE TOOLS -->
116            <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
117            <?php tpl_searchform() ?>
118            <ul>
119                <?php tpl_toolsevent('sitetools', array(
120                    'recent'    => tpl_action('recent', 1, 'li', 1),
121                    'media'     => tpl_action('media', 1, 'li', 1),
122                    'index'     => tpl_action('index', 1, 'li', 1),
123                )); ?>
124            </ul>
125        </div>
126        <br/>
127    </div>
128
129
130
131
132    <?php if ($showTools): ?>
133    <div class="sideheader">Page Tools</div>
134    <div class="sidebox">
135        <div id="navcontainer">
136            <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
137            <ul id="navlist">
138             <!-- PAGE ACTIONS -->
139            <?php tpl_toolsevent('pagetools', array(
140                'edit'      => tpl_action('edit', 1, 'li', 1),
141                'discussion'=> _tpl_action('discussion', 1, 'li', 1),
142                'revisions' => tpl_action('revisions', 1, 'li', 1),
143                'backlink'  => tpl_action('backlink', 1, 'li', 1),
144                'subscribe' => tpl_action('subscribe', 1, 'li', 1),
145                'revert'    => tpl_action('revert', 1, 'li', 1),
146                'top'       => tpl_action('top', 1, 'li', 1),
147            )); ?>
148            </ul>
149        </div>
150        <br/>
151    </div>
152    <?php endif; ?>
153
154    <?php if ($conf['useacl'] && $showTools): ?>
155    <div class="sideheader">User Tools</div>
156    <div class="sidebox">
157        <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
158        <div id="navcontainer">
159            <?php
160                if (!empty($_SERVER['REMOTE_USER'])) {
161                    echo '<p class="user">';
162                    tpl_userinfo(); /* 'Logged in as ...' */
163                    echo '</p>';
164                }
165            ?>
166            <ul id="navlist">
167               <!-- USER TOOLS -->
168
169                <?php /* the optional second parameter of tpl_action() switches between a link and a button,
170                         e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
171                ?>
172                <?php tpl_toolsevent('usertools', array(
173                    'admin'     => tpl_action('admin', 1, 'li', 1),
174                    'userpage'  => _tpl_action('userpage', 1, 'li', 1),
175                    'profile'   => tpl_action('profile', 1, 'li', 1),
176                    'register'  => tpl_action('register', 1, 'li', 1),
177                    'login'     => tpl_action('login', 1, 'li', 1),
178                )); ?>
179            </ul>
180        </div>
181        <br/>
182    </div>
183    <?php endif ?>
184</div>
185
186<div class="middle">
187    <div class="middleheader"><div>Home Page</div></div>
188
189
190        <div class="middlebox">
191            <!-- ********** CONTENT ********** -->
192            <div id="dokuwiki__content"><div class="pad">
193                <?php tpl_flush() /* flush the output buffer */ ?>
194                <?php tpl_includeFile('pageheader.html') ?>
195
196                <div class="page">
197                    <!-- wikipage start -->
198                    <?php tpl_content() /* the main content */ ?>
199                    <!-- wikipage stop -->
200                    <div class="clearer"></div>
201                </div>
202
203                <?php tpl_flush() ?>
204                <?php tpl_includeFile('pagefooter.html') ?>
205            </div></div><!-- /content -->
206    </div>
207
208</div>
209
210     <!-- width is 250px -->
211    <!-- <div class="right">
212        <div class="sideheader"><div>Sidebar 2</div></div>
213        <div class="sidebox">
214        <p>Text here</p><br/>
215        </div>
216    </div> -->
217
218</div> <!-- close the allboxessameheight -->
219
220<div class="footer">
221    <a href="http://desbest.com" target="_blank">Dark Wood theme copyright desbest</a>
222    <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
223    <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
224</div>
225<?php tpl_includeFile('footer.html') ?>
226<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
227</div> <!-- close the container -->
228
229
230<!--[if IE]>  </div>  <![endif]-->
231
232    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
233             precede CSS rules by #IE8 for IE8 (div closes at the bottom) */ ?>
234    <!--[if lte IE 8 ]><div id="IE8"><![endif]-->
235
236    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
237    <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
238             should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
239    <!-- this has to be at the bottom of the
240        page due to the way dokuwiki renders javascript -->
241   <script defer type="text/javascript">
242
243
244
245
246    // make the size="" attribute empty when
247    // ---> editing pages
248    // jQuery(document).ready(function() { // <html> tag has loaded
249    jQuery(window).load(function() { // web page has finished
250
251        function isMobile() {
252        var index = navigator.appVersion.indexOf("Mobile"); // detect chrome for android and ios safari
253        var index2 = navigator.appVersion.indexOf("Android"); // detect firefox for android
254        if (index2) { return (index2 > -1); }
255        return (index > -1);
256        }
257
258        usingmobile = isMobile();
259        if (usingmobile){
260            jQuery('input').filter(function(){
261            return !jQuery(this).attr('size');
262            }).attr('size',''); // change to a number if desired
263            jQuery('textarea').filter(function(){
264            return !jQuery(this).attr('size');
265            }).attr('cols',''); // change to a number if desired
266
267
268            jQuery("#edit__summary").attr('size', '');
269        }
270
271    });
272    </script>
273</body>
274</html>
275