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