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