1<?php
2/**
3 * DokuWiki Mikio Template Main
4 *
5 * @link    http://dokuwiki.org/template:mikio
6 * @author  James Collins <james.collins@outlook.com.au>
7 * @license GPLv2 (http://www.gnu.org/licenses/gpl-2.0.html)
8 */
9
10if (!defined('DOKU_INC')) die();
11require_once('mikio.php');
12
13global $TEMPLATE, $ACT, $conf, $USERINFO;
14
15header('X-UA-Compatible: IE=edge,chrome=1');
16
17$hasSidebar = $TEMPLATE->sidebarExists();
18$showSidebar = $hasSidebar && ($ACT=='show');
19
20?>
21<!doctype html>
22<html lang="<?php echo $conf['lang'] ?>">
23<head>
24    <meta charset="utf-8">
25    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
26    <?php
27        echo '<title>' . $TEMPLATE->getPageTitle() . '</title>';
28        tpl_metaheaders();
29        echo tpl_favicon(array('favicon', 'mobile'));
30        tpl_includeFile('meta.html');
31    ?>
32</head>
33
34<body class="mikio dokuwiki">
35<div id="dokuwiki__site">
36<?php
37    echo '<div id="dokuwiki__top" class="site ' . tpl_classes() . (($showSidebar) ? ' showSidebar' : '') . (($hasSidebar) ? ' hasSidebar' : '') . '">';
38    $TEMPLATE->includePage('topheader', TRUE, TRUE, 'mikio-page-topheader' . (($TEMPLATE->getConf('stickyTopHeader')) ? ' mikio-sticky' : ''));
39    $TEMPLATE->includeNavbar(TRUE, $TEMPLATE->getConf('navbarShowSub', FALSE) && $ACT == 'show');
40    if($ACT == 'show' || $ACT == 'admin') $TEMPLATE->includePage('header', TRUE, TRUE, 'mikio-page-header' . (($TEMPLATE->getConf('stickyHeader')) ? ' mikio-sticky' : ''));
41
42    echo '<a name="dokuwiki__top" id="dokuwiki__top"></a>';
43
44    if(($ACT == 'show' && $TEMPLATE->getConf('youareherePosition') == 'top') || ($ACT == 'show' && $TEMPLATE->getConf('youareherePosition') == 'hero' && $TEMPLATE->getConf('heroTitle') == FALSE) || ($ACT != 'show')) $TEMPLATE->includeYouAreHere();
45    if(($ACT == 'show' && $TEMPLATE->getConf('breadcrumbPosition') == 'top') || ($ACT == 'show' && $TEMPLATE->getConf('breadcrumbPosition') == 'hero' && $TEMPLATE->getConf('heroTitle') == FALSE)) $TEMPLATE->includeBreadcrumbs();
46    if($ACT == 'show' && $TEMPLATE->getConf('heroTitle')) $TEMPLATE->includeHero();
47
48    echo '<main class="mikio-page">';
49    echo '<div class="mikio-container">';
50        if($showSidebar) $TEMPLATE->includeSidebar();
51        echo '<div class="mikio-content" id="dokuwiki__content">';
52            if($ACT == 'show' && $TEMPLATE->getConf('youareherePosition') == 'page') $TEMPLATE->includeYouAreHere();
53            if($ACT == 'show' && $TEMPLATE->getConf('breadcrumbPosition') == 'page') $TEMPLATE->includeBreadcrumbs();
54
55            $TEMPLATE->showMessages();
56
57            echo '<article class="mikio-article' . ($TEMPLATE->getConf('tocFull') ? ' toc-full' : '') . '">';
58                $TEMPLATE->includeTOC();
59                if($ACT == 'show') $TEMPLATE->includePage('contentheader', TRUE, TRUE, 'mikio-page-contentheader');
60                $TEMPLATE->includeContent();
61                if($ACT == 'show') $TEMPLATE->includePage('contentfooter', TRUE, TRUE, 'mikio-page-contentfooter');
62            echo '</article>';
63        echo '</div>';
64
65
66        $showPageTools = $TEMPLATE->getConf('pageToolsFloating');
67        if ($ACT == 'show' && ($showPageTools == 'always' || $TEMPLATE->userCanEdit() && $showPageTools == 'page editors')) $TEMPLATE->includePageTools(TRUE, TRUE);
68
69        $rightsidebar = '';
70        if($showSidebar) $rightsidebar = $TEMPLATE->includeSidebar('right');
71    echo '</div>';
72    echo '</main>';
73    echo '<div class="mikio-page-fill">';
74        echo '<div class="mikio-content" style="padding:0">';
75        if($TEMPLATE->getConf('footerInPage') == TRUE && $ACT=='show') $TEMPLATE->includeFooter();
76        echo '</div>';
77        if($rightsidebar != '') echo '<aside class="mikio-sidebar mikio-sidebar-right"></aside>';
78    echo '</div>';
79
80    if($TEMPLATE->getConf('footerInPage') == FALSE && $ACT=='show') $TEMPLATE->includeFooter();
81    $TEMPLATE->includePage('bottomfooter', TRUE, TRUE, 'mikio-page-bottomfooter');
82?>
83    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
84</div></div>
85<?php $TEMPLATE->includeFooterMeta(); ?>
86</body>
87<?php $TEMPLATE->finalize(); ?>
88</html>
89