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