2021-07-12 18:26:55 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* DokuWiki Default Template 2012
|
|
|
|
*
|
|
|
|
* @author Ruediger Marwein <henryxiv@hotmail.com>
|
|
|
|
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (!defined('DOKU_INC')) die();
|
|
|
|
|
|
|
|
$hasSidebar = page_findnearest($conf['sidebar']);
|
|
|
|
$showSidebar = $hasSidebar && ($ACT=='show');
|
|
|
|
|
2021-07-25 15:16:15 +02:00
|
|
|
ob_start();
|
|
|
|
tpl_content(false);
|
|
|
|
$content = ob_get_clean();
|
|
|
|
|
|
|
|
$wrapperClass = "act-".$ACT;
|
|
|
|
if(in_array($ACT, array('edit', 'preview', 'source'))) {
|
|
|
|
$wrapperClass = "act-edit";
|
|
|
|
}
|
|
|
|
if($ACT == "preview") {
|
|
|
|
$expectedH1Exists = preg_match("/(<h1 .*?id=\"preview\")/", $content, $h1Pattern);
|
|
|
|
if($expectedH1Exists) {
|
|
|
|
// in preview there's a h1 right before content
|
|
|
|
$editForm = substr($content, 0, strpos($content, $h1Pattern[1]));
|
|
|
|
$content = substr($content, strlen($editForm));
|
|
|
|
$wrapperClass = "act-edit";
|
|
|
|
}
|
|
|
|
} elseif($ACT == 'edit' or $ACT == "source") {
|
|
|
|
$editForm = $content;
|
|
|
|
$content = '';
|
|
|
|
}
|
|
|
|
$loggedIn = $INPUT->server->str('REMOTE_USER');
|
|
|
|
|
2021-07-12 18:26:55 +02:00
|
|
|
?><!DOCTYPE html>
|
|
|
|
<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
|
|
|
|
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
|
|
|
|
<?php tpl_metaheaders() ?>
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
|
|
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
|
|
|
|
<?php tpl_includeFile('meta.html') ?>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2021-07-25 15:16:15 +02:00
|
|
|
|
2021-07-12 18:26:55 +02:00
|
|
|
<div id="wrapper">
|
|
|
|
<div class="overlay"></div>
|
|
|
|
<div id="dokuwiki__site">
|
2021-07-25 15:16:15 +02:00
|
|
|
<div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php echo $wrapperClass ?>">
|
|
|
|
<?php if(in_array($ACT, ['edit', 'preview', 'source'])): ?>
|
2021-07-12 18:26:55 +02:00
|
|
|
<div class="container">
|
2021-07-25 15:16:15 +02:00
|
|
|
<?php echo $editForm ?>
|
2021-07-12 18:26:55 +02:00
|
|
|
</div>
|
2021-07-25 15:16:15 +02:00
|
|
|
<?php endif ?>
|
2021-07-26 08:14:41 +02:00
|
|
|
<?php if(in_array($ACT, ['login', 'profile', 'revisions', 'admin', 'diff', 'draft', 'resendpwd', 'register', 'subscribe', 'index', 'backink', 'source'])): ?>
|
2021-07-25 15:16:15 +02:00
|
|
|
<div class="container">
|
|
|
|
<?php tpl_link(wl($ID), "Back", 'class="btn btn-default"'); ?>
|
|
|
|
<?php echo $content ?>
|
|
|
|
</div>
|
|
|
|
<?php elseif(in_array($ACT, ['media'])): ?>
|
|
|
|
<div class="container-fluid">
|
|
|
|
<?php tpl_link(wl($ID), "Back", 'class="btn btn-default"'); ?>
|
|
|
|
<?php echo $content ?>
|
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
<article>
|
|
|
|
<?php echo $content ?>
|
|
|
|
</article>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2021-07-26 08:14:41 +02:00
|
|
|
<?php if(in_array($ACT, ['show', 'profile', 'admin', 'revisions', 'diff', 'draft', 'resendpwd'])): ?>
|
2021-07-25 15:16:15 +02:00
|
|
|
<aside id="dokuwiki__pagetools">
|
|
|
|
<div class="container">
|
|
|
|
<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
|
|
|
|
<div class="tools">
|
|
|
|
<ul class="list-group">
|
2021-07-26 08:14:41 +02:00
|
|
|
<?php if(in_array($ACT, ['show', 'revisions'])): ?>
|
|
|
|
<?php echo (new \dokuwiki\Menu\PageMenu())->getListItems("action-page list-group-item "); ?>
|
|
|
|
<?php endif ?>
|
2021-07-25 15:16:15 +02:00
|
|
|
<?php if($loggedIn): ?>
|
|
|
|
<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems("action-site list-group-item "); ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php echo (new \dokuwiki\Menu\UserMenu())->getListItems('action-user list-group-item '); ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</aside>
|
|
|
|
<?php endif ?>
|
2021-07-12 18:26:55 +02:00
|
|
|
<footer class="text-center">
|
|
|
|
<?php tpl_include_page("footer", true, true) ?>
|
|
|
|
</footer>
|
|
|
|
<?php tpl_flush() ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="no"><?php tpl_indexerWebBug() ?></div>
|
|
|
|
<div id="screen__mode" class="no"></div>
|
|
|
|
</div>
|
2021-07-25 15:16:15 +02:00
|
|
|
<?php if(in_array($ACT, ['show'])): ?>
|
|
|
|
<nav class="navbar navbar-inverse navbar-fixed-top sidebar-offcanvas" id="sidebar-wrapper" role="navigation">
|
|
|
|
<?php tpl_include_page("sidebar", true, true) ?>
|
|
|
|
</nav>
|
|
|
|
<button type="button" class="hamburger is-closed" data-toggle="offcanvas">
|
|
|
|
<i class="hamburger-icon dw-icons fa-fw fa fa-bars" style=""></i>
|
|
|
|
</button>
|
|
|
|
<?php endif ?>
|
2021-07-12 18:26:55 +02:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|