xref: /dokuwiki/lib/tpl/dokuwiki/main.php (revision 0e336ca8d49c813f535e69d9e727aa58356d5197)
1*0e336ca8SAndreas Gohr<?php
2*0e336ca8SAndreas Gohr/**
3*0e336ca8SAndreas Gohr * DokuWiki Default Template 2012
4*0e336ca8SAndreas Gohr *
5*0e336ca8SAndreas Gohr * @link     http://dokuwiki.org/template
6*0e336ca8SAndreas Gohr * @author   Anika Henke <anika@selfthinker.org>
7*0e336ca8SAndreas Gohr * @author   Clarence Lee <clarencedglee@gmail.com>
8*0e336ca8SAndreas Gohr * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
9*0e336ca8SAndreas Gohr */
10*0e336ca8SAndreas Gohr
11*0e336ca8SAndreas Gohrif (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
12*0e336ca8SAndreas Gohr@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
13*0e336ca8SAndreas Gohr
14*0e336ca8SAndreas Gohr$showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show');
15*0e336ca8SAndreas Gohr?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
16*0e336ca8SAndreas Gohr  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
17*0e336ca8SAndreas Gohr<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
18*0e336ca8SAndreas Gohr  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
19*0e336ca8SAndreas Gohr<head>
20*0e336ca8SAndreas Gohr    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
21*0e336ca8SAndreas Gohr    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
22*0e336ca8SAndreas Gohr    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
23*0e336ca8SAndreas Gohr    <?php tpl_metaheaders() ?>
24*0e336ca8SAndreas Gohr    <meta name="viewport" content="width=device-width,initial-scale=1" />
25*0e336ca8SAndreas Gohr    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
26*0e336ca8SAndreas Gohr    <?php _tpl_include('meta.html') ?>
27*0e336ca8SAndreas Gohr</head>
28*0e336ca8SAndreas Gohr
29*0e336ca8SAndreas Gohr<body>
30*0e336ca8SAndreas Gohr    <?php /* with these Conditional Comments you can better address IE issues in CSS files,
31*0e336ca8SAndreas Gohr             precede CSS rules by #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?>
32*0e336ca8SAndreas Gohr    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
33*0e336ca8SAndreas Gohr
34*0e336ca8SAndreas Gohr    <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?>
35*0e336ca8SAndreas Gohr    <?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode,
36*0e336ca8SAndreas Gohr         see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
37*0e336ca8SAndreas Gohr    <?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
38*0e336ca8SAndreas Gohr    <div id="dokuwiki__site"><div id="dokuwiki__top"
39*0e336ca8SAndreas Gohr        class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
40*0e336ca8SAndreas Gohr
41*0e336ca8SAndreas Gohr        <?php include('tpl_header.php') ?>
42*0e336ca8SAndreas Gohr
43*0e336ca8SAndreas Gohr        <div class="wrapper group">
44*0e336ca8SAndreas Gohr
45*0e336ca8SAndreas Gohr            <?php if($showSidebar): ?>
46*0e336ca8SAndreas Gohr                <!-- ********** ASIDE ********** -->
47*0e336ca8SAndreas Gohr                <div id="dokuwiki__aside"><div class="pad include group">
48*0e336ca8SAndreas Gohr                    <?php tpl_flush() /* flush the output buffer */ ?>
49*0e336ca8SAndreas Gohr                    <?php _tpl_include('sidebarheader.html') ?>
50*0e336ca8SAndreas Gohr                    <?php tpl_include_page($conf['sidebar']) /* includes the given wiki page */ ?>
51*0e336ca8SAndreas Gohr                    <?php _tpl_include('sidebarfooter.html') ?>
52*0e336ca8SAndreas Gohr                </div></div><!-- /aside -->
53*0e336ca8SAndreas Gohr            <?php endif; ?>
54*0e336ca8SAndreas Gohr
55*0e336ca8SAndreas Gohr            <!-- ********** CONTENT ********** -->
56*0e336ca8SAndreas Gohr            <div id="dokuwiki__content"><div class="pad group">
57*0e336ca8SAndreas Gohr
58*0e336ca8SAndreas Gohr                <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
59*0e336ca8SAndreas Gohr
60*0e336ca8SAndreas Gohr                <div class="page group">
61*0e336ca8SAndreas Gohr                    <?php tpl_flush() ?>
62*0e336ca8SAndreas Gohr                    <?php _tpl_include('pageheader.html') ?>
63*0e336ca8SAndreas Gohr                    <!-- wikipage start -->
64*0e336ca8SAndreas Gohr                    <?php tpl_content() /* the main content */ ?>
65*0e336ca8SAndreas Gohr                    <!-- wikipage stop -->
66*0e336ca8SAndreas Gohr                    <?php _tpl_include('pagefooter.html') ?>
67*0e336ca8SAndreas Gohr                </div>
68*0e336ca8SAndreas Gohr
69*0e336ca8SAndreas Gohr                <div class="docInfo"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
70*0e336ca8SAndreas Gohr
71*0e336ca8SAndreas Gohr                <?php tpl_flush() ?>
72*0e336ca8SAndreas Gohr            </div></div><!-- /content -->
73*0e336ca8SAndreas Gohr
74*0e336ca8SAndreas Gohr            <hr class="a11y" />
75*0e336ca8SAndreas Gohr
76*0e336ca8SAndreas Gohr            <!-- PAGE ACTIONS -->
77*0e336ca8SAndreas Gohr            <div id="dokuwiki__pagetools">
78*0e336ca8SAndreas Gohr                <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
79*0e336ca8SAndreas Gohr                <div class="tools">
80*0e336ca8SAndreas Gohr                    <ul>
81*0e336ca8SAndreas Gohr                        <?php
82*0e336ca8SAndreas Gohr                            tpl_action('edit',      1, 'li', 0, '<span>', '</span>');
83*0e336ca8SAndreas Gohr                            tpl_action('revert',    1, 'li', 0, '<span>', '</span>');
84*0e336ca8SAndreas Gohr                            tpl_action('revisions', 1, 'li', 0, '<span>', '</span>');
85*0e336ca8SAndreas Gohr                            tpl_action('backlink',  1, 'li', 0, '<span>', '</span>');
86*0e336ca8SAndreas Gohr                            tpl_action('subscribe', 1, 'li', 0, '<span>', '</span>');
87*0e336ca8SAndreas Gohr                            tpl_action('top',       1, 'li', 0, '<span>', '</span>');
88*0e336ca8SAndreas Gohr                        ?>
89*0e336ca8SAndreas Gohr                    </ul>
90*0e336ca8SAndreas Gohr                </div>
91*0e336ca8SAndreas Gohr            </div>
92*0e336ca8SAndreas Gohr        </div><!-- /wrapper -->
93*0e336ca8SAndreas Gohr
94*0e336ca8SAndreas Gohr        <?php include('tpl_footer.php') ?>
95*0e336ca8SAndreas Gohr    </div></div><!-- /site -->
96*0e336ca8SAndreas Gohr
97*0e336ca8SAndreas Gohr    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
98*0e336ca8SAndreas Gohr    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
99*0e336ca8SAndreas Gohr</body>
100*0e336ca8SAndreas Gohr</html>
101