1<?php
2/**
3 * DokuWiki Default Template 2012
4 *
5 * Modifed by Gero Gothe <practical@medizin-lernen.de>
6 *
7 * @link     http://dokuwiki.org/template
8 * @author   Anika Henke <anika@selfthinker.org>
9 * @author   Clarence Lee <clarencedglee@gmail.com>
10 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
11 */
12
13if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
14header('X-UA-Compatible: IE=edge,chrome=1');
15
16$hasSidebar = page_findnearest($conf['sidebar']);
17$showSidebar = $hasSidebar && ($ACT=='show');
18
19# Default Values
20if ($conf['tpl']['kkh']['color background'] == '') $conf['tpl']['kkh']['color background'] = "#eeeeee";
21if ($conf['tpl']['kkh']['color header'] == '') $conf['tpl']['kkh']['color header'] = "#aaaaaa";
22
23?><!DOCTYPE html>
24
25<html style="overflow-x:hidden;" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
26<head>
27    <meta charset="utf-8" />
28
29    <!-- Anpassung Grünstadt -->
30    <title><?php echo strip_tags($conf['title']) ?>: <?php tpl_pagetitle() ?></title>
31    <!------------------------->
32
33    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
34    <?php tpl_metaheaders() ?>
35    <meta name="viewport" content="width=device-width,initial-scale=1" />
36    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
37    <?php tpl_includeFile('meta.html') ?>
38
39    <!-- Anpassung Grünstadt -->
40	<link rel="stylesheet" type="text/css" href="<?php echo tpl_basedir(); ?>css/kkh.css">
41    <style>
42    html {
43        <?php if (isset($conf['tpl']['kkh']['color background'])) echo "background: ".$conf['tpl']['kkh']['color background'].";";?>
44    }
45
46    #dokuwiki__header {
47        box-shadow: 0 40px 0px 0 <?php echo $conf['tpl']['kkh']['color header']?>;
48        background-color: <?php echo $conf['tpl']['kkh']['color header']?>;
49
50    }
51
52    #dokuwiki__content h1{
53        background-color:<?php echo $conf['tpl']['kkh']['color h1']?> !important;
54    }
55
56    <?php if ($conf['tpl']['kkh']['transparent start']===1): ?>
57    /* Elemente auf Startseite ausblenden */
58    .home .docInfo, .home .pageId, .home #dokuwiki__pagetools {display:none !important;}
59
60
61    .home.mode_show #dokuwiki__content .page.group {
62        background:none;border:none;box-shadow:none;
63    }
64
65    .home #plugin__approve {display:none;}
66    <?php endif; ?>
67
68    <?php if ($conf['tpl']['kkh']['animation']===1): ?>
69    .nohome #dokuwiki__site .mode_show #dokuwiki__content .pad .group {
70        animation: rollin 0.7s forwards;
71        position:relative;
72        left:100vw;
73        animation-delay:0.9s;
74    }
75
76    .startpage #dokuwiki__site .mode_show #dokuwiki__content .pad .group {
77        animation: fadein 1.1s forwards;
78    }
79
80    .nohome .pageId, .nohome #dokuwiki__pagetools {
81        visibility:hidden;
82        animation:visiblein 1.7s forwards;
83    }
84    <?php endif; ?>
85
86    <?php
87    # Styles for the button plugin
88    if ($conf['tpl']['kkh']['css plugin button']===1) echo file_get_contents(DOKU_TPLINC.'css/plugins/button.css');
89    ?>
90
91    </style>
92	<!------------------------->
93
94</head>
95
96<body <?php echo 'class="'.($ID!="start"? 'nohome':'startpage').'"';?>>
97
98	<!-- Anpassung Grünstadt -->
99	<?php if(strpos(tpl_classes(),'mode_show') !== false): ?>
100	<?php
101	# Set defaults
102	if (!isset($conf['tpl']['kkh']['logo_image']) || $conf['tpl']['kkh']['logo_image']=='') $conf['tpl']['kkh']['logo_image'] = "wiki:logo.png";
103
104	# Check if configured loader image exists. Otherwise: Use standard image of the template
105    $loader_img = DOKU_INC.'data/media/'.str_replace(':','/',$conf['tpl']['kkh']['loader_image']);
106    if (!isset($conf['tpl']['kkh']['loader_image']) ||
107        $conf['tpl']['kkh']['loader_image']=='' ||
108        !file_exists($loader_img)
109       ) {$loader_img = tpl_basedir().'images/loader.gif';} else
110         {$loader_img = 'lib/exe/fetch.php?media='.$conf['tpl']['kkh']['loader_image'];}
111	?>
112	<div class="branding">
113		<img class="logo" src="lib/exe/fetch.php?media=<?php echo $conf['tpl']['kkh']['logo_loader']; ?>">
114		<img class="loader" src="<?php echo $loader_img ?>">
115		<span><?php if ($conf['tpl']['kkh']['show_title']===1) echo $conf['title']; ?></span>
116	</div>
117	<?php endif; ?>
118	<!------------------------->
119
120    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
121        echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
122
123        <?php include('tpl_header.php') ?>
124
125        <div class="wrapper group">
126
127            <?php if($showSidebar): ?>
128                <!-- ********** ASIDE ********** -->
129                <div id="dokuwiki__aside"><div class="pad aside include group">
130                    <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
131                    <div class="content"><div class="group">
132                        <?php tpl_flush() ?>
133                        <?php tpl_includeFile('sidebarheader.html') ?>
134                        <?php tpl_include_page($conf['sidebar'], true, true) ?>
135                        <?php tpl_includeFile('sidebarfooter.html') ?>
136                        <?php
137                        ############# Gothe ###############
138						if ($INFO['editable']) {
139							echo "<hr>
140								  <div style='padding-left:1em;padding-bottom:1em;'>
141								  <a href='".DOKU_BASE."doku.php?id=".$INFO['namespace'].":sidebar'>Menü anzeigen/bearbeiten</a>
142								  </div>
143								 ";
144						}
145						###################################
146                        ?>
147                    </div></div>
148                </div></div><!-- /aside -->
149            <?php endif; ?>
150
151            <!-- ********** CONTENT ********** -->
152            <div id="dokuwiki__content"><div class="pad group">
153
154                <?php html_msgarea() ?>
155
156                <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
157
158                <div class="page group">
159                    <?php tpl_flush() ?>
160                    <?php tpl_includeFile('pageheader.html') ?>
161                    <!-- wikipage start -->
162                    <?php tpl_content() ?>
163                    <!-- wikipage stop -->
164                    <?php tpl_includeFile('pagefooter.html') ?>
165                </div>
166
167                <div class="docInfo"><?php tpl_pageinfo() ?></div>
168
169                <?php tpl_flush() ?>
170            </div></div><!-- /content -->
171
172            <hr class="a11y" />
173
174            <!-- PAGE ACTIONS -->
175            <div id="dokuwiki__pagetools">
176                <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
177                <div class="tools">
178                    <ul>
179                        <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
180                    </ul>
181                </div>
182            </div>
183        </div><!-- /wrapper -->
184
185        <?php include('tpl_footer.php') ?>
186    </div></div><!-- /site -->
187
188    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
189    <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
190
191    <?php if ($conf['tpl']['kkh']['slider show']): ?>
192    <!-- Slider -->
193	<div class="rightslider" style="top:300px;background:white;">
194		<div class="rightslider_toggle"><img src="<?php echo tpl_basedir(); ?>images/external_link.png"></div>
195		<div class="kkh_box"><a href="<?php echo $conf['tpl']['kkh']['slider link']; ?>"><?php echo $conf['tpl']['kkh']['slider text'];?></a></div>
196	</div>
197    <?php endif; ?>
198
199</body>
200</html>
201