1<?php
2/**
3 * DokuWiki Grass Stains template
4 *
5 * @link     http://dokuwiki.org/template:grassstaings
6 * @author   Dennis Plöger <develop@dieploegers.de>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 * @see      Dokuwiki Starter Template at http://dokuwiki.org/template:starter *
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') && $_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    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
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</head>
29
30<body>
31    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
32             precede CSS rules by #IE6 for IE6, #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?>
33    <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
34
35    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
36    <?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode,
37         see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
38    <?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
39    <div id="dokuwiki__site"><div id="dokuwiki__top"
40        class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : '' ?>">
41        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
42        <?php tpl_includeFile('header.html') ?>
43
44        <?php if ($conf['useacl'] && $showTools): ?>
45
46        <!-- ********** HEADER ********** -->
47        <div id="dokuwiki__header"><div class="pad">
48
49            <div class="headings">
50                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
51                <?php /* how to insert logo instead (if no CSS image replacement technique is used):
52                        upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
53                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
54                <?php if ($conf['tagline']): ?>
55                    <p class="claim"><?php echo $conf['tagline'] ?></p>
56                <?php endif ?>
57
58                <ul class="a11y skip">
59                    <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
60                </ul>
61                <div class="clearer"></div>
62            </div>
63
64            <div class="tools">
65                <!-- USER TOOLS -->
66                    <div id="dokuwiki__usertools">
67                        <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
68                        <ul>
69                            <?php /* the optional second parameter of tpl_action() switches between a link and a button,
70                                     e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
71                                if ($_SERVER['REMOTE_USER']) {
72                                    echo '<li class="user">';
73                                    tpl_userinfo(); /* 'Logged in as ...' */
74                                    echo '</li>';
75                                }
76                                tpl_action('admin', 1, 'li');
77                                _tpl_action('userpage', 1, 'li');
78                                tpl_action('profile', 1, 'li');
79                                tpl_action('register', 1, 'li'); /* DW versions < 2011-02-20 need to use _tpl_action('register', 1, 'li') */
80                                tpl_action('login', 1, 'li');
81                            ?>
82                        </ul>
83                    </div>
84
85                <!-- SITE TOOLS -->
86                <div id="dokuwiki__sitetools">
87                    <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
88                    <?php tpl_searchform() ?>
89                    <ul>
90                        <?php
91                            tpl_action('recent', 1, 'li');
92                            tpl_action('media', 1, 'li');
93                            tpl_action('index', 1, 'li');
94                        ?>
95                    </ul>
96                </div>
97
98            </div>
99            <div class="clearer"></div>
100
101            <!-- BREADCRUMBS -->
102            <?php if($conf['breadcrumbs']){ ?>
103                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
104            <?php } ?>
105            <?php if($conf['youarehere']){ ?>
106                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
107            <?php } ?>
108
109            <div class="clearer"></div>
110            <hr class="a11y" />
111        </div></div><!-- /header -->
112
113        <?php endif ?>
114
115        <div class="wrapper">
116
117            <!-- ********** ASIDE ********** -->
118            <?php if ($showSidebar): ?>
119                <div id="dokuwiki__aside"><div class="pad include">
120                    <?php tpl_includeFile('sidebarheader.html') ?>
121                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
122                    <?php tpl_includeFile('sidebarfooter.html') ?>
123                    <div class="clearer"></div>
124                </div></div><!-- /aside -->
125            <?php endif; ?>
126
127            <!-- ********** CONTENT ********** -->
128            <div id="dokuwiki__content"><div class="pad">
129                <?php tpl_flush() /* flush the output buffer */ ?>
130                <?php tpl_includeFile('pageheader.html') ?>
131
132                <div class="page">
133                    <!-- wikipage start -->
134                    <?php tpl_content() /* the main content */ ?>
135                    <!-- wikipage stop -->
136                    <div class="clearer"></div>
137                </div>
138
139                <?php tpl_flush() ?>
140                <?php tpl_includeFile('pagefooter.html') ?>
141            </div></div><!-- /content -->
142
143            <div class="clearer"></div>
144            <hr class="a11y" />
145
146            <!-- PAGE ACTIONS -->
147            <?php if ($showTools): ?>
148                <div id="dokuwiki__pagetools">
149                    <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
150                    <ul>
151                        <?php
152                            tpl_action('edit', 1, 'li');
153                            _tpl_action('discussion', 1, 'li');
154                            tpl_action('revisions', 1, 'li');
155                            tpl_action('backlink', 1, 'li');
156                            tpl_action('subscribe', 1, 'li');
157                            tpl_action('revert', 1, 'li');
158                            tpl_action('top', 1, 'li');
159                        ?>
160                    </ul>
161                </div>
162            <?php endif; ?>
163        </div><!-- /wrapper -->
164
165        <!-- ********** FOOTER ********** -->
166        <div id="dokuwiki__footer"><div class="pad">
167            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
168            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
169        </div></div><!-- /footer -->
170
171        <?php tpl_includeFile('footer.html') ?>
172    </div></div><!-- /site -->
173
174    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
175    <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
176</body>
177</html>
178