-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathmain.php
executable file
·213 lines (150 loc) · 7.38 KB
/
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?php
/**
* DokuWiki Bootstrap3 Template
*
* @link http://dokuwiki.org/template:bootstrap3
* @author Giuseppe Di Terlizzi <[email protected]>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
if (!defined('DOKU_INC')) die(); // must be run from within DokuWiki
require_once 'tpl/global.php';
require_once 'tpl/functions.php';
header('X-UA-Compatible: IE=edge,chrome=1');
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
<head>
<meta charset="UTF-8" />
<title><?php echo $TPL->getBrowserPageTitle() ?></title>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<?php
if ($TPL->getConf('themeByNamespace')) {
echo '<link href="' . tpl_basedir() . 'css.php?id='. $ID .'" rel="stylesheet" />';
}
echo tpl_favicon(['favicon', 'mobile']);
tpl_includeFile('meta.html');
tpl_metaheaders();
?>
<!--[if lt IE 9]>
<script type="text/javascript" src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script type="text/javascript" src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<?php tpl_flush() ?>
<body class="<?php echo $TPL->getClasses() ?>" data-page-id="<?php echo $ID ?>"><div class="dokuwiki"><?php /* CSS class for Plugins and user styles */ ?>
<header id="dokuwiki__header" class="dw-container dokuwiki container<?php echo ($TPL->getConf('fluidContainer')) ? '-fluid mx-5' : '' ?>">
<?php
tpl_includeFile('topheader.html');
// Top-Header DokuWiki page
if ($ACT == 'show') $TPL->includePage('topheader');
require_once('tpl/navbar.php');
tpl_includeFile('header.html');
// Header DokuWiki page
if ($ACT == 'show') $TPL->includePage('header');
?>
</header>
<a name="dokuwiki__top" id="dokuwiki__top"></a>
<main role="main" class="dw-container pb-5 dokuwiki container<?php echo ($TPL->getConf('fluidContainer')) ? '-fluid mx-5' : '' ?>">
<div id="dokuwiki__pageheader">
<?php tpl_includeFile('social.html') ?>
<?php require_once('tpl/breadcrumbs.php'); ?>
<p class="text-right">
<?php
if (($ACT == 'show') && $TPL->getConf('tagsOnTop') && $tag = $TPL->getPlugin('tag')) {
echo implode('', array_map('trim', explode(',', $tag->td($ID))));
}
if ($TPL->getConf('showPageId')) {
echo '<span class="pageId ml-1 label label-primary">'. hsc($ID) .'</span>';
}
?>
</p>
<div id="dw__msgarea" class="small">
<?php $TPL->getMessageArea() ?>
</div>
</div>
<div class="row">
<?php $TPL->includeSidebar('left'); // Left Sidebar ?>
<article id="dokuwiki__content" class="<?php echo $TPL->getContainerGrid() ?>" itemscope itemtype="http://schema.org/<?php echo $TPL->getConf('schemaOrgType'); ?>" itemref="dw__license">
<?php require_once('tpl/page-tools.php'); // Page Tools ?>
<div class="<?php echo ($TPL->getConf('pageOnPanel') ? 'panel panel-default px-3 py-2' : 'no-panel') ?>" itemprop="articleBody">
<div class="page <?php echo ($TPL->getConf('pageOnPanel') ? 'panel-body' : '') ?>">
<?php
// Page icons (print, email, share link, etc.)
require_once('tpl/page-icons.php');
// Page-Header DokuWiki page
tpl_includeFile('pageheader.html');
// Page-Header DokuWiki page
if ($ACT == 'show') $TPL->includePage('pageheader');
tpl_flush(); /* flush the output buffer */
// render the content into buffer for later use
ob_start();
tpl_content(false);
$content = ob_get_clean();
$toc = $TPL->getTOC(true);
$content_classes = [];
if ($TPL->getConf('tocCollapsed')) $content_classes[] = 'dw-toc-closed';
echo '<div class="dw-content-page '. implode(' ', $content_classes) .'">';
if ($toc) echo $toc;
echo '<!-- content -->';
echo '<div class="dw-content">';
echo $content;
echo '</div>';
echo '<!-- /content -->';
echo '</div>';
tpl_flush();
if (! $TPL->getConf('tagsOnTop') && $tag = $TPL->getPlugin('tag')) {
echo implode('', array_map('trim', explode(',', $tag->td($ID))));
}
// Page-Footer hook
tpl_includeFile('pagefooter.html');
// Page-Footer DokuWiki page
if ($ACT == 'show') $TPL->includePage('pagefooter');
?>
</div>
</div>
<div class="small text-right">
<?php if ($TPL->getConf('showPageInfo')): ?>
<span class="docInfo">
<?php $TPL->getPageInfo() /* 'Last modified' etc */ ?>
</span>
<?php endif ?>
<?php if ($TPL->getConf('showLoginOnFooter')): ?>
<span class="loginLink hidden-print">
<?php
if ($login_item = $TPL->getToolMenuItem('user', 'login')) {
echo '<a '. buildAttributes($login_item->getLinkAttributes()) .'>'. inlineSVG($login_item->getSvg()) . ' ' . hsc($login_item->getLabel()) .'</a>';
}
?>
</span>
<?php endif; ?>
</div>
</article>
<?php $TPL->includeSidebar('right'); // Right Sidebar ?>
</div>
</main>
<footer id="dw__footer" class="dw-container py-5 dokuwiki container<?php echo ($TPL->getConf('fluidContainer')) ? '-fluid' : '' ?>">
<?php
// Footer hook
tpl_includeFile('footer.html');
// Footer DokuWiki page
require_once('tpl/footer.php');
// Cookie-Law banner
require_once('tpl/cookielaw.php');
?>
</footer>
<a href="#dokuwiki__top" class="back-to-top hidden-print btn btn-default" title="<?php echo $lang['skip_to_content'] ?>" accesskey="t">
<?php echo iconify('mdi:chevron-up'); ?>
</a>
<div id="screen__mode"><?php /* helper to detect CSS media query in script.js */ ?>
<span class="visible-xs-block"></span>
<span class="visible-sm-block"></span>
<span class="visible-md-block"></span>
<span class="visible-lg-block"></span>
</div>
<?php
// Provide DokuWiki housekeeping, required in all templates
tpl_indexerWebBug();
?>
</div>
</body>
</html>