xref: /template/ancient/main.php (revision 5046b4362243e89db3bfe0433ec1d5d5a76270b9)
1*5046b436Sluqi114<?php
2*5046b436Sluqi114/**
3*5046b436Sluqi114 * DokuWiki Starter Template
4*5046b436Sluqi114 *
5*5046b436Sluqi114 * @link     http://dokuwiki.org/template:starter
6*5046b436Sluqi114 * @author   Anika Henke <anika@selfthinker.org>
7*5046b436Sluqi114 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8*5046b436Sluqi114 */
9*5046b436Sluqi114
10*5046b436Sluqi114if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
11*5046b436Sluqi114@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
12*5046b436Sluqi114header('X-UA-Compatible: IE=edge,chrome=1');
13*5046b436Sluqi114
14*5046b436Sluqi114$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
15*5046b436Sluqi114$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
16*5046b436Sluqi114?><!DOCTYPE html>
17*5046b436Sluqi114<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
18*5046b436Sluqi114  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
19*5046b436Sluqi114<head>
20*5046b436Sluqi114    <meta charset="UTF-8" />
21*5046b436Sluqi114    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
22*5046b436Sluqi114    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
23*5046b436Sluqi114    <?php tpl_metaheaders() ?>
24*5046b436Sluqi114    <meta name="viewport" content="width=device-width,initial-scale=1" />
25*5046b436Sluqi114    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
26*5046b436Sluqi114    <?php tpl_includeFile('meta.html') ?>
27*5046b436Sluqi114</head>
28*5046b436Sluqi114
29*5046b436Sluqi114<body>
30*5046b436Sluqi114    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
31*5046b436Sluqi114             precede CSS rules by #IE8 for IE8 (div closes at the bottom) */ ?>
32*5046b436Sluqi114    <!--[if lte IE 8 ]><div id="IE8"><![endif]-->
33*5046b436Sluqi114
34*5046b436Sluqi114    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
35*5046b436Sluqi114    <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
36*5046b436Sluqi114             should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
37*5046b436Sluqi114    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
38*5046b436Sluqi114        echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
39*5046b436Sluqi114        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
40*5046b436Sluqi114        <?php tpl_includeFile('header.html') ?>
41*5046b436Sluqi114
42*5046b436Sluqi114        <!-- ********** HEADER ********** -->
43*5046b436Sluqi114        <div id="dokuwiki__header"><div class="pad">
44*5046b436Sluqi114
45*5046b436Sluqi114            <div class="headings">
46*5046b436Sluqi114                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
47*5046b436Sluqi114                <?php /* how to insert logo instead (if no CSS image replacement technique is used):
48*5046b436Sluqi114                        upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' accordingly:
49*5046b436Sluqi114                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"') */ ?>
50*5046b436Sluqi114                <?php if ($conf['tagline']): ?>
51*5046b436Sluqi114                    <p class="claim"><?php echo $conf['tagline'] ?></p>
52*5046b436Sluqi114                <?php endif ?>
53*5046b436Sluqi114
54*5046b436Sluqi114                <ul class="a11y skip">
55*5046b436Sluqi114                    <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
56*5046b436Sluqi114                </ul>
57*5046b436Sluqi114                <div class="clearer"></div>
58*5046b436Sluqi114            </div>
59*5046b436Sluqi114
60*5046b436Sluqi114            <div class="tools">
61*5046b436Sluqi114                <!-- USER TOOLS -->
62*5046b436Sluqi114                <?php if ($conf['useacl'] && $showTools): ?>
63*5046b436Sluqi114                    <div id="dokuwiki__usertools">
64*5046b436Sluqi114                        <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
65*5046b436Sluqi114                        <ul>
66*5046b436Sluqi114                            <?php
67*5046b436Sluqi114                                if (!empty($_SERVER['REMOTE_USER'])) {
68*5046b436Sluqi114                                    echo '<li class="user">';
69*5046b436Sluqi114                                    tpl_userinfo(); /* 'Logged in as ...' */
70*5046b436Sluqi114                                    echo '</li>';
71*5046b436Sluqi114                                }
72*5046b436Sluqi114                            ?>
73*5046b436Sluqi114                            <?php
74*5046b436Sluqi114                            echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ', false);
75*5046b436Sluqi114                            ?>
76*5046b436Sluqi114                        </ul>
77*5046b436Sluqi114                    </div>
78*5046b436Sluqi114                <?php endif ?>
79*5046b436Sluqi114
80*5046b436Sluqi114                <!-- SITE TOOLS -->
81*5046b436Sluqi114                <div id="dokuwiki__sitetools">
82*5046b436Sluqi114                    <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3>
83*5046b436Sluqi114                    <?php tpl_searchform() ?>
84*5046b436Sluqi114                    <div class="mobileTools">
85*5046b436Sluqi114                        <?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
86*5046b436Sluqi114                    </div>
87*5046b436Sluqi114                    <ul>
88*5046b436Sluqi114                        <?php //echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
89*5046b436Sluqi114                    </ul>
90*5046b436Sluqi114                </div>
91*5046b436Sluqi114
92*5046b436Sluqi114            </div>
93*5046b436Sluqi114            <div class="clearer"></div>
94*5046b436Sluqi114
95*5046b436Sluqi114            <!-- BREADCRUMBS -->
96*5046b436Sluqi114            <?php if($conf['breadcrumbs']){ ?>
97*5046b436Sluqi114                <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
98*5046b436Sluqi114            <?php } ?>
99*5046b436Sluqi114            <?php if($conf['youarehere']){ ?>
100*5046b436Sluqi114                <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
101*5046b436Sluqi114            <?php } ?>
102*5046b436Sluqi114
103*5046b436Sluqi114            <div class="clearer"></div>
104*5046b436Sluqi114            <hr class="a11y" />
105*5046b436Sluqi114        </div></div><!-- /header -->
106*5046b436Sluqi114
107*5046b436Sluqi114
108*5046b436Sluqi114        <div class="wrapper">
109*5046b436Sluqi114
110*5046b436Sluqi114            <!-- ********** ASIDE ********** -->
111*5046b436Sluqi114            <?php if ($showSidebar): ?>
112*5046b436Sluqi114                <div id="dokuwiki__aside"><div class="pad aside include group">
113*5046b436Sluqi114                    <?php tpl_includeFile('sidebarheader.html') ?>
114*5046b436Sluqi114                    <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
115*5046b436Sluqi114                    <?php tpl_includeFile('sidebarfooter.html') ?>
116*5046b436Sluqi114                    <div class="clearer"></div>
117*5046b436Sluqi114                </div></div><!-- /aside -->
118*5046b436Sluqi114            <?php endif; ?>
119*5046b436Sluqi114
120*5046b436Sluqi114            <!-- ********** CONTENT ********** -->
121*5046b436Sluqi114            <div id="dokuwiki__content"><div class="pad">
122*5046b436Sluqi114                <?php tpl_flush() /* flush the output buffer */ ?>
123*5046b436Sluqi114                <?php tpl_includeFile('pageheader.html') ?>
124*5046b436Sluqi114
125*5046b436Sluqi114                <div class="page">
126*5046b436Sluqi114                    <!-- wikipage start -->
127*5046b436Sluqi114                    <?php tpl_content() /* the main content */ ?>
128*5046b436Sluqi114                    <!-- wikipage stop -->
129*5046b436Sluqi114                    <div class="clearer"></div>
130*5046b436Sluqi114                </div>
131*5046b436Sluqi114
132*5046b436Sluqi114                <?php tpl_flush() ?>
133*5046b436Sluqi114                <?php tpl_includeFile('pagefooter.html') ?>
134*5046b436Sluqi114            </div></div><!-- /content -->
135*5046b436Sluqi114
136*5046b436Sluqi114            <div class="clearer"></div>
137*5046b436Sluqi114            <hr class="a11y" />
138*5046b436Sluqi114
139*5046b436Sluqi114            <!-- PAGE ACTIONS -->
140*5046b436Sluqi114            <div id="dokuwiki__pagetools">
141*5046b436Sluqi114                <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
142*5046b436Sluqi114                <div class="tools">
143*5046b436Sluqi114                    <ul>
144*5046b436Sluqi114                        <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
145*5046b436Sluqi114                    </ul>
146*5046b436Sluqi114                </div>
147*5046b436Sluqi114            </div>
148*5046b436Sluqi114        </div><!-- /wrapper -->
149*5046b436Sluqi114
150*5046b436Sluqi114        <!-- ********** FOOTER ********** -->
151*5046b436Sluqi114        <div id="dokuwiki__footer"><div class="pad">
152*5046b436Sluqi114<!--            <div class="doc">--><?php //tpl_pageinfo() /* 'Last modified' etc */ ?><!--</div>-->
153*5046b436Sluqi114<!--            --><?php //tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
154*5046b436Sluqi114
155*5046b436Sluqi114                <div class="license">
156*5046b436Sluqi114                    © 2019 紫郢青索
157*5046b436Sluqi114                </div>
158*5046b436Sluqi114        </div></div><!-- /footer -->
159*5046b436Sluqi114
160*5046b436Sluqi114        <?php tpl_includeFile('footer.html') ?>
161*5046b436Sluqi114    </div></div><!-- /site -->
162*5046b436Sluqi114
163*5046b436Sluqi114    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
164*5046b436Sluqi114    <!--[if lte IE 8 ]></div><![endif]-->
165*5046b436Sluqi114</body>
166*5046b436Sluqi114</html>
167