1<?php
2
3/**
4 * DokuWiki Flarum Template
5 *
6 * @link     http://dokuwiki.org/template:flarum
7 * @author   laoyu <wfdaj@qq.com>
8 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
9 */
10
11if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
12header('X-UA-Compatible: IE=edge,chrome=1');
13
14$showTools = !tpl_getConf('hideTools') || (tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']));
15$showSidebar = page_findnearest($conf['sidebar']) && ($ACT == 'show');
16?>
17<!doctype html>
18<html lang="<?php echo $conf['lang'] ?>" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
19
20<head>
21    <meta charset="utf-8">
22    <meta name="viewport" content="width=device-width, initial-scale=1">
23    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
24    <script>
25        (function(H) {
26            H.className = H.className.replace(/\bno-js\b/, 'js')
27        })(document.documentElement)
28    </script>
29    <?php tpl_metaheaders() ?>
30    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
31    <?php tpl_includeFile('meta.html') ?>
32</head>
33
34<body>
35
36    <div id="dokuwiki__site" class="app affix <?php echo tpl_classes(); ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
37
38        <?php include('tpl_header.php') ?>
39
40        <main id="dokuwiki__top" class="app-content">
41            <header class="hero alert p-0 m-0 alert-dismissible fade show" role="alert">
42                <div class="container position-relative">
43                    <div class="container-narrow">
44                        <h2 class="hero-title">胜败乃兵家常事��,少侠请重新来过。</h2>
45                        <?php if ($conf['tagline']) : ?>
46                            <div class="hero-subtitle"><?= $conf['tagline']; ?></div>
47                        <?php endif ?>
48                    </div>
49                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
50                        <span aria-hidden="true">&times;</span>
51                    </button>
52                </div>
53            </header>
54            <div class="container">
55                <div class="sideNavContainer">
56                    <div class="sideNavOffset">
57                        <?php if ($conf['youarehere']) : ?>
58                            <div class="youarehere"><?php tpl_youarehere() ?></div>
59                        <?php endif ?>
60                        <!-- ********** CONTENT ********** -->
61                        <div id="dokuwiki__content">
62                            <?php html_msgarea() ?>
63                            <div class="typo position-relative">
64                                <?php tpl_flush() ?>
65                                <?php tpl_includeFile('pageheader.html') ?>
66                                <!-- wikipage start -->
67                                <?php tpl_content(false) ?>
68                                <!-- wikipage stop -->
69                                <?php tpl_includeFile('pagefooter.html') ?>
70                            </div>
71
72                            <div class="docInfo"><?php tpl_pageinfo() ?></div>
73
74                            <?php tpl_flush() ?>
75                        </div><!-- /content -->
76                    </div>
77                    <nav class="IndexPage-nav sideNav offcanvas">
78                        <ul data-spy="affix" data-offset-top="180">
79                            <li class="app-primaryControl item-newDiscussion">
80                                <button type="button" class="btn btn-primary IndexPage-newDiscussion hasIcon" data-toggle="modal" data-target="#addNew" title="add new">
81                                    <svg t="1610551596271" class="icon btn-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8435" width="24" height="24">
82                                        <path d="M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z" p-id="8436" fill="#515151"></path>
83                                        <path d="M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z" p-id="8437" fill="#515151"></path>
84                                    </svg>
85                                    <span class="btn-label">
86                                        <?php
87                                            global $lang;
88                                            echo $lang['mail_newpage'];
89                                        ?>
90                                    </span>
91                                </button>
92                            </li>
93                            <li class="item-nav">
94                                <div class="btn-group dropdown app-titleControl dropdown-select">
95                                    <button class="dropdown-toggle btn" id="dropdownMenuTools" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
96                                        <span class="btn-label"><?php echo $lang['page_tools']; ?></span>
97                                    </button>
98                                    <ul class="dropdown-menu" aria-labelledby="dropdownMenuTools">
99                                        <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems('action '); ?>
100                                        <li class="dropdown-separator"></li>
101                                        <li>
102                                            <?php tpl_toc() ?>
103                                        </li>
104                                    </ul>
105                                </div>
106                            </li>
107                        </ul>
108                    </nav>
109                </div>
110            </div>
111        </main>
112    </div>
113
114    <?php html_msgarea() /* 页面顶部偶尔出现错误和信息消息 */ ?>
115
116    <div class="no">
117        <?php tpl_indexerWebBug() /* 提供DokuWiki内务管理,所有模板都需要 */ ?>
118    </div>
119    <!-- Modal -->
120    <div class="modal fade" id="addNew" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="addNewLabel" aria-hidden="true">
121        <div class="modal-dialog modal-dialog-centered">
122            <div class="modal-content">
123                <div class="modal-header">
124                    <h5 class="modal-title" id="addNewLabel">
125                        Modal title
126                    </h5>
127                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
128                        <span aria-hidden="true">
129                            &times;
130                        </span>
131                    </button>
132                </div>
133                <div class="modal-body">
134                    <?php echo p_render('xhtml', p_get_instructions('{{NEWPAGE}}'), $info) ?>
135                </div>
136            </div>
137        </div>
138    </div>
139</body>
140
141</html>
142