1 <?php
2 /**
3  * DokuWiki Template DokuBook
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  * @link   http://wiki.splitbrain.org/template:dokubook
12  * @author Andreas Gohr <andi@splitbrain.org>
13  * @author Michael Klier <chi@chimeric.de>
14  */
15 
16 // must be run from within DokuWiki
17 if (!defined('DOKU_INC')) die();
18 require_once('tpl_functions.php');
19 global $REV;
20 global $ACT;
21 
22 ?>
23 <!DOCTYPE html>
24 <html lang="<?php echo $conf['lang']?>" id="document" dir="<?php echo $lang['direction']?>">
25 <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 } ?>>
26   <meta charset="utf-8" />
27   <meta name="viewport" content="width=device-width, initial-scale=1" />
28   <title>
29     <?php tpl_pagetitle()?>
30     [<?php echo strip_tags($conf['title'])?>]
31   </title>
32 
33   <?php tpl_metaheaders()?>
34 
35   <?php echo tpl_favicon()?>
36 
37   <?php tpl_includeFile('meta.html')?>
38 
39   <!-- change link borders dynamically -->
40   <style type="text/css">
41     <?php
42     if($ACT == 'show' || $ACT == 'edit') {
43         if($ACT == 'show' && $INFO['ismanager'] && actionOK('revert') && !empty($REV)) {
44     ?>
45         div.dokuwiki ul#top__nav a.revert
46     <?php
47         } else {
48     ?>
49         div.dokuwiki ul#top__nav a.edit,
50         div.dokuwiki ul#top__nav a.show,
51         div.dokuwiki ul#top__nav a.source,
52         div.dokuwiki ul#top__nav a.restore
53     <?php
54         }
55     } else { ?>
56         div.dokuwiki ul#top__nav a.<?php echo $ACT;?>
57     <?php } ?>
58     {
59       border-color: #fabd23;
60       border-bottom: 1px solid #fff;
61       font-weight: bold;
62     }
63   </style>
64 </head>
65 <body class="<?php echo $ACT ?>">
66 <?php tpl_includeFile('topheader.html')?>
67 <div class="dokuwiki">
68   <?php html_msgarea()?>
69 
70   <div id="sidebar_<?php echo tpl_getConf('sb_position')?>" class="sidebar">
71     <?php dokubook_tpl_logo()?>
72     <?php
73         /** @var helper_plugin_translation $translation */
74         $translation = plugin_load('helper','translation');
75         if ($translation) echo $translation->showTranslations();
76     ?>
77     <?php dokubook_tpl_sidebar()?>
78   </div>
79 
80   <div id="dokubook_container_<?php echo tpl_getConf('sb_position')?>">
81 
82     <header class="stylehead">
83       <div class="header">
84         <?php tpl_includeFile('pageheader.html')?>
85         <?php tpl_includeFile('header.html')?>
86         <div class="logo">
87           <?php tpl_link(wl(),$conf['title'],'id="dokuwiki__top" accesskey="h" title="[ALT+H]"')?>
88         </div>
89       </div>
90 
91       <ul id="top__nav">
92         <?php
93 	    if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
94                 $npb = $npd->html_new_page_button(true);
95                 if($npb) {
96                     print '<li>' . $npb . '</li>' . DOKU_LF;
97                 }
98             }
99             foreach(array('revert', 'edit', 'history', 'subscribe') as $act) {
100                 ob_start();
101                 print '<li>';
102                 if($act == 'revert' && !empty($REV)) {
103                     if(tpl_actionlink($act)) {
104                         print '</li>' . DOKU_LF;
105                         ob_end_flush();
106                     } else {
107                         ob_end_clean();
108                     }
109                 } else {
110                     if(tpl_actionlink($act)) {
111                         print '</li>' . DOKU_LF;
112                         ob_end_flush();
113                     } else {
114                         ob_end_clean();
115                     }
116                 }
117             }
118         ?>
119       </ul>
120 
121     </header>
122 
123     <?php flush()?>
124 
125     <main class="page">
126 
127       <?php if($conf['breadcrumbs']){?>
128       <div class="breadcrumbs">
129         <?php tpl_breadcrumbs()?>
130       </div>
131       <?php }?>
132 
133       <?php if($conf['youarehere']){?>
134       <div class="breadcrumbs">
135         <?php tpl_youarehere() ?>
136       </div>
137       <?php }?>
138 
139       <!-- wikipage start -->
140       <?php tpl_content()?>
141       <!-- wikipage stop -->
142 
143       <div class="meta">
144         <div class="doc">
145           <?php tpl_pageinfo()?>
146         </div>
147       </div>
148 
149       <?php tpl_actionlink('top')?>
150 
151       <div class="clearer"></div>
152 
153     </main>
154 
155     <?php flush()?>
156 
157     <div class="clearer"></div>
158 
159     <?php dokubook_tpl_footer() ?>
160 
161     <footer class="stylefoot">
162       <?php tpl_includeFile('pagefooter.html')?>
163     </footer>
164 
165     <?php tpl_includeFile('footer.html')?>
166 
167   </div>
168 
169 </div>
170 <div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div>
171 </body>
172 </html>
173