xref: /dokuwiki/lib/tpl/dokuwiki/main.php (revision 1e94c175409c39f190b7da3a1941230f3758513c)
10e336ca8SAndreas Gohr<?php
20e336ca8SAndreas Gohr/**
30e336ca8SAndreas Gohr * DokuWiki Default Template 2012
40e336ca8SAndreas Gohr *
50e336ca8SAndreas Gohr * @link     http://dokuwiki.org/template
60e336ca8SAndreas Gohr * @author   Anika Henke <anika@selfthinker.org>
70e336ca8SAndreas Gohr * @author   Clarence Lee <clarencedglee@gmail.com>
80e336ca8SAndreas Gohr * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
90e336ca8SAndreas Gohr */
100e336ca8SAndreas Gohr
110e336ca8SAndreas Gohrif (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
12b9cf8ad4SAnika Henkeheader('X-UA-Compatible: IE=edge,chrome=1');
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" />
240e336ca8SAndreas Gohr    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
25e5d4768dSAndreas Gohr    <?php tpl_includeFile('meta.html') ?>
260e336ca8SAndreas Gohr</head>
270e336ca8SAndreas Gohr
280e336ca8SAndreas Gohr<body>
290e336ca8SAndreas Gohr    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
30c71db656SAnika Henke    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
31c71db656SAnika Henke        echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
320e336ca8SAndreas Gohr
330e336ca8SAndreas Gohr        <?php include('tpl_header.php') ?>
340e336ca8SAndreas Gohr
350e336ca8SAndreas Gohr        <div class="wrapper group">
360e336ca8SAndreas Gohr
370e336ca8SAndreas Gohr            <?php if($showSidebar): ?>
380e336ca8SAndreas Gohr                <!-- ********** ASIDE ********** -->
39*1e94c175SAnika Henke                <div id="dokuwiki__aside"><div class="pad aside include group">
40a655c878SAnika Henke                    <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
4148722ac8SAnika Henke                    <div class="content">
4257fc5eddSAnika Henke                        <?php tpl_flush() ?>
43e5d4768dSAndreas Gohr                        <?php tpl_includeFile('sidebarheader.html') ?>
44835dfcaeSAnika Henke                        <?php tpl_include_page($conf['sidebar'], 1, 1) ?>
45e5d4768dSAndreas Gohr                        <?php tpl_includeFile('sidebarfooter.html') ?>
46c8388e44SAndreas Gohr                    </div>
470e336ca8SAndreas Gohr                </div></div><!-- /aside -->
480e336ca8SAndreas Gohr            <?php endif; ?>
490e336ca8SAndreas Gohr
500e336ca8SAndreas Gohr            <!-- ********** CONTENT ********** -->
510e336ca8SAndreas Gohr            <div id="dokuwiki__content"><div class="pad group">
520e336ca8SAndreas Gohr
530e336ca8SAndreas Gohr                <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
540e336ca8SAndreas Gohr
550e336ca8SAndreas Gohr                <div class="page group">
560e336ca8SAndreas Gohr                    <?php tpl_flush() ?>
57e5d4768dSAndreas Gohr                    <?php tpl_includeFile('pageheader.html') ?>
580e336ca8SAndreas Gohr                    <!-- wikipage start -->
5957fc5eddSAnika Henke                    <?php tpl_content() ?>
600e336ca8SAndreas Gohr                    <!-- wikipage stop -->
61e5d4768dSAndreas Gohr                    <?php tpl_includeFile('pagefooter.html') ?>
620e336ca8SAndreas Gohr                </div>
630e336ca8SAndreas Gohr
6457fc5eddSAnika Henke                <div class="docInfo"><?php tpl_pageinfo() ?></div>
650e336ca8SAndreas Gohr
660e336ca8SAndreas Gohr                <?php tpl_flush() ?>
670e336ca8SAndreas Gohr            </div></div><!-- /content -->
680e336ca8SAndreas Gohr
690e336ca8SAndreas Gohr            <hr class="a11y" />
700e336ca8SAndreas Gohr
710e336ca8SAndreas Gohr            <!-- PAGE ACTIONS -->
720e336ca8SAndreas Gohr            <div id="dokuwiki__pagetools">
730e336ca8SAndreas Gohr                <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
740e336ca8SAndreas Gohr                <div class="tools">
750e336ca8SAndreas Gohr                    <ul>
760e336ca8SAndreas Gohr                        <?php
770a8f03d8SAndreas Gohr                            $data = array(
78834ad97fSAnika Henke                                'view'  => 'main',
79834ad97fSAnika Henke                                'items' => array(
800a8f03d8SAndreas Gohr                                    'edit'      => tpl_action('edit',      1, 'li', 1, '<span>', '</span>'),
810a8f03d8SAndreas Gohr                                    'revert'    => tpl_action('revert',    1, 'li', 1, '<span>', '</span>'),
820a8f03d8SAndreas Gohr                                    'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'),
830a8f03d8SAndreas Gohr                                    'backlink'  => tpl_action('backlink',  1, 'li', 1, '<span>', '</span>'),
840a8f03d8SAndreas Gohr                                    'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'),
850a8f03d8SAndreas Gohr                                    'top'       => tpl_action('top',       1, 'li', 1, '<span>', '</span>')
86834ad97fSAnika Henke                                )
870a8f03d8SAndreas Gohr                            );
880a8f03d8SAndreas Gohr
894432749aSChristopher Smith                            // the page tools can be amended through a custom plugin hook
90834ad97fSAnika Henke                            $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
910a8f03d8SAndreas Gohr                            if($evt->advise_before()){
92834ad97fSAnika Henke                                foreach($evt->data['items'] as $k => $html) echo $html;
930a8f03d8SAndreas Gohr                            }
940a8f03d8SAndreas Gohr                            $evt->advise_after();
950a8f03d8SAndreas Gohr                            unset($data);
960a8f03d8SAndreas Gohr                            unset($evt);
970e336ca8SAndreas Gohr                        ?>
980e336ca8SAndreas Gohr                    </ul>
990e336ca8SAndreas Gohr                </div>
1000e336ca8SAndreas Gohr            </div>
1010e336ca8SAndreas Gohr        </div><!-- /wrapper -->
1020e336ca8SAndreas Gohr
1030e336ca8SAndreas Gohr        <?php include('tpl_footer.php') ?>
1040e336ca8SAndreas Gohr    </div></div><!-- /site -->
1050e336ca8SAndreas Gohr
1060e336ca8SAndreas Gohr    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
10785159e75SAnika Henke    <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
1080e336ca8SAndreas Gohr    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
1090e336ca8SAndreas Gohr</body>
1100e336ca8SAndreas Gohr</html>
111