1<?php
2/**
3 * Gerardnico Template since 2015
4 *
5 * @link     http://gerardnico.com/dokuwiki/template
6 * @author   Nicolas GERARD
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10//Library of template function
11require_once('tpl_template_NicoBoot.php');
12
13if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
14header('X-UA-Compatible: IE=edge,chrome=1');
15
16global $ID;
17global $lang;
18global $ACT;
19global $conf;
20
21$hasSidebar = page_findnearest($conf['sidebar']);
22$showSidebar = $hasSidebar && ($ACT == 'show');
23
24global $EVENT_HANDLER;
25$EVENT_HANDLER->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', null, 'tpl_bootie_meta_header');
26
27// There is no header in the Home page
28if ($ID == "start") {
29    $pageTitle = "Home";
30} else {
31    $pageTitle = tpl_pagetitle($ID, true);
32}
33?>
34
35<!DOCTYPE html>
36
37<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
38<head>
39
40    <?php tpl_metaheaders() ?>
41
42    <meta charset="utf-8"/>
43
44    <title><?php echo $pageTitle ?> [<?php echo strip_tags($conf['title']) ?>]</title>
45
46    <meta name="viewport" content="width=device-width,initial-scale=1"/>
47
48    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
49
50
51</head>
52<body role="document">
53
54
55<?php
56// The header (used also in detail.php)
57include('tpl_header.php')
58?>
59<!--
60  * tpl_classes will add the dokuwiki class. See https://www.dokuwiki.org/devel:templates#dokuwiki_class
61  * dokuwiki__top ID is needed for the "Back to top" utility
62  * used also by some plugins
63-->
64<!-- Relative positioning is important for the positioning of the pagetools -->
65<div class="container <?php echo tpl_classes() ?>" id="dokuwiki__top" style="position: relative">
66
67    <!-- TAGLINE (TODO put in on the head) -->
68    <!--    --><?php //if ($conf['tagline']): ?>
69    <!--        <p class="claim">--><?php //echo $conf['tagline']; ?><!--</p>-->
70    <!--    --><?php //endif ?>
71
72    <!-- The global message array -->
73    <?php html_msgarea() ?>
74
75    <!-- A trigger to show content on the top part of the website -->
76    <?php
77    $data = "";// Mandatory
78    trigger_event('TPL_PAGE_TOP_OUTPUT', $data);
79    ?>
80
81    <div class="row">
82
83        <!-- ********** The CONTENT layout ********** -->
84        <!-- ********** One or two columns ********** -->
85        <?php if ($showSidebar) {
86            echo '<div role="main" class="col-md-9">';
87        } else {
88            echo '<div role="main" class="col-md-12">';
89        }
90        ?>
91
92
93        <!-- BREADCRUMBS -->
94        <?php
95        if ($conf['youarehere']) {
96            tpl_youarehere_bootstrap();
97        }
98        ?>
99
100
101        <!-- The content: Show, Edit, .... -->
102        <?php tpl_flush() ?>
103
104
105        <!-- Add a p around the content to enable the reader view in Mozilla -->
106        <!-- https://github.com/mozilla/readability -->
107        <!-- But Firefox close the P because they must contain only inline element ???-->
108        <?php tpl_content($prependTOC = false) ?>
109
110        <?php tpl_pageinfo() ?>
111        <?php tpl_flush() ?>
112
113
114
115    </div>
116    <!-- /content -->
117
118    <!-- SIDE BAR -->
119    <?php if ($showSidebar): ?>
120        <nav role="complementary" class="col-md-3" style="padding-top: 15px;">
121            <!-- Below data-spy="affix" data-offset-top="230"-->
122            <nav class="bs-docs-sidebar hidden-prints">
123
124                <?php tpl_flush() ?>
125
126                <?php tpl_include_page($conf['sidebar'], 1, 1) ?>
127
128                <a class="back-to-top" href="#dokuwiki__top"> Back to top </a>
129
130            </nav>
131
132            <!-- A trigger to show content on the sidebar part of the website -->
133            <?php
134            $data = "";// Mandatory
135            trigger_event('TPL_SIDEBAR_BOTTOM_OUTPUT', $data);
136            ?>
137
138        </nav>
139    <?php endif; ?>
140
141</div>
142
143<!-- PAGE/USER/SITE ACTIONS -->
144<?php if (!empty($_SERVER['REMOTE_USER'])) { ?>
145    <div id="dokuwiki__pagetools" style="z-index: 1030;" class="d-none d-md-block">
146        <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
147        <div class="tools">
148            <ul>
149                <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
150                <?php echo (new \dokuwiki\Menu\UserMenu())->getListItems('action'); ?>
151                <?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action'); ?>
152                <?php // FYI: for all menu in mobile: echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
153            </ul>
154        </div>
155    </div>
156<?php } ?>
157
158<!-- /wrapper -->
159
160<!-- Footer (used also in details.php -->
161<?php include('tpl_footer.php') ?>
162
163
164<!-- The stylesheet (before indexer work and script at the end) -->
165<?php
166global $DOKU_TPL_BOOTIE_PRELOAD_CSS;
167
168foreach ($DOKU_TPL_BOOTIE_PRELOAD_CSS as $link){
169    $htmlLink = '<link rel="stylesheet" href="' . $link['href'] . '" ';
170    if ($link['crossorigin']!=""){
171        $htmlLink .= ' crossorigin="'.$link['crossorigin'].'" ';
172    }
173    // No integrity here
174    $htmlLink .= '>';
175    ptln($htmlLink);
176}
177?>
178
179<!-- Indexer -->
180<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
181
182
183<!-- A trigger to add resources at the end -->
184<?php
185$data = "";// Mandatory
186trigger_event('TPL_DOCUMENT_CLOSING', $data);
187tpl_flush();
188?>
189
190
191</html>
192