xref: /template/retro/main.php (revision 413b1e27df10cde677df13cd05f97486bfa4854d)
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 /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
31    <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
32             should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
33    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
34        echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
35        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
36        <?php tpl_includeFile('header.html') ?>
37
38        <!-- ********** HEADER ********** -->
39        <div id="dokuwiki__header"><div class="pad">
40
41            <div class="headings">
42                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
43                <?php /* how to insert logo instead (if no CSS image replacement technique is used):
44                        upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
45                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
46                <?php if ($conf['tagline']): ?>
47                    <p class="claim"><?php echo $conf['tagline'] ?></p>
48                <?php endif ?>
49
50                <ul class="a11y skip">
51                    <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
52                </ul>
53                <div class="clearer"></div>
54            </div>
55
56            <div class="tools">
57                <!-- USER TOOLS -->
58                <?php if ($conf['useacl'] && $showTools): ?>
59                    <div id="dokuwiki__usertools">
60                        <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
61                        <ul>
62                            <?php
63                                if (!empty($_SERVER['REMOTE_USER'])) {
64                                    echo '<li class="user">';
65                                    tpl_userinfo(); /* 'Logged in as ...' */
66                                    echo '</li>';
67                                }
68                            ?>
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                            ?>
72                            <?php tpl_toolsevent('usertools', array(
73                                'admin'     => tpl_action('admin', 1, 'li', 1),
74                                'userpage'  => _tpl_action('userpage', 1, 'li', 1),
75                                'profile'   => tpl_action('profile', 1, 'li', 1),
76                                'register'  => tpl_action('register', 1, 'li', 1),
77                                'login'     => tpl_action('login', 1, 'li', 1),
78                            )); ?>
79                        </ul>
80                    </div>
81                <?php endif ?>
82
83                <!-- SITE TOOLS -->
84                <div id="dokuwiki__sitetools">
85                    <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
86                    <?php tpl_searchform() ?>
87                    <ul>
88                        <?php tpl_toolsevent('sitetools', array(
89                            'recent'    => tpl_action('recent', 1, 'li', 1),
90                            'media'     => tpl_action('media', 1, 'li', 1),
91                            'index'     => tpl_action('index', 1, 'li', 1),
92                        )); ?>
93                    </ul>
94                </div>
95
96            </div>
97            <div class="clearer"></div>
98
99            <!-- BREADCRUMBS -->
100            <?php if($conf['breadcrumbs']){ ?>
101                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
102            <?php } ?>
103            <?php if($conf['youarehere']){ ?>
104                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
105            <?php } ?>
106
107            <div class="clearer"></div>
108            <hr class="a11y" />
109        </div></div><!-- /header -->
110
111
112        <div class="wrapper">
113
114            <!-- ********** ASIDE ********** -->
115            <?php if ($showSidebar): ?>
116                <div id="dokuwiki__aside"><div class="pad aside include group">
117                    <?php tpl_includeFile('sidebarheader.html') ?>
118                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
119                    <?php tpl_includeFile('sidebarfooter.html') ?>
120                    <div class="clearer"></div>
121                </div></div><!-- /aside -->
122            <?php endif; ?>
123
124            <!-- ********** CONTENT ********** -->
125            <div id="dokuwiki__content"><div class="pad">
126                <?php tpl_flush() /* flush the output buffer */ ?>
127                <?php tpl_includeFile('pageheader.html') ?>
128
129                <div class="page">
130                    <!-- wikipage start -->
131                    <?php tpl_content() /* the main content */ ?>
132                    <!-- wikipage stop -->
133                    <div class="clearer"></div>
134                </div>
135
136                <?php tpl_flush() ?>
137                <?php tpl_includeFile('pagefooter.html') ?>
138            </div></div><!-- /content -->
139
140            <div class="clearer"></div>
141            <hr class="a11y" />
142
143            <!-- PAGE ACTIONS -->
144            <?php if ($showTools): ?>
145                <div id="dokuwiki__pagetools">
146                    <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
147                    <ul>
148                        <?php tpl_toolsevent('pagetools', array(
149                            'edit'      => tpl_action('edit', 1, 'li', 1),
150                            'discussion'=> _tpl_action('discussion', 1, 'li', 1),
151                            'revisions' => tpl_action('revisions', 1, 'li', 1),
152                            'backlink'  => tpl_action('backlink', 1, 'li', 1),
153                            'subscribe' => tpl_action('subscribe', 1, 'li', 1),
154                            'revert'    => tpl_action('revert', 1, 'li', 1),
155                            'top'       => tpl_action('top', 1, 'li', 1),
156                        )); ?>
157                    </ul>
158                </div>
159            <?php endif; ?>
160        </div><!-- /wrapper -->
161
162        <!-- ********** FOOTER ********** -->
163        <div id="dokuwiki__footer"><div class="pad">
164            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
165            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
166        </div></div><!-- /footer -->
167
168        <?php tpl_includeFile('footer.html') ?>
169    </div></div><!-- /site -->
170
171    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
172</body>
173</html>
174