xref: /template/writr/main.php (revision 6fb33d549a43f5a3cf7eb50b723c2cd26d9a2eb7)
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        <!-- ********** HEADER ********** -->
33        <header id="masthead" class="site-header" role="banner">
34            <?php
35                $logoSize = array();
36                $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
37            ?>
38
39            <a class="site-logo"  href="<?php echo wl(); ?>" title="<?php echo $conf['title']; ?>" rel="home" accesskey="h" title="[H]">
40                <img src="<?php echo $logo; ?>" <?php echo $logoSize[3]; ?> alt="" class="no-grav header-image" />
41            </a>
42
43            <div class="site-branding">
44                <h1 class="site-title"><a href="<?php echo wl(); ?>" rel="home" accesskey="h" title="[H]"><?php echo $conf['title']; ?></a></h1>
45                <?php if ($conf['tagline']): ?>
46                    <h2 class="site-description"><?php echo $conf['tagline'] ?></h2>
47                <?php endif ?>
48            </div>
49
50            <div class="search-form widget">
51                <?php tpl_searchform() ?>
52            </div>
53
54            <?php if (page_findnearest('topnav')): ?>
55                <nav id="site-navigation" class="main-navigation" role="navigation">
56                    <h1 class="menu-toggle genericon genericon-menu">
57                        <span class="screen-reader-text"><?php /* TODO: _e( 'Menu', 'writr' );*/ ?>Menu</span>
58                    </h1>
59                    <div class="screen-reader-text skip-link">
60                        <a href="#content"><?php echo $lang['skip_to_content'] ?></a>
61                    </div>
62                    <?php tpl_include_page('topnav', 1, 1) ?>
63                </nav><!-- #site-navigation -->
64            <?php endif; ?>
65        </header><!-- #masthead -->
66
67        <div class="sidebar-area" id="sidebar">
68            <a id="sidebar-toggle" href="#">
69                <span class="genericon genericon-close"></span>
70                <span class="screen-reader-text"><?php echo $lang['sidebar'] ?></span>
71            </a>
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            </div>
120
121
122        </div>
123
124        <div id="content" class="site-content">
125            <div id="primary" class="content-area">
126                <main id="main" class="site-main" role="main">
127
128                    <!-- BREADCRUMBS -->
129                    <?php if($conf['breadcrumbs']){ ?>
130                        <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
131                    <?php } ?>
132                    <?php if($conf['youarehere']){ ?>
133                        <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
134                    <?php } ?>
135
136                    <?php tpl_flush() ?>
137                    <?php tpl_includeFile('pageheader.html') ?>
138
139                    <?php html_msgarea() ?>
140                    <!-- wikipage start -->
141                    <?php tpl_content() ?>
142                    <!-- wikipage stop -->
143
144                    <?php tpl_flush() ?>
145                    <?php tpl_includeFile('pagefooter.html') ?>
146                </main><!-- #main -->
147            </div><!-- #primary -->
148        </div><!-- #content -->
149
150        <footer id="colophon" class="site-footer" role="contentinfo">
151            <div class="site-info">
152                <p><?php tpl_pageinfo() ?></p>
153                <?php tpl_license('button') ?>
154                <?php tpl_includeFile('footer.html') ?>
155            </div><!-- .site-info -->
156        </footer><!-- #colophon -->
157    </div><!-- #page -->
158
159    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
160</body>
161</html>
162