-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.php
109 lines (96 loc) · 4.51 KB
/
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/**
* DokuWiki Starter Template
*
* @link http://dokuwiki.org/template:starter
* @author Anika Henke <[email protected]>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
$_toc = tpl_toc(true);
$showToc = !empty($_toc) ? true : false;
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
$sidebarElement = tpl_getConf('sidebarIsNav') ? 'nav' : 'aside';
?><!DOCTYPE html>
<html class="has-background-light" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
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>
<?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
<?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
<body>
<div id="dokuwiki__top" class="<?php echo tpl_classes(); ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
<!-- NAVBAR -->
<nav class="navbar has-shadow is-link mb-4" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<!-- LOGO -->
<?php
$logo = tpl_getMediaFile(array('images/logo.svg'), true);
tpl_link(
wl(),
'<img src="'. $logo .'" alt="" />',
'class="navbar-item brand-text" accesskey="h" title="[H]"'
);
?>
<!-- TITLE -->
<div class="navbar-item brand-text">
<?php echo $conf['title']; ?>
</div><!-- /title -->
</div><!-- /navbar-brand -->
<div class="navbar-end">
<?php _tpl_tools_menu(); ?>
<?php _tpl_user_menu(); ?>
</div><!-- /navbar-end -->
</nav><!-- /navbar -->
<div class="container is-fluid">
<div class="columns">
<!-- SIDEBAR -->
<div id="bulma-sidebar" class="sidebar column is-2">
<?php if($showSidebar): ?>
<nav class="content is-small">
<?php tpl_include_page($conf['sidebar'], true, true) ?>
</nav>
<?php endif; ?>
</div><!-- /bulma-sidebar -->
<!-- CONTENT COLUMN -->
<div class="bulma-content column has-background-white is-8">
<!-- BREADCRUMBS -->
<?php
if($conf['breadcrumbs']) {
_tpl_breadcrumbs();
}
if($conf['youarehere']){ ?>
<div class="breadcrumbs"><?php tpl_youarehere() ?></div>
<?php } ?>
<!-- CONTENT -->
<div id="dokuwiki__content" class="content pl-4 pr-4">
<?php _tpl_content(false) ?>
</div><!-- /content -->
</div><!-- /content column -->
<div class="bulma-toc-pagetools column is-2">
<div class="bulma-search">
<?php _tpl_searchform() ?>
</div>
<?php if ($showToc) _tpl_toc(); ?>
<div id="bulma-pagetools" style="position: sticky; top: 0px">
<h3 class="has-text-grey-light is-size-7">Page tools</h3>
<?php _tpl_page_tools(); ?>
</div><!-- /bulma-pagetools -->
</div><!-- /bulma-toc -->
</div><!-- /columns -->
</div><!-- /container -->
</div><!-- /dokuwiki__top -->
<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
</div>
</body>
</html>