zhangdocs 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bin/idoc.js +65 -0
- package/.github/FUNDING.yml +9 -0
- package/README.md +108 -0
- package/index.js +56 -0
- package/lib/build.js +126 -0
- package/lib/clean.js +43 -0
- package/lib/copy.js +215 -0
- package/lib/deploy.js +24 -0
- package/lib/file.js +148 -0
- package/lib/imgPath.js +20 -0
- package/lib/init.js +166 -0
- package/lib/menu_json.js +36 -0
- package/lib/menu_update.js +73 -0
- package/lib/nav.js +108 -0
- package/lib/pdf.js +66 -0
- package/lib/pk.json +13 -0
- package/lib/stylus.js +36 -0
- package/lib/theme.js +57 -0
- package/lib/toc.js +119 -0
- package/lib/watch.js +76 -0
- package/lib/whoami.js +23 -0
- package/package.json +41 -0
- package/theme/default/footer.ejs +3 -0
- package/theme/default/gitignore +22 -0
- package/theme/default/head.ejs +17 -0
- package/theme/default/header.ejs +34 -0
- package/theme/default/layout.ejs +16 -0
- package/theme/default/source/css/_partial/head_nav.styl +239 -0
- package/theme/default/source/css/_partial/highlight.styl +103 -0
- package/theme/default/source/css/_partial/markdown.styl +121 -0
- package/theme/default/source/css/_partial/reset.styl +101 -0
- package/theme/default/source/css/_partial/variables.styl +10 -0
- package/theme/default/source/css/main.styl +156 -0
- package/theme/default/source/img/forkgithub.png +0 -0
- package/theme/doc/footer.ejs +25 -0
- package/theme/doc/gitignore +22 -0
- package/theme/doc/head.ejs +17 -0
- package/theme/doc/header.ejs +34 -0
- package/theme/doc/layout.ejs +16 -0
- package/theme/doc/source/css/_partial/head_nav.styl +239 -0
- package/theme/doc/source/css/_partial/highlight.styl +103 -0
- package/theme/doc/source/css/_partial/markdown.styl +121 -0
- package/theme/doc/source/css/_partial/reset.styl +101 -0
- package/theme/doc/source/css/_partial/variables.styl +10 -0
- package/theme/doc/source/css/main.styl +164 -0
- package/theme/doc/source/img/forkgithub.png +0 -0
- package/theme/handbook/footer.ejs +3 -0
- package/theme/handbook/gitignore +22 -0
- package/theme/handbook/head.ejs +10 -0
- package/theme/handbook/header.ejs +14 -0
- package/theme/handbook/layout.ejs +15 -0
- package/theme/handbook/source/css/_partial/highlight.styl +103 -0
- package/theme/handbook/source/css/_partial/markdown.styl +120 -0
- package/theme/handbook/source/css/_partial/reset.styl +101 -0
- package/theme/handbook/source/css/_partial/variables.styl +9 -0
- package/theme/handbook/source/css/main.styl +175 -0
- package/theme/handbook/source/img/background.png +0 -0
- package/theme/handbook/source/img/forkgithub.png +0 -0
- package/theme/resume/footer.ejs +2 -0
- package/theme/resume/gitignore +22 -0
- package/theme/resume/head.ejs +16 -0
- package/theme/resume/layout.ejs +27 -0
- package/theme/resume/source/css/_partial/highlight.styl +103 -0
- package/theme/resume/source/css/_partial/markdown.styl +137 -0
- package/theme/resume/source/css/_partial/reset.styl +101 -0
- package/theme/resume/source/css/_partial/variables.styl +10 -0
- package/theme/resume/source/css/main.styl +50 -0
- package/theme/resume/source/js/jquery.2.1.4.min.js +5 -0
- package/theme/resume/source/js/pdfmake.js +17 -0
- package/theme/resume/source/js/vfs_fonts.js +1 -0
package/lib/theme.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 选择主题命令
|
|
3
|
+
*/
|
|
4
|
+
var inquirer = require('inquirer');
|
|
5
|
+
var file = require('./file');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
var build = require('./build');
|
|
8
|
+
var server = require('ssr');
|
|
9
|
+
|
|
10
|
+
var template = path.dirname(__dirname);
|
|
11
|
+
|
|
12
|
+
var theme = module.exports = {
|
|
13
|
+
runTask:runTask,
|
|
14
|
+
themeList:themeList
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function runTask(commander){
|
|
18
|
+
|
|
19
|
+
var pkg = require(path.resolve('package.json'));
|
|
20
|
+
|
|
21
|
+
if(commander.theme && commander.args.length > 0){
|
|
22
|
+
build(commander);
|
|
23
|
+
server();
|
|
24
|
+
}else{
|
|
25
|
+
|
|
26
|
+
inquirer.prompt([{
|
|
27
|
+
type: "list",
|
|
28
|
+
name: "theme",
|
|
29
|
+
message: " Choose a theme.",
|
|
30
|
+
choices: themeList()
|
|
31
|
+
}],function(answers){
|
|
32
|
+
pkg.idoc.theme = answers.theme;
|
|
33
|
+
file.write(process.cwd() + '/package.json',JSON.stringify(pkg, null, 4));
|
|
34
|
+
build(commander);
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* [themeList 获取主题列表]
|
|
43
|
+
* @return {[type]} [array]
|
|
44
|
+
*/
|
|
45
|
+
function themeList(){
|
|
46
|
+
var _def = file.currentDir(template + '/theme/');
|
|
47
|
+
|
|
48
|
+
var _m = file.currentDir(process.cwd() + '/')
|
|
49
|
+
|
|
50
|
+
for (var i = 0; i < _m.length; i++) {
|
|
51
|
+
if(/^idoc\-theme./.test(_m[i])){
|
|
52
|
+
_def.push(_m[i])
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return _def
|
|
57
|
+
}
|
package/lib/toc.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var cheerio = require('cheerio');
|
|
2
|
+
var hljs = require("highlight.js");
|
|
3
|
+
var log = console.log;
|
|
4
|
+
|
|
5
|
+
module.exports = toc
|
|
6
|
+
|
|
7
|
+
function toc(str,cb){
|
|
8
|
+
|
|
9
|
+
var option = {}
|
|
10
|
+
$ = cheerio.load(str)
|
|
11
|
+
|
|
12
|
+
// 代码高亮使用 highlight.js
|
|
13
|
+
// 网站 http://adilapapaya.com/docs/highlight.js/#nodejs
|
|
14
|
+
// 官网 https://highlightjs.org/
|
|
15
|
+
$('pre code').each(function(i, e) {
|
|
16
|
+
var htstr,el = $(this),lang = el.attr('class');
|
|
17
|
+
lang = lang?lang.replace('lang-',''):'';
|
|
18
|
+
if(lang){
|
|
19
|
+
try{
|
|
20
|
+
htstr = hljs.highlight(lang,$(this).text()).value;
|
|
21
|
+
}catch(e){
|
|
22
|
+
htstr = $(this).text();
|
|
23
|
+
}
|
|
24
|
+
$(this).html(htstr);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// 1. markd模块 中文标题生成 ID bug;
|
|
29
|
+
// 2. 序列号一个导航菜单
|
|
30
|
+
tocCreate($('h1,h2,h3,h4,h5,h6').attr('id',function(idx,elm){
|
|
31
|
+
return 't'+idx+$(this).text();
|
|
32
|
+
}).map(function(idx,itm){
|
|
33
|
+
return {
|
|
34
|
+
title:$(itm).text(),
|
|
35
|
+
tag:$(itm).get(0).tagName.replace(/^(h)/g,''),
|
|
36
|
+
id:$(itm).attr('id')
|
|
37
|
+
}
|
|
38
|
+
}), function(op){
|
|
39
|
+
option.toc = op.tocHTML;
|
|
40
|
+
option.tocJSON = op.tocJSON;
|
|
41
|
+
});
|
|
42
|
+
$('h1,h2,h3,h4,h5,h6').each(function(i){
|
|
43
|
+
$(this).html($(this).text() + ' <a href="#'+'t'+i+ $(this).text() +'"> # </a>')
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
//github 中的任务列表增强
|
|
47
|
+
$('ul li').each(function(idx,el){
|
|
48
|
+
var txt = $(this).html();
|
|
49
|
+
var chtml = '';
|
|
50
|
+
if(/^(\[x\])/.test(txt)){
|
|
51
|
+
chtml = 'checked="checked"';
|
|
52
|
+
}else if(/^(\[\ \])/.test(txt)){
|
|
53
|
+
chtml = '';
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
if(/^(\[x\]|\[\ \])/.test(txt)){
|
|
57
|
+
txt = txt.replace(/^(\[x\]|\[\ \])/g,'')
|
|
58
|
+
$(this).html('').prepend('<input type="checkbox" class="task-list-item-checkbox" '+ chtml +' disabled="disabled">'+txt)
|
|
59
|
+
$(this).addClass('task-list-item').parent().addClass('task-list-item');
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
});
|
|
63
|
+
// 回调返回 菜单静态页面
|
|
64
|
+
cb&&cb(option);
|
|
65
|
+
// 返回HTML
|
|
66
|
+
return $.html();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 树形菜单 - 序列化成JSON,生成 HTML
|
|
70
|
+
// tocJSON 返回toc的JSON
|
|
71
|
+
// tocHTML 返回toc的HTML静态页面
|
|
72
|
+
function tocCreate(arr,cb){
|
|
73
|
+
// console.log("message:arr",arr);
|
|
74
|
+
var newArr = []
|
|
75
|
+
for (var i = 0; i < arr.length; i++) {
|
|
76
|
+
if(i===0) newArr.push(arr[i]);
|
|
77
|
+
else{
|
|
78
|
+
newArr = pushArr(newArr,arr[i])
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var html = tocCreatHTML(newArr);
|
|
82
|
+
cb&&cb({
|
|
83
|
+
tocJSON:newArr,
|
|
84
|
+
tocHTML:html
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// 树形菜单 - 序列化成JSON
|
|
89
|
+
function pushArr(_group,_new){
|
|
90
|
+
var last = _group[_group.length-1]
|
|
91
|
+
var tag = last.tag
|
|
92
|
+
if(tag === _new.tag || tag > _new.tag){
|
|
93
|
+
_group.push(_new)
|
|
94
|
+
}else{
|
|
95
|
+
if(last.submenu){
|
|
96
|
+
pushArr(last.submenu,_new);
|
|
97
|
+
}else{
|
|
98
|
+
last.submenu = [];
|
|
99
|
+
last.submenu.push(_new);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return _group;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 树形菜单 - 生成HTML
|
|
106
|
+
function tocCreatHTML(arr){
|
|
107
|
+
// console.log("arr:",arr);
|
|
108
|
+
var str = '<ul>';
|
|
109
|
+
for (var i = 0; i < arr.length; i++) {
|
|
110
|
+
toc_num = (i+1);
|
|
111
|
+
str += '<li><a href="#' + arr[i].id +'">' + arr[i].title + '</a>';
|
|
112
|
+
if(arr[i].submenu){
|
|
113
|
+
str += tocCreatHTML(arr[i].submenu);
|
|
114
|
+
}
|
|
115
|
+
str += '</li>';
|
|
116
|
+
};
|
|
117
|
+
str += '</ul>';
|
|
118
|
+
return str;
|
|
119
|
+
}
|
package/lib/watch.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var fs = require('fs');
|
|
2
|
+
var chokidar = require('chokidar');
|
|
3
|
+
var color = require('colors-cli');
|
|
4
|
+
var path = require('path');
|
|
5
|
+
var file = require('./file');
|
|
6
|
+
var log = console.log;
|
|
7
|
+
|
|
8
|
+
function watch(commander,build){
|
|
9
|
+
|
|
10
|
+
// 过滤文件
|
|
11
|
+
var filter = function(pattern, fn) {
|
|
12
|
+
return function(filename) {
|
|
13
|
+
if (pattern.test(filename)) {
|
|
14
|
+
fn(filename);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var file = fs.readdirSync(process.cwd());
|
|
20
|
+
|
|
21
|
+
log(color.green("Waiting...") );
|
|
22
|
+
log(color.blue("idoc is running. Press Ctrl+C to stop."));
|
|
23
|
+
log();
|
|
24
|
+
|
|
25
|
+
var now = new Date();
|
|
26
|
+
|
|
27
|
+
var watcher = chokidar.watch(process.cwd()+'/md', {
|
|
28
|
+
// ignored: /[^\.md]$/, //正则过滤哪些被监控
|
|
29
|
+
persistent: true,
|
|
30
|
+
ignoreInitial:true// 初始化不执行事件
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _path = '';
|
|
34
|
+
var _root = path.normalize(process.cwd()+'/md')
|
|
35
|
+
|
|
36
|
+
watcher
|
|
37
|
+
.on('add', function(_path) { // 添加文件
|
|
38
|
+
|
|
39
|
+
changMenuBuild(commander,build, color.blue('File') + _path.replace(_root,'') + 'has been added');
|
|
40
|
+
|
|
41
|
+
})
|
|
42
|
+
.on('change', function(_path) { // 文件更改
|
|
43
|
+
|
|
44
|
+
build(commander,_path);
|
|
45
|
+
log( color.blue('File'), _path.replace(_root,''), color.blue('has been changed!') );
|
|
46
|
+
|
|
47
|
+
})
|
|
48
|
+
.on('unlink', function(_path) { // 删除文件
|
|
49
|
+
|
|
50
|
+
changMenuBuild(commander,build, color.blue('File') + _path.replace(_root,'') + 'has been removed');
|
|
51
|
+
|
|
52
|
+
})
|
|
53
|
+
// More events.
|
|
54
|
+
.on('addDir', function(_path) { // 添加文件夹
|
|
55
|
+
|
|
56
|
+
changMenuBuild(commander,build, color.blue('Directory') + _path.replace(_root,'') + 'has been added');
|
|
57
|
+
|
|
58
|
+
})
|
|
59
|
+
.on('unlinkDir', function(_path) {// 删除文件夹
|
|
60
|
+
|
|
61
|
+
changMenuBuild(commander,build, color.blue('Directory') + _path.replace(_root,'') + 'has been removed');
|
|
62
|
+
|
|
63
|
+
})
|
|
64
|
+
.on('error', function(error) { log('Error happened', error); })
|
|
65
|
+
.on('ready', function() { log('Initial scan complete. Ready for changes.\n'); })
|
|
66
|
+
.on('raw', function(event, _path, details) {
|
|
67
|
+
// log('\n Raw event info:', event, path, details,'\n');
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
module.exports = watch;
|
|
71
|
+
|
|
72
|
+
function changMenuBuild(commander,build, str){
|
|
73
|
+
require('./menu_update')();
|
|
74
|
+
log(str);
|
|
75
|
+
build(commander);
|
|
76
|
+
}
|
package/lib/whoami.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var shell = require('shelljs');
|
|
2
|
+
require('shelljs/global');
|
|
3
|
+
|
|
4
|
+
var name = shell.exec('git config --get user.name', {
|
|
5
|
+
silent: true
|
|
6
|
+
}).stdout.trim();
|
|
7
|
+
|
|
8
|
+
var email = shell.exec('git config --get user.email', {
|
|
9
|
+
silent: true
|
|
10
|
+
}).stdout.trim();
|
|
11
|
+
|
|
12
|
+
var result = name ? name : process.env.USER;
|
|
13
|
+
|
|
14
|
+
if (!which('git')) {
|
|
15
|
+
result = 'Pick a name';
|
|
16
|
+
email = 'Your email';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (email) {
|
|
20
|
+
result += ' <' + email + '>';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = result;
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zhangdocs",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Simple document generation tool. Dependence Node.js run.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/jaywcjlove/idoc.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "index.js",
|
|
10
|
+
"bin": {
|
|
11
|
+
"idoc": ".bin/idoc.js"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"idoc",
|
|
15
|
+
"markdown",
|
|
16
|
+
"api",
|
|
17
|
+
"document",
|
|
18
|
+
"tool"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
22
|
+
},
|
|
23
|
+
"author": "kenny wang <wowohoo@qq.com>",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"autoprefixer-stylus": "^0.13.0",
|
|
27
|
+
"cheerio": "^0.22.0",
|
|
28
|
+
"chokidar": "^1.6.1",
|
|
29
|
+
"colors-cli": "^1.0.7",
|
|
30
|
+
"commander": "^2.9.0",
|
|
31
|
+
"ejs": "^2.5.6",
|
|
32
|
+
"highlight.js": "^9.9.0",
|
|
33
|
+
"inquirer": "^3.0.5",
|
|
34
|
+
"marked": "^0.3.6",
|
|
35
|
+
"semver": "^5.3.0",
|
|
36
|
+
"shelljs": "^0.7.6",
|
|
37
|
+
"ssr": "^1.0.15",
|
|
38
|
+
"stylus": "^0.54.5",
|
|
39
|
+
"underscore": "^1.8.3"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title><%=title%></title>
|
|
7
|
+
<%if(pkg.idoc&&pkg.idoc.logo){ var iconurl = pkg.idoc.logo %>
|
|
8
|
+
<%if(/\.png$/.test(iconurl)){%>
|
|
9
|
+
<link rel="shortcut icon" href="<%=relative_path%><%=pkg.idoc.logo%>" type="image/x-png">
|
|
10
|
+
<%}else if(/\.ico$/.test(iconurl)){%>
|
|
11
|
+
<link rel="shortcut icon" href="<%=relative_path%><%=pkg.idoc.logo%>" type="image/x-icon">
|
|
12
|
+
<%}%>
|
|
13
|
+
<%}%>
|
|
14
|
+
<link rel="stylesheet" type="text/css" href="<%=relative_path%>static/css/main.css">
|
|
15
|
+
</head>
|
|
16
|
+
<body>
|
|
17
|
+
<% include header.ejs %>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<div class="navbar <%if(!index){%>navbar-line<%}%>">
|
|
2
|
+
<div class="container">
|
|
3
|
+
<div class="logo">
|
|
4
|
+
<%if(pkg.idoc.logo){%>
|
|
5
|
+
<img src="<%=relative_path%><%=pkg.idoc.logo%>">
|
|
6
|
+
<%}else{%>
|
|
7
|
+
<%= title %>
|
|
8
|
+
<%}%>
|
|
9
|
+
</div>
|
|
10
|
+
<input type="checkbox" id="idoc_nav" />
|
|
11
|
+
<div class="menu_tree">
|
|
12
|
+
<%- menu_html %>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<% if(pkg&&pkg.repository&&pkg.repository.url) {%>
|
|
16
|
+
<div class="forkgithub"><a target="_blank" href="<%=pkg.repository.url%>">fork on github</a></div>
|
|
17
|
+
<%}%>
|
|
18
|
+
|
|
19
|
+
<section class="idoc_nav_btn">
|
|
20
|
+
<label for="idoc_nav"><span></span></label>
|
|
21
|
+
</section>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<% if(index){ %>
|
|
28
|
+
<div class="bs-docs-header">
|
|
29
|
+
<div class="container">
|
|
30
|
+
<h1><%= title %></h1>
|
|
31
|
+
<p><%= pkg.description %></p>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<% } %>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<% include head.ejs %>
|
|
2
|
+
|
|
3
|
+
<div class="container">
|
|
4
|
+
|
|
5
|
+
<div class="page-toc">
|
|
6
|
+
<%- toc_html %>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div class="content markdown-body">
|
|
10
|
+
<%- markdown_html %>
|
|
11
|
+
<div class="copyright">Powered by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a>. Dependence <a href="https://nodejs.org">Node.js</a> run.</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<% include footer.ejs %>
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
.navbar
|
|
2
|
+
line-height: nav-height
|
|
3
|
+
ul
|
|
4
|
+
list-style: none
|
|
5
|
+
position: relative
|
|
6
|
+
display: inline-table
|
|
7
|
+
float: left
|
|
8
|
+
@media mq-mobile
|
|
9
|
+
position: absolute
|
|
10
|
+
ul
|
|
11
|
+
display: none
|
|
12
|
+
background: #FFFFFF
|
|
13
|
+
border-radius: 0 0 5px 5px
|
|
14
|
+
padding: 3px
|
|
15
|
+
position: absolute
|
|
16
|
+
top: 100%
|
|
17
|
+
z-index: 9
|
|
18
|
+
li.active
|
|
19
|
+
a
|
|
20
|
+
color: #463265
|
|
21
|
+
background-color: #f9f9f9
|
|
22
|
+
line-height:29px
|
|
23
|
+
height:29px
|
|
24
|
+
li
|
|
25
|
+
float: none
|
|
26
|
+
border-bottom: 1px solid #F7F2FF
|
|
27
|
+
position: relative
|
|
28
|
+
a:hover
|
|
29
|
+
color:#573E7D
|
|
30
|
+
a
|
|
31
|
+
color: #fff
|
|
32
|
+
line-height: 29px
|
|
33
|
+
white-space:nowrap
|
|
34
|
+
word-break:keep-all
|
|
35
|
+
ul
|
|
36
|
+
position: absolute
|
|
37
|
+
left: 100%
|
|
38
|
+
top:0
|
|
39
|
+
border-radius 0 5px 5px 5px
|
|
40
|
+
li
|
|
41
|
+
float: left
|
|
42
|
+
line-height: nav-height
|
|
43
|
+
a
|
|
44
|
+
display: block
|
|
45
|
+
color: #757575
|
|
46
|
+
text-decoration: none
|
|
47
|
+
padding: 0 15px
|
|
48
|
+
@media mq-mobile
|
|
49
|
+
padding: 0 5px
|
|
50
|
+
li:hover
|
|
51
|
+
background: #F3F3F3
|
|
52
|
+
a
|
|
53
|
+
color: #333
|
|
54
|
+
li.active
|
|
55
|
+
a
|
|
56
|
+
color: #463265
|
|
57
|
+
background-color: #F3F3F3
|
|
58
|
+
height: nav-height
|
|
59
|
+
ul li:hover > ul
|
|
60
|
+
display: block
|
|
61
|
+
box-shadow: rgba(0, 0, 0, 0.26) 0px 2px 2px 1px
|
|
62
|
+
ul:after
|
|
63
|
+
content: ""
|
|
64
|
+
clear: both
|
|
65
|
+
display: block
|
|
66
|
+
|
|
67
|
+
#idoc_nav
|
|
68
|
+
display none
|
|
69
|
+
|
|
70
|
+
@media mq-tablet
|
|
71
|
+
.navbar
|
|
72
|
+
z-index: 2
|
|
73
|
+
background-image: linear-gradient(to bottom,#fff 0,#f8f8f8 100%)
|
|
74
|
+
|
|
75
|
+
section.idoc_nav_btn
|
|
76
|
+
position relative
|
|
77
|
+
transition all 0.6s
|
|
78
|
+
z-index 999
|
|
79
|
+
display block
|
|
80
|
+
label
|
|
81
|
+
position fixed
|
|
82
|
+
display block
|
|
83
|
+
right 7px
|
|
84
|
+
top 10px
|
|
85
|
+
cursor pointer
|
|
86
|
+
z-index 99
|
|
87
|
+
width 26px
|
|
88
|
+
height 26px
|
|
89
|
+
overflow hidden
|
|
90
|
+
span,&:after,&:before
|
|
91
|
+
content ''
|
|
92
|
+
display block
|
|
93
|
+
height 3px
|
|
94
|
+
background #333
|
|
95
|
+
margin 4px 4px 0 4px
|
|
96
|
+
transform rotate(0deg)
|
|
97
|
+
transition all 0.6s
|
|
98
|
+
.menu_tree
|
|
99
|
+
transition all 0.6s
|
|
100
|
+
background #fff
|
|
101
|
+
position relative
|
|
102
|
+
width 100%
|
|
103
|
+
// display none
|
|
104
|
+
ul
|
|
105
|
+
opacity 0
|
|
106
|
+
height 0
|
|
107
|
+
overflow hidden
|
|
108
|
+
display block
|
|
109
|
+
transition all 0.6s
|
|
110
|
+
input#idoc_nav:checked ~ section label span
|
|
111
|
+
display none
|
|
112
|
+
input#idoc_nav:checked ~ section label:before
|
|
113
|
+
margin 12px 4px 0 4px
|
|
114
|
+
transform rotate(45deg)
|
|
115
|
+
border-radius 3px
|
|
116
|
+
background #458
|
|
117
|
+
input#idoc_nav:checked ~ section label:after
|
|
118
|
+
margin -3px 4px 0 4px
|
|
119
|
+
transform rotate(-45deg)
|
|
120
|
+
border-radius 3px
|
|
121
|
+
background #458
|
|
122
|
+
input#idoc_nav:checked ~ .menu_tree
|
|
123
|
+
display block
|
|
124
|
+
ul
|
|
125
|
+
width 100%
|
|
126
|
+
opacity 1
|
|
127
|
+
position relative
|
|
128
|
+
transition all 0.6s
|
|
129
|
+
padding-bottom 10px
|
|
130
|
+
display block
|
|
131
|
+
height inherit
|
|
132
|
+
li.active
|
|
133
|
+
line-height 36px
|
|
134
|
+
a
|
|
135
|
+
line-height 36px
|
|
136
|
+
height 36px
|
|
137
|
+
background-color #D7D7D7
|
|
138
|
+
li
|
|
139
|
+
float initial
|
|
140
|
+
line-height 30px
|
|
141
|
+
&:hover
|
|
142
|
+
background transparent
|
|
143
|
+
&:hover > ul
|
|
144
|
+
box-shadow #fff 0 0 0 0
|
|
145
|
+
ul
|
|
146
|
+
display block
|
|
147
|
+
position inherit
|
|
148
|
+
border-radius 0
|
|
149
|
+
float inherit
|
|
150
|
+
background #EEE
|
|
151
|
+
padding-left 7px
|
|
152
|
+
padding-bottom 0px
|
|
153
|
+
li
|
|
154
|
+
display inline-block
|
|
155
|
+
@media mq-mobile
|
|
156
|
+
.navbar
|
|
157
|
+
z-index: 2
|
|
158
|
+
background-image: linear-gradient(to bottom,#fff 0,#f8f8f8 100%)
|
|
159
|
+
|
|
160
|
+
section.idoc_nav_btn
|
|
161
|
+
position relative
|
|
162
|
+
transition all 0.6s
|
|
163
|
+
z-index 999
|
|
164
|
+
display block
|
|
165
|
+
label
|
|
166
|
+
position fixed
|
|
167
|
+
display block
|
|
168
|
+
right 7px
|
|
169
|
+
top 10px
|
|
170
|
+
cursor pointer
|
|
171
|
+
z-index 99
|
|
172
|
+
width 26px
|
|
173
|
+
height 26px
|
|
174
|
+
overflow hidden
|
|
175
|
+
span,&:after,&:before
|
|
176
|
+
content ''
|
|
177
|
+
display block
|
|
178
|
+
height 3px
|
|
179
|
+
background #333
|
|
180
|
+
margin 4px 4px 0 4px
|
|
181
|
+
transform rotate(0deg)
|
|
182
|
+
transition all 0.6s
|
|
183
|
+
.menu_tree
|
|
184
|
+
transition all 0.6s
|
|
185
|
+
background #fff
|
|
186
|
+
position relative
|
|
187
|
+
width 100%
|
|
188
|
+
// display none
|
|
189
|
+
ul
|
|
190
|
+
opacity 0
|
|
191
|
+
height 0
|
|
192
|
+
overflow hidden
|
|
193
|
+
display block
|
|
194
|
+
transition all 0.6s
|
|
195
|
+
input#idoc_nav:checked ~ section label span
|
|
196
|
+
display none
|
|
197
|
+
input#idoc_nav:checked ~ section label:before
|
|
198
|
+
margin 12px 4px 0 4px
|
|
199
|
+
transform rotate(45deg)
|
|
200
|
+
border-radius 3px
|
|
201
|
+
background #458
|
|
202
|
+
input#idoc_nav:checked ~ section label:after
|
|
203
|
+
margin -3px 4px 0 4px
|
|
204
|
+
transform rotate(-45deg)
|
|
205
|
+
border-radius 3px
|
|
206
|
+
background #458
|
|
207
|
+
input#idoc_nav:checked ~ .menu_tree
|
|
208
|
+
display block
|
|
209
|
+
ul
|
|
210
|
+
width 100%
|
|
211
|
+
opacity 1
|
|
212
|
+
position relative
|
|
213
|
+
transition all 0.6s
|
|
214
|
+
padding-bottom 10px
|
|
215
|
+
display block
|
|
216
|
+
height inherit
|
|
217
|
+
li.active
|
|
218
|
+
line-height 36px
|
|
219
|
+
a
|
|
220
|
+
line-height 36px
|
|
221
|
+
height 36px
|
|
222
|
+
background-color #D7D7D7
|
|
223
|
+
li
|
|
224
|
+
float initial
|
|
225
|
+
line-height 30px
|
|
226
|
+
&:hover
|
|
227
|
+
background transparent
|
|
228
|
+
&:hover > ul
|
|
229
|
+
box-shadow #fff 0 0 0 0
|
|
230
|
+
ul
|
|
231
|
+
display block
|
|
232
|
+
position inherit
|
|
233
|
+
border-radius 0
|
|
234
|
+
float inherit
|
|
235
|
+
background #EEE
|
|
236
|
+
padding-left 7px
|
|
237
|
+
padding-bottom 0px
|
|
238
|
+
li
|
|
239
|
+
display inline-block
|