1<?php
2/**
3 * DokuWiki Default Template 2012
4 *
5 * @link     http://dokuwiki.org/template
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @author   Clarence Lee <clarencedglee@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 */
12header('X-UA-Compatible: IE=edge,chrome=1');
13
14$hasSidebar = page_findnearest($conf['sidebar']);
15$showSidebar = $hasSidebar && ($ACT=='show');
16
17/**
18 * MindTheDark theme settings ******************************************************
19 */
20$configUserChoice = tpl_getConf('userChoice');
21$configAutoDark = tpl_getConf('autoDark');
22$theme = tpl_getConf('theme');
23
24if ($configAutoDark) {
25    $theme = "auto";
26}
27
28if ($configUserChoice && isset($_COOKIE["theme"])) {
29    $theme = $_COOKIE["theme"];
30}
31
32// MindTheDark additional plugins
33$pluginNote = "0";
34if (tpl_getConf('pluginNote')) {
35    $pluginNote = "1";
36}
37$pluginWrap = "0";
38if (tpl_getConf('pluginWrap')) {
39    $pluginWrap = "1";
40}
41
42/**
43 * *********************************************************************************
44 */
45
46?><!DOCTYPE html>
47<html lang="<?php echo $conf['lang'] ?>"
48    dir="<?php echo $lang['direction'] ?>"
49    class="no-js"
50    theme="<?php echo $theme ?>"
51    pluginnote="<?php echo $pluginNote ?>"
52    pluginwrap="<?php echo $pluginWrap ?>"
53>
54
55<head>
56    <meta charset="utf-8" />
57    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
58    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
59    <?php tpl_metaheaders() ?>
60    <meta name="viewport" content="width=device-width,initial-scale=1" />
61    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
62    <?php tpl_includeFile('meta.html') ?>
63    <meta name="configUserChoice" id="configUserChoice" content="<?php echo $configUserChoice ?>" />
64</head>
65
66<body>
67    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
68        echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
69
70        <?php include('tpl_header.php') ?>
71
72        <div class="wrapper group">
73
74            <?php if($showSidebar): ?>
75                <!-- ********** ASIDE ********** -->
76                <div id="dokuwiki__aside"><div class="pad aside include group">
77                    <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
78                    <div class="content"><div class="group">
79                        <?php tpl_flush() ?>
80                        <?php tpl_includeFile('sidebarheader.html') ?>
81                        <?php tpl_include_page($conf['sidebar'], true, true) ?>
82                        <?php tpl_includeFile('sidebarfooter.html') ?>
83                    </div></div>
84                </div></div><!-- /aside -->
85            <?php endif; ?>
86
87            <!-- ********** CONTENT ********** -->
88            <div id="dokuwiki__content"><div class="pad group">
89                <?php html_msgarea() ?>
90
91                <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
92
93                <div class="page group">
94                    <?php tpl_flush() ?>
95                    <?php tpl_includeFile('pageheader.html') ?>
96                    <!-- wikipage start -->
97                    <?php tpl_content() ?>
98                    <!-- wikipage stop -->
99                    <?php tpl_includeFile('pagefooter.html') ?>
100                </div>
101
102                <div class="docInfo"><?php tpl_pageinfo() ?></div>
103
104                <?php tpl_flush() ?>
105            </div></div><!-- /content -->
106
107            <hr class="a11y" />
108
109            <!-- PAGE ACTIONS -->
110            <div id="dokuwiki__pagetools">
111                <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
112                <div class="tools">
113                    <ul>
114                        <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
115                    </ul>
116                </div>
117            </div>
118        </div><!-- /wrapper -->
119
120        <?php include('tpl_footer.php') ?>
121
122    </div></div><!-- /site -->
123
124    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
125    <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
126</body>
127</html>
128