xref: /template/sprintdoc/main.php (revision ccbb71de8d94d2e14856de95581ce5822c3c46b8)
1<!DOCTYPE html>
2<?php
3
4/**
5 * DokuWiki sprintDoc Template
6 *
7 * @link     FIXME
8 * @author   Jana Deutschlaender <deutschlaender@cosmocode.de>
9 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
10 */
11
12if (!defined('DOKU_INC')) die();                        /* must be run from within DokuWiki */
13@require_once(dirname(__FILE__).'/tpl_functions.php');  /* include hook for template functions */
14header('X-UA-Compatible: IE=edge,chrome=1');
15
16$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
17$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
18
19?>
20<!--[if lt IE 9]> <html class="no-js lt-ie10 lt-ie9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
21<!--[if IE 9]> <html class="no-js lt-ie10 ie-9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
22<!--[if gt IE 9]><!--> <html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <!--<![endif]-->
23<head>
24
25<?php
26
27/* + + + + + + + + + + + + + +  meta and link relations  + + + + + + + + + + + + + + */
28?>
29<meta charset="utf-8" />
30<meta name="viewport" content="width=device-width, initial-scale=1.0" />
31<?php tpl_metaheaders() ?>
32<?php
33
34/* + + + + + + + + + + + + + +  IE8 support HTML5 / media queries  + + + + + + + + + */
35?>
36<!--[if lt IE 9]><script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script><script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]-->
37
38<?php
39
40/* + + + + + + + + + + + + + + page title  + + + + + + + + + + + + + + + + + + + + + */
41?>
42<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
43
44<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
45
46<?php
47
48/* + + + + + + + + + + + + + +  favicons   + + + + + + + + + + + + + + + + + + + + + */
49?>
50<?php echo tpl_favicon(array('favicon', 'mobile')) ?> <?php /* DokuWiki: favicon.ico, apple-touch-icon.png  */ ?>
51<?php /* FIXME: additional favicons */ ?>
52
53<?php
54
55/* + + + + + + + + + + + + + +  Include Hook: meta.html  + + + + + + + + + + + + + + */
56?>
57<?php tpl_includeFile('meta.html') ?>
58</head>
59<body>
60
61
62    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
63    <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
64             should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
65    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
66        echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
67        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
68        <?php tpl_includeFile('header.html') ?>
69
70        <!-- ********** HEADER ********** -->
71        <div id="dokuwiki__header"><div class="pad">
72
73            <div class="headings">
74                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
75                <?php /* how to insert logo instead (if no CSS image replacement technique is used):
76                        upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
77                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
78                <?php if ($conf['tagline']): ?>
79                    <p class="claim"><?php echo $conf['tagline'] ?></p>
80                <?php endif ?>
81
82                <ul class="a11y skip">
83                    <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
84                </ul>
85                <div class="clearer"></div>
86            </div>
87
88            <div class="tools">
89                <!-- USER TOOLS -->
90                <?php if ($conf['useacl'] && $showTools): ?>
91                    <div id="dokuwiki__usertools">
92                        <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
93                        <ul>
94                            <?php
95                                if (!empty($_SERVER['REMOTE_USER'])) {
96                                    echo '<li class="user">';
97                                    tpl_userinfo(); /* 'Logged in as ...' */
98                                    echo '</li>';
99                                }
100                            ?>
101                            <?php /* the optional second parameter of tpl_action() switches between a link and a button,
102                                     e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
103                            ?>
104                            <?php tpl_toolsevent('usertools', array(
105                                'admin'     => tpl_action('admin', 1, 'li', 1),
106                                'userpage'  => _tpl_action('userpage', 1, 'li', 1),
107                                'profile'   => tpl_action('profile', 1, 'li', 1),
108                                'register'  => tpl_action('register', 1, 'li', 1),
109                                'login'     => tpl_action('login', 1, 'li', 1),
110                            )); ?>
111                        </ul>
112                    </div>
113                <?php endif ?>
114
115                <!-- SITE TOOLS -->
116                <div id="dokuwiki__sitetools">
117                    <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
118                    <?php tpl_searchform() ?>
119                    <ul>
120                        <?php tpl_toolsevent('sitetools', array(
121                            'recent'    => tpl_action('recent', 1, 'li', 1),
122                            'media'     => tpl_action('media', 1, 'li', 1),
123                            'index'     => tpl_action('index', 1, 'li', 1),
124                        )); ?>
125                    </ul>
126                </div>
127
128            </div>
129            <div class="clearer"></div>
130
131            <!-- BREADCRUMBS -->
132            <?php if($conf['breadcrumbs']){ ?>
133                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
134            <?php } ?>
135            <?php if($conf['youarehere']){ ?>
136                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
137            <?php } ?>
138
139            <div class="clearer"></div>
140            <hr class="a11y" />
141        </div></div><!-- /header -->
142
143
144        <div class="wrapper">
145
146            <!-- ********** ASIDE ********** -->
147            <?php if ($showSidebar): ?>
148                <div id="dokuwiki__aside"><div class="pad aside include group">
149                    <?php tpl_includeFile('sidebarheader.html') ?>
150                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
151                    <?php tpl_includeFile('sidebarfooter.html') ?>
152                    <div class="clearer"></div>
153                </div></div><!-- /aside -->
154            <?php endif; ?>
155
156            <!-- ********** CONTENT ********** -->
157            <div id="dokuwiki__content"><div class="pad">
158                <?php tpl_flush() /* flush the output buffer */ ?>
159                <?php tpl_includeFile('pageheader.html') ?>
160
161                <div class="page">
162                    <!-- wikipage start -->
163                    <?php tpl_content() /* the main content */ ?>
164                    <!-- wikipage stop -->
165                    <div class="clearer"></div>
166                </div>
167
168                <?php tpl_flush() ?>
169                <?php tpl_includeFile('pagefooter.html') ?>
170            </div></div><!-- /content -->
171
172            <div class="clearer"></div>
173            <hr class="a11y" />
174
175            <!-- PAGE ACTIONS -->
176            <?php if ($showTools): ?>
177                <div id="dokuwiki__pagetools">
178                    <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
179                    <ul>
180                        <?php tpl_toolsevent('pagetools', array(
181                            'edit'      => tpl_action('edit', 1, 'li', 1),
182                            'discussion'=> _tpl_action('discussion', 1, 'li', 1),
183                            'revisions' => tpl_action('revisions', 1, 'li', 1),
184                            'backlink'  => tpl_action('backlink', 1, 'li', 1),
185                            'subscribe' => tpl_action('subscribe', 1, 'li', 1),
186                            'revert'    => tpl_action('revert', 1, 'li', 1),
187                            'top'       => tpl_action('top', 1, 'li', 1),
188                        )); ?>
189                    </ul>
190                </div>
191            <?php endif; ?>
192        </div><!-- /wrapper -->
193
194        <!-- ********** FOOTER ********** -->
195        <div id="dokuwiki__footer"><div class="pad">
196            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
197            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
198        </div></div><!-- /footer -->
199
200        <?php tpl_includeFile('footer.html') ?>
201    </div></div><!-- /site -->
202
203    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
204
205</body>
206</html>
207