1<?php
2/**
3 * Template header, included in the files main.php and detail.php
4 */
5
6// must be run from within DokuWiki
7if (!defined('DOKU_INC')) die();
8
9global $conf;
10
11?>
12
13<nav class="fixed-top navbar-light bg-light">
14
15<!--    navbar-expand-lg gives:-->
16<!--       * the breakpoint at the md breakpoint-->
17<!--       * and make the content flex (no new line then)  -->
18<!--    <nav id="navBar" class="navbar navbar-expand-md">-->
19
20
21        <?php
22        $navBarPageName = tpl_getConf('header');
23        if (page_findnearest($navBarPageName)) {
24            tpl_flush();
25            tpl_include_page($navBarPageName, 1, 1);
26        } else {
27            echo '<div class="container">Create a page with the id ('.$navBarPageName.') to create a page header. Example with the <a href="https://gerardnico.com/dokuwiki/webcomponent/navbar">navbar Web component</a></div>';
28        }
29        ?>
30
31
32        <!-- About -->
33        <!-- Margin Right auto (mr-auto) pushes the others components to the right -->
34        <!--                <li class="nav-item mr-auto">-->
35        <!--                    --><?php //tpl_link(wl('about'), hsc("About"), 'title="About" class="nav-link"'); ?>
36        <!--                </li>-->
37
38
39        <!--//-->
40        <!--//-->
41        <!--//                // TODO: https://www.dokuwiki.org/devel:menus-->
42        <!--//                if ($INFO['ismanager']) {-->
43        <!--//-->
44        <!--//                    $data['items']['purge'] = '<li class="nav-item">' . tpl_link(wl($ID, ['purge' => true]), '<span>Purge this page</span>', 'class="action purge dropdown-item"', $return = true) . '</li>';-->
45        <!--//                    $data['items']['purge_css'] = '<li class="nav-item">' . tpl_link("/lib/exe/css.php?purge=true", '<span>Purge Css</span>', 'class="action purge dropdown-item"', $return = true) . '</li>';-->
46        <!--//                    $data['items']['purge_js'] = '<li class="nav-item">' . tpl_link("/lib/exe/js.php?purge=true", '<span>Purge Js</span>', 'class="action purge dropdown-item"', $return = true) . '</li>';-->
47        <!--//                    $data['items']['export_xhtml'] = '<li class="nav-item">' . tpl_link(wl($ID, ['do' => "export_xhtml"]), '<span>Export Xhtml</span>', 'class="action purge dropdown-item"', $return = true) . '</li>';-->
48        <!--//-->
49        <!--//                    // the page tools can be amended through a custom plugin hook-->
50        <!--//                    $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);-->
51        <!--//                    if ($evt->advise_before()) {-->
52        <!--//                        foreach ($evt->data['items'] as $k => $html) echo $html;-->
53        <!--//                    }-->
54        <!--//                    $evt->advise_after();-->
55        <!--//                    unset($data);-->
56        <!--//                    unset($evt);-->
57        <!--//-->
58        <!--//                }-->
59        <!--//-->
60
61
62<!--    </nav>-->
63    <!-- Start a new line  -->
64    <div class="container">
65        <!-- ********** Breadcrumbs ********** -->
66        <?php
67
68        if ($conf['breadcrumbs']) {
69            tpl_breadcrumbs_bootstrap();
70        }
71
72        ?>
73    </div>
74</nav>
75
76