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?>
15<!DOCTYPE html>
16<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
17  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
18<head>
19    <meta charset="UTF-8" />
20    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
21    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" />
22    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" />
23    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
24    <?php tpl_metaheaders() ?>
25    <meta name="viewport" content="width=device-width,initial-scale=1" />
26    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
27    <?php tpl_includeFile('meta.html') ?>
28    <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css' />
29</head>
30
31<body id="dokuwiki__top" class="sidebar-closed <?php echo tpl_classes(); ?>">
32    <div id="writr__page" class="hfeed <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
33        <?php tpl_includeFile('header.html') ?>
34
35        <div class="sidebar-area group" id="writr__sidebar">
36            <a id="writr__sidebar-toggle" href="#writr__secondary" title="<?php echo $lang['sidebar'] ?>">
37                <span class="genericon genericon-close"></span>
38                <span class="a11y"><?php echo $lang['sidebar'] ?></span>
39            </a>
40
41            <!-- ********** HEADER ********** -->
42            <header id="writr__masthead" class="site-header" role="banner">
43                <?php
44                    $logoSize = array();
45                    $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
46                ?>
47
48                <a class="site-logo"  href="<?php echo wl(); ?>" title="<?php echo $conf['title']; ?>" rel="home" accesskey="h" title="[H]">
49                    <img src="<?php echo $logo; ?>" <?php echo $logoSize[3]; ?> alt="" class="no-grav header-image" />
50                </a>
51
52                <div class="site-branding">
53                    <h1 class="site-title"><a href="<?php echo wl(); ?>" rel="home" accesskey="h" title="[H]"><?php echo $conf['title']; ?></a></h1>
54                    <?php if ($conf['tagline']): ?>
55                        <h2 class="site-description"><?php echo $conf['tagline'] ?></h2>
56                    <?php endif ?>
57                </div>
58
59                <div class="search-form widget">
60                    <?php tpl_searchform() ?>
61                </div>
62
63                <?php if (page_findnearest('topnav')): ?>
64                    <nav id="writr__site-navigation" class="main-navigation" role="navigation">
65                        <h3 class="menu-toggle genericon genericon-menu" title="<?php echo tpl_getLang('menu') ?>">
66                            <span class="a11y"><?php echo tpl_getLang('menu') ?></span>
67                        </h3>
68                        <div class="a11y skip-link">
69                            <a href="#writr__content"><?php echo $lang['skip_to_content'] ?></a>
70                        </div>
71                        <?php tpl_include_page('topnav', 1, 1) ?>
72                    </nav><!-- #writr__site-navigation -->
73                <?php endif; ?>
74            </header><!-- #writr__masthead -->
75
76            <div id="writr__secondary" class="widget-area" role="complementary">
77                <?php if ($conf['sidebar']): ?>
78                    <div class="widget">
79                        <?php tpl_includeFile('sidebarheader.html') ?>
80                        <?php tpl_include_page($conf['sidebar'], 1, 1) ?>
81                        <?php tpl_includeFile('sidebarfooter.html') ?>
82                    </div>
83                <?php endif ?>
84
85                <div class="tools widget_links widget">
86                    <!-- SITE TOOLS -->
87                    <div class="site-tools">
88                        <h3><?php echo $lang['site_tools'] ?></h3>
89                        <ul>
90                            <?php tpl_toolsevent('sitetools', array(
91                                'recent'    => tpl_action('recent', 1, 'li', 1, '<span></span> '),
92                                'media'     => tpl_action('media', 1, 'li', 1, '<span></span> '),
93                                'index'     => tpl_action('index', 1, 'li', 1, '<span></span> '),
94                            )); ?>
95                        </ul>
96                    </div>
97
98                    <!-- PAGE TOOLS -->
99                    <div class="page-tools">
100                        <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3>
101                        <ul>
102                            <?php $items = (new \dokuwiki\Menu\PageMenu())->getItems();
103                            foreach($items as $item) {
104                                echo '<li>'
105                                    .'<a href="'.$item->getLink().'" class="action '.strtolower($item->getType()).'" title="'.$item->getTitle().'">'
106                                    .'<span class="icon"></span>'
107                                    . '<span class="a11y">'.$item->getLabel().'</span>'
108                                    . '</a></li>';
109                            } ?>
110                        </ul>
111                    </div>
112
113                    <?php if ($conf['useacl']): ?>
114                        <!-- USER TOOLS -->
115                        <div class="user-tools">
116                            <h3><?php echo $lang['user_tools'] ?></h3>
117                            <ul>
118                                <?php tpl_toolsevent('usertools', array(
119                                    'admin'     => tpl_action('admin', 1, 'li', 1, '<span></span> '),
120                                    'profile'   => tpl_action('profile', 1, 'li', 1, '<span></span> '),
121                                    'register'  => tpl_action('register', 1, 'li', 1, '<span></span> '),
122                                    'login'     => tpl_action('login', 1, 'li', 1, '<span></span> '),
123                                )); ?>
124                            </ul>
125                        </div>
126
127                        <?php
128                            if (!empty($_SERVER['REMOTE_USER'])) {
129                                echo '<p class="user">';
130                                tpl_userinfo();
131                                echo '</p>';
132                            }
133                        ?>
134                    <?php endif ?>
135                </div>
136
137                <footer id="writr__colophon" class="site-footer" role="contentinfo">
138                    <div class="site-info">
139                        <?php tpl_license('button') ?>
140                        <?php tpl_includeFile('footer.html') ?>
141                    </div><!-- .site-info -->
142                </footer><!-- #writr__colophon -->
143
144            </div>
145        </div>
146
147        <div id="writr__content" class="site-content">
148            <div id="writr__primary" class="content-area">
149
150                <!-- BREADCRUMBS -->
151                <?php if($conf['breadcrumbs']){ ?>
152                    <div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
153                <?php } ?>
154                <?php if($conf['youarehere']){ ?>
155                    <div class="breadcrumbs"><?php tpl_youarehere() ?></div>
156                <?php } ?>
157
158                <main id="writr__main" class="site-main group" role="main">
159
160                    <?php tpl_flush() ?>
161                    <?php tpl_includeFile('pageheader.html') ?>
162
163                    <?php html_msgarea() ?>
164                    <!-- wikipage start -->
165                    <?php tpl_content() ?>
166                    <!-- wikipage stop -->
167
168                    <?php tpl_flush() ?>
169                    <?php tpl_includeFile('pagefooter.html') ?>
170                </main><!-- #writr__main -->
171
172		<div class="page-footer">
173			<?php
174				tpl_pageinfo();
175				$translation = plugin_load('helper','translation');
176				if ($translation) echo $translation->showTranslations();
177			?>
178		</div>
179            </div><!-- #writr__primary -->
180        </div><!-- #writr__content -->
181    </div><!-- #writr__page -->
182
183    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
184
185    <!-- JavaScript Libraries and Scripts -->
186    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.slim.min.js"></script>
187    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
188    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha256-BRqBN7dYgABqtY9Hd4ynE+1slnEw+roEPFzQ7TRRfcg=" crossorigin="anonymous"></script>
189</body>
190</html>
191