hanna-nouveau 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +12 -0
- data/Gemfile.lock +18 -0
- data/LICENSE +19 -0
- data/README.rdoc +108 -0
- data/Rakefile +55 -0
- data/VERSION +1 -0
- data/hanna.gemspec +21 -0
- data/lib/hanna.rb +323 -0
- data/lib/hanna/template_files/class_index.haml +3 -0
- data/lib/hanna/template_files/file_index.haml +12 -0
- data/lib/hanna/template_files/index.haml +11 -0
- data/lib/hanna/template_files/layout.haml +34 -0
- data/lib/hanna/template_files/method_index.haml +15 -0
- data/lib/hanna/template_files/method_list.haml +52 -0
- data/lib/hanna/template_files/method_search.js +63 -0
- data/lib/hanna/template_files/page.haml +45 -0
- data/lib/hanna/template_files/prototype-1.6.0.3.js +4320 -0
- data/lib/hanna/template_files/sections.haml +86 -0
- data/lib/hanna/template_files/styles.sass +364 -0
- data/lib/rdoc/discover.rb +1 -0
- metadata +179 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
- section = values[:section]
|
2
|
+
#section
|
3
|
+
- if section[:sectitle]
|
4
|
+
%h2= link_to section[:sectitle], section[:secsequence]
|
5
|
+
- if section[:seccomment]
|
6
|
+
.section-comment= section[:seccomment]
|
7
|
+
|
8
|
+
- if section[:classlist] =~ /<li>/
|
9
|
+
#class-list
|
10
|
+
%h2 Classes and Modules
|
11
|
+
= section[:classlist]
|
12
|
+
|
13
|
+
- unless section[:constants].empty?
|
14
|
+
#constants-list
|
15
|
+
%h2 Constants
|
16
|
+
.name-list
|
17
|
+
%table{ :summary => "Constants" }
|
18
|
+
- section[:constants].each do |const|
|
19
|
+
%tr.top-aligned-row.context-row
|
20
|
+
%td.context-item-name= const.name
|
21
|
+
%td =
|
22
|
+
%td.context-item-value= const.value
|
23
|
+
- if const.description then
|
24
|
+
%td
|
25
|
+
%td.context-item-desc= const.description
|
26
|
+
|
27
|
+
- unless section[:aliases].empty?
|
28
|
+
#aliases-list
|
29
|
+
%h2 External Aliases
|
30
|
+
.name-list
|
31
|
+
%table{ :summary => "Aliases" }
|
32
|
+
- section[:aliases].each do |alia|
|
33
|
+
%tr.top-aligned-row.context-row
|
34
|
+
%td.context-item-name= alia.name
|
35
|
+
%td ->
|
36
|
+
%td.context-item-value= link_to alia.is_alias_for.name, "##{alia.is_alias_for.aref}"
|
37
|
+
- unless alia.description.empty?
|
38
|
+
%tr.top-aligned-row.context-row
|
39
|
+
%td
|
40
|
+
%td.context-item-desc{ :colspan => "2" }
|
41
|
+
= alia.description
|
42
|
+
|
43
|
+
- unless section[:attributes].empty?
|
44
|
+
#attribute-list
|
45
|
+
%h2.section-bar Attributes
|
46
|
+
.name-list
|
47
|
+
%table
|
48
|
+
- section[:attributes].each do |attrib|
|
49
|
+
%tr.top-aligned-row.context-row
|
50
|
+
%td.context-item-name
|
51
|
+
%a{:name => "method-#{attrib.html_name}"}=attrib.name
|
52
|
+
%td.context-item-value= attrib.rw ? "[#{attrib.rw}]" : ' '
|
53
|
+
%td.context-item-desc~ sanitize_code_blocks(attrib.description)
|
54
|
+
|
55
|
+
- unless section[:method_list].empty?
|
56
|
+
#methods
|
57
|
+
- section[:method_list].group_by { |x| [x.visibility, x.type].map(&:to_s).map(&:capitalize).join(" ") }.each do |type, list|
|
58
|
+
- unless list.empty?
|
59
|
+
%h2== #{type} methods
|
60
|
+
|
61
|
+
- list.each do |method|
|
62
|
+
.method{ :id => "method-#{method.aref}", :class => "#{type.gsub(/\s+/, '-')}".downcase }
|
63
|
+
%a{ :name => method.aref }
|
64
|
+
.synopsis
|
65
|
+
- method_html = capture_haml do
|
66
|
+
- if method.call_seq
|
67
|
+
%span.name
|
68
|
+
- method.call_seq.split(/\r?\n/).each do |seq|
|
69
|
+
%div=seq
|
70
|
+
- else
|
71
|
+
%span.name= method.name
|
72
|
+
%span.arguments= method.params
|
73
|
+
-#- if method[:codeurl]
|
74
|
+
-#%a.method-signature{ :href => method[:codeurl], :onclick => "popupCode(this.href); return false", :target => "Code" }
|
75
|
+
-#= method_html
|
76
|
+
-#- else
|
77
|
+
= method_html
|
78
|
+
- if method.description
|
79
|
+
.description
|
80
|
+
~ sanitize_code_blocks method.description
|
81
|
+
- if method.markup_code
|
82
|
+
.source
|
83
|
+
- name = "#{method.aref}-source"
|
84
|
+
%a.source-toggle{ :href => "#", :onclick => "toggleCode('#{name}'); return false" }
|
85
|
+
[show source]
|
86
|
+
~ "<pre id='#{name}'>#{method.markup_code}</pre>"
|
@@ -0,0 +1,364 @@
|
|
1
|
+
!title_font = "Georgia", "serif"
|
2
|
+
!body_font = "Lucida Grande", "Verdana", "Arial", "Helvetica", "sans-serif"
|
3
|
+
!code_font_family = "Monaco", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", "monospace"
|
4
|
+
!code_font_size = 14px
|
5
|
+
!code_font = !code_font_size !code_font_family
|
6
|
+
|
7
|
+
!light_link = #369
|
8
|
+
!link = !light_link - 40
|
9
|
+
!light_text = #666
|
10
|
+
!dark_blue_text = #0E3062
|
11
|
+
|
12
|
+
html, body
|
13
|
+
:height 100%
|
14
|
+
body
|
15
|
+
:font-family = !body_font
|
16
|
+
:font-size 90%
|
17
|
+
:margin 0
|
18
|
+
:padding 0
|
19
|
+
:background white
|
20
|
+
:color black
|
21
|
+
|
22
|
+
#wrapper
|
23
|
+
:min-height 100%
|
24
|
+
:height auto !important
|
25
|
+
:height 100%
|
26
|
+
:margin 0 auto -43px
|
27
|
+
#footer-push
|
28
|
+
:height 43px
|
29
|
+
div.header, #footer
|
30
|
+
:background #eee
|
31
|
+
#footer
|
32
|
+
:border-top 1px solid silver
|
33
|
+
:margin-top 12px
|
34
|
+
:padding 0 2em
|
35
|
+
:line-height 30px
|
36
|
+
:text-align center
|
37
|
+
:font-variant small-caps
|
38
|
+
:font-size 95%
|
39
|
+
|
40
|
+
// self-clearing
|
41
|
+
.clearing
|
42
|
+
&:after
|
43
|
+
:content "."
|
44
|
+
:visibility hidden
|
45
|
+
:height 0
|
46
|
+
:display block
|
47
|
+
:clear both
|
48
|
+
* html &
|
49
|
+
:height 1px
|
50
|
+
*:first-child + html
|
51
|
+
:overflow hidden
|
52
|
+
|
53
|
+
h1, h2, h3, h4, h5, h6
|
54
|
+
:margin 0
|
55
|
+
:font-weight normal
|
56
|
+
|
57
|
+
a
|
58
|
+
:color = !link
|
59
|
+
&:hover
|
60
|
+
:background = !light_link
|
61
|
+
:text-decoration none
|
62
|
+
:color #eef
|
63
|
+
|
64
|
+
#diagram
|
65
|
+
img
|
66
|
+
:border = 0
|
67
|
+
|
68
|
+
#description, .method .description, .header
|
69
|
+
a
|
70
|
+
:color = !light_link
|
71
|
+
&:hover
|
72
|
+
:color #eee
|
73
|
+
h1, h2, h3, h4, h5, h6
|
74
|
+
a
|
75
|
+
:color = !link
|
76
|
+
|
77
|
+
ol
|
78
|
+
:margin 0
|
79
|
+
:padding 0
|
80
|
+
:list-style none
|
81
|
+
li
|
82
|
+
:margin-left 0
|
83
|
+
:white-space nowrap
|
84
|
+
&.other
|
85
|
+
:display none
|
86
|
+
ol.expanded li.other
|
87
|
+
:display list-item
|
88
|
+
|
89
|
+
table
|
90
|
+
:margin-bottom 1em
|
91
|
+
:font-size 1em
|
92
|
+
:border-collapse collapse
|
93
|
+
td, th
|
94
|
+
:padding .4em .8em
|
95
|
+
thead
|
96
|
+
:background-color #e8e8e8
|
97
|
+
th
|
98
|
+
:font-variant small-caps
|
99
|
+
:color = !light_text
|
100
|
+
tr
|
101
|
+
:border-bottom 1px solid silver
|
102
|
+
|
103
|
+
#index, div.header
|
104
|
+
a.show
|
105
|
+
:text-decoration underline
|
106
|
+
:font-style italic
|
107
|
+
:color = !light_text
|
108
|
+
&:after
|
109
|
+
:content " ..."
|
110
|
+
&:hover
|
111
|
+
:color black
|
112
|
+
:background #ffe
|
113
|
+
|
114
|
+
#index
|
115
|
+
:font 85%/1.2 Arial, Helvetica, sans-serif
|
116
|
+
a
|
117
|
+
:text-decoration none
|
118
|
+
h1
|
119
|
+
:padding .2em .5em .1em
|
120
|
+
:background #ccc
|
121
|
+
:font = "small-caps 1.2em" !title_font
|
122
|
+
:color #333
|
123
|
+
:border-bottom 1px solid gray
|
124
|
+
form
|
125
|
+
:margin 0
|
126
|
+
:padding 0
|
127
|
+
input
|
128
|
+
:margin .4em 3px 0 .4em
|
129
|
+
:width 80%
|
130
|
+
#search.untouched
|
131
|
+
:color #777777
|
132
|
+
.clear_button
|
133
|
+
:-moz-border-radius 7px
|
134
|
+
:-webkit-border-radius 7px
|
135
|
+
:background #AAA
|
136
|
+
:color white
|
137
|
+
:padding 0 5px 1px 5px
|
138
|
+
:cursor pointer
|
139
|
+
ol
|
140
|
+
:padding .4em .5em
|
141
|
+
li
|
142
|
+
:white-space nowrap
|
143
|
+
#index-entries li a
|
144
|
+
:padding 1px 2px
|
145
|
+
#index-entries.classes
|
146
|
+
:font-size 1.1em
|
147
|
+
ol
|
148
|
+
:padding 0
|
149
|
+
span.nodoc
|
150
|
+
:display none
|
151
|
+
span.nodoc, a
|
152
|
+
:font-weight bold
|
153
|
+
.parent
|
154
|
+
:font-weight normal
|
155
|
+
#index-entries.methods, #search-results.methods
|
156
|
+
li
|
157
|
+
:margin-bottom 0.2em
|
158
|
+
a
|
159
|
+
.method_name
|
160
|
+
:margin-right 0.25em
|
161
|
+
.module_name
|
162
|
+
:color #666666
|
163
|
+
&:hover .module_name
|
164
|
+
:color #ddd
|
165
|
+
|
166
|
+
|
167
|
+
#attribute-list
|
168
|
+
.context-item-name
|
169
|
+
:font-weight bold
|
170
|
+
|
171
|
+
div.header
|
172
|
+
:font-size 80%
|
173
|
+
:padding .5em 2%
|
174
|
+
:font-family Arial, Helvetica, sans-serif
|
175
|
+
:border-bottom 1px solid silver
|
176
|
+
.name
|
177
|
+
:font-size 1.6em
|
178
|
+
:font-family = !title_font
|
179
|
+
.type
|
180
|
+
:color = !light_text
|
181
|
+
:font-size 80%
|
182
|
+
:font-variant small-caps
|
183
|
+
h1.name
|
184
|
+
:font-size 2.2em
|
185
|
+
.paths, .last-update, .parent
|
186
|
+
:color = !light_text
|
187
|
+
.last-update .datetime
|
188
|
+
:color = !light_text - 30
|
189
|
+
.parent
|
190
|
+
:margin-top .3em
|
191
|
+
strong
|
192
|
+
:font-weight normal
|
193
|
+
:color = !light_text - 30
|
194
|
+
|
195
|
+
#content
|
196
|
+
:padding 12px 2%
|
197
|
+
div.class &
|
198
|
+
:position relative
|
199
|
+
:width 72%
|
200
|
+
|
201
|
+
pre, .method .synopsis
|
202
|
+
:font = !code_font
|
203
|
+
pre
|
204
|
+
:color black
|
205
|
+
:background #eee
|
206
|
+
:border 1px solid silver
|
207
|
+
:padding .5em .8em
|
208
|
+
:overflow auto
|
209
|
+
p, li, dl
|
210
|
+
code, tt
|
211
|
+
:font = !code_font
|
212
|
+
:background #ffffe3
|
213
|
+
:padding 2px 3px
|
214
|
+
:line-height 1.4
|
215
|
+
h1, h2, h3, h4, h5, h6
|
216
|
+
code, tt
|
217
|
+
:font-size 1.1em
|
218
|
+
|
219
|
+
#text
|
220
|
+
:position relative
|
221
|
+
|
222
|
+
#description
|
223
|
+
// :max-width 60em
|
224
|
+
p
|
225
|
+
:margin-top .5em
|
226
|
+
h1, h2, h3, h4, h5, h6
|
227
|
+
:font-family = !title_font
|
228
|
+
h1
|
229
|
+
:font-size 2.2em
|
230
|
+
:margin-bottom .2em
|
231
|
+
:border-bottom 3px double #d8d8d8
|
232
|
+
:padding-bottom .1em
|
233
|
+
h2
|
234
|
+
:font-size 1.8em
|
235
|
+
:color = !dark_blue_text
|
236
|
+
:margin .8em 0 .3em 0
|
237
|
+
h3
|
238
|
+
:font-size 1.6em
|
239
|
+
:margin .8em 0 .3em 0
|
240
|
+
:color = !light_text
|
241
|
+
h4
|
242
|
+
:font-size 1.4em
|
243
|
+
:margin .8em 0 .3em 0
|
244
|
+
h5
|
245
|
+
:font-size 1.2em
|
246
|
+
:margin .8em 0 .3em 0
|
247
|
+
:color = !dark_blue_text
|
248
|
+
h6
|
249
|
+
:font-size 1.0em
|
250
|
+
:margin .8em 0 .3em 0
|
251
|
+
:color = !light_text
|
252
|
+
|
253
|
+
#description, .method .description
|
254
|
+
ul, ol
|
255
|
+
:margin .8em 0
|
256
|
+
:padding-left 1.5em
|
257
|
+
ol
|
258
|
+
:list-style decimal
|
259
|
+
li
|
260
|
+
:white-space normal
|
261
|
+
|
262
|
+
#method-list
|
263
|
+
:position absolute
|
264
|
+
:top 0px
|
265
|
+
:right -33%
|
266
|
+
:width 28%
|
267
|
+
:background #eee
|
268
|
+
:border 1px solid silver
|
269
|
+
:padding .4em 1%
|
270
|
+
:overflow hidden
|
271
|
+
h2
|
272
|
+
:font-size 1.3em
|
273
|
+
h3
|
274
|
+
:font-variant small-caps
|
275
|
+
:text-transform capitalize
|
276
|
+
:font-family = !title_font
|
277
|
+
:color #666
|
278
|
+
:font-size 1.1em
|
279
|
+
ol
|
280
|
+
:padding 0 0 .5em .5em
|
281
|
+
|
282
|
+
#context
|
283
|
+
:border-top 1px dashed silver
|
284
|
+
:margin-top 1em
|
285
|
+
:margin-bottom 1em
|
286
|
+
|
287
|
+
#context, #section
|
288
|
+
h2
|
289
|
+
:font = "small-caps 1.2em" !title_font
|
290
|
+
:color #444
|
291
|
+
:margin 1em 0 .2em 0
|
292
|
+
|
293
|
+
#methods
|
294
|
+
.method
|
295
|
+
:border 1px solid silver
|
296
|
+
:margin-top .5em
|
297
|
+
:background #eee
|
298
|
+
.synopsis
|
299
|
+
:color black
|
300
|
+
:background silver
|
301
|
+
:padding .2em 1em
|
302
|
+
.name
|
303
|
+
:font-weight bold
|
304
|
+
a
|
305
|
+
:text-decoration none
|
306
|
+
.description
|
307
|
+
:padding 0 1em
|
308
|
+
pre
|
309
|
+
:background #f8f8f8
|
310
|
+
.source
|
311
|
+
:margin .5em 0
|
312
|
+
.source-toggle
|
313
|
+
:font-size 85%
|
314
|
+
:margin-left 1em
|
315
|
+
.public-class
|
316
|
+
:background #ffffe4
|
317
|
+
.public-instance .synopsis
|
318
|
+
:color #eee
|
319
|
+
:background = !light_link
|
320
|
+
|
321
|
+
#content .method .source pre
|
322
|
+
:background #262626
|
323
|
+
:color #ffdead
|
324
|
+
:margin 1em
|
325
|
+
:padding 0.5em
|
326
|
+
:border 1px dashed #999
|
327
|
+
:overflow auto
|
328
|
+
|
329
|
+
.ruby-constant
|
330
|
+
:color #7fffd4
|
331
|
+
:background transparent
|
332
|
+
|
333
|
+
.ruby-keyword
|
334
|
+
:color #00ffff
|
335
|
+
:background transparent
|
336
|
+
|
337
|
+
.ruby-ivar
|
338
|
+
:color #eedd82
|
339
|
+
:background transparent
|
340
|
+
|
341
|
+
.ruby-operator
|
342
|
+
:color #00ffee
|
343
|
+
:background transparent
|
344
|
+
|
345
|
+
.ruby-identifier
|
346
|
+
:color #ffdead
|
347
|
+
:background transparent
|
348
|
+
|
349
|
+
.ruby-node
|
350
|
+
:color #ffa07a
|
351
|
+
:background transparent
|
352
|
+
|
353
|
+
.ruby-comment
|
354
|
+
:color #b22222
|
355
|
+
:font-weight bold
|
356
|
+
:background transparent
|
357
|
+
|
358
|
+
.ruby-regexp
|
359
|
+
:color #ffa07a
|
360
|
+
:background transparent
|
361
|
+
|
362
|
+
.ruby-value
|
363
|
+
:color #7fffd4
|
364
|
+
:background transparent
|