xref: /dokuwiki/lib/tpl/dokuwiki/main.php (revision d4f83172d9533c4d84f450fe22ef630816b21d75)
10e336ca8SAndreas Gohr<?php
2*d4f83172SAndreas Gohr
30e336ca8SAndreas Gohr/**
40e336ca8SAndreas Gohr * DokuWiki Default Template 2012
50e336ca8SAndreas Gohr *
60e336ca8SAndreas Gohr * @link     http://dokuwiki.org/template
70e336ca8SAndreas Gohr * @author   Anika Henke <anika@selfthinker.org>
80e336ca8SAndreas Gohr * @author   Clarence Lee <clarencedglee@gmail.com>
90e336ca8SAndreas Gohr * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
100e336ca8SAndreas Gohr */
110e336ca8SAndreas Gohr
120e336ca8SAndreas Gohrif (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
130e336ca8SAndreas Gohr
14fc8dc822SAnika Henke$hasSidebar = page_findnearest($conf['sidebar']);
15fc8dc822SAnika Henke$showSidebar = $hasSidebar && ($ACT == 'show');
16c0670a18SAnika Henke?><!DOCTYPE html>
17c0670a18SAnika Henke<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
180e336ca8SAndreas Gohr<head>
19d22cdf50SAnika Henke    <meta charset="utf-8" />
200e336ca8SAndreas Gohr    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
21c0670a18SAnika Henke    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
220e336ca8SAndreas Gohr    <?php tpl_metaheaders() ?>
230e336ca8SAndreas Gohr    <meta name="viewport" content="width=device-width,initial-scale=1" />
24f90148d3SAndreas Gohr    <?php echo tpl_favicon(['favicon', 'mobile']) ?>
25e5d4768dSAndreas Gohr    <?php tpl_includeFile('meta.html') ?>
260e336ca8SAndreas Gohr</head>
270e336ca8SAndreas Gohr
280e336ca8SAndreas Gohr<body>
29c71db656SAnika Henke    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
30c71db656SAnika Henke        echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
310e336ca8SAndreas Gohr
32f90148d3SAndreas Gohr        <?php include(__DIR__ . '/tpl_header.php') ?>
330e336ca8SAndreas Gohr
340e336ca8SAndreas Gohr        <div class="wrapper group">
350e336ca8SAndreas Gohr
360e336ca8SAndreas Gohr            <?php if ($showSidebar) : ?>
370e336ca8SAndreas Gohr                <!-- ********** ASIDE ********** -->
38834b0b20SAnika Henke                <nav id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar']
39834b0b20SAnika Henke                ?>"><div class="pad aside include group">
40a655c878SAnika Henke                    <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
4182246f10SAndreas Gohr                    <div class="content"><div class="group">
4257fc5eddSAnika Henke                        <?php tpl_flush() ?>
43e5d4768dSAndreas Gohr                        <?php tpl_includeFile('sidebarheader.html') ?>
44e0c26282SGerrit Uitslag                        <?php tpl_include_page($conf['sidebar'], true, true) ?>
45e5d4768dSAndreas Gohr                        <?php tpl_includeFile('sidebarfooter.html') ?>
4682246f10SAndreas Gohr                    </div></div>
47834b0b20SAnika Henke                </div></nav><!-- /aside -->
480e336ca8SAndreas Gohr            <?php endif; ?>
490e336ca8SAndreas Gohr
500e336ca8SAndreas Gohr            <!-- ********** CONTENT ********** -->
51834b0b20SAnika Henke            <main id="dokuwiki__content"><div class="pad group">
52eba389bbSAndreas Gohr                <?php html_msgarea() ?>
530e336ca8SAndreas Gohr
540e336ca8SAndreas Gohr                <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
550e336ca8SAndreas Gohr
560e336ca8SAndreas Gohr                <div class="page group">
570e336ca8SAndreas Gohr                    <?php tpl_flush() ?>
58e5d4768dSAndreas Gohr                    <?php tpl_includeFile('pageheader.html') ?>
590e336ca8SAndreas Gohr                    <!-- wikipage start -->
6057fc5eddSAnika Henke                    <?php tpl_content() ?>
610e336ca8SAndreas Gohr                    <!-- wikipage stop -->
62e5d4768dSAndreas Gohr                    <?php tpl_includeFile('pagefooter.html') ?>
630e336ca8SAndreas Gohr                </div>
640e336ca8SAndreas Gohr
6557fc5eddSAnika Henke                <div class="docInfo"><?php tpl_pageinfo() ?></div>
660e336ca8SAndreas Gohr
670e336ca8SAndreas Gohr                <?php tpl_flush() ?>
680e336ca8SAndreas Gohr
690e336ca8SAndreas Gohr                <hr class="a11y" />
70834b0b20SAnika Henke            </div></main><!-- /content -->
710e336ca8SAndreas Gohr
720e336ca8SAndreas Gohr            <!-- PAGE ACTIONS -->
73834b0b20SAnika Henke            <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
74834b0b20SAnika Henke                <h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
750e336ca8SAndreas Gohr                <div class="tools">
760e336ca8SAndreas Gohr                    <ul>
772852cbd2SAndreas Gohr                        <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
780e336ca8SAndreas Gohr                    </ul>
790e336ca8SAndreas Gohr                </div>
80834b0b20SAnika Henke            </nav>
810e336ca8SAndreas Gohr        </div><!-- /wrapper -->
820e336ca8SAndreas Gohr
83f90148d3SAndreas Gohr        <?php include(__DIR__ . '/tpl_footer.php') ?>
840e336ca8SAndreas Gohr    </div></div><!-- /site -->
850e336ca8SAndreas Gohr
860e336ca8SAndreas Gohr    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
8785159e75SAnika Henke    <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
880e336ca8SAndreas Gohr</body>
890e336ca8SAndreas Gohr</html>
90