xref: /template/retro/main.php (revision 30d266233c7c50be2ba6f67a89222be93da7a61c)
1<?php
2/**
3 * DokuWiki Retro Template
4 *
5 * @link     http://dokuwiki.org/template:minimal
6 * @author   Reactive Matter <reactivematter@protonmail.com>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
11
12$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
13
14
15$theme = '';
16if(tpl_getConf('theme')!='Default')
17{
18    $theme = ' theme-'.strtolower(tpl_getConf('theme'));
19}
20
21$toc = tpl_getConf('inlineToc')?' itoc':'';
22$width = tpl_getConf('fullWidthSite')?' full-width':'';
23$tpl_retro_classes =  tpl_classes().$toc.$width.$theme;
24?>
25
26<!DOCTYPE html>
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
28  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
29<head>
30    <meta charset="UTF-8" />
31    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
32    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
33    <?php tpl_metaheaders() ?>
34    <meta name="viewport" content="width=device-width,initial-scale=1" />
35    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
36    <?php tpl_includeFile('meta.html') ?>
37</head>
38
39
40<body class="<?=$tpl_retro_classes?>">
41<navbar id="navbar" class="container" role="navigation" aria-label="Main navigation">
42        <div id='showhidesidemenu' class="mobile icon">
43            <div class="button"></div>
44        </div>
45        <div class="left-column">
46        <a class="site-name" href="<?=DOKU_BASE?>">
47        <div class="site-logo">
48            <img src="<?=tpl_getMediaFile(array(':wiki:logo.png', ':wiki:logo.svg', ':wiki:logo.jpeg',':wiki:logo.jpg',  ':logo.png', ':logo.svg', ':logo.jpeg',':logo.jpg', 'images/logo.png', ':wiki:dokuwiki.svg'), false)?>">
49        </div>
50        <div class="site-title">
51            <?=$conf['title']?>
52        </div>
53        </a>
54        <?php if($conf['tagline']):?>
55        <div class="site-tagline">
56            <?=$conf['tagline']?>
57        </div>
58        <?php endif;?>
59        </div>
60        <?php if(actionOK('search') ):?>
61        <div class="right-column">
62        <?php if($showTools):?>
63        <div class="search">
64            <?php tpl_searchform(true,false) ?>
65        </div>
66        <?php endif?>
67
68        </div>
69
70     <?php endif?>
71    </navbar>
72    <?php if(tpl_getConf('topToolBar') ):?>
73         <div class="top-toolbar plain-toolbar">
74           <?php if(strpos(tpl_getConf('topToolBar'), 'page') !== false)
75           {echo (new \dokuwiki\Menu\PageMenu())->getListItems();}
76            ?>
77            <?php if(strpos(tpl_getConf('topToolBar'), 'site') !== false)
78           {echo (new \dokuwiki\Menu\SiteMenu())->getListItems();}
79            ?>
80            <?php if(strpos(tpl_getConf('topToolBar'), 'user') !== false)
81           {echo (new \dokuwiki\Menu\UserMenu())->getListItems();}
82            ?>
83            <?php if($USERINFO) {
84                echo '<li>('.$USERINFO['name'].')</li>';
85            }?>
86        </div>
87    <?php endif; ?>
88
89    <?php if($conf['youarehere'] || $conf['breadcrumbs'] || (page_exists(":header") && auth_quickaclcheck(":header"))):?>
90    <div class="site-header">
91    <?php html_msgarea()  ?>
92    <!-- ********** Notice ********** -->
93    <?php
94        if(page_exists(":header") && auth_quickaclcheck(":header"))
95        {
96            echo '<div class="site-header-content">';
97            tpl_include_page(':header');
98            echo '</div>';
99        }
100    ?>
101
102    <?php if($conf['youarehere'] || $conf['breadcrumbs']):?>
103
104    <div class="site-navigation">
105        <!-- BREADCRUMBS -->
106        <?php if($conf['youarehere']){ ?>
107            <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
108        <?php } ?>
109        <?php if($conf['breadcrumbs']){ ?>
110            <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
111        <?php } ?>
112    </div>
113    <?php endif?>
114    </div>
115    <?php endif?>
116
117<div id="main">
118        <div id="#dokuwiki__top"></div>
119        <article id="content">
120            <?php tpl_flush();
121                if($conf['tocminheads']>0)
122                {
123
124                    tpl_toc();
125                }
126                tpl_content(false);
127                tpl_flush(); ?>
128        </article>
129        <?php if(tpl_getConf('showPageInfo') ):?>
130         <div class="page-info">
131                <?php tpl_pageinfo()?>
132        </div>
133        <?php endif; ?>
134        <!-- /footer -->
135     <div style="display: none;"><?php tpl_indexerWebBug()?></div>
136    </div>
137    <?php if(tpl_getConf('bottomToolBar') ):?>
138         <div class="bottom-toolbar plain-toolbar">
139         <?php if(strpos(tpl_getConf('bottomToolBar'), 'page') !== false)
140           {echo (new \dokuwiki\Menu\PageMenu())->getListItems();}
141            ?>
142            <?php if(strpos(tpl_getConf('bottomToolBar'), 'site') !== false)
143           {echo (new \dokuwiki\Menu\SiteMenu())->getListItems();}
144            ?>
145            <?php if(strpos(tpl_getConf('bottomToolBar'), 'user') !== false)
146           {echo (new \dokuwiki\Menu\UserMenu())->getListItems();}
147            ?>
148             <?php if($USERINFO) {
149                echo '<li>('.$USERINFO['name'].')</li>';
150            }?>
151        </div>
152    <?php endif; ?>
153        <?php
154    if(page_exists(":footer") && auth_quickaclcheck(":footer"))
155    {
156        echo '<footer id="footer">';
157        tpl_include_page(':footer');
158        echo '</footer>';
159    }
160    ?>
161</body>
162</html>
163