1 | module RDoc
|
---|
2 | module Page
|
---|
3 |
|
---|
4 |
|
---|
5 | FONTS = "Verdana, Arial, Helvetica, sans-serif"
|
---|
6 |
|
---|
7 | STYLE = %{
|
---|
8 | body,td,p { font-family: %fonts%;
|
---|
9 | color: #000040;
|
---|
10 | }
|
---|
11 |
|
---|
12 | .attr-rw { font-size: xx-small; color: #444488 }
|
---|
13 |
|
---|
14 | .title-row { background-color: #CCCCFF;
|
---|
15 | color: #000010;
|
---|
16 | }
|
---|
17 |
|
---|
18 | .big-title-font {
|
---|
19 | color: black;
|
---|
20 | font-weight: bold;
|
---|
21 | font-family: %fonts%;
|
---|
22 | font-size: large;
|
---|
23 | height: 60px;
|
---|
24 | padding: 10px 3px 10px 3px;
|
---|
25 | }
|
---|
26 |
|
---|
27 | .small-title-font { color: black;
|
---|
28 | font-family: %fonts%;
|
---|
29 | font-size:10; }
|
---|
30 |
|
---|
31 | .aqua { color: black }
|
---|
32 |
|
---|
33 | .method-name, .attr-name {
|
---|
34 | font-family: font-family: %fonts%;
|
---|
35 | font-weight: bold;
|
---|
36 | font-size: small;
|
---|
37 | margin-left: 20px;
|
---|
38 | color: #000033;
|
---|
39 | }
|
---|
40 |
|
---|
41 | .tablesubtitle, .tablesubsubtitle {
|
---|
42 | width: 100%;
|
---|
43 | margin-top: 1ex;
|
---|
44 | margin-bottom: .5ex;
|
---|
45 | padding: 5px 0px 5px 3px;
|
---|
46 | font-size: large;
|
---|
47 | color: black;
|
---|
48 | background-color: #CCCCFF;
|
---|
49 | border: thin;
|
---|
50 | }
|
---|
51 |
|
---|
52 | .name-list {
|
---|
53 | margin-left: 5px;
|
---|
54 | margin-bottom: 2ex;
|
---|
55 | line-height: 105%;
|
---|
56 | }
|
---|
57 |
|
---|
58 | .description {
|
---|
59 | margin-left: 5px;
|
---|
60 | margin-bottom: 2ex;
|
---|
61 | line-height: 105%;
|
---|
62 | font-size: small;
|
---|
63 | }
|
---|
64 |
|
---|
65 | .methodtitle {
|
---|
66 | font-size: small;
|
---|
67 | font-weight: bold;
|
---|
68 | text-decoration: none;
|
---|
69 | color: #000033;
|
---|
70 | background-color: white;
|
---|
71 | }
|
---|
72 |
|
---|
73 | .srclink {
|
---|
74 | font-size: small;
|
---|
75 | font-weight: bold;
|
---|
76 | text-decoration: none;
|
---|
77 | color: #0000DD;
|
---|
78 | background-color: white;
|
---|
79 | }
|
---|
80 |
|
---|
81 | .paramsig {
|
---|
82 | font-size: small;
|
---|
83 | }
|
---|
84 |
|
---|
85 | .srcbut { float: right }
|
---|
86 |
|
---|
87 | }
|
---|
88 |
|
---|
89 |
|
---|
90 | ############################################################################
|
---|
91 |
|
---|
92 |
|
---|
93 | BODY = %{
|
---|
94 | <html><head>
|
---|
95 | <title>%title%</title>
|
---|
96 | <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
---|
97 | <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
|
---|
98 | <script type="text/javascript" language="JavaScript">
|
---|
99 | <!--
|
---|
100 | function popCode(url) {
|
---|
101 | parent.frames.source.location = url
|
---|
102 | }
|
---|
103 | //-->
|
---|
104 | </script>
|
---|
105 | </head>
|
---|
106 | <body bgcolor="white">
|
---|
107 |
|
---|
108 | !INCLUDE! <!-- banner header -->
|
---|
109 |
|
---|
110 | IF:diagram
|
---|
111 | <table width="100%"><tr><td align="center">
|
---|
112 | %diagram%
|
---|
113 | </td></tr></table>
|
---|
114 | ENDIF:diagram
|
---|
115 |
|
---|
116 | IF:description
|
---|
117 | <div class="description">%description%</div>
|
---|
118 | ENDIF:description
|
---|
119 |
|
---|
120 | IF:requires
|
---|
121 | <table cellpadding="5" width="100%">
|
---|
122 | <tr><td class="tablesubtitle">Required files</td></tr>
|
---|
123 | </table><br />
|
---|
124 | <div class="name-list">
|
---|
125 | START:requires
|
---|
126 | HREF:aref:name:
|
---|
127 | END:requires
|
---|
128 | ENDIF:requires
|
---|
129 | </div>
|
---|
130 |
|
---|
131 | IF:methods
|
---|
132 | <table cellpadding="5" width="100%">
|
---|
133 | <tr><td class="tablesubtitle">Methods</td></tr>
|
---|
134 | </table><br />
|
---|
135 | <div class="name-list">
|
---|
136 | START:methods
|
---|
137 | HREF:aref:name:,
|
---|
138 | END:methods
|
---|
139 | </div>
|
---|
140 | ENDIF:methods
|
---|
141 |
|
---|
142 |
|
---|
143 | START:sections
|
---|
144 | <div id="section">
|
---|
145 | IF:sectitle
|
---|
146 | <h2 class="section-title"><a name="%secsequence%">%sectitle%</a></h2>
|
---|
147 | IF:seccomment
|
---|
148 | <div class="section-comment">
|
---|
149 | %seccomment%
|
---|
150 | </div>
|
---|
151 | ENDIF:seccomment
|
---|
152 | ENDIF:sectitle
|
---|
153 |
|
---|
154 | IF:attributes
|
---|
155 | <table cellpadding="5" width="100%">
|
---|
156 | <tr><td class="tablesubtitle">Attributes</td></tr>
|
---|
157 | </table><br />
|
---|
158 | <table cellspacing="5">
|
---|
159 | START:attributes
|
---|
160 | <tr valign="top">
|
---|
161 | IF:rw
|
---|
162 | <td align="center" class="attr-rw"> [%rw%] </td>
|
---|
163 | ENDIF:rw
|
---|
164 | IFNOT:rw
|
---|
165 | <td></td>
|
---|
166 | ENDIF:rw
|
---|
167 | <td class="attr-name">%name%</td>
|
---|
168 | <td>%a_desc%</td>
|
---|
169 | </tr>
|
---|
170 | END:attributes
|
---|
171 | </table>
|
---|
172 | ENDIF:attributes
|
---|
173 |
|
---|
174 | IF:classlist
|
---|
175 | <table cellpadding="5" width="100%">
|
---|
176 | <tr><td class="tablesubtitle">Classes and Modules</td></tr>
|
---|
177 | </table><br />
|
---|
178 | %classlist%<br />
|
---|
179 | ENDIF:classlist
|
---|
180 |
|
---|
181 | !INCLUDE! <!-- method descriptions -->
|
---|
182 |
|
---|
183 | END:sections
|
---|
184 |
|
---|
185 | </body>
|
---|
186 | </html>
|
---|
187 | }
|
---|
188 |
|
---|
189 | ###############################################################################
|
---|
190 |
|
---|
191 | FILE_PAGE = <<_FILE_PAGE_
|
---|
192 | <table width="100%">
|
---|
193 | <tr class="title-row">
|
---|
194 | <td><table width="100%"><tr>
|
---|
195 | <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font>%short_name%</td>
|
---|
196 | <td align="right"><table cellspacing="0" cellpadding="2">
|
---|
197 | <tr>
|
---|
198 | <td class="small-title-font">Path:</td>
|
---|
199 | <td class="small-title-font">%full_path%
|
---|
200 | IF:cvsurl
|
---|
201 | (<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
---|
202 | ENDIF:cvsurl
|
---|
203 | </td>
|
---|
204 | </tr>
|
---|
205 | <tr>
|
---|
206 | <td class="small-title-font">Modified:</td>
|
---|
207 | <td class="small-title-font">%dtm_modified%</td>
|
---|
208 | </tr>
|
---|
209 | </table>
|
---|
210 | </td></tr></table></td>
|
---|
211 | </tr>
|
---|
212 | </table><br />
|
---|
213 | _FILE_PAGE_
|
---|
214 |
|
---|
215 | ###################################################################
|
---|
216 |
|
---|
217 | CLASS_PAGE = %{
|
---|
218 | <table width="100%" border="0" cellspacing="0">
|
---|
219 | <tr class="title-row">
|
---|
220 | <td class="big-title-font">
|
---|
221 | <font size="-3"><b>%classmod%</b><br /></font>%full_name%
|
---|
222 | </td>
|
---|
223 | <td align="right">
|
---|
224 | <table cellspacing="0" cellpadding="2">
|
---|
225 | <tr valign="top">
|
---|
226 | <td class="small-title-font">In:</td>
|
---|
227 | <td class="small-title-font">
|
---|
228 | START:infiles
|
---|
229 | HREF:full_path_url:full_path:
|
---|
230 | IF:cvsurl
|
---|
231 | (<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
---|
232 | ENDIF:cvsurl
|
---|
233 | END:infiles
|
---|
234 | </td>
|
---|
235 | </tr>
|
---|
236 | IF:parent
|
---|
237 | <tr>
|
---|
238 | <td class="small-title-font">Parent:</td>
|
---|
239 | <td class="small-title-font">
|
---|
240 | IF:par_url
|
---|
241 | <a href="%par_url%" class="cyan">
|
---|
242 | ENDIF:par_url
|
---|
243 | %parent%
|
---|
244 | IF:par_url
|
---|
245 | </a>
|
---|
246 | ENDIF:par_url
|
---|
247 | </td>
|
---|
248 | </tr>
|
---|
249 | ENDIF:parent
|
---|
250 | </table>
|
---|
251 | </td>
|
---|
252 | </tr>
|
---|
253 | </table><br />
|
---|
254 | }
|
---|
255 |
|
---|
256 | ###################################################################
|
---|
257 |
|
---|
258 | METHOD_LIST = %{
|
---|
259 | IF:includes
|
---|
260 | <div class="tablesubsubtitle">Included modules</div><br />
|
---|
261 | <div class="name-list">
|
---|
262 | START:includes
|
---|
263 | <span class="method-name">HREF:aref:name:</span>
|
---|
264 | END:includes
|
---|
265 | </div>
|
---|
266 | ENDIF:includes
|
---|
267 |
|
---|
268 | IF:method_list
|
---|
269 | START:method_list
|
---|
270 | IF:methods
|
---|
271 | <table cellpadding=5 width="100%">
|
---|
272 | <tr><td class="tablesubtitle">%type% %category% methods</td></tr>
|
---|
273 | </table>
|
---|
274 | START:methods
|
---|
275 | <table width="100%" cellspacing="0" cellpadding="5" border="0">
|
---|
276 | <tr><td class="methodtitle">
|
---|
277 | <a name="%aref%">
|
---|
278 | IF:callseq
|
---|
279 | <b>%callseq%</b>
|
---|
280 | ENDIF:callseq
|
---|
281 | IFNOT:callseq
|
---|
282 | <b>%name%</b>%params%
|
---|
283 | ENDIF:callseq
|
---|
284 | IF:codeurl
|
---|
285 | <a href="%codeurl%" target="source" class="srclink">src</a>
|
---|
286 | ENDIF:codeurl
|
---|
287 | </a></td></tr>
|
---|
288 | </table>
|
---|
289 | IF:m_desc
|
---|
290 | <div class="description">
|
---|
291 | %m_desc%
|
---|
292 | </div>
|
---|
293 | ENDIF:m_desc
|
---|
294 | IF:aka
|
---|
295 | <div class="aka">
|
---|
296 | This method is also aliased as
|
---|
297 | START:aka
|
---|
298 | <a href="%aref%">%name%</a>
|
---|
299 | END:aka
|
---|
300 | </div>
|
---|
301 | ENDIF:aka
|
---|
302 | IF:sourcecode
|
---|
303 | <pre class="source">
|
---|
304 | %sourcecode%
|
---|
305 | </pre>
|
---|
306 | ENDIF:sourcecode
|
---|
307 | END:methods
|
---|
308 | ENDIF:methods
|
---|
309 | END:method_list
|
---|
310 | ENDIF:method_list
|
---|
311 | }
|
---|
312 |
|
---|
313 | =begin
|
---|
314 | =end
|
---|
315 |
|
---|
316 | ########################## Source code ##########################
|
---|
317 |
|
---|
318 | SRC_PAGE = %{
|
---|
319 | <html>
|
---|
320 | <head><title>%title%</title>
|
---|
321 | <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
---|
322 | <style type="text/css">
|
---|
323 | .ruby-comment { color: green; font-style: italic }
|
---|
324 | .ruby-constant { color: #4433aa; font-weight: bold; }
|
---|
325 | .ruby-identifier { color: #222222; }
|
---|
326 | .ruby-ivar { color: #2233dd; }
|
---|
327 | .ruby-keyword { color: #3333FF; font-weight: bold }
|
---|
328 | .ruby-node { color: #777777; }
|
---|
329 | .ruby-operator { color: #111111; }
|
---|
330 | .ruby-regexp { color: #662222; }
|
---|
331 | .ruby-value { color: #662222; font-style: italic }
|
---|
332 | .kw { color: #3333FF; font-weight: bold }
|
---|
333 | .cmt { color: green; font-style: italic }
|
---|
334 | .str { color: #662222; font-style: italic }
|
---|
335 | .re { color: #662222; }
|
---|
336 | </style>
|
---|
337 | </head>
|
---|
338 | <body bgcolor="white">
|
---|
339 | <pre>%code%</pre>
|
---|
340 | </body>
|
---|
341 | </html>
|
---|
342 | }
|
---|
343 |
|
---|
344 | ########################## Index ################################
|
---|
345 |
|
---|
346 | FR_INDEX_BODY = %{
|
---|
347 | !INCLUDE!
|
---|
348 | }
|
---|
349 |
|
---|
350 | FILE_INDEX = %{
|
---|
351 | <html>
|
---|
352 | <head>
|
---|
353 | <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
---|
354 | <style>
|
---|
355 | <!--
|
---|
356 | body {
|
---|
357 | background-color: #ddddff;
|
---|
358 | font-family: #{FONTS};
|
---|
359 | font-size: 11px;
|
---|
360 | font-style: normal;
|
---|
361 | line-height: 14px;
|
---|
362 | color: #000040;
|
---|
363 | }
|
---|
364 | div.banner {
|
---|
365 | background: #0000aa;
|
---|
366 | color: white;
|
---|
367 | padding: 1;
|
---|
368 | margin: 0;
|
---|
369 | font-size: 90%;
|
---|
370 | font-weight: bold;
|
---|
371 | line-height: 1.1;
|
---|
372 | text-align: center;
|
---|
373 | width: 100%;
|
---|
374 | }
|
---|
375 |
|
---|
376 | -->
|
---|
377 | </style>
|
---|
378 | <base target="docwin">
|
---|
379 | </head>
|
---|
380 | <body>
|
---|
381 | <div class="banner">%list_title%</div>
|
---|
382 | START:entries
|
---|
383 | <a href="%href%">%name%</a><br />
|
---|
384 | END:entries
|
---|
385 | </body></html>
|
---|
386 | }
|
---|
387 |
|
---|
388 | CLASS_INDEX = FILE_INDEX
|
---|
389 | METHOD_INDEX = FILE_INDEX
|
---|
390 |
|
---|
391 | INDEX = %{
|
---|
392 | <html>
|
---|
393 | <head>
|
---|
394 | <title>%title%</title>
|
---|
395 | <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
---|
396 | </head>
|
---|
397 |
|
---|
398 | <frameset cols="20%,*">
|
---|
399 | <frameset rows="15%,35%,50%">
|
---|
400 | <frame src="fr_file_index.html" title="Files" name="Files">
|
---|
401 | <frame src="fr_class_index.html" name="Classes">
|
---|
402 | <frame src="fr_method_index.html" name="Methods">
|
---|
403 | </frameset>
|
---|
404 | IF:inline_source
|
---|
405 | <frame src="%initial_page%" name="docwin">
|
---|
406 | ENDIF:inline_source
|
---|
407 | IFNOT:inline_source
|
---|
408 | <frameset rows="80%,20%">
|
---|
409 | <frame src="%initial_page%" name="docwin">
|
---|
410 | <frame src="blank.html" name="source">
|
---|
411 | </frameset>
|
---|
412 | ENDIF:inline_source
|
---|
413 | <noframes>
|
---|
414 | <body bgcolor="white">
|
---|
415 | Click <a href="html/index.html">here</a> for a non-frames
|
---|
416 | version of this page.
|
---|
417 | </body>
|
---|
418 | </noframes>
|
---|
419 | </frameset>
|
---|
420 |
|
---|
421 | </html>
|
---|
422 | }
|
---|
423 |
|
---|
424 | # and a blank page to use as a target
|
---|
425 | BLANK = %{
|
---|
426 | <html><body bgcolor="white"></body></html>
|
---|
427 | }
|
---|
428 |
|
---|
429 | def write_extra_pages
|
---|
430 | template = TemplatePage.new(BLANK)
|
---|
431 | File.open("blank.html", "w") { |f| template.write_html_on(f, {}) }
|
---|
432 | end
|
---|
433 |
|
---|
434 | end
|
---|
435 | end
|
---|