1<?php
2/**
3 * Template header, included in the main and detail files
4 */
5
6// must be run from within DokuWiki
7if (!defined('DOKU_INC')) die();
8?>
9
10<!-- ********** HEADER ********** -->
11<?php tpl_includeFile('header.html') ?>
12
13<!-- Navigation bar -->
14<nav class="navbar navbar-expand-md p-0">
15
16    <!-- Sub component -->
17    <?php if($ID == 'start'): ?>
18	<div class="container">
19	    <a class="navbar-brand text-dark" style="font-weight:900;" href="<?php  echo wl() ?>">
20		<?php echo $conf['title']; ?>
21	    </a>
22
23	    <!-- Tagline -->
24	    <?php if ($conf['tagline']): ?>
25		<p class="claim"><?php echo $conf['tagline']; ?></p>
26	    <?php endif ?>
27
28	    <!-- Hamburgar button -->
29	    <button class="navbar-toggler btn" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
30		<span class="navbar-toggler-icon"><i class="fas fa-bars"></i>
31		</span>
32	    </button>
33
34	    <!-- Navigation -->
35	    <div class="collapse navbar-collapse" id="navbar-content">
36
37		<ul class="navbar-nav mr-auto">
38
39		</ul>
40
41		<!-- Topmenu -->
42		<ul class="navbar-nav py-3">
43		    <!-- User tools -->
44
45		    <!-- Page menu -->
46
47		    <!-- <li class="nav-item mx-2 dropdown d-lg-none">
48			 <a href="#" class="nav-link dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Page</a>
49			 <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
50			 <?php
51			 $items = (new \dokuwiki\Menu\PageMenu())->getItems();
52			 foreach($items as $item) {
53			 echo '<li><a class="nav-item mx-2" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
54			 . $item->getLabel()
55			 . '</a></li>';
56			 }
57			 ?>
58			 </ul>
59			 </li> -->
60
61		    <!-- Mobile tool -->
62		    <li class="nav-item mx-2 dropdown">
63			<a href="#" class=" nav-link dropdown-toggle" id="mldropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
64			    <?php if ($conf['useacl']):
65			    if (!empty($_SERVER['REMOTE_USER'])) {
66				echo $_SERVER['REMOTE_USER'];
67			    }else{
68				echo 'N/A';
69			    }
70			    endif
71			    ?>
72			</a>
73			<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
74			    <?php
75			    $items = (new \dokuwiki\Menu\MobileMenu())->getItems();
76			    foreach($items as $item) {
77				echo '<li><a class="nav-item mx-2" href="'.$item->getLink().'" title="'.$item->getTitle().'">'
78				   . $item->getLabel()
79				   . '</a></li>';
80			    }
81			    ?>
82			</ul>
83		    </li>
84
85		    <!-- Search bar -->
86		    <li class="nav-item ml-0">
87			<?php /*tpl_searchform();*/ ?>
88			<form action="/doku.php?id=start" method="get" role="search" class="search doku_form" id="dw__search" accept-charset="utf-8"><input type="hidden" name="do" value="search" />
89			    <input type="hidden" name="id" value="start" />
90			    <div class="no">
91				<input name="q" class="edit border-secondary text-secondary" type="text" title="[F]" accesskey="f" placeholder="" autocomplete="on" id="qsearch__in" value="" />
92				<button value="1" type="submit" title="検索" class="border-secondary btn-outline-secondary"><i class="fas fa-search"></i></button>
93			    </div>
94			</form>
95		    </li>
96
97		    <!-- BREADCRUMBS -->
98		    <?php if($conf['breadcrumbs'] || $conf['youarehere']): ?>
99			<!-- <div class="breadcrumbs">
100			     <?php if($conf['youarehere']): ?>
101			     <div class="youarehere"><?php tpl_youarehere() ?></div>
102			     <?php endif ?>
103			     <?php if($conf['breadcrumbs']): ?>
104			     <div class="trace"><?php tpl_breadcrumbs() ?></div>
105			     <?php endif ?>
106			     </div> -->
107		    <?php endif ?>
108
109		    <hr class="a11y" />
110		</ul>
111	    </div>
112    <?php else: ?>
113	    <div class="container border-bottom border-dark px-0">
114		<h3>
115		    <a href="<?php echo wl() ?>" class="text-dark" style="text-decoration:none;">
116			<i class="fas fa-long-arrow-alt-left"></i>Home
117		</a>
118		</h3>
119
120		<?php
121		/* $logoSize = array();
122		   $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize); */
123		// display logo and wiki title in a link to the home page
124		/* tpl_link(
125		 *     wl(),
126		 *     'Home',
127		 *     'accesskey="h" title="[H]"'
128		   ); */
129		?>
130	    </div>
131    <?php endif; ?><!-- /start -->
132</nav>
133<!-- /header -->
134