1<?php
2if (!defined('DOKU_INC')) die();
3
4require_once(dirname(__FILE__).'/tpl_functions.php');
5
6// load translation plugin (if present): not yet tested
7$translation = plugin_load('helper','translation');
8
9
10echo '
11<!DOCTYPE html>
12<html lang="', $conf['lang'], '" dir="', $lang['direction'], '">
13    <head>
14        <meta charset="utf-8" />
15        <title>',
16            tpl_getConf("title_prefix"),
17            // print title without language namespace
18            preg_replace('/^'.$conf['lang'].':/','',tpl_pagetitle(null, true)),
19        '</title>',
20        // set viewport for mobile devices
21        // include js and css from kit sources
22        '<meta name="viewport" content="width=device-width, initial-scale=1.0">
23         <script src="https://static.scc.kit.edu/kit-2020/js/jquery-3.4.1.min.js"></script>
24         <script src="https://static.scc.kit.edu/kit-2020/js/main.js"></script>
25         <script src="https://static.scc.kit.edu/kit-2020/js/kit.js"></script>
26         <script src="https://static.scc.kit.edu/fancybox/dist/jquery.fancybox.min.js"></script>
27         <link rel="stylesheet" type="text/css" href="https://kit-cd.scc.kit.edu/global_stylesheet.php.css">
28         <link rel="stylesheet" href="https://static.scc.kit.edu/fancybox/dist/jquery.fancybox.min.css" />
29';
30// dokuwiki specific css and js
31tpl_metaheaders();
32
33echo tpl_favicon(array('favicon', 'mobile')), '
34    </head>
35    <body class="oe-page" vocab="http://schema.org/" typeof="WebPage" class="oe-page" vocab="http://schema.org/" typeof="WebPage">
36    <header class="page-header">
37        <div class="content-wrap">
38            <div class="logo">',
39            tpl_includeFile('logo.html')
40            ,'</div>
41
42            <div class="navigation">
43                <button class="burger"><svg class="burger-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 300 274.5" width="300px" height="274.5px">
44                    <rect class="burger-top" y="214.4" width="300" height="60.1"></rect>
45                    <rect class="burger-middle" y="107.2" width="300" height="60.1"></rect>
46                    <rect class="burger-bottom" y="0" width="300" height="60.1"></rect>
47                </svg></button>
48                <a id="logo_oe_name" href="', wl($conf['start']),'">', $conf['title'] ,'</a>
49                <div class="navigation-meta">
50                    <ul class="navigation-meta-links">
51                       <li>', html_wikilink(':' . $conf['start'], 'Home') ,'</li>';
52 echo '                <li><a accesskey="8" href="https://kit.edu/impressum.php">Imprint</a></li>
53                        <li><a href="https://kit.edu/datenschutz.php">Privacy</a></li>
54                        <li><a href="',  DOKU_URL ,'doku.php?do=index">Sitemap</a></li>
55                        <li><a href="http://www.kit.edu/english/index.php"><span class="svg-icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 299.4 295.7" width="299.4px" height="295.7px">
56                        <polygon points="299.3,295.7 299.3,295.6 299.3,295.6 "></polygon>
57                        <polygon points="299.3,295.6 299.3,295.6 299.3,295.6 "></polygon>
58                        <path d="M67.9,108.1c-15.6,18.9-28.8,39.6-39.3,61.7l270.6,125.9L67.9,108.1z"></path>
59                        <path d="M299.2,295.6L173,27.2c-22.2,10.2-43,23.1-62,38.4l188.3,230.1L299.2,295.6z"></path>
60                        <polygon points="299.3,295.6 299.3,295.6 299.3,295.6 299.3,295.5 "></polygon>
61                        <polygon points="299.3,295.6 299.3,295.6 299.3,295.6 299.3,295.5 "></polygon>
62                        <path d="M9.3,223.2c-6.1,23.7-9.2,48-9.3,72.5h299.2L9.3,223.2z"></path>
63                        <path d="M299.3,295.6l0.1-295.6c-0.8,0-1.5-0.1-2.2-0.1c-23.6,0-47,2.8-69.9,8.4L299.3,295.6L299.3,295.6z"></path>
64                        </svg></span><span>KIT</span></a></li>
65';
66
67if($_SERVER['REMOTE_USER']) echo (new \dokuwiki\Menu\UserMenu())->getListItems();
68echo '              </ul>';
69echo '<div class="navigation-language" style="margin-left: 0.6875em;">';
70if ($translation) {
71    if(!$_SERVER['REMOTE_USER']) $conf['plugin']['translation']['checkage'] = 0;
72    echo $translation->showTranslations();
73    if(null != tpl_getConf("institute_".$conf['lang'])) $conf['title'] = tpl_getConf("institute_".$conf['lang']);
74} else {
75   echo strtoupper($conf['lang']);
76}
77echo '</div>';
78
79//search bar
80echo '
81		<div class="navigation-search" style="margin-left: 1.3em;">
82        	<div class="search-form">
83              <form action="', wl(),'" method="get" role="search" id="dw__search" accept-charset="utf-8">
84                <input type="hidden" name="do" value="search" />
85                <input type="hidden" name="id" value="', $ID ,'" />
86                <input id="meta_search_input" type="search" name="q" placeholder="suchen" aria-label="suchen" size="1" required="required" />
87                <button value="1" type="submit"><span>suchen</span></button>
88                <div id="qsearch__out" class="ajax_qsearch JSpopup"></div>
89              </form>
90            </div>
91			<a id="meta_search_label" class="search-trigger" title="suchen" href="#"><span>suchen</span></a>
92        </div>
93	    </div>';
94echo '<nav class="navigation-main">', dropdown_menu(), '</nav>';
95
96
97
98// side tools when scrolling and mobile view
99echo '<ul class="side-widgets">
100      <li class="meta">', html_wikilink(':' . $conf['start'], 'Home') ,'</li>
101      <li class="meta"><a accesskey="8" href="https://kit.edu/impressum.php">Imprint</a></li>
102      <li class="meta"><a href="https://kit.edu/datenschutz.php">Privacy</a></li>
103      <li class="meta"><a href="',  DOKU_URL ,'doku.php?do=index">Sitemap</a></li>
104<li class="search">
105	<a title="suchen"><span>suchen</span></a>
106    <div class="search-form">
107          <form action="', wl(),'" method="get" role="search" id="dw__search" accept-charset="utf-8">
108               <input type="hidden" name="do" value="search" />
109               <input type="hidden" name="id" value="', $ID ,'" />
110               <input type="search" name="q" placeholder="suchen" aria-label="suchen" size="1" required="required"/>
111               <button value="1" type="submit"><span>suchen</span></button>
112           </form>
113       </div>
114</li>
115</ul>';
116
117echo '</div></div>
118</header><main>';
119if(
120    $ID ==  $conf['start'] &&
121    $ACT != 'diff' &&
122    $ACT != 'edit' &&
123    $ACT != 'preview' &&
124    $ACT != 'admin' &&
125    $ACT != 'login' &&
126    $ACT != 'logout' &&
127    $ACT != 'profile' &&
128    $ACT != 'revisions' &&
129    $ACT != 'index' &&
130    $ACT != 'search' &&
131    $ACT != 'media' &&
132    tpl_getConf("bighead") == 'yes'
133) {
134    /* default images from https://pixabay.com/illustrations/universe-particles-vibration-line-1566161/*/
135    echo '
136<section class="stage stage-big">
137    <img src="'.DOKU_URL.'/lib/tpl/dokukitv2/images/head-big.jpg" alt="', $conf['title'] ,'" loading="lazy" width="1920" height="700" />
138    <div class="content-wrap"><p class="bigger" title="', $conf['title'] ,'">', $conf['title'] ,'</p></div>
139</section>';
140} else{
141    echo '
142<section class="stage stage-small">
143    <img src="'.DOKU_URL.'/lib/tpl/dokukitv2/images/head-small.jpg" alt="', $conf['title'] ,'" loading="lazy"/>
144    <div class="content-wrap">
145        <a href="', wl($conf['start']),'">', $conf['title'] ,'</a>
146        <!-- <a href="/index.php"><img src="'.DOKU_URL.'/lib/tpl/dokukitv2/images/logo.jpg" alt="SCC-Logo" /></a> --!>
147    </div>
148</section>';
149}
150echo '<div class="side-widgets-trigger"></div>';
151html_msgarea();
152// BREADCRUMBS
153echo '<section class="breadcrumbs-big">';
154echo    '<div class="content-wrap">';
155            trace();
156echo '	</div>
157</section>';
158
159tpl_flush();
160
161echo '
162<section class="content-wrap">
163	<div class="content">
164	<div class="KIT_section text full dokuwiki">';
165	if($_SERVER['REMOTE_USER']) {
166		echo '<div class="content-wrap" style="text-align:right;">';
167    	foreach((new \dokuwiki\Menu\PageMenu())->getItems() as $item) {
168  			echo '<a href="', $item->getLink(), '" title="', $item->getTitle(), '">
169				  	<span class="icon">'.inlineSVG($item->getSvg()).'</span>
170					<span class="a11y">'.$item->getLabel().'</span>
171				  </a>';
172		}
173		echo '</div>
174 <div class="side-widgets-trigger"></div>
175';
176	}
177    tpl_content(false);
178echo	'
179	</div>
180	</div>
181	</div>
182</section>
183
184
185    </main>
186
187<button class="to-top-button" aria-label="scroll back to top"></button>
188
189
190<footer class="page-footer">
191            <div class="content-wrap">
192                <div class="column full" style="grid-template-columns:unset;"> <!-- compatible with columns-plugin --!>
193                    <div class="KIT_section text column fourth">', tpl_include_page(tpl_getConf("footer"), false, true, true), ' </div>';
194                    if($_SERVER['REMOTE_USER'] && (auth_quickaclcheck(tpl_getConf('foot')) >= AUTH_EDIT)) {
195    	                echo '<small><a href="',wl(tpl_getConf('footer'), array('do'=>'edit')), '">Edit</a></small>';
196                    }
197echo '         </div>
198            </div>
199
200            <div class="footer-meta-navigation">
201                <div class="content-wrap">
202                    <span class="copyright">', tpl_getLang('kitfooter') ,'</span>
203                    <ul>
204                        <li><a accesskey="1" href="/index.php">Home</a></li>
205                        <li><a accesskey="8" href="/impressum.php">Imprint</a></li>
206                        <li><a href="/datenschutz.php">Privacy</a></li>
207                        <li><a href="http://www.kit.edu"><span>KIT</span></a></li>';
208
209if(!$_SERVER['REMOTE_USER']) {
210    echo '<li>', (new \dokuwiki\Menu\Item\Login)->asHtmlLink('menuitem' ,false), '</li>';
211} elseif (
212    $ACT != 'login' &&
213    $ACT != 'logout' &&
214    $ACT != 'diff' &&
215    $ACT != 'edit' &&
216    $ACT != 'preview' &&
217    $ACT != 'admin' &&
218    $ACT != 'profile' &&
219    $ACT != 'revisions') {
220    echo '<li>', tpl_pageinfo(true), '</li>';
221}
222 echo '             </ul>
223                </div>
224            </div>
225</footer>
226';
227
228if($_SERVER['REMOTE_USER']) tpl_indexerWebBug();
229
230echo '</body>
231    </html>';
232
233?>
234