1<?php
2/**
3 * DokuWiki Starter Template
4 *
5 * @link     http://dokuwiki.org/template:starter
6 * @author   Anika Henke <anika@selfthinker.org>
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 */
12header('X-UA-Compatible: IE=edge,chrome=1');
13
14$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
15$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
16?><!DOCTYPE html>
17<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
18  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
19<head>
20    <meta charset="UTF-8" />
21    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
22    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
23    <?php tpl_metaheaders() ?>
24    <meta name="viewport" content="width=device-width,initial-scale=1" />
25    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
26    <?php tpl_includeFile('meta.html') ?>
27</head>
28
29<body>
30    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
31             precede CSS rules by #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?>
32    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
33
34    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
35    <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
36             should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
37    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
38        echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
39        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
40        <?php tpl_includeFile('header.html') ?>
41
42        <!-- ********** HEADER ********** -->
43        <div id="dokuwiki__header"><div class="pad">
44
45            <div class="headings">
46                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
47                <?php /* how to insert logo instead (if no CSS image replacement technique is used):
48                        upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
49                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
50                <?php if ($conf['tagline']): ?>
51                    <p class="claim"><?php echo $conf['tagline'] ?></p>
52                <?php endif ?>
53
54                <ul class="a11y skip">
55                    <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
56                </ul>
57                <div class="clearer"></div>
58            </div>
59
60            <div class="tools">
61                <!-- USER TOOLS -->
62                <?php if ($conf['useacl'] && $showTools): ?>
63                    <div id="dokuwiki__usertools">
64                        <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
65                        <ul>
66                            <?php
67                                if (!empty($_SERVER['REMOTE_USER'])) {
68                                    echo '<li class="user">';
69                                    tpl_userinfo(); /* 'Logged in as ...' */
70                                    echo '</li>';
71                                }
72                            ?>
73                            <?php /* the optional second parameter of tpl_action() switches between a link and a button,
74                                     e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
75                            ?>
76                            <?php _tpl_toolsevent('usertools', array(
77                                'admin'     => tpl_action('admin', 1, 'li', 1),
78                                'userpage'  => _tpl_action('userpage', 1, 'li', 1),
79                                'profile'   => tpl_action('profile', 1, 'li', 1),
80                                'register'  => tpl_action('register', 1, 'li', 1),
81                                'login'     => tpl_action('login', 1, 'li', 1),
82                            )); ?>
83                        </ul>
84                    </div>
85                <?php endif ?>
86
87                <!-- SITE TOOLS -->
88                <div id="dokuwiki__sitetools">
89                    <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
90                    <?php tpl_searchform() ?>
91                    <ul>
92                        <?php _tpl_toolsevent('sitetools', array(
93                            'recent'    => tpl_action('recent', 1, 'li', 1),
94                            'media'     => tpl_action('media', 1, 'li', 1),
95                            'index'     => tpl_action('index', 1, 'li', 1),
96                        )); ?>
97                    </ul>
98                </div>
99
100            </div>
101            <div class="clearer"></div>
102
103            <!-- BREADCRUMBS -->
104            <?php if($conf['breadcrumbs']){ ?>
105                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
106            <?php } ?>
107            <?php if($conf['youarehere']){ ?>
108                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
109            <?php } ?>
110
111            <div class="clearer"></div>
112            <hr class="a11y" />
113        </div></div><!-- /header -->
114
115
116        <div class="wrapper">
117
118            <!-- ********** ASIDE ********** -->
119            <?php if ($showSidebar): ?>
120                <div id="dokuwiki__aside"><div class="pad include">
121                    <?php tpl_includeFile('sidebarheader.html') ?>
122                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
123                    <?php tpl_includeFile('sidebarfooter.html') ?>
124                    <div class="clearer"></div>
125                </div></div><!-- /aside -->
126            <?php endif; ?>
127
128            <!-- ********** CONTENT ********** -->
129            <div id="dokuwiki__content"><div class="pad">
130                <?php tpl_flush() /* flush the output buffer */ ?>
131                <?php tpl_includeFile('pageheader.html') ?>
132
133                <div class="page">
134                    <!-- wikipage start -->
135                    <?php tpl_content() /* the main content */ ?>
136                    <!-- wikipage stop -->
137                    <div class="clearer"></div>
138                </div>
139
140                <?php tpl_flush() ?>
141                <?php tpl_includeFile('pagefooter.html') ?>
142            </div></div><!-- /content -->
143
144            <div class="clearer"></div>
145            <hr class="a11y" />
146
147            <!-- PAGE ACTIONS -->
148            <?php if ($showTools): ?>
149                <div id="dokuwiki__pagetools">
150                    <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
151                    <ul>
152                        <?php _tpl_toolsevent('pagetools', array(
153                            'edit'      => tpl_action('edit', 1, 'li', 1),
154                            'discussion'=> _tpl_action('discussion', 1, 'li', 1),
155                            'revisions' => tpl_action('revisions', 1, 'li', 1),
156                            'backlink'  => tpl_action('backlink', 1, 'li', 1),
157                            'subscribe' => tpl_action('subscribe', 1, 'li', 1),
158                            'revert'    => tpl_action('revert', 1, 'li', 1),
159                            'top'       => tpl_action('top', 1, 'li', 1),
160                        )); ?>
161                    </ul>
162                </div>
163            <?php endif; ?>
164        </div><!-- /wrapper -->
165
166        <!-- ********** FOOTER ********** -->
167        <div id="dokuwiki__footer"><div class="pad">
168            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
169            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
170        </div></div><!-- /footer -->
171
172        <?php tpl_includeFile('footer.html') ?>
173    </div></div><!-- /site -->
174
175    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
176    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
177</body>
178</html>
179