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.
Files changed (70) hide show
  1. package/.bin/idoc.js +65 -0
  2. package/.github/FUNDING.yml +9 -0
  3. package/README.md +108 -0
  4. package/index.js +56 -0
  5. package/lib/build.js +126 -0
  6. package/lib/clean.js +43 -0
  7. package/lib/copy.js +215 -0
  8. package/lib/deploy.js +24 -0
  9. package/lib/file.js +148 -0
  10. package/lib/imgPath.js +20 -0
  11. package/lib/init.js +166 -0
  12. package/lib/menu_json.js +36 -0
  13. package/lib/menu_update.js +73 -0
  14. package/lib/nav.js +108 -0
  15. package/lib/pdf.js +66 -0
  16. package/lib/pk.json +13 -0
  17. package/lib/stylus.js +36 -0
  18. package/lib/theme.js +57 -0
  19. package/lib/toc.js +119 -0
  20. package/lib/watch.js +76 -0
  21. package/lib/whoami.js +23 -0
  22. package/package.json +41 -0
  23. package/theme/default/footer.ejs +3 -0
  24. package/theme/default/gitignore +22 -0
  25. package/theme/default/head.ejs +17 -0
  26. package/theme/default/header.ejs +34 -0
  27. package/theme/default/layout.ejs +16 -0
  28. package/theme/default/source/css/_partial/head_nav.styl +239 -0
  29. package/theme/default/source/css/_partial/highlight.styl +103 -0
  30. package/theme/default/source/css/_partial/markdown.styl +121 -0
  31. package/theme/default/source/css/_partial/reset.styl +101 -0
  32. package/theme/default/source/css/_partial/variables.styl +10 -0
  33. package/theme/default/source/css/main.styl +156 -0
  34. package/theme/default/source/img/forkgithub.png +0 -0
  35. package/theme/doc/footer.ejs +25 -0
  36. package/theme/doc/gitignore +22 -0
  37. package/theme/doc/head.ejs +17 -0
  38. package/theme/doc/header.ejs +34 -0
  39. package/theme/doc/layout.ejs +16 -0
  40. package/theme/doc/source/css/_partial/head_nav.styl +239 -0
  41. package/theme/doc/source/css/_partial/highlight.styl +103 -0
  42. package/theme/doc/source/css/_partial/markdown.styl +121 -0
  43. package/theme/doc/source/css/_partial/reset.styl +101 -0
  44. package/theme/doc/source/css/_partial/variables.styl +10 -0
  45. package/theme/doc/source/css/main.styl +164 -0
  46. package/theme/doc/source/img/forkgithub.png +0 -0
  47. package/theme/handbook/footer.ejs +3 -0
  48. package/theme/handbook/gitignore +22 -0
  49. package/theme/handbook/head.ejs +10 -0
  50. package/theme/handbook/header.ejs +14 -0
  51. package/theme/handbook/layout.ejs +15 -0
  52. package/theme/handbook/source/css/_partial/highlight.styl +103 -0
  53. package/theme/handbook/source/css/_partial/markdown.styl +120 -0
  54. package/theme/handbook/source/css/_partial/reset.styl +101 -0
  55. package/theme/handbook/source/css/_partial/variables.styl +9 -0
  56. package/theme/handbook/source/css/main.styl +175 -0
  57. package/theme/handbook/source/img/background.png +0 -0
  58. package/theme/handbook/source/img/forkgithub.png +0 -0
  59. package/theme/resume/footer.ejs +2 -0
  60. package/theme/resume/gitignore +22 -0
  61. package/theme/resume/head.ejs +16 -0
  62. package/theme/resume/layout.ejs +27 -0
  63. package/theme/resume/source/css/_partial/highlight.styl +103 -0
  64. package/theme/resume/source/css/_partial/markdown.styl +137 -0
  65. package/theme/resume/source/css/_partial/reset.styl +101 -0
  66. package/theme/resume/source/css/_partial/variables.styl +10 -0
  67. package/theme/resume/source/css/main.styl +50 -0
  68. package/theme/resume/source/js/jquery.2.1.4.min.js +5 -0
  69. package/theme/resume/source/js/pdfmake.js +17 -0
  70. package/theme/resume/source/js/vfs_fonts.js +1 -0
@@ -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 fixted
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
@@ -0,0 +1,103 @@
1
+ /*
2
+ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
3
+ */
4
+ .hljs
5
+ display: block
6
+ overflow-x: auto
7
+ padding: 0.5em
8
+ color: #333
9
+ background: #f8f8f8
10
+ -webkit-text-size-adjust: none
11
+
12
+ .hljs-comment,
13
+ .diff .hljs-header
14
+ color: #969896
15
+ font-size: 90%
16
+
17
+ .hljs-keyword,
18
+ .css .rule .hljs-keyword,
19
+ .hljs-winutils,
20
+ .nginx .hljs-title,
21
+ .hljs-subst,
22
+ .hljs-request,
23
+ .hljs-status
24
+ color: #a71d5d
25
+ font-weight: bold
26
+
27
+ .hljs-number,
28
+ .hljs-hexcolor,
29
+ .ruby .hljs-constant
30
+ color: #008080
31
+
32
+ .hljs-string,
33
+ .hljs-tag .hljs-value,
34
+ .hljs-doctag,
35
+ .tex .hljs-formula
36
+ color: #183691
37
+
38
+ .hljs-title,
39
+ .hljs-id,
40
+ .scss .hljs-preprocessor
41
+ color: #900
42
+ font-weight: bold
43
+
44
+ .hljs-list .hljs-keyword,
45
+ .hljs-subst
46
+ font-weight: normal
47
+
48
+ .hljs-class .hljs-title,
49
+ .hljs-type,
50
+ .vhdl .hljs-literal,
51
+ .tex .hljs-command
52
+ color: #458
53
+ font-weight: bold
54
+
55
+ .hljs-tag,
56
+ .hljs-tag .hljs-title,
57
+ .hljs-rule .hljs-property,
58
+ .django .hljs-tag .hljs-keyword
59
+ color: #000080
60
+ font-weight: normal
61
+
62
+ .hljs-attribute,
63
+ .hljs-variable,
64
+ .lisp .hljs-body,
65
+ .hljs-name
66
+ color: #008080
67
+
68
+ .hljs-regexp
69
+ color: #009926
70
+
71
+ .hljs-symbol,
72
+ .ruby .hljs-symbol .hljs-string,
73
+ .lisp .hljs-keyword,
74
+ .clojure .hljs-keyword,
75
+ .scheme .hljs-keyword,
76
+ .tex .hljs-special,
77
+ .hljs-prompt
78
+ color: #990073
79
+
80
+ .hljs-built_in
81
+ color: #0086b3
82
+
83
+ .hljs-preprocessor,
84
+ .hljs-pragma,
85
+ .hljs-pi,
86
+ .hljs-doctype,
87
+ .hljs-shebang,
88
+ .hljs-cdata
89
+ color: #999
90
+ font-weight: bold
91
+
92
+ .hljs-deletion
93
+ background: #fdd
94
+
95
+ .hljs-addition
96
+ background: #dfd
97
+
98
+ .diff .hljs-change
99
+ background: #0086b3
100
+
101
+ .hljs-chunk
102
+ color: #aaa
103
+
@@ -0,0 +1,121 @@
1
+
2
+ .markdown-body
3
+ padding: 30px 35px 30px 0
4
+ word-wrap: break-word
5
+ font-family: Helvetica Neue,Helvetica,Arial,PingFang SC,Hiragino Sans GB,WenQuanYi Micro Hei,Microsoft Yahei,sans-serif
6
+ font-size: 18px
7
+ line-height: 1.5em
8
+ color:#333
9
+ @media mq-mobile
10
+ padding-right 0
11
+ &>*:first-child
12
+ margin-top: 0 !important
13
+ strong
14
+ font-weight: bold
15
+ hr
16
+ border-top: 1px solid #CACACA
17
+ border-width: 1px 0 0 0
18
+ em
19
+ font-style:italic
20
+ img
21
+ max-width 100%
22
+ h1,h2,h3,h4,h5,h6
23
+ position: relative
24
+ margin-top: 1em
25
+ margin-bottom: 16px
26
+ font-weight: bold
27
+ line-height: 1.4
28
+ a
29
+ display:none
30
+ &:hover a
31
+ display:inline
32
+ color:#000
33
+ font-size:85%
34
+ h1,h2
35
+ border-bottom: 1px solid #eee
36
+ h1
37
+ font-size: 2.25em
38
+ line-height: 1.2
39
+ padding-bottom: 0.3em
40
+ h2
41
+ padding-bottom: 0.3em
42
+ font-size: 1.75em
43
+ line-height: 1.225
44
+ border-bottom:1px dashed #DEDEDE
45
+ blockquote
46
+ padding: 0 15px
47
+ color: #777
48
+ border-left: 4px solid #ddd
49
+ margin: 0;
50
+ &>:last-child
51
+ margin-bottom: 0
52
+ &>:first-child
53
+ margin-top: 0
54
+ p,blockquote,ul,ol,dl,table,pre
55
+ margin-top: 0;
56
+ margin-bottom: 16px
57
+ ul,ol
58
+ padding-left: 1.4em
59
+ list-style:initial
60
+ ol
61
+ list-style-type: decimal
62
+ ol ol, ul ol
63
+ list-style-type: lower-roman;
64
+ ul ul ol, ul ol ol, ol ul ol, ol ol ol
65
+ list-style-type: lower-alpha;
66
+ pre
67
+ padding: 5px
68
+ overflow: auto
69
+ background-color: #f7f7f9
70
+ border-radius: 3px
71
+ word-break: break-all
72
+ word-wrap: break-word
73
+ font: 16px Consolas, "Liberation Mono", Menlo, Courier, monospace;
74
+ code
75
+ // letter-spacing: 1px
76
+ background-color:transparent
77
+ color: inherit
78
+ line-height: 16px
79
+ display: block
80
+ font-size: 14px
81
+ code:before,code:after,tt:before,tt:after
82
+ letter-spacing: 0;
83
+ content: "";
84
+ code,tt
85
+ padding: 0
86
+ padding-bottom: 2px
87
+ margin: 0 3px
88
+ vertical-align: top
89
+ background-color: #EDEDF7
90
+ border-radius: 4px
91
+ padding-left: 3px
92
+ padding-right: 3px
93
+ font-size: 14px
94
+ color: #6F5990
95
+ code:before,code:after,tt:before,tt:after
96
+ content: "\00a0"
97
+ vertical-align: text-top
98
+ table
99
+ width: 100%
100
+ border-collapse: collapse
101
+ border-spacing: 0
102
+ max-width: 100%
103
+ display: block
104
+ background-color: transparent
105
+ th,td
106
+ border: 1px solid #ddd
107
+ padding: 4px 10px
108
+ th
109
+ font-weight: bold
110
+ background: #F3F3F3
111
+ tr:nth-child(2n)
112
+ background-color: #f8f8f8
113
+ tbody
114
+ background:#fff
115
+
116
+ // markdown 增强样式
117
+ .markdown-body
118
+ .task-list-item
119
+ padding: 0;
120
+ li
121
+ list-style-type: none
@@ -0,0 +1,101 @@
1
+ // Reset
2
+
3
+
4
+ //在HTML标签在浏览器里有默认的样式,例如 p 标签有上下边距,strong标签有字体加粗样式,em标签有字体倾斜样式。不同浏览器的默认样式之间也会有差别,例如ul默认带有缩进的样式,在IE下,它的缩进是通过margin实现的,而Firefox下,它的缩进是由padding实现的。在切换页面的时候,浏览器的默认样式往往会给我们带来麻烦,影响开发效率。所以解决的方法就是一开始就将浏览器的默认样式全部去掉,更准确说就是通过重新定义标签样式。“覆盖”浏览器的CSS默认属性。最最简单的说法就是把浏览器提供的默认样式覆盖掉!这就是CSS reset。
5
+
6
+ // global-reset()
7
+ // nested-reset()
8
+ // reset-font()
9
+ // reset-box-model()
10
+ // reset-body()
11
+ // reset-table()
12
+ // reset-table-cell()
13
+ // reset-html5()
14
+
15
+ // http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
16
+ // http://yuilibrary.com/yui/docs/cssreset/
17
+ // http://yui.yahooapis.com/3.18.1/build/cssreset/cssreset-min.css
18
+ // http://cssreset.com/
19
+
20
+ global-reset()
21
+ html, body, div, span, applet, object, iframe,
22
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
23
+ a, abbr, acronym, address, big, cite, code,
24
+ del, dfn, em, img, ins, kbd, q, s, samp,
25
+ small, strike, strong, sub, sup, tt, var,
26
+ dl, dt, dd, ol, ul, li,
27
+ fieldset, form, label, legend,
28
+ table, caption, tbody, tfoot, thead, tr, th, td
29
+ reset-box-model()
30
+ reset-font()
31
+ body
32
+ reset-body()
33
+ ol, ul
34
+ list-style: none
35
+ table
36
+ reset-table()
37
+ caption, th, td
38
+ reset-table-cell()
39
+ a
40
+ text-decoration:inherit
41
+ &:hover
42
+ text-decoration:underline
43
+ a img
44
+ border: none
45
+ *
46
+ box-sizing: border-box;
47
+
48
+ nested-reset()
49
+ div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
50
+ pre, a, abbr, acronym, address, code, del, dfn, em, img,
51
+ dl, dt, dd, ol, ul, li, fieldset, form, label,
52
+ legend, caption, tbody, tfoot, thead, tr
53
+ reset-box-model()
54
+ reset-font()
55
+ table
56
+ reset-table()
57
+ caption, th, td
58
+ reset-table-cell()
59
+ a img
60
+ border: none
61
+
62
+ reset-box-model()
63
+ margin: 0
64
+ padding: 0
65
+ border: 0
66
+ outline: 0
67
+
68
+ reset-font()
69
+ font-weight: inherit
70
+ font-style: inherit
71
+ font-family: inherit
72
+ font-size: 100%
73
+ vertical-align: baseline
74
+
75
+ reset-body()
76
+ line-height: 1
77
+ color: black
78
+ background: white
79
+
80
+ reset-table()
81
+ border-collapse: separate
82
+ border-spacing: 0
83
+ vertical-align: middle
84
+
85
+ reset-table-cell()
86
+ text-align: left
87
+ font-weight: normal
88
+ vertical-align: middle
89
+
90
+ reset-html5()
91
+ article, aside, canvas, details, figcaption,
92
+ figure, footer, header, hgroup, menu, nav,
93
+ section, summary, main
94
+ reset-box-model()
95
+ display: block
96
+ audio, canvas, video
97
+ display inline-block
98
+ *display inline
99
+ *zoom 1
100
+ audio:not([controls]),[hidden]
101
+ display none
@@ -0,0 +1,10 @@
1
+ // Media queries
2
+ mq-mobile = "screen and (max-width: 479px)"
3
+ mq-tablet = "screen and (min-width: 480px) and (max-width: 1170px)"
4
+ // mq-iPhones4 = "only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"
5
+ // mq-normal = "screen and (min-width: 768px)"
6
+
7
+
8
+
9
+ tocwidth = 220px
10
+ nav-height = 49px