xref: /template/mikio/main.php (revision 2b4583abab306b8eb94c98b5ea77d885731fe2f3)
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();
11
12global $TEMPLATE;
13require_once('mikio.php');
14
15
16header('X-UA-Compatible: IE=edge,chrome=1');
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    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
23    <?php tpl_metaheaders() ?>
24    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
25    <?php tpl_includeFile('meta.html') ?>
26  </head>
27  <body class="mikio d-flex flex-column dokuwiki">
28    <!-- <div class="dokuwiki"> -->
29
30        <?php
31            tpl_includeFile('topheader.html');
32            if ($ACT == 'show') $TEMPLATE->includePage('topheader');
33        ?>
34
35
36        <!-- Navbar -->
37        <nav class="navbar <?php print $TEMPLATE->getConf('navbarClasses'); ?>">
38          <div id="mikio-site-title" class="mr-0 p-0">
39            <div class="row">
40              <?php
41                $logo     = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false);
42                $title    = $conf['title'];
43                $tagline  = (($conf['tagline']) ? '<span class="navbar-text mikio-navbar-tagline col-12 p-0">'. $conf['tagline'] .'</span>' : '');
44
45                if($logo != '' && $TEMPLATE->getConf('navbarHideImage') == false) {
46                    echo '<div class="col-2 mikio-navbar-image" style="background-image:url(\'' . $logo . '\')"></div><div class="col-10">';
47                } else {
48                    echo '<div class="col-12">';
49                }
50                echo '<a href="' . wl() . '" title="' . $title . '" class="navbar-brand col-12 p-0">' . $title . '</a>' . ($tagline != '' ? $tagline : '');
51                echo '</div>';
52              ?>
53            </div>
54          </div>
55          <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-toggle="collapse" data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
56          <!-- <div class="col-md-9"> -->
57            <?php $TEMPLATE->includeSearch('left'); ?>
58            <ul class="navbar-nav <?php print $TEMPLATE->getConf('navbarMenuClasses') . ' ' . $TEMPLATE->getConf('navbarMenuPosition') ?>">
59
60                <!-- Custom Menus -->
61                <?php $TEMPLATE->includeCustomMenu('navbar', false); ?>
62                <?php $TEMPLATE->includeMenu('navbar'); ?>
63
64            </ul>
65            <?php $TEMPLATE->includeSearch('right'); ?>
66          <!-- </div> -->
67        </nav>
68
69        <?php
70            tpl_includeFile('header.html');
71            if ($ACT == 'show') $TEMPLATE->includePage('header');
72        ?>
73
74        <!-- Breadcrumbs -->
75        <?php $TEMPLATE->includeBreadcrumbs('top'); ?>
76
77        <!-- Hero Title -->
78        <?php ob_start(); ?>
79        <?php $TEMPLATE->includeHero(); ?>
80
81        <div class="d-flex flex-grow-1">
82          <!-- Sidebar -->
83          <?php $TEMPLATE->includeSidebar('left'); ?>
84
85          <!-- Content -->
86          <main>
87            <?php
88                $TEMPLATE->includeBreadcrumbs('page');
89                $TEMPLATE->includeTOC('float');
90
91                tpl_includeFile('pageheader.html');
92                if ($ACT == 'show') $TEMPLATE->includePage('pageheader');
93
94                tpl_content(false);
95
96                tpl_includeFile('pagefooter.html');
97                if ($ACT == 'show') $TEMPLATE->includePage('pagefooter');
98            ?>
99          </main>
100
101          <!-- TOC -->
102          <?php $TEMPLATE->includeTOC('full'); ?>
103
104          <!-- Page Tools -->
105          <?php $TEMPLATE->includePageTools('side'); ?>
106
107        </div>
108
109        <?php
110            $content = ob_get_contents();
111            ob_end_clean();
112            print $TEMPLATE->parseContent($content);
113        ?>
114
115        <!-- Footer -->
116        <footer class="bg-dark text-white p-3">
117          <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
118          <?php
119            tpl_includeFile('footer.html');
120            if ($ACT == 'show') $TEMPLATE->includePage('footer');
121
122            $TEMPLATE->includeSearch('footer');
123            $TEMPLATE->includeCustomMenu('footer', true);
124
125            $TEMPLATE->includePageTools('footer');
126            tpl_license('button')
127            ?>
128        </footer>
129
130      </div>
131
132      <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
133    <!-- </div> -->
134  </body>
135</html>
136