xref: /template/sprintdoc/main.php (revision 8bbec98f221faf28e1dd413a8f65977986cc1756)
1<?php
2
3/**
4 * DokuWiki sprintDoc Template
5 *
6 * @link     FIXME
7 * @author   Jana Deutschlaender <deutschlaender@cosmocode.de>
8 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
9 */
10
11use dokuwiki\template\sprintdoc\Template;
12Template::getInstance();
13
14if (!defined('DOKU_INC')) die();                        /* must be run from within DokuWiki */
15header('X-UA-Compatible: IE=edge,chrome=1');
16
17global $JSINFO;
18if (empty($JSINFO['template'])) {
19    $JSINFO['template'] = array();
20}
21$JSINFO['template']['sprintdoc'] = array('sidebar_toggle_elements' => tpl_getConf('sidebar_sections'));
22
23$showTools = true;
24$showSidebar =  true;
25?>
26<!DOCTYPE html>
27<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
28<head>
29<?php
30/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
31/* meta and link relations */
32/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
33?>
34<meta charset="utf-8" />
35<meta name="viewport" content="width=device-width, initial-scale=1.0" />
36<?php tpl_metaheaders() ?>
37<?php
38
39
40/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
41/* page title */
42/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
43?>
44<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
45
46<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
47
48<?php
49
50
51/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
52/* favicons */
53/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
54?>
55<?php
56    include('tpl/favicon_tiles.php');
57?>
58<?php
59
60
61/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
62/* Include Hook: meta.html */
63/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
64?>
65<?php tpl_includeFile('meta.html') ?>
66</head>
67<?php
68
69
70/* #dokuwiki__top used as anchor for "back to top" button/link links */
71$classWideContent = ($ACT === "show") ? "": "wide-content ";
72?>
73<body id="dokuwiki__top" class="<?php echo ($ACT) ? 'do-'.$ACT : 'do-none'; ?> <?php echo $classWideContent; ?><?php echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo tpl_getConf('header_layout'); ?>">
74
75<div id="dokuwiki__site" class="<?php echo tpl_classes(); ?>">
76    <?php
77
78
79/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
80/* template Include: tpl/nav-direct */
81/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
82    ?>
83    <?php include('tpl/nav-direct.php') ?>
84
85
86    <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
87        <?php
88/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
89/* Include Hook: header.html */
90/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
91            tpl_includeFile('header.html');
92
93/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
94/* User Tools and MagicMatcher Bar */
95/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
96
97            /** @var \helper_plugin_magicmatcher_context $mm */
98            $mm = plugin_load('helper', 'magicmatcher_context');
99            $headerClass = ""; /* for additionial class in #dokuwiki__header */
100            $navClass = "";    /* for additionial class in #dokuwiki__usertools (header.html) */
101
102            if($mm){
103                $matcher = $mm->getIssueContextBar();
104                if($matcher !== ""){
105                    $headerClass = "has-magicmatcher";
106                    $navClass = "has-bar";
107                }
108            }
109        ?>
110
111        <div id="dokuwiki__header" class="header <?php echo $headerClass; ?> no-print">
112            <div class="container">
113                <div class="row">
114                    <div class="col-xs-12">
115                        <div class="claim main-sidebar">
116                            <div class="menu-togglelink mobile-only">
117                                <a href="#">
118                                    <span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle'); ?></span>
119                                </a>
120                            </div>
121
122                            <?php
123
124
125/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
126/* Logo */
127/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
128/* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
129                                include('tpl/main-sidebar-logo.php');
130                            ?>
131                            <div class="main-title">
132                                <?php if ($conf['title']):
133
134
135/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
136/* Wiki Title Mobile */
137/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
138                                    <p class="title mobile-only"><?php echo $conf['title'] ?></p>
139                                <?php endif ?>
140                            </div><!-- .main-title -->
141
142                            <div class="menu-tool-select">
143                                <h5 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_tool-select') ?></h5>
144                                <?php
145                                if (file_exists(DOKU_INC . 'inc/Menu/MobileMenu.php')) {
146                                    echo (new \dokuwiki\Menu\MobileMenu())->getDropdown();
147                                } else {
148                                    //Pre-Greebo Backwards compatibility
149                                    tpl_actiondropdown($lang['tools'], "test");
150                                }
151                                ?>
152                            </div><!-- .menu-tool-select -->
153                        </div><!-- .headings -->
154                    </div><!-- .col -->
155
156
157                    <div class="col-xs-12">
158                        <div class="main-title desktop-only">
159                            <?php if ($conf['title']):
160
161
162/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
163/* Wiki Title Desktop */
164/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
165                                <p class="title"><?php echo $conf['title'] ?></p>
166                            <?php endif ?>
167                            <?php if ($conf['tagline']):
168
169
170/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
171/* Wiki Tagline Desktop */
172/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
173                                <p class="claim"><?php echo $conf['tagline'] ?></p>
174                            <?php endif ?>
175                        </div><!-- .main-title -->
176                    </div><!-- .col -->
177
178                </div><!-- .row -->
179            </div><!-- .container -->
180        </div><!-- .header -->
181        <?php
182
183
184/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
185/* headline menu area (Accessibility ) */
186/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
187        ?>
188
189        <div class="sr-only nav-area-head">
190            <h5 class="sr-only" role="heading" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
191        </div><!-- .nav-area-head -->
192
193        <div class="tools">
194            <div class="container">
195                <div class="row">
196                    <div class="col-xs-12">
197                        <div class="search main-sidebar">
198                            <?php
199
200
201/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
202/* search form */
203/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
204                                include('tpl/main-sidebar-search.php');
205                            ?>
206                        </div><!-- .search -->
207
208                        <div class="sidebarheader main-sidebar">
209                            <?php
210
211
212/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
213/* Include Hook: sidebarheader.html */
214/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
215                                tpl_includeFile('sidebarheader.html')
216                            ?>
217                        </div><!-- .sidebarheader -->
218
219                        <div id="dokuwiki__aside">
220
221                            <?php
222                            echo Template::getInstance()->getInclude(
223                                'sidebarheader',
224                                '<div class="sidebarheader">',
225                                '<div class="clearer"></div></div>'
226                            );
227                            ?>
228
229                            <?php
230
231
232/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
233/* sidebar */
234/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
235                                include('tpl/main-sidebar-nav.php');
236                            ?>
237
238                            <?php
239                            echo Template::getInstance()->getInclude(
240                                'sidebarfooter',
241                                '<div class="sidebarfooter">',
242                                '<div class="clearer"></div></div>'
243                            );
244                            ?>
245                        </div><!-- .aside -->
246
247                    </div><!-- .col -->
248                </div><!-- .row -->
249            </div><!-- .container -->
250        </div><!-- .tools -->
251
252
253        <div class="top-header">
254            <div class="container">
255                <div class="row">
256                    <div class="col-xs-12">
257
258                        <?php
259
260
261/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
262/* User Tools and MagicMatcher Bar */
263/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
264                            include('tpl/nav-usertools-buttons.php');
265                            if($mm && $matcher !== ""){
266                                include('tpl/nav-magicmatcher.php');
267                            }
268                        ?>
269
270                    </div><!-- .col -->
271                </div><!-- .row -->
272            </div><!-- .container -->
273        </div><!-- /top-header -->
274
275
276        <div class="content">
277            <div class="container">
278                <div class="row">
279                    <div class="col-xs-12">
280
281                        <?php tpl_flush(); /* flush the output buffer */
282
283
284/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
285/* Include Hook: pageheader.html */
286/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
287                            tpl_includeFile('pageheader.html')
288                        ?>
289
290                        <?php
291                         ?>
292
293                        <div class="breadcrumbs" data-do="<?php echo $ACT?>">
294
295                            <div class="togglelink page_main-content">
296                                <a id="spr__toggle-content" href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
297                            </div>
298
299                            <h6 class="sr-only" role="heading" aria-level="2"><?php echo  tpl_getLang('head_menu_status')  ?></h6>
300
301                            <?php
302
303/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
304/* page quality / page tasks */
305/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
306                                include('tpl/nav-page-attributes.php');
307                            ?>
308
309                            <?php
310/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
311/* breadcrumb */
312/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
313                                include('tpl/nav-breadcrumb.php');
314                            ?>
315
316                            <h6 class="sr-only" role="heading" aria-level="2"><?php echo  $lang['page_tools']  ?></h6>
317
318                            <?php
319
320
321/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
322/* page tools */
323/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
324                                include('tpl/nav-page-tools.php');
325                            ?>
326
327                        </div>
328
329                        <div id="dokuwiki__content" class="page main-content">
330                            <div id="spr__meta-box">
331                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  tpl_getLang('head_meta_box')  ?></h6>
332
333                                <?php
334
335
336/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
337/* meta box */
338/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
339                                include('tpl/nav-meta-box.php'); ?>
340                            </div>
341
342                            <div class="qc-output"></div>
343                            <?php
344                            /** @var action_plugin_highlightparent $highlightParent */
345                            $highlightParent = plugin_load('action', 'highlightparent');
346                            if ($highlightParent) {
347                                echo $highlightParent->tpl();
348                            }
349                            ?>
350                            <div class="page-content">
351                                <div class="msg-area"><?php html_msgarea();/*msg('Information.', 0);msg('Success', 1);msg('Notification', 2);msg('Fehler', -1);*/ ?></div>
352                                <div class="clearer"></div>
353                            </div>
354                            <?php
355
356
357/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
358/* wikipage start / main  content */
359/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
360                                tpl_content(false); /* the main content */
361                            ?>
362                            <div class="clearer"></div>
363                            <?php
364                            if($ACT == 'show') echo Template::getInstance()->getInclude(
365                                'footer',
366                                '<div class="wikipagefooter"><hr>',
367                                '<div class="clearer"></div></div>'
368                            );
369                            ?>
370                        </div><!-- .main-content -->
371
372
373                        <div class="page-footer">
374                            <?php
375
376
377/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
378/* Include Hook: pagefooter */
379/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
380                                tpl_includeFile('pagefooter.html');
381
382
383/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
384/* 'Last modified' etc */
385/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
386                                tpl_pageinfo()
387                            ?>
388                        </div>
389
390                    </div><!-- .col -->
391                </div><!-- .row -->
392            </div><!-- .container -->
393
394
395            <?php
396                tpl_flush()
397            ?>
398        </div><!-- /content -->
399
400
401        <div class="clearer"></div>
402
403    </div><!-- /wrapper -->
404
405
406
407<!-- ********** FOOTER ********** -->
408
409    <div id="dokuwiki__footer">
410        <div class="container">
411            <div class="row">
412                <div class="col-xs-12">
413
414                    <div class="main-footer">
415                        <p>
416                            <?php
417
418
419/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
420/* copyright */
421/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
422                            tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
423                            ?>
424                        </p>
425                    </div>
426
427                </div>
428            </div>
429        </div>
430    </div><!-- /footer -->
431
432
433    <?php tpl_includeFile('footer.html') ?>
434</div><!-- .dokuwiki__site -->
435
436<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
437
438</body>
439</html>
440