1<?php
2/**
3 * DokuWiki Nostalgia Template
4 * Based on the starter template and the default and only theme for UseModWiki
5 *
6 * @link     http://dokuwiki.org/template:starter
7 * @author   Anika Henke <anika@selfthinker.org>
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 */
13
14$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
15$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
16$sidebarElement = tpl_getConf('sidebarIsNav') ? 'nav' : 'aside';
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    <script type="text/javascript">
29        jQuery(window).load(function() { // web page has finished
30
31    function isMobile() {
32    var index = navigator.appVersion.indexOf("Mobile"); // detect chrome for android and ios safari
33    var index2 = navigator.appVersion.indexOf("Android"); // detect firefox for android
34    if (index2) { return (index2 > -1); }
35    return (index > -1);
36    }
37
38    usingmobile = isMobile();
39    if (usingmobile){
40        jQuery('input').filter(function(){
41        return !jQuery(this).attr('size');
42        }).attr('size',''); // change to a number if desired
43        jQuery('textarea').filter(function(){
44        return !jQuery(this).attr('size');
45        }).attr('cols',''); // change to a number if desired
46
47        jQuery("#edit__summary").attr('size', '');
48    }
49
50});
51</script>
52</head>
53
54<body>
55    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
56    <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
57             should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
58    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
59        echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
60        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
61        <!-- ********** HEADER ********** -->
62        <header id="dokuwiki__header"><div class="pad">
63            <?php tpl_includeFile('header.html') ?>
64
65            <div class="headings">
66                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
67                <?php /* how to insert logo instead (if no CSS image replacement technique is used):
68                        upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
69                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
70                <?php if ($conf['tagline']): ?>
71                    <p class="claim"><?php echo $conf['tagline'] ?></p>
72                <?php endif ?>
73
74                <ul class="a11y skip">
75                    <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
76                </ul>
77                <div class="clearer"></div>
78            </div>
79
80            <div class="tools">
81                <!-- USER TOOLS -->
82                <?php if ($conf['useacl'] && $showTools): ?>
83                    <nav id="dokuwiki__usertools" aria-labelledby="dokuwiki__usertools_heading">
84                        <h3 class="a11y" id="dokuwiki__usertools_heading"><?php echo $lang['user_tools'] ?></h3>
85                        <ul>
86                            <?php if (!empty($_SERVER['REMOTE_USER'])) {
87                                echo '<li class="user">';
88                                tpl_userinfo(); /* 'Logged in as ...' */
89                                echo '</li>';
90                            } ?>
91                            <?php if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) {
92                                /* the first parameter is for an additional class, the second for if SVGs should be added */
93                                echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ', false);
94                            } else {
95                                /* tool menu before Greebo */
96                                _tpl_usertools();
97                            } ?>
98                        </ul>
99                    </nav>
100                <?php endif ?>
101
102                <!-- SITE TOOLS -->
103                <nav id="dokuwiki__sitetools" aria-labelledby="dokuwiki__sitetools_heading">
104                    <h3 class="a11y" id="dokuwiki__sitetools_heading"><?php echo $lang['site_tools'] ?></h3>
105                    <?php //tpl_searchform() ?>
106                    <?php
107                        // mobile menu (combines all menus in one dropdown)
108                        // if (file_exists(DOKU_INC . 'inc/Menu/MobileMenu.php')) {
109                        //     echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']);
110                        // } else {
111                        //   tpl_actiondropdown($lang['tools']);
112                        // }
113                    ?>
114                    <ul>
115                        <?php if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) {
116                            echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false);
117                        } else {
118                            _tpl_sitetools();
119                        } ?>
120                    </ul>
121                </nav>
122
123                <!-- PAGE ACTIONS -->
124            <?php if ($showTools): ?>
125                <nav id="" aria-labelledby="dokuwiki__pagetools_heading">
126                    <h3 class="a11y" id="dokuwiki__pagetools_heading"><?php echo $lang['page_tools'] ?></h3>
127                    <ul>
128                        <?php if (file_exists(DOKU_INC . 'inc/Menu/PageMenu.php')) {
129                            echo (new \dokuwiki\Menu\PageMenu())->getListItems('action ', false);
130                        } else {
131                            _tpl_pagetools();
132                        } ?>
133                    </ul>
134                </nav>
135            <?php endif; ?>
136
137            <?php tpl_searchform() ?>
138
139
140
141            </div>
142            <div class="clearer"></div>
143
144            <hr>
145            <!-- BREADCRUMBS -->
146            <?php if($conf['breadcrumbs']){ ?>
147                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
148            <?php } ?>
149            <?php if($conf['youarehere']){ ?>
150                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
151            <?php } ?>
152
153            <div class="clearer"></div>
154            <hr class="a11y" />
155        </div></header><!-- /header -->
156
157        <hr>
158
159
160        <div class="wrapper">
161
162
163
164            <!-- ********** CONTENT ********** -->
165            <main id="dokuwiki__content"><!-- <div class="pad"> -->
166                <?php tpl_flush() /* flush the output buffer */ ?>
167                <?php tpl_includeFile('pageheader.html') ?>
168
169                <div class="page">
170                    <!-- wikipage start -->
171                    <?php tpl_content() /* the main content */ ?>
172                    <!-- wikipage stop -->
173                    <div class="clearer"></div>
174                </div>
175
176                <?php tpl_flush() ?>
177                <?php tpl_includeFile('pagefooter.html') ?>
178            <!-- /div> --></main><!-- /content -->
179
180            <!-- ********** ASIDE ********** -->
181            <?php if ($showSidebar): ?>
182                <hr>
183                <<?php echo $sidebarElement ?> id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar'] ?>"><div class="pad aside include group">
184                    <?php tpl_includeFile('sidebarheader.html') ?>
185                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
186                    <?php tpl_includeFile('sidebarfooter.html') ?>
187                    <div class="clearer"></div>
188                </div></<?php echo $sidebarElement ?>><!-- /aside -->
189            <?php endif; ?>
190
191            <div class="clearer"></div>
192            <hr class="a11y" />
193        </div><!-- /wrapper -->
194
195
196        <hr>
197        <!-- ********** FOOTER ********** -->
198        <footer id="dokuwiki__footer"><div class="pad">
199            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
200            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
201
202            <?php tpl_includeFile('footer.html') ?>
203        </div></footer><!-- /footer -->
204    </div></div><!-- /site -->
205
206    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
207</body>
208</html>
209