sdoc 1.0.0.rc2 → 1.0.0.rc3

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/Rakefile +1 -0
  4. data/lib/rdoc/generator/template/rails/_context.rhtml +216 -0
  5. data/lib/rdoc/generator/template/rails/_head.rhtml +6 -0
  6. data/lib/rdoc/generator/template/rails/class.rhtml +50 -0
  7. data/lib/rdoc/generator/template/rails/file.rhtml +35 -0
  8. data/lib/rdoc/generator/template/rails/index.rhtml +11 -0
  9. data/lib/rdoc/generator/template/rails/resources/apple-touch-icon.png +0 -0
  10. data/lib/rdoc/generator/template/rails/resources/css/github.css +123 -0
  11. data/lib/rdoc/generator/template/rails/resources/css/main.css +363 -0
  12. data/lib/rdoc/generator/template/rails/resources/css/panel.css +360 -0
  13. data/lib/rdoc/generator/template/rails/resources/css/reset.css +48 -0
  14. data/lib/rdoc/generator/template/rails/resources/favicon.ico +0 -0
  15. data/lib/rdoc/generator/template/rails/resources/i/arrow-down.svg +8 -0
  16. data/lib/rdoc/generator/template/rails/resources/i/arrow-right.svg +8 -0
  17. data/lib/rdoc/generator/template/rails/resources/i/search.svg +12 -0
  18. data/lib/rdoc/generator/template/rails/resources/i/tree_bg.svg +8 -0
  19. data/lib/rdoc/generator/template/rails/resources/js/highlight.pack.js +1 -0
  20. data/lib/rdoc/generator/template/rails/resources/js/jquery-1.3.2.min.js +19 -0
  21. data/lib/rdoc/generator/template/rails/resources/js/main.js +25 -0
  22. data/lib/rdoc/generator/template/rails/resources/js/searchdoc.js +465 -0
  23. data/lib/rdoc/generator/template/rails/resources/panel/index.html +47 -0
  24. data/lib/rdoc/generator/template/rails/search_index.rhtml +8 -0
  25. data/lib/rdoc/generator/template/sdoc/_head.rhtml +0 -1
  26. data/lib/rdoc/generator/template/sdoc/class.rhtml +13 -0
  27. data/lib/rdoc/generator/template/sdoc/resources/css/main.css +11 -1
  28. data/lib/rdoc/generator/template/sdoc/resources/js/main.js +7 -1
  29. data/lib/rdoc/generator/template/sdoc/resources/js/searchdoc.js +21 -2
  30. data/lib/sdoc/helpers.rb +22 -0
  31. data/lib/sdoc/version.rb +1 -1
  32. data/spec/helpers_spec.rb +30 -0
  33. metadata +7 -7
  34. data/lib/rdoc/generator/template/sdoc/resources/js/jquery-effect.js +0 -593
@@ -0,0 +1,363 @@
1
+ body {
2
+ font-family: "Helvetica Neue", Arial, sans-serif;
3
+ background: #FFF;
4
+ color: #3B3B3B;
5
+ margin: 0px;
6
+ font-size: 15px;
7
+ line-height: 1.25em;
8
+ }
9
+
10
+ a:link, a:active, a:visited, a:hover {
11
+ color: #CC0000;
12
+ text-decoration: none;
13
+ }
14
+
15
+ a:hover {
16
+ color: #990000;
17
+ text-decoration: underline;
18
+ }
19
+
20
+ .banner a:hover {
21
+ color: white;
22
+ }
23
+
24
+ h1 a, h2 a, .banner a {
25
+ color: #fff;
26
+ }
27
+
28
+ h1 a:hover, h2 a:hover {
29
+ color: #fff;
30
+ }
31
+
32
+ p {
33
+ margin-bottom: 1em;
34
+ text-align: justify;
35
+ }
36
+
37
+ h1 {
38
+ font-size: 2.1em;
39
+ font-weight: normal;
40
+ line-height: 1.2em;
41
+ margin: 1.4em 0 0.7em 0;
42
+ }
43
+
44
+ h2 {
45
+ font-size: 1.6em;
46
+ margin: 1.8em 0 0.8em 0;
47
+ font-weight: normal;
48
+ line-height: 1.2em;
49
+ }
50
+
51
+ h3 {
52
+ font-size: 1.4em;
53
+ color:#555;
54
+ margin: 1.4em 0 0.7em 0;
55
+ font-weight: normal;
56
+ }
57
+
58
+ h4 {
59
+ margin: 1.4em 0 0.5em 0;
60
+ font-size: 1em;
61
+ }
62
+
63
+ table
64
+ {
65
+ margin-bottom: 1em;
66
+ }
67
+
68
+ td, th
69
+ {
70
+ padding: 0 0.7em 0.3em 0;
71
+ }
72
+
73
+ th
74
+ {
75
+ font-weight: bold;
76
+ }
77
+
78
+ .clear
79
+ {
80
+ clear: both;
81
+ width: 0; height: 0;
82
+ }
83
+
84
+ dt
85
+ {
86
+ margin-bottom: 0.3em;
87
+ font-weight: bold;
88
+ }
89
+
90
+ dd
91
+ {
92
+ margin-left: 2em;
93
+ margin-bottom: 1em;
94
+ }
95
+
96
+ dd p
97
+ {
98
+ margin-top: 0.6em;
99
+ }
100
+
101
+ li
102
+ {
103
+ margin: 0 0 0.5em 2em;
104
+ }
105
+
106
+ ul li
107
+ {
108
+ list-style: disc;
109
+ }
110
+
111
+ ol li
112
+ {
113
+ list-style: decimal;
114
+ }
115
+
116
+ .banner
117
+ {
118
+ background: #B61D1D;
119
+ color: #FFF;
120
+ border-bottom: 1px solid #9b281c;
121
+ padding: 1em;
122
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
123
+ }
124
+ .banner h1
125
+ {
126
+ font-size: 1.2em;
127
+ margin: 0;
128
+ }
129
+
130
+ .banner h1 .type
131
+ {
132
+ font-size: 0.833em;
133
+ display:block;
134
+ }
135
+
136
+ .banner h1 .type,
137
+ .banner h1 .parent
138
+ {
139
+ color: #CCC;
140
+ }
141
+
142
+ .banner ul
143
+ {
144
+ margin-top: 0.3em;
145
+ margin-bottom: 0;
146
+ font-size: 0.85em;
147
+ }
148
+
149
+ .banner li
150
+ {
151
+ list-style: none;
152
+ margin-left: 0;
153
+ margin-bottom: 0;
154
+ }
155
+
156
+ .banner .github_url {
157
+ color: #CCC;
158
+ }
159
+
160
+ pre
161
+ {
162
+ margin-bottom: 1em;
163
+ }
164
+
165
+ .methods dt
166
+ {
167
+ width: 1em;
168
+ font-size: 1.5em;
169
+ color:#AAA;
170
+ position: absolute;
171
+ font-weight: normal;
172
+ margin: 0;
173
+ }
174
+
175
+ .methods dd
176
+ {
177
+ margin-left: 2.5em;
178
+ min-height: 1.8em;
179
+ -height: 1.8em;
180
+ padding-bottom: 0.8em;
181
+ }
182
+
183
+
184
+ .methods ul li
185
+ {
186
+ margin-right: 0.7em;
187
+ margin-left: 0;
188
+ list-style: none;
189
+ display: inline;
190
+ }
191
+
192
+ #content {
193
+ margin: 2em;
194
+ margin-left: 3.5em;
195
+ margin-right: 3.5em;
196
+ }
197
+
198
+
199
+ .sectiontitle {
200
+ margin-top: 2em;
201
+ margin-bottom: 1.3em;
202
+ margin-left: -1.2em;
203
+ font-size: 1.2em;
204
+ padding: 0 0 0.25em 0;
205
+ font-weight: bold;
206
+ border-bottom: 1px solid #000;
207
+ }
208
+
209
+ .contenttitle {
210
+ margin-top: 4em;
211
+ margin-bottom: 1.3em;
212
+ margin-left: -0.9em;
213
+ font-size: 1.6em;
214
+ padding: 0 0 0.25em 0;
215
+ font-weight: bold;
216
+ }
217
+
218
+ .attr-rw {
219
+ padding-right: 1em;
220
+ text-align: center;
221
+ color: #055;
222
+ }
223
+
224
+ .attr-name {
225
+ font-weight: bold;
226
+ padding-right: 1em;
227
+ }
228
+
229
+ .attr-desc {
230
+ }
231
+
232
+ tt {
233
+ font-size: 1.15em;
234
+ }
235
+
236
+ .attr-value {
237
+ font-family: monospace;
238
+ padding-left: 1em;
239
+ font-size: 1.15em;
240
+ }
241
+
242
+ .dyn-source {
243
+ display: none;
244
+ background: #fffde8;
245
+ color: #000;
246
+ border: #ffe0bb dotted 1px;
247
+ margin: 0.5em 2em 0.5em 0;
248
+ padding: 0.5em;
249
+ }
250
+
251
+ .dyn-source .cmt {
252
+ color: #00F;
253
+ font-style: italic;
254
+ }
255
+
256
+ .dyn-source .kw {
257
+ color: #070;
258
+ font-weight: bold;
259
+ }
260
+
261
+ .description pre {
262
+ padding: 0.5em;
263
+ background: #EEEEEE;
264
+ font-size: 15px;
265
+ overflow-x: scroll;
266
+ }
267
+
268
+ .method {
269
+ margin-bottom: 2em;
270
+ }
271
+ .method .description,
272
+ .method .sourcecode
273
+ {
274
+ margin-left: 1.2em;
275
+ }
276
+ .method h4
277
+ {
278
+ border-bottom: 1px dotted #999;
279
+ padding: 0 0 0.2em 0;
280
+ margin-bottom: 0.8em;
281
+ font-size: 1.1em;
282
+ color:#333;
283
+ }
284
+ .method .method-title {
285
+ border-bottom: 1px dotted #666;
286
+ padding: 0 0 0.15em 0;
287
+ margin: 0 0 0.5em 0;
288
+ font-size: 1.2em;
289
+ line-height: 1.25em;
290
+ position: relative;
291
+ }
292
+
293
+ .method .method-title a.permalink {
294
+ position: absolute;
295
+ font-size: 0.75em;
296
+ right: 0;
297
+ }
298
+
299
+ .method .sourcecode p.source-link {
300
+ text-indent: 0em;
301
+ margin-top: 0.5em;
302
+ }
303
+
304
+ .method .aka {
305
+ margin-top: 0.3em;
306
+ margin-left: 1em;
307
+ font-style: italic;
308
+ text-indent: 2em;
309
+ }
310
+
311
+ .method .source-link
312
+ {
313
+ font-size: 0.85em;
314
+ }
315
+
316
+ .ruby-constant {
317
+ color: teal;
318
+ }
319
+ .ruby-keyword {
320
+ color: #000;
321
+ font-weight: bold
322
+ }
323
+ .ruby-title {
324
+ color: #900;
325
+ font-weight: bold;
326
+ }
327
+ .ruby-ivar {
328
+ color: teal;
329
+ }
330
+ .ruby-operator {
331
+ color: #000;
332
+ font-weight: bold
333
+ }
334
+ .ruby-identifier {
335
+ color: #000;
336
+ }
337
+ .ruby-string,
338
+ .ruby-node {
339
+ color: #D14;
340
+ }
341
+ .ruby-comment {
342
+ color: #998;
343
+ font-style: italic;
344
+ }
345
+ .ruby-regexp {
346
+ color: #009926;
347
+ }
348
+ .ruby-value {
349
+ color: #990073;
350
+ }
351
+ .ruby-number {
352
+ color: #40A070;
353
+ }
354
+
355
+ @keyframes highlight {
356
+ from { background-color: yellow; }
357
+ to { background-color: white; }
358
+ }
359
+
360
+ .highlight {
361
+ animation-name: highlight;
362
+ animation-duration: 1s;
363
+ }
@@ -0,0 +1,360 @@
1
+ /* Panel (begin) */
2
+ .panel
3
+ {
4
+ position: absolute;
5
+ width: 100%;
6
+ height: 100%;
7
+ top: 0;
8
+ left: 0;
9
+ background: #FFF;
10
+ z-index: 2;
11
+ font-family: "Helvetica Neue", "Arial", sans-serif;
12
+ overflow-x: hidden;
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: 100%;
29
+ position: absolute;
30
+ left: 0; top: 0;
31
+ z-index: 300;
32
+ }
33
+
34
+ .panel .header input
35
+ {
36
+ border: 0;
37
+ box-sizing: border-box;
38
+ display: inline-block;
39
+ font-size: 14px;
40
+ height: 40px;
41
+ width: 100%;
42
+ padding: 0 5px;
43
+ margin: 0;
44
+ margin-left: 25px;
45
+ outline: none;
46
+ }
47
+
48
+ /* Header with search box (end) */
49
+
50
+
51
+ /* Results (begin) */
52
+ .panel .result
53
+ {
54
+ position: absolute;
55
+ top: 40px;
56
+ bottom: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ overflow-y: scroll;
60
+ overflow-x: hidden;
61
+ z-index: 2;
62
+ }
63
+
64
+ .panel .result ul
65
+ {
66
+ font-size: 0.8em;
67
+ width: 100%;
68
+ }
69
+
70
+ .panel .result ul li
71
+ {
72
+ height: 46px;
73
+ overflow: hidden;
74
+ padding: 4px 10px 0 10px;
75
+ cursor: pointer;
76
+ }
77
+
78
+ .panel .result ul li:nth-child(2n) {
79
+ background: #F0EFEF;
80
+ }
81
+
82
+ .panel .result ul li h1
83
+ {
84
+ font-size: 13px;
85
+ font-weight: normal;
86
+ color: #333;
87
+ margin-bottom: 2px;
88
+ white-space: nowrap;
89
+ }
90
+
91
+ .panel .result ul li p
92
+ {
93
+ font-size: 11px;
94
+ color: #333;
95
+ margin-bottom: 2px;
96
+ white-space: nowrap;
97
+ }
98
+
99
+ .panel .result ul li h1 i,
100
+ .panel .result ul li p.snippet
101
+ {
102
+ color: #777;
103
+ }
104
+
105
+ .panel .result ul li b
106
+ {
107
+ color: #000;
108
+ }
109
+
110
+ .panel .result ul li.current
111
+ {
112
+ background: #B61D1D;
113
+ }
114
+
115
+ .panel .result ul li.current h1,
116
+ .panel .result ul li.current p
117
+ {
118
+ color: #D9D9D9;
119
+ }
120
+
121
+ .panel .result ul li.current h1 i,
122
+ .panel .result ul li.current p.snippet
123
+ {
124
+ color: #ACACAC;
125
+ }
126
+
127
+ .panel .result ul li.current b
128
+ {
129
+ color: #FFF;
130
+ }
131
+
132
+
133
+ .panel .result ul li:hover,
134
+ .panel .result ul li.selected
135
+ {
136
+ background: #d0d0d0;
137
+ }
138
+
139
+ .panel .result ul li.current:hover
140
+ {
141
+ background: #B61D1D;
142
+ }
143
+
144
+ .panel .result ul li .badge
145
+ {
146
+ margin-right: 0.4em;
147
+ margin-left: -0.2em;
148
+ padding: 0 0.2em;
149
+ color: #000;
150
+ border-radius: 3px;
151
+ }
152
+
153
+ .panel .result ul li .badge_1
154
+ {
155
+ background: #ACDBF4;
156
+ }
157
+
158
+ .panel .result ul li.current .badge_1
159
+ {
160
+ background: #97BFD7;
161
+ }
162
+
163
+ .panel .result ul li .badge_2
164
+ {
165
+ background: #ACF3C3;
166
+ }
167
+
168
+ .panel .result ul li.current .badge_2
169
+ {
170
+ background: #98D7AC;
171
+ }
172
+
173
+ .panel .result ul li .badge_3
174
+ {
175
+ background: #E0F3AC;
176
+ }
177
+
178
+ .panel .result ul li.current .badge_3
179
+ {
180
+ background: #C4D798;
181
+ }
182
+
183
+ .panel .result ul li .badge_4
184
+ {
185
+ background: #D7CA98;
186
+ }
187
+
188
+ .panel .result ul li.current .badge_4
189
+ {
190
+ background: #A6B0AC;
191
+ }
192
+
193
+ .panel .result ul li .badge_5
194
+ {
195
+ background: #F3C8AC;
196
+ }
197
+
198
+ .panel .result ul li.current .badge_5
199
+ {
200
+ background: #D7B198;
201
+ }
202
+
203
+ .panel .result ul li .badge_6
204
+ {
205
+ background: #F3ACC3;
206
+ }
207
+
208
+ .panel .result ul li.current .badge_6
209
+ {
210
+ background: #D798AB;
211
+ }
212
+
213
+ /* Results (end) */
214
+
215
+ /* Tree (begin) */ /**/
216
+ .panel .tree
217
+ {
218
+ background: white;
219
+ position: absolute;
220
+ top: 40px;
221
+ bottom: 0;
222
+ left: 0;
223
+ width: 100%;
224
+ overflow-y: scroll;
225
+ overflow-x: hidden;
226
+ z-index: 30;
227
+ }
228
+
229
+ .panel .tree ul:first-child
230
+ {
231
+ background: url(../i/tree_bg.svg);
232
+ background-size: 1px 60px;
233
+ }
234
+
235
+ .panel .tree li
236
+ {
237
+ cursor: pointer;
238
+ overflow: hidden;
239
+ height: 30px;
240
+ line-height: 100%;
241
+ }
242
+
243
+
244
+ .panel .tree li .content
245
+ {
246
+ padding-left: 18px;
247
+ padding-top: 5px;
248
+ height: 18px;
249
+ overflow: hidden;
250
+ position: relative;
251
+ }
252
+
253
+ .panel .tree li .icon
254
+ {
255
+ width: 10px;
256
+ height: 9px;
257
+ background: url(../i/arrow-down.svg);
258
+ background-size: 10px;
259
+ position: absolute;
260
+ left: 1px;
261
+ top: 8px;
262
+ cursor: default;
263
+ }
264
+
265
+ .panel .tree li.closed .icon
266
+ {
267
+ background: url(../i/arrow-right.svg);
268
+ background-size: 10px;
269
+ }
270
+
271
+ .panel .tree ul li h1
272
+ {
273
+ font-size: 13px;
274
+ font-weight: normal;
275
+ color: #000;
276
+ margin-bottom: 2px;
277
+ white-space: nowrap;
278
+ }
279
+
280
+ .panel .tree ul li p
281
+ {
282
+ font-size: 11px;
283
+ color: #666;
284
+ margin-bottom: 2px;
285
+ white-space: nowrap;
286
+ }
287
+
288
+ .panel .tree ul li h1 i
289
+ {
290
+ color: #999;
291
+ font-style: normal;
292
+ }
293
+
294
+ .panel .tree ul li.current h1 i
295
+ {
296
+ color: #CCC;
297
+ }
298
+
299
+ .panel .tree ul li.empty
300
+ {
301
+ cursor: text;
302
+ }
303
+
304
+ .panel .tree ul li.empty h1,
305
+ .panel .tree ul li.empty p
306
+ {
307
+ color: #666;
308
+ font-style: italic;
309
+ }
310
+
311
+ .panel .tree ul li.current
312
+ {
313
+ background: #B61D1D;
314
+ }
315
+
316
+ .panel .tree ul li.current .icon
317
+ {
318
+ background: url(../i/arrow-right.svg);
319
+ background-size: 10px;
320
+ }
321
+
322
+ .panel .tree ul li.current.closed .icon
323
+ {
324
+ background: url(../i/arrow-down.svg);
325
+ background-size: 10px;
326
+ }
327
+
328
+ .panel .tree ul li.current h1
329
+ {
330
+ color: #FFF;
331
+ }
332
+
333
+ .panel .tree ul li.current p
334
+ {
335
+ color: #CCC;
336
+ }
337
+
338
+ .panel .tree ul li.current.empty h1,
339
+ .panel .tree ul li.current.empty p
340
+ {
341
+ color: #999;
342
+ }
343
+
344
+ .panel .tree ul li:hover
345
+ {
346
+ background: #d0d0d0;
347
+ }
348
+
349
+ .panel .tree ul li.current:hover
350
+ {
351
+ background: #B61D1D;
352
+ }
353
+
354
+ .panel .tree .stopper
355
+ {
356
+ display: none;
357
+ }
358
+ /* Tree (end) */ /**/
359
+
360
+ /* Panel (end) */