1<?php
2/**
3 * DokuWiki Wallpaper Template
4 *
5 * @link:   http://wiki.splitbrain.org/wiki:tpl:templates
6 * @author: Andreas Gohr <andi@splitbrain.org>
7 * @author: Klaus Vormweg <klaus.vormweg@gmx.de>
8 */
9
10// must be run from within DokuWiki
11if (!defined('DOKU_INC')) die();
12
13// include custom template functions
14require_once(dirname(__FILE__).'/tpl_functions.php');
15
16echo '<!DOCTYPE html>
17<html lang="', $conf['lang'],'" dir="', $lang['direction'], '">
18<head>
19  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
20  <title>',"\n";
21tpl_pagetitle();
22echo ' [', strip_tags($conf['title']), ']';
23echo '  </title>
24  <meta name="viewport" content="width=device-width, initial-scale=1.0" />',"\n";
25tpl_metaheaders();
26echo tpl_favicon(array('favicon', 'mobile'));
27if($conf['tpl']['wallpaper']['fixedbackground']) {
28  echo '  <style type="text/css">
29    img#fakebackground {
30	    position: fixed;
31    }
32  </style>',"\n";
33}
34
35echo '  </head>
36
37<body>
38<div class="dokuwiki">
39   <img id="fakebackground" src="', _wp_tpl_bgimage(), '" alt="" />',"\n";
40html_msgarea();
41echo '  <div class="stylehead">
42    <div class="header">
43      <div class="pagename">',"\n";
44
45tpl_link(wl(),$conf['title'],' id="dokuwiki__top" accesskey="h" title="[ALT+H]"');
46echo '      </div>
47
48     <div class="clearer"></div>
49	   <div class="mainmenu">
50     <input type="checkbox" id="hamburger" class="hamburger" />
51     <label for="hamburger" class="hamburger" title="Menu">&#9776; <span class="vishelp">Menu</span></label>',"\n";
52_wp_tpl_mainmenu();
53echo '      </div>
54    </div>
55    <div class="breadcrumbs">',"\n";
56if($conf['breadcrumbs']){
57  tpl_breadcrumbs();
58} elseif($conf['youarehere']){
59  _wp_tpl_youarehere();
60}
61//$translation = &plugin_load('helper','translation');
62//if ($translation) echo $translation->showTranslations();
63echo '    </div>
64  </div>',"\n";
65flush();
66if($ACT != 'diff' && $ACT != 'edit' && $ACT != 'preview' && $ACT != 'admin' && $ACT != 'login' && $ACT != 'logout' && $ACT != 'profile' && $ACT != 'revisions') {
67  echo '  <div class="wrap">
68     <div class="page">',"\n";
69  tpl_content();
70  echo '
71     </div>
72  </div>',"\n";
73} else {
74  echo '  <div class="wrap">
75     <div class="page" style="margin-left:0; max-width: 78em;">',"\n";
76  tpl_content();
77  echo '   </div>
78  </div>',"\n";
79}
80tpl_flush();
81echo '  <div class="stylefoot">',"\n";
82if($ACT != 'diff' && $ACT != 'edit' && $ACT != 'preview' && $ACT != 'admin' && $ACT != 'login' && $ACT != 'logout' && $ACT != 'profile' && $ACT != 'revisions') {
83  echo '    <div class="meta">
84     <div class="homelink">
85  		   <a href="http://wiki.splitbrain.org/wiki:dokuwiki" title="Driven by DokuWiki"><img src="', DOKU_TPL, 'images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
86   	 <a href="', DOKU_BASE, 'feed.php" title="Recent changes RSS feed"><img src="', DOKU_TPL, 'images/button-rss.png" width="80" height="15" alt="Recent changes RSS feed" /></a>
87    </div>',"\n";
88  _wp_tpl_pageinfo();
89  echo '  </div>',"\n";
90} else {
91  echo '  <div class="meta">
92     <div class="homelink">
93  		   <a href="http://wiki.splitbrain.org/wiki:dokuwiki" title="Driven by DokuWiki"><img src="', DOKU_TPL, 'images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
94    	 <a href="', DOKU_BASE, 'feed.php" title="Recent changes RSS feed"><img src="', DOKU_TPL, 'images/button-rss.png" width="80" height="15" alt="Recent changes RSS feed" /></a>
95      </div>
96    </div>',"\n";
97}
98echo '    <div class="bar" id="bar__bottom">
99       <div class="bar-left" id="bar__bottomleft">',"\n";
100tpl_button('admin');
101if($ACT != 'login' && $ACT != 'logout') {
102  tpl_button('login');
103  echo '&nbsp;';
104}
105if($_SERVER['REMOTE_USER']){
106  tpl_button('subscribe');
107  tpl_button('profile');
108  tpl_button('history');
109}
110echo '&nbsp;
111       </div>
112       <div class="bar-right" id="bar__bottomright">',"\n";
113if($ACT != 'login' && $ACT != 'logout') {
114  if($conf['tpl']['wallpaper']['showsearch']) {
115    tpl_searchform();
116    echo '&nbsp';
117  }
118  if(!$_SERVER['REMOTE_USER']){
119    if($conf['tpl']['wallpaper']['showmedia']) {
120      tpl_button('media');
121    }
122  } else {
123    tpl_button('media');
124  }
125}
126tpl_button('edit');
127$dw2pdf = &plugin_load('action','dw2pdf');
128if($dw2pdf) {
129	global $REV;
130	echo '<form class="button" method="get" action="',wl($ID),'">
131          <div class="no"><input type="hidden" name="do" value="export_pdf" />
132          <input type="hidden" name="rev" value="', $REV, '" />
133          <input type="hidden" name="id" value="', $ID, '" />
134          <input type="submit" value="PDF-Export" class="button" title="PDF-Export" />
135          </div></form>',"\n";
136}
137echo '  </div>
138  <div class="clearer"></div>
139  </div>
140  </div>
141  <div class="no">';
142/* provide DokuWiki housekeeping, required in all templates */
143tpl_indexerWebBug();
144echo '</div>
145</div>
146</body>
147</html>',"\n";
148?>
149