1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
7
+ <?php
8
+ $ pageTitle = $ currentCatalog ['title ' ] . ' - imi 框架开发手册文档 ' ;
9
+ ?>
10
+ <title><?= $ pageTitle ?> </title>
11
+ <!-- jQuery-->
12
+ <script src="<?= $ this ->path ('statics/plugin/jquery/jquery-1.12.0.min.js ' )?> "></script>
13
+ <!-- layui -->
14
+ <link rel="stylesheet" href="<?= $ this ->path ('statics/plugin/layui/css/layui.css ' )?> " />
15
+ <script src="<?= $ this ->path ('statics/plugin/layui/layui.all.js ' )?> "></script>
16
+ <!-- zTree -->
17
+ <link rel="stylesheet" href="<?= $ this ->path ('statics/plugin/zTree/css/zTreeStyle/zTreeStyle.css ' )?> " />
18
+ <script src="<?= $ this ->path ('statics/plugin/zTree/js/jquery.ztree.core.js ' )?> "></script>
19
+ <!-- SyntaxHighlighter -->
20
+ <script src="<?= $ this ->path ('statics/plugin/SyntaxHighlighter/shCore.js ' )?> " type="text/javascript"></script>
21
+ <link rel="stylesheet" type="text/css" href="<?= $ this ->path ('statics/plugin/SyntaxHighlighter/shCoreDefault.css ' )?> "/>
22
+ <!-- 自定义 -->
23
+ <link rel="stylesheet" href="<?= $ this ->path ('statics/css/style.css ' )?> " />
24
+ <script src="<?= $ this ->path ('statics/js/home.js ' )?> "></script>
25
+ <link rel="stylesheet" href="<?= $ this ->path ('statics/css/docView.css ' )?> " />
26
+ <script src="<?= $ this ->path ('statics/js/docView.js ' )?> "></script>
27
+ </head>
28
+ <body>
29
+ <!-- top-begin -->
30
+ <div id="navbar">
31
+ <ul class="layui-nav" lay-filter="">
32
+ <div class="navRight">
33
+ <li class="layui-nav-item" lay-unselect>
34
+ <a id="btn-about" href="javascript:;">关于</a>
35
+ </li>
36
+ </div>
37
+ </ul>
38
+ <div class="nav-menu">
39
+ <a href="<?= $ this ->path ('' )?> " class="logo"><?= $ this ->config ['name ' ]?> </a>
40
+ <a href="javascript:;" id="navMenuLeft"><i class="layui-icon"></i></a>
41
+ <a href="javascript:;" id="navMenuRight"><i class="layui-icon"></i></a>
42
+ </div>
43
+ <div class="clear"></div>
44
+ </div>
45
+ <script>
46
+ function openMenuLeft()
47
+ {
48
+ $('#leftbar').addClass('show-item');
49
+ $('#navMenuLeft').addClass('active');
50
+ }
51
+ function closeMenuLeft()
52
+ {
53
+ $('#leftbar').removeClass('show-item');
54
+ $('#navMenuLeft').removeClass('active');
55
+ }
56
+ $('#navMenuLeft').click(function(){
57
+ var isShow = $('#leftbar').hasClass('show-item');
58
+ if(isShow)
59
+ {
60
+ closeMenuLeft();
61
+ }
62
+ else
63
+ {
64
+ closeMenuRight();
65
+ openMenuLeft();
66
+ }
67
+ });
68
+ function openMenuRight()
69
+ {
70
+ $('#navbar > .layui-nav').addClass('show-item')
71
+ $('#navMenuRight').addClass('active').find('i').html('');
72
+ }
73
+ function closeMenuRight()
74
+ {
75
+ $('#navbar > .layui-nav').removeClass('show-item')
76
+ $('#navMenuRight').removeClass('active').find('i').html('');
77
+ }
78
+ $('#navMenuRight').click(function(){
79
+ var isShow = $('#navbar > .layui-nav').hasClass('show-item');
80
+ if(isShow)
81
+ {
82
+ closeMenuRight();
83
+ }
84
+ else
85
+ {
86
+ closeMenuLeft();
87
+ openMenuRight();
88
+ }
89
+ });
90
+ </script>
91
+ <!-- top-end -->
92
+
93
+ <!-- left-begin -->
94
+ <div id="leftbar" class="layui-nav-side">
95
+ <div class="layui-tab layui-tab-brief" style="margin-top:0">
96
+ <ul class="layui-tab-title">
97
+ <li class="layui-this"><i class="layui-icon"></i> 目录</li>
98
+ <li><i class="layui-icon"></i> 搜索</li>
99
+ </ul>
100
+ <div class="layui-tab-content" style="padding:0;overflow-y: auto;position: relative;padding-top: 12px;box-sizing: border-box;">
101
+ <div class="layui-tab-item layui-show">
102
+ <ul id="treeDirectory" class="ztree showIcon"></ul>
103
+ </div>
104
+ <div class="layui-tab-item">
105
+ <div class="searchBox">
106
+ <div id="searchForm">
107
+ <div class="inputBox">
108
+ <input type="text" id="search-keyword" name="keyword" placeholder="搜索关键词" class="layui-input"/>
109
+ <i class="layui-icon input-icon"></i>
110
+ </div>
111
+ </div>
112
+ <ul id="treeSearch" class="ztree">
113
+ </ul>
114
+ <div class="searchResultNone">
115
+ <i class="layui-icon"></i>
116
+ <p>未搜索到结果</p>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ <div class="copyright noScroll">mddoc</div>
122
+ </div>
123
+ </div>
124
+ <script id="searchListTemplate" type="text/html">
125
+ {{# layui.each(d, function(index, item){ }}
126
+ <li>
127
+ <a href="{{ item.url }}"><span>{{ item.title }}</span></a>
128
+ </li>
129
+ {{# }) }}
130
+ </script>
131
+ <!-- left-end -->
132
+
133
+ <div id="body">
134
+ <div id="content_body" name="content_body" style="width:100%;height:100%;border:none;overflow: auto;">
135
+ <div id="article-content" class="markdown-body">
136
+ <script>
137
+ function parseCatalogItem(item)
138
+ {
139
+ item.url = new Array(<?= substr_count ($ currentCatalog ['url ' ], '/ ' )?> + 1).join('../') + item.url;
140
+ return item;
141
+ }
142
+ document.title = '<?= $ pageTitle ?> ';
143
+ var currentCatalog = parseCatalogItem(<?= json_encode ($ currentCatalog )?> );
144
+ var catalogList = <?= json_encode ($ data ['catalogList ' ])?> ;
145
+ for(var i = 0; i < catalogList.length; ++i)
146
+ {
147
+ if(void 0 !== catalogList[i].url)
148
+ {
149
+ catalogList[i] = parseCatalogItem(catalogList[i]);
150
+ }
151
+ }
152
+ initTree(catalogList);
153
+ </script>
154
+ <?= $ articleContent?>
155
+ </div>
156
+ </div>
157
+ </div>
158
+
159
+ <script>
160
+ $(function(){
161
+ var leftBarTimeout = null;
162
+ $('#leftbar').hover(function(e){
163
+ if(null !== leftBarTimeout)
164
+ {
165
+ clearTimeout(leftBarTimeout);
166
+ leftBarTimeout = null;
167
+ }
168
+ if(e.type === 'mouseenter')
169
+ {
170
+ $('.left-show-hide').fadeIn(250);
171
+ }
172
+ else if($('#leftbar').css('left') == '0px')
173
+ {
174
+ $('.left-show-hide').fadeOut(500);
175
+ }
176
+ });
177
+ });
178
+ function showLeftbar()
179
+ {
180
+ $('#leftbar').css('left', 0);
181
+ $('#body').css('padding-left','');
182
+ $('.left-show-hide > i.layui-icon').html('');
183
+ }
184
+ function hideLeftbar()
185
+ {
186
+ $('#leftbar').css('left', '-240px');
187
+ $('#body').css('padding-left',0);
188
+ $('.left-show-hide > i.layui-icon').html('');
189
+ $('.left-show-hide').fadeIn(250);
190
+ }
191
+ $('.left-show-hide').click(function(){
192
+ if($('#leftbar').css('left') == '0px')
193
+ {
194
+ hideLeftbar();
195
+ }
196
+ else
197
+ {
198
+ showLeftbar();
199
+ }
200
+ })
201
+ </script>
202
+ <script src="<?= $ this ->path ('statics/js/mddoc-search.js ' )?> "></script>
203
+ <script src="https://s13.cnzz.com/z_stat.php?id=1273991018&web_id=1273991018" language="JavaScript"></script>
204
+ </body>
205
+ </html>
0 commit comments