sdoc 1.0.0.rc2 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -1
- data/.travis.yml +12 -11
- data/CHANGELOG.md +31 -0
- data/Gemfile +1 -1
- data/README.md +15 -5
- data/Rakefile +1 -2
- data/bin/sdoc +1 -1
- data/bin/sdoc-merge +1 -1
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc/generator/template/rails/_context.rhtml +216 -0
- data/lib/rdoc/generator/template/rails/_head.rhtml +39 -0
- data/lib/rdoc/generator/template/rails/_panel.rhtml +14 -0
- data/lib/rdoc/generator/template/rails/class.rhtml +51 -0
- data/lib/rdoc/generator/template/rails/file.rhtml +38 -0
- data/lib/rdoc/generator/template/rails/index.rhtml +33 -0
- data/lib/rdoc/generator/template/rails/resources/apple-touch-icon.png +0 -0
- data/lib/rdoc/generator/template/rails/resources/css/github.css +123 -0
- data/lib/rdoc/generator/template/rails/resources/css/main.css +378 -0
- data/lib/rdoc/generator/template/rails/resources/css/panel.css +365 -0
- data/lib/rdoc/generator/template/rails/resources/css/reset.css +48 -0
- data/lib/rdoc/generator/template/rails/resources/favicon.ico +0 -0
- data/lib/rdoc/generator/template/rails/resources/i/arrow-down.svg +8 -0
- data/lib/rdoc/generator/template/rails/resources/i/arrow-right.svg +8 -0
- data/lib/rdoc/generator/template/rails/resources/i/search.svg +12 -0
- data/lib/rdoc/generator/template/rails/resources/i/tree_bg.svg +8 -0
- data/lib/rdoc/generator/template/rails/resources/js/highlight.pack.js +1 -0
- data/lib/rdoc/generator/template/rails/resources/js/jquery-3.5.1.min.js +2 -0
- data/lib/rdoc/generator/template/rails/resources/js/main.js +41 -0
- data/lib/rdoc/generator/template/rails/resources/js/searchdoc.js +493 -0
- data/lib/rdoc/generator/template/rails/resources/js/turbolinks.js +6 -0
- data/lib/rdoc/generator/template/rails/search_index.rhtml +8 -0
- data/lib/rdoc/generator/template/sdoc/_context.rhtml +5 -5
- data/lib/rdoc/generator/template/sdoc/_head.rhtml +0 -1
- data/lib/rdoc/generator/template/sdoc/class.rhtml +13 -0
- data/lib/rdoc/generator/template/sdoc/file.rhtml +0 -0
- data/lib/rdoc/generator/template/sdoc/index.rhtml +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/css/main.css +11 -1
- data/lib/rdoc/generator/template/sdoc/resources/css/panel.css +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/css/reset.css +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/i/arrows.png +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/i/results_bg.png +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/i/tree_bg.png +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/js/highlight.pack.js +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/js/jquery-1.3.2.min.js +0 -0
- data/lib/rdoc/generator/template/sdoc/resources/js/main.js +7 -1
- data/lib/rdoc/generator/template/sdoc/resources/js/searchdoc.js +21 -2
- data/lib/rdoc/generator/template/sdoc/resources/panel/index.html +0 -0
- data/lib/sdoc.rb +0 -2
- data/lib/sdoc/generator.rb +19 -80
- data/lib/sdoc/github.rb +13 -14
- data/lib/sdoc/helpers.rb +22 -0
- data/lib/sdoc/templatable.rb +5 -1
- data/lib/sdoc/version.rb +1 -1
- data/sdoc.gemspec +2 -1
- data/spec/helpers_spec.rb +32 -0
- data/spec/rdoc_generator_spec.rb +8 -0
- metadata +27 -13
- data/lib/rdoc/generator/template/sdoc/resources/js/jquery-effect.js +0 -593
@@ -0,0 +1,365 @@
|
|
1
|
+
/* Panel (begin) */
|
2
|
+
.panel
|
3
|
+
{
|
4
|
+
position: fixed;
|
5
|
+
width: 300px;
|
6
|
+
height: 100%;
|
7
|
+
background: #FFF;
|
8
|
+
z-index: 2;
|
9
|
+
font-family: "Helvetica Neue", "Arial", sans-serif;
|
10
|
+
overflow-x: hidden;
|
11
|
+
border-right: 1px #ccc solid;
|
12
|
+
line-height: 1;
|
13
|
+
}
|
14
|
+
|
15
|
+
.panel_tree .results,
|
16
|
+
.panel_results .tree
|
17
|
+
{
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Header with search box (begin) */
|
22
|
+
.panel .header
|
23
|
+
{
|
24
|
+
background: white url(../i/search.svg) no-repeat;
|
25
|
+
background-position: 5px;
|
26
|
+
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
|
27
|
+
height: 40px;
|
28
|
+
width: 300px;
|
29
|
+
position: fixed;
|
30
|
+
left: 0; top: 0;
|
31
|
+
z-index: 300;
|
32
|
+
overflow-x: hidden;
|
33
|
+
}
|
34
|
+
|
35
|
+
.panel .header input
|
36
|
+
{
|
37
|
+
border: 0;
|
38
|
+
box-sizing: border-box;
|
39
|
+
display: inline-block;
|
40
|
+
font-size: 14px;
|
41
|
+
height: 40px;
|
42
|
+
width: 100%;
|
43
|
+
padding: 0 5px;
|
44
|
+
margin: 0;
|
45
|
+
margin-left: 25px;
|
46
|
+
outline: none;
|
47
|
+
}
|
48
|
+
|
49
|
+
/* Header with search box (end) */
|
50
|
+
|
51
|
+
|
52
|
+
/* Results (begin) */
|
53
|
+
.panel .result
|
54
|
+
{
|
55
|
+
position: relative;
|
56
|
+
bottom: 0;
|
57
|
+
top: 40px;
|
58
|
+
left: 0;
|
59
|
+
width: 100%;
|
60
|
+
overflow-y: scroll;
|
61
|
+
overflow-x: hidden;
|
62
|
+
z-index: 2;
|
63
|
+
}
|
64
|
+
|
65
|
+
.panel .result ul
|
66
|
+
{
|
67
|
+
font-size: 0.8em;
|
68
|
+
width: 100%;
|
69
|
+
}
|
70
|
+
|
71
|
+
.panel .result ul li
|
72
|
+
{
|
73
|
+
height: 46px;
|
74
|
+
overflow: hidden;
|
75
|
+
padding: 4px 10px 0 10px;
|
76
|
+
cursor: pointer;
|
77
|
+
margin: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.panel .result ul li:nth-child(2n) {
|
81
|
+
background: #F0EFEF;
|
82
|
+
}
|
83
|
+
|
84
|
+
.panel .result ul li h1
|
85
|
+
{
|
86
|
+
font-size: 13px;
|
87
|
+
font-weight: normal;
|
88
|
+
color: #333;
|
89
|
+
margin-top: 0;
|
90
|
+
margin-bottom: 2px;
|
91
|
+
white-space: nowrap;
|
92
|
+
}
|
93
|
+
|
94
|
+
.panel .result ul li p
|
95
|
+
{
|
96
|
+
font-size: 11px;
|
97
|
+
color: #333;
|
98
|
+
margin-bottom: 2px;
|
99
|
+
white-space: nowrap;
|
100
|
+
}
|
101
|
+
|
102
|
+
.panel .result ul li h1 i,
|
103
|
+
.panel .result ul li p.snippet
|
104
|
+
{
|
105
|
+
color: #777;
|
106
|
+
}
|
107
|
+
|
108
|
+
.panel .result ul li b
|
109
|
+
{
|
110
|
+
color: #000;
|
111
|
+
}
|
112
|
+
|
113
|
+
.panel .result ul li.current
|
114
|
+
{
|
115
|
+
background: #B61D1D;
|
116
|
+
}
|
117
|
+
|
118
|
+
.panel .result ul li.current h1,
|
119
|
+
.panel .result ul li.current p
|
120
|
+
{
|
121
|
+
color: #D9D9D9;
|
122
|
+
}
|
123
|
+
|
124
|
+
.panel .result ul li.current h1 i,
|
125
|
+
.panel .result ul li.current p.snippet
|
126
|
+
{
|
127
|
+
color: #ACACAC;
|
128
|
+
}
|
129
|
+
|
130
|
+
.panel .result ul li.current b
|
131
|
+
{
|
132
|
+
color: #FFF;
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
.panel .result ul li:hover,
|
137
|
+
.panel .result ul li.selected
|
138
|
+
{
|
139
|
+
background: #d0d0d0;
|
140
|
+
}
|
141
|
+
|
142
|
+
.panel .result ul li.current:hover
|
143
|
+
{
|
144
|
+
background: #B61D1D;
|
145
|
+
}
|
146
|
+
|
147
|
+
.panel .result ul li .badge
|
148
|
+
{
|
149
|
+
margin-right: 0.4em;
|
150
|
+
margin-left: -0.2em;
|
151
|
+
padding: 0 0.2em;
|
152
|
+
color: #000;
|
153
|
+
border-radius: 3px;
|
154
|
+
}
|
155
|
+
|
156
|
+
.panel .result ul li .badge_1
|
157
|
+
{
|
158
|
+
background: #ACDBF4;
|
159
|
+
}
|
160
|
+
|
161
|
+
.panel .result ul li.current .badge_1
|
162
|
+
{
|
163
|
+
background: #97BFD7;
|
164
|
+
}
|
165
|
+
|
166
|
+
.panel .result ul li .badge_2
|
167
|
+
{
|
168
|
+
background: #ACF3C3;
|
169
|
+
}
|
170
|
+
|
171
|
+
.panel .result ul li.current .badge_2
|
172
|
+
{
|
173
|
+
background: #98D7AC;
|
174
|
+
}
|
175
|
+
|
176
|
+
.panel .result ul li .badge_3
|
177
|
+
{
|
178
|
+
background: #E0F3AC;
|
179
|
+
}
|
180
|
+
|
181
|
+
.panel .result ul li.current .badge_3
|
182
|
+
{
|
183
|
+
background: #C4D798;
|
184
|
+
}
|
185
|
+
|
186
|
+
.panel .result ul li .badge_4
|
187
|
+
{
|
188
|
+
background: #D7CA98;
|
189
|
+
}
|
190
|
+
|
191
|
+
.panel .result ul li.current .badge_4
|
192
|
+
{
|
193
|
+
background: #A6B0AC;
|
194
|
+
}
|
195
|
+
|
196
|
+
.panel .result ul li .badge_5
|
197
|
+
{
|
198
|
+
background: #F3C8AC;
|
199
|
+
}
|
200
|
+
|
201
|
+
.panel .result ul li.current .badge_5
|
202
|
+
{
|
203
|
+
background: #D7B198;
|
204
|
+
}
|
205
|
+
|
206
|
+
.panel .result ul li .badge_6
|
207
|
+
{
|
208
|
+
background: #F3ACC3;
|
209
|
+
}
|
210
|
+
|
211
|
+
.panel .result ul li.current .badge_6
|
212
|
+
{
|
213
|
+
background: #D798AB;
|
214
|
+
}
|
215
|
+
|
216
|
+
/* Results (end) */
|
217
|
+
|
218
|
+
/* Tree (begin) */ /**/
|
219
|
+
.panel .tree
|
220
|
+
{
|
221
|
+
background: white;
|
222
|
+
position: relative;
|
223
|
+
top: 40px;
|
224
|
+
bottom: 0;
|
225
|
+
left: 0;
|
226
|
+
width: 100%;
|
227
|
+
overflow-y: scroll;
|
228
|
+
overflow-x: hidden;
|
229
|
+
z-index: 30;
|
230
|
+
}
|
231
|
+
|
232
|
+
.panel .tree ul:first-child
|
233
|
+
{
|
234
|
+
background: url(../i/tree_bg.svg);
|
235
|
+
background-size: 1px 60px;
|
236
|
+
}
|
237
|
+
|
238
|
+
.panel .tree li
|
239
|
+
{
|
240
|
+
cursor: pointer;
|
241
|
+
overflow: hidden;
|
242
|
+
height: 30px;
|
243
|
+
line-height: 100%;
|
244
|
+
margin: 0;
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
.panel .tree li .content
|
249
|
+
{
|
250
|
+
padding-left: 18px;
|
251
|
+
padding-top: 5px;
|
252
|
+
height: 18px;
|
253
|
+
overflow: hidden;
|
254
|
+
position: relative;
|
255
|
+
}
|
256
|
+
|
257
|
+
.panel .tree li .icon
|
258
|
+
{
|
259
|
+
width: 10px;
|
260
|
+
height: 9px;
|
261
|
+
background: url(../i/arrow-down.svg);
|
262
|
+
background-size: 10px;
|
263
|
+
position: absolute;
|
264
|
+
left: 1px;
|
265
|
+
top: 8px;
|
266
|
+
cursor: default;
|
267
|
+
}
|
268
|
+
|
269
|
+
.panel .tree li.closed .icon
|
270
|
+
{
|
271
|
+
background: url(../i/arrow-right.svg);
|
272
|
+
background-size: 10px;
|
273
|
+
}
|
274
|
+
|
275
|
+
.panel .tree ul li h1
|
276
|
+
{
|
277
|
+
font-size: 13px;
|
278
|
+
font-weight: normal;
|
279
|
+
color: #000;
|
280
|
+
margin-top: 0;
|
281
|
+
margin-bottom: 2px;
|
282
|
+
white-space: nowrap;
|
283
|
+
}
|
284
|
+
|
285
|
+
.panel .tree ul li p
|
286
|
+
{
|
287
|
+
font-size: 11px;
|
288
|
+
color: #666;
|
289
|
+
margin-bottom: 2px;
|
290
|
+
white-space: nowrap;
|
291
|
+
}
|
292
|
+
|
293
|
+
.panel .tree ul li h1 i
|
294
|
+
{
|
295
|
+
color: #999;
|
296
|
+
font-style: normal;
|
297
|
+
}
|
298
|
+
|
299
|
+
.panel .tree ul li.current h1 i
|
300
|
+
{
|
301
|
+
color: #CCC;
|
302
|
+
}
|
303
|
+
|
304
|
+
.panel .tree ul li.empty
|
305
|
+
{
|
306
|
+
cursor: text;
|
307
|
+
}
|
308
|
+
|
309
|
+
.panel .tree ul li.empty h1,
|
310
|
+
.panel .tree ul li.empty p
|
311
|
+
{
|
312
|
+
color: #666;
|
313
|
+
font-style: italic;
|
314
|
+
}
|
315
|
+
|
316
|
+
.panel .tree ul li.current
|
317
|
+
{
|
318
|
+
background: #B61D1D;
|
319
|
+
}
|
320
|
+
|
321
|
+
.panel .tree ul li.current .icon
|
322
|
+
{
|
323
|
+
background: url(../i/arrow-right.svg);
|
324
|
+
background-size: 10px;
|
325
|
+
}
|
326
|
+
|
327
|
+
.panel .tree ul li.current.closed .icon
|
328
|
+
{
|
329
|
+
background: url(../i/arrow-down.svg);
|
330
|
+
background-size: 10px;
|
331
|
+
}
|
332
|
+
|
333
|
+
.panel .tree ul li.current h1
|
334
|
+
{
|
335
|
+
color: #FFF;
|
336
|
+
}
|
337
|
+
|
338
|
+
.panel .tree ul li.current p
|
339
|
+
{
|
340
|
+
color: #CCC;
|
341
|
+
}
|
342
|
+
|
343
|
+
.panel .tree ul li.current.empty h1,
|
344
|
+
.panel .tree ul li.current.empty p
|
345
|
+
{
|
346
|
+
color: #999;
|
347
|
+
}
|
348
|
+
|
349
|
+
.panel .tree ul li:hover
|
350
|
+
{
|
351
|
+
background: #d0d0d0;
|
352
|
+
}
|
353
|
+
|
354
|
+
.panel .tree ul li.current:hover
|
355
|
+
{
|
356
|
+
background: #B61D1D;
|
357
|
+
}
|
358
|
+
|
359
|
+
.panel .tree .stopper
|
360
|
+
{
|
361
|
+
display: none;
|
362
|
+
}
|
363
|
+
/* Tree (end) */ /**/
|
364
|
+
|
365
|
+
/* Panel (end) */
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/ */
|
2
|
+
/* v1.0 | 20080212 */
|
3
|
+
|
4
|
+
html, body, div, span, applet, object, iframe,
|
5
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
6
|
+
a, abbr, acronym, address, big, cite, code,
|
7
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
8
|
+
small, strike, strong, sub, sup, tt, var,
|
9
|
+
b, u, i, center,
|
10
|
+
dl, dt, dd, ol, ul, li,
|
11
|
+
fieldset, form, label, legend,
|
12
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
border: 0;
|
16
|
+
outline: 0;
|
17
|
+
font-size: 100%;
|
18
|
+
vertical-align: baseline;
|
19
|
+
background: transparent;
|
20
|
+
}
|
21
|
+
body {
|
22
|
+
line-height: 1;
|
23
|
+
}
|
24
|
+
ol, ul {
|
25
|
+
list-style: none;
|
26
|
+
}
|
27
|
+
blockquote, q {
|
28
|
+
quotes: none;
|
29
|
+
}
|
30
|
+
blockquote:before, blockquote:after,
|
31
|
+
q:before, q:after {
|
32
|
+
content: '';
|
33
|
+
content: none;
|
34
|
+
}
|
35
|
+
|
36
|
+
/* remember to highlight inserts somehow! */
|
37
|
+
ins {
|
38
|
+
text-decoration: none;
|
39
|
+
}
|
40
|
+
del {
|
41
|
+
text-decoration: line-through;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* tables still need 'cellspacing="0"' in the markup */
|
45
|
+
table {
|
46
|
+
border-collapse: collapse;
|
47
|
+
border-spacing: 0;
|
48
|
+
}
|
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
3
|
+
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
4
|
+
<style type="text/css">
|
5
|
+
.st0{fill:#555555;}
|
6
|
+
</style>
|
7
|
+
<polygon class="st0" points="27.8,3.1 0.6,3.1 14.2,26.2 "/>
|
8
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
3
|
+
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
4
|
+
<style type="text/css">
|
5
|
+
.st0{fill:#555555;}
|
6
|
+
</style>
|
7
|
+
<polygon class="st0" points="2.6,1.1 2.6,28.2 25.8,14.6 "/>
|
8
|
+
</svg>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
|
4
|
+
<title>search</title>
|
5
|
+
<desc>Created with Sketch.</desc>
|
6
|
+
<defs></defs>
|
7
|
+
<g id="Octicons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
+
<g id="search" fill="#555555">
|
9
|
+
<path d="M15.7,13.3 L11.89,9.47 C12.59,8.49 13,7.3 13,6 C13,2.69 10.31,0 7,0 C3.69,0 1,2.69 1,6 C1,9.31 3.69,12 7,12 C8.3,12 9.48,11.59 10.47,10.89 L14.3,14.7 C14.49,14.9 14.75,15 15,15 C15.25,15 15.52,14.91 15.7,14.7 C16.09,14.31 16.09,13.68 15.7,13.29 L15.7,13.3 Z M7,10.7 C4.41,10.7 2.3,8.59 2.3,6 C2.3,3.41 4.41,1.3 7,1.3 C9.59,1.3 11.7,3.41 11.7,6 C11.7,8.59 9.59,10.7 7,10.7 L7,10.7 Z" id="Shape"></path>
|
10
|
+
</g>
|
11
|
+
</g>
|
12
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
3
|
+
viewBox="0 0 1 60" style="enable-background:new 0 0 1 60;" xml:space="preserve">
|
4
|
+
<style type="text/css">
|
5
|
+
.st0{fill:#F0EFEF;}
|
6
|
+
</style>
|
7
|
+
<rect class="st0" width="1" height="30"/>
|
8
|
+
</svg>
|