xref: /template/writr/main.php (revision d828d8908447af6906377abef422cdd0ea6c7dc8)
1<?php
2/**
3 * DokuWiki Writr Template
4 *
5 * @link     http://dokuwiki.org/template:writr
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10if (!defined('DOKU_INC')) die();
11@require_once(dirname(__FILE__).'/tpl_functions.php');
12header('X-UA-Compatible: IE=edge,chrome=1');
13$showSidebar = page_findnearest($conf['sidebar']);
14?><!DOCTYPE html>
15<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
16  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
17<head>
18    <meta charset="UTF-8" />
19    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
20    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
21    <?php tpl_metaheaders() ?>
22    <meta name="viewport" content="width=device-width,initial-scale=1" />
23    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
24    <?php tpl_includeFile('meta.html') ?>
25    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css' />
26</head>
27
28<body id="dokuwiki__top" class="sidebar-closed <?php echo tpl_classes(); ?>">
29    <div id="page" class="hfeed <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
30        <?php tpl_includeFile('header.html') ?>
31
32        <div class="sidebar-area group" id="sidebar">
33            <a id="sidebar-toggle" href="#secondary" title="<?php echo $lang['sidebar'] ?>">
34                <span class="genericon genericon-close"></span>
35                <span class="screen-reader-text"><?php echo $lang['sidebar'] ?></span>
36            </a>
37
38            <!-- ********** HEADER ********** -->
39            <header id="masthead" class="site-header" role="banner">
40                <?php
41                    $logoSize = array();
42                    $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
43                ?>
44
45                <a class="site-logo"  href="<?php echo wl(); ?>" title="<?php echo $conf['title']; ?>" rel="home" accesskey="h" title="[H]">
46                    <img src="<?php echo $logo; ?>" <?php echo $logoSize[3]; ?> alt="" class="no-grav header-image" />
47                </a>
48
49                <div class="site-branding">
50                    <h1 class="site-title"><a href="<?php echo wl(); ?>" rel="home" accesskey="h" title="[H]"><?php echo $conf['title']; ?></a></h1>
51                    <?php if ($conf['tagline']): ?>
52                        <h2 class="site-description"><?php echo $conf['tagline'] ?></h2>
53                    <?php endif ?>
54                </div>
55
56                <div class="search-form widget">
57                    <?php tpl_searchform() ?>
58                </div>
59
60                <?php if (page_findnearest('topnav')): ?>
61                    <nav id="site-navigation" class="main-navigation" role="navigation">
62                        <h1 class="menu-toggle genericon genericon-menu">
63                            <span class="screen-reader-text"><?php /* TODO: _e( 'Menu', 'writr' );*/ ?>Menu</span>
64                        </h1>
65                        <div class="screen-reader-text skip-link">
66                            <a href="#content"><?php echo $lang['skip_to_content'] ?></a>
67                        </div>
68                        <?php tpl_include_page('topnav', 1, 1) ?>
69                    </nav><!-- #site-navigation -->
70                <?php endif; ?>
71            </header><!-- #masthead -->
72
73            <div id="secondary" class="widget-area" role="complementary">
74                <div class="widget">
75                    <?php tpl_includeFile('sidebarheader.html') ?>
76                    <?php tpl_include_page($conf['sidebar'], 1, 1) ?>
77                    <?php tpl_includeFile('sidebarfooter.html') ?>
78                </div>
79
80                <div class="tools widget_links widget">
81                    <h3><?php echo $lang['tools'] ?></h3>
82                    <ul>
83                        <!-- SITE TOOLS -->
84                        <?php _tpl_toolsevent('sitetools', array(
85                            'recent'    => tpl_action('recent', 1, 'li', 1),
86                            'media'     => tpl_action('media', 1, 'li', 1),
87                            'index'     => tpl_action('index', 1, 'li', 1),
88                        )); ?>
89
90                        <!-- PAGE TOOLS -->
91                        <?php _tpl_toolsevent('pagetools', array(
92                            'edit'      => tpl_action('edit', 1, 'li', 1),
93                            'revisions' => tpl_action('revisions', 1, 'li', 1),
94                            'backlink'  => tpl_action('backlink', 1, 'li', 1),
95                            'subscribe' => tpl_action('subscribe', 1, 'li', 1),
96                            'revert'    => tpl_action('revert', 1, 'li', 1),
97                            'top'       => tpl_action('top', 1, 'li', 1),
98                        )); ?>
99
100                        <!-- USER TOOLS -->
101                        <?php if ($conf['useacl']): ?>
102                            <?php _tpl_toolsevent('usertools', array(
103                                'admin'     => tpl_action('admin', 1, 'li', 1),
104                                'profile'   => tpl_action('profile', 1, 'li', 1),
105                                'register'  => tpl_action('register', 1, 'li', 1),
106                                'login'     => tpl_action('login', 1, 'li', 1),
107                            )); ?>
108                        <?php endif ?>
109                    </ul>
110
111                    <?php
112                        if (!empty($_SERVER['REMOTE_USER'])) {
113                            echo '<p class="user">';
114                            tpl_userinfo();
115                            echo '</p>';
116                        }
117                    ?>
118                </div>
119
120                <footer id="colophon" class="site-footer" role="contentinfo">
121                    <div class="site-info">
122                        <p><?php tpl_pageinfo() ?></p>
123                        <?php tpl_license('button') ?>
124                        <?php tpl_includeFile('footer.html') ?>
125                    </div><!-- .site-info -->
126                </footer><!-- #colophon -->
127
128            </div>
129        </div>
130
131        <div id="content" class="site-content">
132            <div id="primary" class="content-area">
133                <main id="main" class="site-main" role="main">
134
135                    <!-- BREADCRUMBS -->
136                    <?php if($conf['breadcrumbs']){ ?>
137                        <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
138                    <?php } ?>
139                    <?php if($conf['youarehere']){ ?>
140                        <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
141                    <?php } ?>
142
143                    <?php tpl_flush() ?>
144                    <?php tpl_includeFile('pageheader.html') ?>
145
146                    <?php html_msgarea() ?>
147                    <!-- wikipage start -->
148                    <?php tpl_content() ?>
149                    <!-- wikipage stop -->
150
151                    <?php tpl_flush() ?>
152                    <?php tpl_includeFile('pagefooter.html') ?>
153                </main><!-- #main -->
154            </div><!-- #primary -->
155        </div><!-- #content -->
156
157    </div><!-- #page -->
158
159    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
160</body>
161</html>
162