1<?php
2/**
3 * DokuWiki Arctic Template.
4 *
5 * This is the template you need to change for the overall look
6 * of DokuWiki.
7 *
8 * You should leave the doctype at the very top - It should
9 * always be the very first line of a document.
10 *
11 * @author Mark C. Prins <mprins@users.sf.net>
12 * @author Andreas Gohr <andi@splitbrain.org>
13 * @author Michael Klier <chi@chimeric.de>
14 * @link   http://www.dokuwiki.org/template:arctic
15 */
16
17// must be run from within DokuWiki
18if (!defined('DOKU_INC')) die();
19
20global $ACT;
21
22// include custom arctic template functions
23require_once(dirname(__FILE__).'/tpl_functions.php');
24?>
25<!DOCTYPE html>
26<html lang="<?php echo $conf['lang']?>" id="document" dir="<?php echo $lang['direction']?>">
27<head<?php if (tpl_getConf('opengraphheading')) { ?> prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# fb: http://ogp.me/ns/fb# place: http://ogp.me/ns/place# book: http://ogp.me/ns/book#"<?php } ?>>
28  <meta charset="utf-8" />
29  <meta name="viewport" content="width=device-width, initial-scale=1"/>
30  <title>
31    <?php tpl_pagetitle()?>
32    [<?php echo strip_tags($conf['title'])?>]
33  </title>
34
35  <?php tpl_metaheaders()?>
36
37  <?php echo tpl_favicon() ?>
38
39  <?php tpl_includeFile('meta.html') ?>
40
41</head>
42<body>
43
44<div id="skiplinks" class="skiplinks">
45  <a href="#dokuwiki__content" class="skiplink"><?php echo $lang['skip_to_content']; ?></a>
46</div>
47
48<?php tpl_includeFile('topheader.html') ?>
49<div id="wrapper" class='<?php echo $ACT ?>'>
50  <div class="dokuwiki">
51
52    <?php html_msgarea()?>
53
54    <header class="stylehead">
55      <div class="header">
56        <div class="pagename">
57          [[<?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true))?>]]
58        </div>
59        <div class="logo">
60          <?php tpl_link(wl(),$conf['title'],'id="dokuwiki__top" accesskey="h" title="[ALT+H]"')?>
61        </div>
62      </div>
63
64      <?php if(tpl_getConf('trace')) {?>
65      <div class="breadcrumbs">
66        <?php ($conf['youarehere'] != 1) ? tpl_breadcrumbs() : tpl_youarehere();?>
67      </div>
68      <?php } ?>
69
70      <?php tpl_includeFile('header.html') ?>
71    </header>
72
73      <?php if(!$toolb) { ?>
74      <?php if(!tpl_getConf('hideactions') || tpl_getConf('hideactions') && isset($_SERVER['REMOTE_USER'])) { ?>
75      <div class="bar" id="bar__top">
76        <div class="bar-left">
77          <?php
78            if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
79                switch(tpl_getConf('wiki_actionlinks')) {
80                  case('buttons'):
81                    // check if new page button plugin is available
82                    if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
83                      $npd->html_new_page_button();
84                    }
85                    tpl_button('edit');
86                    break;
87                  case('links'):
88                    // check if new page button plugin is available
89                    if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
90                      $npd->html_new_page_button();
91                    }
92                    tpl_actionlink('edit');
93                    break;
94                }
95            }
96          ?>
97        </div>
98        <div class="bar-right">
99          <?php
100            switch(tpl_getConf('wiki_actionlinks')) {
101              case('buttons'):
102                if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
103                  tpl_button('admin');
104                  tpl_button('revert');
105                  tpl_button('profile');
106                  tpl_button('recent');
107                  tpl_button('index');
108                  tpl_button('login');
109                  if(tpl_getConf('sidebar') == 'none') arctic_tpl_searchform();
110                } else {
111                  tpl_button('login');
112                }
113                break;
114              case('links'):
115                if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
116                  tpl_actionlink('admin');
117                  tpl_actionlink('revert');
118                  tpl_actionlink('profile');
119                  tpl_actionlink('recent');
120                  tpl_actionlink('index');
121                  tpl_actionlink('login');
122                  if(tpl_getConf('sidebar') == 'none') arctic_tpl_searchform();
123                } else {
124                  tpl_actionlink('login');
125                }
126                break;
127            }
128          ?>
129        </div>
130    </div>
131    <?php } ?>
132    <?php } ?>
133
134    <?php tpl_includeFile('pageheader.html') ?>
135
136    <?php flush()?>
137
138    <?php if(tpl_getConf('sidebar') == 'left') { ?>
139
140      <?php if(!arctic_tpl_sidebar_hide()) { ?>
141        <div class="left_sidebar">
142          <?php arctic_tpl_searchform() ?>
143          <?php arctic_tpl_sidebar('left') ?>
144        </div>
145        <main class="right_page" id="dokuwiki__content" tabindex="-1">
146          <?php ($notoc) ? tpl_content(false) : tpl_content() ?>
147        </main>
148      <?php } else { ?>
149        <main class="page" id="dokuwiki__content" tabindex="-1">
150          <?php tpl_content()?>
151        </main>
152      <?php } ?>
153
154    <?php } elseif(tpl_getConf('sidebar') == 'right') { ?>
155
156      <?php if(!arctic_tpl_sidebar_hide()) { ?>
157        <main class="left_page" id="dokuwiki__content" tabindex="-1">
158          <?php ($notoc) ? tpl_content(false) : tpl_content() ?>
159        </main>
160        <div class="right_sidebar">
161          <?php arctic_tpl_searchform() ?>
162          <?php arctic_tpl_sidebar('right') ?>
163        </div>
164      <?php } else { ?>
165        <main class="page" id="dokuwiki__content" tabindex="-1">
166          <?php tpl_content() ?>
167        </main>
168      <?php }?>
169
170    <?php } elseif(tpl_getConf('sidebar') == 'both') { ?>
171
172      <?php if(!arctic_tpl_sidebar_hide()) { ?>
173        <div class="left_sidebar">
174          <?php if(tpl_getConf('search') == 'left') arctic_tpl_searchform() ?>
175          <?php arctic_tpl_sidebar('left') ?>
176        </div>
177        <main class="center_page" id="dokuwiki__content" tabindex="-1">
178          <?php ($notoc) ? tpl_content(false) : tpl_content() ?>
179        </main>
180        <div class="right_sidebar">
181          <?php if(tpl_getConf('search') == 'right') arctic_tpl_searchform() ?>
182          <?php arctic_tpl_sidebar('right') ?>
183        </div>
184      <?php } else { ?>
185        <main class="page" id="dokuwiki__content" tabindex="-1">
186          <?php tpl_content()?>
187        </main>
188      <?php }?>
189
190    <?php } elseif(tpl_getConf('sidebar') == 'none') { ?>
191      <main class="page" id="dokuwiki__content" tabindex="-1">
192        <?php tpl_content() ?>
193      </main>
194    <?php } ?>
195
196      <footer class="stylefoot">
197        <div class="meta">
198          <div class="user">
199          <?php tpl_userinfo()?>
200          </div>
201          <div class="doc">
202          <?php tpl_pageinfo()?>
203          </div>
204        </div>
205      </footer>
206
207    <div class="clearer"></div>
208
209    <?php flush()?>
210
211    <?php if(!$toolb) { ?>
212    <?php if(!tpl_getConf('hideactions') || tpl_getConf('hideactions') && isset($_SERVER['REMOTE_USER'])) { ?>
213    <?php if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) { ?>
214    <div class="bar" id="bar__bottom">
215      <div class="bar-left">
216        <?php
217          switch(tpl_getConf('wiki_actionlinks')) {
218            case('buttons'):
219                tpl_button('edit');
220                tpl_button('history');
221              break;
222            case('links'):
223                tpl_actionlink('edit');
224                tpl_actionlink('history');
225              break;
226          }
227        ?>
228      </div>
229      <div class="bar-right">
230        <?php
231          switch(tpl_getConf('wiki_actionlinks')) {
232            case('buttons'):
233                tpl_button('media');
234                tpl_button('subscribe');
235                tpl_button('top');
236              break;
237            case('links'):
238                tpl_actionlink('media');
239                tpl_actionlink('subscribe');
240                tpl_actionlink('top');
241              break;
242          }
243        ?>
244      </div>
245    </div>
246    <div class="clearer"></div>
247    <?php } ?>
248    <?php } ?>
249    <?php } ?>
250
251    <?php tpl_includeFile('footer.html') ?>
252
253  </div>
254</div>
255
256<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div>
257</body>
258</html>
259