xref: /template/retro/main.php (revision 70a5ab9f6137add2f24e1262d053f40278290b8d)
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                                'userpage'  => _tpl_action('userpage', 1, 'li', 1),
74                                'profile'   => tpl_action('profile', 1, 'li', 1),
75                                'register'  => tpl_action('register', 1, 'li', 1),
76                                'login'     => tpl_action('login', 1, 'li', 1),
77                            )); ?>
78                        </ul>
79                    </div>
80                <?php endif ?>
81
82                <!-- SITE TOOLS -->
83                <div id="dokuwiki__sitetools">
84                    <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
85                    <?php tpl_searchform() ?>
86                    <ul>
87                        <?php tpl_toolsevent('sitetools', array(
88                            'recent'    => tpl_action('recent', 1, 'li', 1),
89                            'media'     => tpl_action('media', 1, 'li', 1),
90                            'index'     => tpl_action('index', 1, 'li', 1),
91                        )); ?>
92                    </ul>
93                </div>
94
95            </div>
96            <div class="clearer"></div>
97
98            <!-- BREADCRUMBS -->
99            <?php if($conf['breadcrumbs']){ ?>
100                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
101            <?php } ?>
102            <?php if($conf['youarehere']){ ?>
103                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
104            <?php } ?>
105
106            <div class="clearer"></div>
107            <hr class="a11y" />
108        </div></div><!-- /header -->
109
110
111        <div class="wrapper">
112
113            <!-- ********** ASIDE ********** -->
114            <?php if ($showSidebar): ?>
115                <div id="dokuwiki__aside"><div class="pad aside include group">
116                    <?php tpl_includeFile('sidebarheader.html') ?>
117                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
118                    <?php tpl_includeFile('sidebarfooter.html') ?>
119                    <div class="clearer"></div>
120                </div></div><!-- /aside -->
121            <?php endif; ?>
122
123            <!-- ********** CONTENT ********** -->
124            <div id="dokuwiki__content"><div class="pad">
125                <?php tpl_flush() /* flush the output buffer */ ?>
126                <?php tpl_includeFile('pageheader.html') ?>
127
128                <div class="page">
129                    <!-- wikipage start -->
130                    <?php tpl_content() /* the main content */ ?>
131                    <!-- wikipage stop -->
132                    <div class="clearer"></div>
133                </div>
134
135                <?php tpl_flush() ?>
136                <?php tpl_includeFile('pagefooter.html') ?>
137            </div></div><!-- /content -->
138
139            <div class="clearer"></div>
140            <hr class="a11y" />
141
142            <!-- PAGE ACTIONS -->
143            <?php if ($showTools): ?>
144                <div id="dokuwiki__pagetools">
145                    <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
146                    <ul>
147                        <?php tpl_toolsevent('pagetools', array(
148                            'edit'      => tpl_action('edit', 1, 'li', 1),
149                            'discussion'=> _tpl_action('discussion', 1, 'li', 1),
150                            'revisions' => tpl_action('revisions', 1, 'li', 1),
151                            'backlink'  => tpl_action('backlink', 1, 'li', 1),
152                            'subscribe' => tpl_action('subscribe', 1, 'li', 1),
153                            'revert'    => tpl_action('revert', 1, 'li', 1),
154                            'top'       => tpl_action('top', 1, 'li', 1),
155                        )); ?>
156                    </ul>
157                </div>
158            <?php endif; ?>
159        </div><!-- /wrapper -->
160
161        <!-- ********** FOOTER ********** -->
162        <div id="dokuwiki__footer"><div class="pad">
163            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
164            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
165        </div></div><!-- /footer -->
166
167        <?php tpl_includeFile('footer.html') ?>
168    </div></div><!-- /site -->
169
170    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
171</body>
172</html>
173