xref: /template/retro/main.php (revision c73a278835f15f52ac4c3cc79b57c5a3590a1c4b)
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') && $_SERVER['REMOTE_USER'] );
14?><!DOCTYPE html>
15<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
16  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
17<head>
18    <meta charset="UTF-8" />
19    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
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 /* with these Conditional Comments you can better address IE issues in CSS files,
30             precede CSS rules by #IE6 for IE6, #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?>
31    <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
32
33    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
34    <?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode,
35         see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
36    <?php /* .dokuwiki 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"
38        class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($conf['sidebar']) ? '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 /* the optional second parameter of tpl_action() switches between a link and a button,
67                                     e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
68                                if ($_SERVER['REMOTE_USER']) {
69                                    echo '<li class="user">';
70                                    tpl_userinfo(); /* 'Logged in as ...' */
71                                    echo '</li>';
72                                }
73                                tpl_action('admin', 1, 'li');
74                                _tpl_action('userpage', 1, 'li');
75                                tpl_action('profile', 1, 'li');
76                                tpl_action('register', 1, 'li'); /* DW versions < 2011-02-20 need to use _tpl_action('register', 1, 'li') */
77                                tpl_action('login', 1, 'li');
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
89                            tpl_action('recent', 1, 'li');
90                            tpl_action('media', 1, 'li');
91                            tpl_action('index', 1, 'li');
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 ($conf['sidebar']): ?>
116                <div id="dokuwiki__aside"><div class="pad include">
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
149                            tpl_action('edit', 1, 'li');
150                            _tpl_action('discussion', 1, 'li');
151                            tpl_action('revisions', 1, 'li');
152                            tpl_action('backlink', 1, 'li');
153                            tpl_action('subscribe', 1, 'li');
154                            tpl_action('revert', 1, 'li');
155                            tpl_action('top', 1, 'li');
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    <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
173</body>
174</html>
175