xref: /template/mikio/main.php (revision ab45ba7165dc08ce8ac280c60e4318ef9df9d00d)
1<?php
2/**
3 * DokuWiki Mikio Template
4 *
5 * @link     http://dokuwiki.org/template:mikio
6 * @author   James Collins <james.collins@outlook.com.au>
7 * @license  MIT License (https://raw.githubusercontent.com/nomadjimbob/Mikio/master/LICENSE)
8 */
9
10if (!defined('DOKU_INC')) die();
11require_once('mikio.php');
12
13global $TEMPLATE, $ACT, $conf;
14
15header('X-UA-Compatible: IE=edge,chrome=1');
16?>
17<!doctype html>
18<html lang="<?php echo $conf['lang'] ?>">
19<head>
20    <meta charset="utf-8">
21    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
22    <?php echo '<title>' . $TEMPLATE->includePageTitle('', FALSE) . '</title>' ?>
23    <?php tpl_metaheaders() ?>
24    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
25    <?php tpl_includeFile('meta.html') ?>
26</head>
27
28<body class="mikio dokuwiki mikio-act-<?php echo $ACT ?>">
29    <?php
30        $content = tpl_includeFile('topheader.html');
31        if($content != '') $content = $TEMPLATE->includePage('topheader');
32        if($content != '') echo '<div class="mikio-header-top">' . $content . '</div>';
33
34        // TODO is this still needed?
35        //if ($ACT == 'show')
36        //$TEMPLATE->includePage('topheader');
37    ?>
38
39    <?php $TEMPLATE->includeNavbar(); ?>
40
41    <?php
42    tpl_includeFile('header.html');
43    if ($ACT == 'show') $TEMPLATE->includePage('header');
44    ?>
45
46    <a name="dokuwiki__top" id="dokuwiki__top"></a>
47
48    <!-- Breadcrumbs -->
49    <?php if ($ACT == 'show' && $TEMPLATE->getConf('breadcrumbPos') == 'top' || $ACT == 'admin') $TEMPLATE->includeBreadcrumbs(); ?>
50
51    <!-- Hero Title -->
52    <?php $TEMPLATE->includeHero(); ?>
53
54    <main class="mikio-page">
55        <?php if ($ACT == 'show') $TEMPLATE->includeSidebar() ?>
56
57        <div class="mikio-content">
58        <?php
59            if ($ACT == 'show' && $TEMPLATE->getConf('breadcrumbPos') == 'page') $TEMPLATE->includeBreadcrumbs();
60
61            tpl_includeFile('pageheader.html');
62            if ($ACT == 'show') $TEMPLATE->includePage('pageheader');
63
64            echo '<article class="mikio-article">';
65            $TEMPLATE->includeTOC();
66            $TEMPLATE->includeContent(TRUE);
67            echo '</article>';
68
69            tpl_includeFile('pagefooter.html');
70            if ($ACT == 'show') $TEMPLATE->includePage('pagefooter');
71            ?>
72        </div>
73        <?php
74            global $USERINFO;
75
76            if ($ACT == 'show' && !$TEMPLATE->getConf('pageToolsHide') && (!$TEMPLATE->getConf('pageToolsHideNoEdit') || $TEMPLATE->userCanEdit()) && (!$TEMPLATE->getConf('pageToolsHideGuest') || ($USERINFO))) {
77                $TEMPLATE->includePageTools(TRUE, TRUE);
78            }
79        ?>
80        </div>
81
82        <?php if ($ACT == 'show') $TEMPLATE->includeSidebar('right') ?>
83    </main>
84
85    <div class="mikio-page-fill"></div>
86
87    <!-- Footer -->
88    <?php $TEMPLATE->includeFooter(); ?>
89
90    </div>
91
92    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
93</body>
94</html>