1<?php
2/**
3 * DokuWiki Monochrome Template based on Starter
4 *
5 * @link     tbd
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @author   klaus Vormweg <klaus.vormweg@gmx.de>
8 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
9 *
10 * @var string $ID
11 * @var string $ACT
12 * @var array  $conf
13 * @var array  $lang
14 */
15
16if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
17@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
18header('X-UA-Compatible: IE=edge');
19
20$versionarr = getVersionData();
21$version = substr($versionarr['date'], 0, 10);
22
23$showSidebar = FALSE;
24if ($ID != $conf['sidebar']):
25  $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
26endif;
27echo '<!DOCTYPE html>
28<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="', $conf['lang'],
29'" lang="', $conf['lang'], '" dir="', $lang['direction'], '" class="no-js">
30<head>
31<meta charset="UTF-8" />
32<title>';
33tpl_pagetitle();
34echo ' [', strip_tags($conf['title']), ']</title>
35    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,\'js\')})(document.documentElement)</script>',"\n";
36tpl_metaheaders();
37echo '    <meta name="viewport" content="width=device-width,initial-scale=1" />',"\n",
38     _tpl_favicon();
39tpl_includeFile('meta.html');
40echo '</head>
41<body>',"\n";
42/* with these Conditional Comments you can better address IE issues in CSS files,
43   precede CSS rules by #IE8 for IE8 (div closes at the bottom) */
44echo '    <!--[if lte IE 8 ]><div id="IE8"><![endif]-->',"\n";
45
46/* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */
47/* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
48   should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */
49echo '    <div id="dokuwiki__site">
50      <div id="dokuwiki__top" class="site ', tpl_classes();
51if($showSidebar):
52  echo ' hasSidebar';
53endif;
54echo '">';
55html_msgarea(); /* occasional error and info messages on top of the page */
56tpl_includeFile('header.html');
57echo "\n",'        <!-- ********** HEADER ********** -->
58        <div id="dokuwiki__header">
59          <div class="pad">
60            <div class="headings">',"\n";
61/* how to insert logo: upload your logo into the data/media folder (root of the media manager) as 'logo.png' */
62if(file_exists(DOKU_INC.'data/media/logo.png') and _tpl_media_isreadable('logo.png')):
63  tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />',' accesskey="h" title="[H]"');
64else:
65  tpl_link(wl(),'<img src="'.tpl_basedir().'images/dokuwiki.svg" alt="'.$conf['title'].'" style="width: 5em;" />',' accesskey="h" title="[H]"');
66endif;
67echo '                <h1>';
68tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"');
69echo '</h1>',"\n";
70if($conf['tagline']):
71  echo '                    <p class="claim">', $conf['tagline'], '</p>',"\n";
72endif;
73echo '                <ul class="a11y skip">
74                    <li><a href="#dokuwiki__content">', $lang['skip_to_content'], '</a></li>
75                </ul>
76                <div class="clearer"></div>
77            </div>
78
79            <div class="tools">',"\n";
80if($ACT != 'denied'):
81  echo '                <!-- ********** SITE TOOLS ********** -->
82                <div id="dokuwiki__sitetools">
83                    <h3 class="a11y">', $lang['site_tools'], '</h3>',"\n";
84  tpl_searchform();
85  echo '                </div> <!-- #dokuwiki__sitetools -->',"\n";
86endif;
87echo '            </div> <!-- .tools -->
88            <div class="clearer"></div>',"\n";
89
90echo '            <!-- ********** BREADCRUMBS ********** -->
91          <div class="breadcrumbs">',"\n";
92if($ACT != 'denied'):
93  echo '            <!-- ********** MENU ********** -->
94              <nav class="mainmenu">
95              <input type="checkbox" id="hamburger" class="hamburger" />
96              <label for="hamburger" class="hamburger" title="Menu">',
97        '<img src="',tpl_basedir(),'images/icon-menu.png"  alt="Menu"> ',
98        '<span class="vishelp">Menu</span></label>',"\n";
99  _tpl_mainmenu();
100  echo '            </nav>',"\n";
101  if ($conf['breadcrumbs']):
102    tpl_breadcrumbs();
103  elseif ($conf['youarehere']):
104    tpl_youarehere();
105  endif;
106endif;
107echo '</div>',"\n";
108echo '            <div class="clearer"></div>
109            <hr class="a11y" />
110        </div></div><!-- /header -->
111
112        <div class="wrapper">',"\n";
113echo '            <!-- ********** CONTENT ********** -->
114            <div id="dokuwiki__content">
115              <div class="pad">',"\n";
116tpl_flush(); /* flush the output buffer */
117tpl_includeFile('pageheader.html');
118echo '                <div class="page">
119                    <!-- wikipage start -->',"\n";
120tpl_content(); /* the main content */
121echo '                    <!-- wikipage stop -->
122                    <div class="clearer"></div>
123                </div>',"\n";
124tpl_flush();
125tpl_includeFile('pagefooter.html');
126echo '            </div></div><!-- /content -->',"\n";
127if ($showSidebar):
128  echo '              <!-- ********** SIDEBAR ********** -->
129              <div id="dokuwiki__aside">
130                  <div class="pad aside include group">';
131  tpl_includeFile('sidebarheader.html');
132  tpl_include_page($conf['sidebar'], 1, 1); /* includes the nearest sidebar page */
133  tpl_includeFile('sidebarfooter.html');
134  echo '                    <div class="clearer"></div>
135                </div>
136              </div><!-- /aside -->',"\n";
137endif;
138echo '            <div class="clearer"></div>
139            <hr class="a11y" />
140
141            <!-- *** USER TOOLS and PAGE ACTIONS *** -->',"\n";
142if ($ACT != 'denied'):
143  echo '                <div id="dokuwiki__pagetools">',"\n";
144  if (isset($conf['useacl']) and $conf['useacl']):
145    echo '                        <h3 class="a11y">', $lang['user_tools'], '</h3>
146                      <ul>',"\n";
147    echo (new \dokuwiki\Menu\UserMenu())->getListItems();
148    echo '                        </ul>',"\n";
149  endif;
150  if (auth_quickaclcheck($ID) > AUTH_READ):
151    echo '                      <h3 class="a11y">', $lang['page_tools'], '</h3>
152                    <ul class="pagetools">',"\n";
153    echo (new \dokuwiki\Menu\PageMenu())->getListItems();
154    echo '                    </ul>
155                    <h3 class="a11y">', $lang['site_tools'], '</h3>',"\n";
156    echo '                    <ul class="sitetools">';
157    echo (new \dokuwiki\Menu\SiteMenu())->getListItems();
158    echo '                      </ul>',"\n";
159  endif;
160  echo '                </div><!-- /dokuwiki__pagetools -->',"\n";
161endif;
162echo '        </div><!-- /wrapper -->
163
164        <!-- ********** FOOTER ********** -->
165        <div id="dokuwiki__footer">
166          <div class="pad">
167            <div class="doc">';
168tpl_pageinfo(); /* 'Last modified' etc */
169if (!empty($_SERVER['REMOTE_USER'])):
170  echo '</div><div class="user">';
171  tpl_userinfo();
172endif;
173echo "</div>","\n";
174tpl_license('button'); /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */
175echo '        </div>
176      </div><!-- /footer -->',"\n";
177tpl_includeFile('footer.html');
178echo '    </div>
179    </div><!-- /site -->
180
181    <div class="no">';
182tpl_indexerWebBug(); /* provide DokuWiki housekeeping, required in all templates */
183echo '</div>
184    <!--[if lte IE 8 ]></div><![endif]-->
185</body>
186</html>';
187