rubyosa19 0.5.0 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,696 @@
1
+ #
2
+ # Note: this is the original default RDoc template slightly modified for the
3
+ # RubyOSA project.
4
+ #
5
+ # = CSS2 RDoc HTML template
6
+ #
7
+ # This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a
8
+ # bit more of the appearance of the output to cascading stylesheets than the
9
+ # default. It was designed for clean inline code display, and uses DHTMl to
10
+ # toggle the visbility of each method's source with each click on the '[source]'
11
+ # link.
12
+ #
13
+ # == Authors
14
+ #
15
+ # * Michael Granger <ged@FaerieMUD.org>
16
+ #
17
+ # Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved.
18
+ #
19
+ # This work is licensed under the Creative Commons Attribution License. To view
20
+ # a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or
21
+ # send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
22
+ # 94305, USA.
23
+ #
24
+
25
+ module RDoc
26
+ module Page
27
+
28
+ FONTS = "Verdana,Arial,Helvetica,sans-serif"
29
+
30
+ STYLE = %{
31
+ body {
32
+ font-family: Verdana,Arial,Helvetica,sans-serif;
33
+ font-size: 90%;
34
+ margin: 0;
35
+ margin-left: 40px;
36
+ padding: 0;
37
+ background: white;
38
+ }
39
+
40
+ h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
41
+ h1 { font-size: 150%; }
42
+ h2,h3,h4 { margin-top: 1em; }
43
+
44
+ a { background: #eef; color: #039; text-decoration: none; }
45
+ a:hover { background: #039; color: #eef; }
46
+
47
+ /* Override the base stylesheet's Anchor inside a table cell */
48
+ td > a {
49
+ background: transparent;
50
+ color: #039;
51
+ text-decoration: none;
52
+ }
53
+
54
+ /* and inside a section title */
55
+ .section-title > a {
56
+ background: transparent;
57
+ color: #eee;
58
+ text-decoration: none;
59
+ }
60
+
61
+ /* === Structural elements =================================== */
62
+
63
+ div#index {
64
+ margin: 0;
65
+ margin-left: -40px;
66
+ padding: 0;
67
+ font-size: 90%;
68
+ }
69
+
70
+
71
+ div#index a {
72
+ margin-left: 0.7em;
73
+ }
74
+
75
+ div#index .section-bar {
76
+ margin-left: 0px;
77
+ padding-left: 0.7em;
78
+ background: #ccc;
79
+ font-size: small;
80
+ }
81
+
82
+
83
+ div#classHeader, div#fileHeader {
84
+ width: auto;
85
+ color: white;
86
+ padding: 0.5em 1.5em 0.5em 1.5em;
87
+ margin: 0;
88
+ margin-left: -40px;
89
+ border-bottom: 3px solid #006;
90
+ }
91
+
92
+ div#classHeader a, div#fileHeader a {
93
+ background: inherit;
94
+ color: white;
95
+ }
96
+
97
+ div#classHeader td, div#fileHeader td {
98
+ background: inherit;
99
+ color: white;
100
+ }
101
+
102
+
103
+ div#fileHeader {
104
+ background: #057;
105
+ }
106
+
107
+ div#classHeader {
108
+ background: #048;
109
+ }
110
+
111
+
112
+ .class-name-in-header {
113
+ font-size: 180%;
114
+ font-weight: bold;
115
+ }
116
+
117
+
118
+ div#bodyContent {
119
+ padding: 0 1.5em 0 1.5em;
120
+ }
121
+
122
+ div#description {
123
+ padding: 0.5em 1.5em;
124
+ background: #efefef;
125
+ border: 1px dotted #999;
126
+ }
127
+
128
+ div#description h1,h2,h3,h4,h5,h6 {
129
+ color: #125;;
130
+ background: transparent;
131
+ }
132
+
133
+ div#validator-badges {
134
+ text-align: center;
135
+ }
136
+ div#validator-badges img { border: 0; }
137
+
138
+ div#copyright {
139
+ color: #333;
140
+ background: #efefef;
141
+ font: 0.75em sans-serif;
142
+ margin-top: 5em;
143
+ margin-bottom: 0;
144
+ padding: 0.5em 2em;
145
+ }
146
+
147
+
148
+ /* === Classes =================================== */
149
+
150
+ table.header-table {
151
+ color: white;
152
+ font-size: small;
153
+ }
154
+
155
+ .type-note {
156
+ font-size: small;
157
+ color: #DEDEDE;
158
+ }
159
+
160
+ .xxsection-bar {
161
+ background: #eee;
162
+ color: #333;
163
+ padding: 3px;
164
+ }
165
+
166
+ .section-bar {
167
+ color: #333;
168
+ border-bottom: 1px solid #999;
169
+ margin-left: -20px;
170
+ }
171
+
172
+
173
+ .section-title {
174
+ background: #79a;
175
+ color: #eee;
176
+ padding: 3px;
177
+ margin-top: 2em;
178
+ margin-left: -30px;
179
+ border: 1px solid #999;
180
+ }
181
+
182
+ .top-aligned-row { vertical-align: top }
183
+ .bottom-aligned-row { vertical-align: bottom }
184
+
185
+ /* --- Context section classes ----------------------- */
186
+
187
+ .context-row { }
188
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
189
+ .context-item-value { font-size: small; color: #448; }
190
+ .context-item-desc { color: #333; padding-left: 2em; }
191
+
192
+ /* --- Method classes -------------------------- */
193
+ .method-detail {
194
+ background: #efefef;
195
+ padding: 0;
196
+ margin-top: 0.5em;
197
+ margin-bottom: 1em;
198
+ border: 1px dotted #ccc;
199
+ }
200
+ .method-heading {
201
+ color: black;
202
+ background: #ccc;
203
+ border-bottom: 1px solid #666;
204
+ padding: 0.2em 0.5em 0 0.5em;
205
+ }
206
+ .method-signature { color: black; background: inherit; }
207
+ .method-name { font-weight: bold; }
208
+ .method-args { font-style: italic; }
209
+ .method-description { padding: 0 0.5em 0 0.5em; }
210
+
211
+ /* --- Source code sections -------------------- */
212
+
213
+ a.source-toggle { font-size: 90%; }
214
+ div.method-source-code {
215
+ background: #262626;
216
+ color: #ffdead;
217
+ margin: 1em;
218
+ padding: 0.5em;
219
+ border: 1px dashed #999;
220
+ overflow: hidden;
221
+ }
222
+
223
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
224
+
225
+ /* --- Ruby keyword styles --------------------- */
226
+
227
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
228
+
229
+ .ruby-constant { color: #7fffd4; background: transparent; }
230
+ .ruby-keyword { color: #00ffff; background: transparent; }
231
+ .ruby-ivar { color: #eedd82; background: transparent; }
232
+ .ruby-operator { color: #00ffee; background: transparent; }
233
+ .ruby-identifier { color: #ffdead; background: transparent; }
234
+ .ruby-node { color: #ffa07a; background: transparent; }
235
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
236
+ .ruby-regexp { color: #ffa07a; background: transparent; }
237
+ .ruby-value { color: #7fffd4; background: transparent; }
238
+ }
239
+
240
+
241
+ #####################################################################
242
+ ### H E A D E R T E M P L A T E
243
+ #####################################################################
244
+
245
+ XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
246
+ <!DOCTYPE html
247
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
248
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
249
+ }
250
+
251
+ HEADER = XHTML_PREAMBLE + %{
252
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
253
+ <head>
254
+ <title>%title%</title>
255
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
256
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
257
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
258
+ <script type="text/javascript">
259
+ // <![CDATA[
260
+
261
+ function popupCode( url ) {
262
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
263
+ }
264
+
265
+ function toggleCode( id ) {
266
+ if ( document.getElementById )
267
+ elem = document.getElementById( id );
268
+ else if ( document.all )
269
+ elem = eval( "document.all." + id );
270
+ else
271
+ return false;
272
+
273
+ elemStyle = elem.style;
274
+
275
+ if ( elemStyle.display != "block" ) {
276
+ elemStyle.display = "block"
277
+ } else {
278
+ elemStyle.display = "none"
279
+ }
280
+
281
+ return true;
282
+ }
283
+
284
+ // Make codeblocks hidden by default
285
+ document.writeln( "<style type=\\"text/css\\">div.method-source-code { display: none }</style>" )
286
+
287
+ // ]]>
288
+ </script>
289
+
290
+ </head>
291
+ <body>
292
+ }
293
+
294
+
295
+ #####################################################################
296
+ ### C O N T E X T C O N T E N T T E M P L A T E
297
+ #####################################################################
298
+
299
+ CONTEXT_CONTENT = %{
300
+ }
301
+
302
+
303
+ #####################################################################
304
+ ### F O O T E R T E M P L A T E
305
+ #####################################################################
306
+ FOOTER = %{
307
+ <div id="validator-badges">
308
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
309
+ </div>
310
+
311
+ </body>
312
+ </html>
313
+ }
314
+
315
+
316
+ #####################################################################
317
+ ### F I L E P A G E H E A D E R T E M P L A T E
318
+ #####################################################################
319
+
320
+ FILE_PAGE = %{
321
+ <div id="fileHeader">
322
+ <h1>%short_name%</h1>
323
+ <table class="header-table">
324
+ <tr class="top-aligned-row">
325
+ <td><strong>Path:</strong></td>
326
+ <td>%full_path%
327
+ IF:cvsurl
328
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
329
+ ENDIF:cvsurl
330
+ </td>
331
+ </tr>
332
+ <tr class="top-aligned-row">
333
+ <td><strong>Last Update:</strong></td>
334
+ <td>%dtm_modified%</td>
335
+ </tr>
336
+ </table>
337
+ </div>
338
+ }
339
+
340
+
341
+ #####################################################################
342
+ ### C L A S S P A G E H E A D E R T E M P L A T E
343
+ #####################################################################
344
+
345
+ CLASS_PAGE = %{
346
+ <div id="classHeader">
347
+ <table class="header-table">
348
+ <tr class="top-aligned-row">
349
+ <td><strong>%classmod%</strong></td>
350
+ <td class="class-name-in-header">%full_name%</td>
351
+ </tr>
352
+ <!--
353
+ <tr class="top-aligned-row">
354
+ <td><strong>In:</strong></td>
355
+ <td>
356
+ START:infiles
357
+ IF:full_path_url
358
+ <a href="%full_path_url%">
359
+ ENDIF:full_path_url
360
+ %full_path%
361
+ IF:full_path_url
362
+ </a>
363
+ ENDIF:full_path_url
364
+ IF:cvsurl
365
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
366
+ ENDIF:cvsurl
367
+ <br />
368
+ END:infiles
369
+ </td>
370
+ </tr>
371
+ -->
372
+
373
+ IF:parent
374
+ <tr class="top-aligned-row">
375
+ <td><strong>Parent:</strong></td>
376
+ <td>
377
+ IF:par_url
378
+ <a href="%par_url%">
379
+ ENDIF:par_url
380
+ %parent%
381
+ IF:par_url
382
+ </a>
383
+ ENDIF:par_url
384
+ </td>
385
+ </tr>
386
+ ENDIF:parent
387
+ </table>
388
+ </div>
389
+ }
390
+
391
+
392
+ #####################################################################
393
+ ### M E T H O D L I S T T E M P L A T E
394
+ #####################################################################
395
+
396
+ METHOD_LIST = %{
397
+
398
+ <div id="contextContent">
399
+ IF:diagram
400
+ <div id="diagram">
401
+ %diagram%
402
+ </div>
403
+ ENDIF:diagram
404
+
405
+ IF:description
406
+ <div id="description">
407
+ %description%
408
+ </div>
409
+ ENDIF:description
410
+
411
+ IF:requires
412
+ <div id="requires-list">
413
+ <h3 class="section-bar">Required files</h3>
414
+
415
+ <div class="name-list">
416
+ START:requires
417
+ HREF:aref:name:&nbsp;&nbsp;
418
+ END:requires
419
+ </div>
420
+ </div>
421
+ ENDIF:requires
422
+
423
+ IF:toc
424
+ <div id="contents-list">
425
+ <h3 class="section-bar">Contents</h3>
426
+ <ul>
427
+ START:toc
428
+ <li><a href="#%href%">%secname%</a></li>
429
+ END:toc
430
+ </ul>
431
+ ENDIF:toc
432
+ </div>
433
+
434
+ IF:methods
435
+ <div id="method-list">
436
+ <h3 class="section-bar">Methods</h3>
437
+
438
+ <div class="name-list">
439
+ START:methods
440
+ HREF:aref:name:&nbsp;&nbsp;
441
+ END:methods
442
+ </div>
443
+ </div>
444
+ ENDIF:methods
445
+
446
+ </div>
447
+
448
+
449
+ <!-- if includes -->
450
+ IF:includes
451
+ <div id="includes">
452
+ <h3 class="section-bar">Included Modules</h3>
453
+
454
+ <div id="includes-list">
455
+ START:includes
456
+ <span class="include-name">HREF:aref:name:</span>
457
+ END:includes
458
+ </div>
459
+ </div>
460
+ ENDIF:includes
461
+
462
+ START:sections
463
+ <div id="section">
464
+ IF:sectitle
465
+ <h2 class="section-title"><a name="%secsequence%">%sectitle%</a></h2>
466
+ IF:seccomment
467
+ <div class="section-comment">
468
+ %seccomment%
469
+ </div>
470
+ ENDIF:seccomment
471
+ ENDIF:sectitle
472
+
473
+ IF:classlist
474
+ <div id="class-list">
475
+ <h3 class="section-bar">Classes and Modules</h3>
476
+
477
+ %classlist%
478
+ </div>
479
+ ENDIF:classlist
480
+
481
+ IF:constants
482
+ <div id="constants-list">
483
+ <h3 class="section-bar">Constants</h3>
484
+
485
+ <div class="name-list">
486
+ <table summary="Constants">
487
+ START:constants
488
+ <tr class="top-aligned-row context-row">
489
+ <td class="context-item-name">%name%</td>
490
+ <td>=</td>
491
+ <td class="context-item-value">%value%</td>
492
+ IF:desc
493
+ <td width="3em">&nbsp;</td>
494
+ <td class="context-item-desc">%desc%</td>
495
+ ENDIF:desc
496
+ </tr>
497
+ END:constants
498
+ </table>
499
+ </div>
500
+ </div>
501
+ ENDIF:constants
502
+
503
+ IF:aliases
504
+ <div id="aliases-list">
505
+ <h3 class="section-bar">External Aliases</h3>
506
+
507
+ <div class="name-list">
508
+ <table summary="aliases">
509
+ START:aliases
510
+ <tr class="top-aligned-row context-row">
511
+ <td class="context-item-name">%old_name%</td>
512
+ <td>-&gt;</td>
513
+ <td class="context-item-value">%new_name%</td>
514
+ </tr>
515
+ IF:desc
516
+ <tr class="top-aligned-row context-row">
517
+ <td>&nbsp;</td>
518
+ <td colspan="2" class="context-item-desc">%desc%</td>
519
+ </tr>
520
+ ENDIF:desc
521
+ END:aliases
522
+ </table>
523
+ </div>
524
+ </div>
525
+ ENDIF:aliases
526
+
527
+
528
+ IF:attributes
529
+ <div id="attribute-list">
530
+ <h3 class="section-bar">Attributes</h3>
531
+
532
+ <div class="name-list">
533
+ <table>
534
+ START:attributes
535
+ <tr class="top-aligned-row context-row">
536
+ <td class="context-item-name">%name%</td>
537
+ IF:rw
538
+ <td class="context-item-value">&nbsp;[%rw%]&nbsp;</td>
539
+ ENDIF:rw
540
+ IFNOT:rw
541
+ <td class="context-item-value">&nbsp;&nbsp;</td>
542
+ ENDIF:rw
543
+ <td class="context-item-desc">%a_desc%</td>
544
+ </tr>
545
+ END:attributes
546
+ </table>
547
+ </div>
548
+ </div>
549
+ ENDIF:attributes
550
+
551
+
552
+
553
+ <!-- if method_list -->
554
+ IF:method_list
555
+ <div id="methods">
556
+ START:method_list
557
+ IF:methods
558
+ <h3 class="section-bar">%type% %category% methods</h3>
559
+
560
+ START:methods
561
+ <div id="method-%aref%" class="method-detail">
562
+ <a name="%aref%"></a>
563
+
564
+ <div class="method-heading">
565
+ IF:callseq
566
+ <span class="method-name">%callseq%</span>
567
+ ENDIF:callseq
568
+ IFNOT:callseq
569
+ <span class="method-name">%name%</span><span class="method-args">%params%</span>
570
+ ENDIF:callseq
571
+ IF:codeurl
572
+ </a>
573
+ ENDIF:codeurl
574
+ </div>
575
+
576
+ <div class="method-description">
577
+ IF:m_desc
578
+ %m_desc%
579
+ ENDIF:m_desc
580
+ </div>
581
+ </div>
582
+
583
+ END:methods
584
+ ENDIF:methods
585
+ END:method_list
586
+
587
+ </div>
588
+ ENDIF:method_list
589
+ END:sections
590
+ }
591
+
592
+
593
+ #####################################################################
594
+ ### B O D Y T E M P L A T E
595
+ #####################################################################
596
+
597
+ BODY = HEADER + %{
598
+
599
+ !INCLUDE! <!-- banner header -->
600
+
601
+ <div id="bodyContent">
602
+
603
+ } + METHOD_LIST + %{
604
+
605
+ </div>
606
+
607
+ } + FOOTER
608
+
609
+
610
+
611
+ #####################################################################
612
+ ### S O U R C E C O D E T E M P L A T E
613
+ #####################################################################
614
+
615
+ SRC_PAGE = XHTML_PREAMBLE + %{
616
+ <html>
617
+ <head>
618
+ <title>%title%</title>
619
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
620
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
621
+ </head>
622
+ <body class="standalone-code">
623
+ <pre>%code%</pre>
624
+ </body>
625
+ </html>
626
+ }
627
+
628
+
629
+ #####################################################################
630
+ ### I N D E X F I L E T E M P L A T E S
631
+ #####################################################################
632
+
633
+ FR_INDEX_BODY = %{
634
+ !INCLUDE!
635
+ }
636
+
637
+ FILE_INDEX = XHTML_PREAMBLE + %{
638
+ <!--
639
+
640
+ %list_title%
641
+
642
+ -->
643
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
644
+ <head>
645
+ <title>%list_title%</title>
646
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
647
+ <link rel="stylesheet" href="%style_url%" type="text/css" />
648
+ <base target="docwin" />
649
+ </head>
650
+ <body>
651
+ <div id="index">
652
+ <h1 class="section-bar">%list_title%</h1>
653
+ <div id="index-entries">
654
+ START:entries
655
+ <a href="%href%">%name%</a><br />
656
+ END:entries
657
+ </div>
658
+ </div>
659
+ </body>
660
+ </html>
661
+ }
662
+
663
+ CLASS_INDEX = FILE_INDEX
664
+ METHOD_INDEX = FILE_INDEX
665
+
666
+ INDEX = %{<?xml version="1.0" encoding="%charset%"?>
667
+ <!DOCTYPE html
668
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
669
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
670
+
671
+ <!--
672
+
673
+ %title%
674
+
675
+ -->
676
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
677
+ <head>
678
+ <title>%title%</title>
679
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
680
+ </head>
681
+ <frameset rows="20%, 80%">
682
+ <frameset cols="50%,50%">
683
+ <frame src="fr_class_index.html" name="Classes" />
684
+ <frame src="fr_method_index.html" name="Methods" />
685
+ </frameset>
686
+ <frame src="%initial_page%" name="docwin" />
687
+ </frameset>
688
+ </html>
689
+ }
690
+
691
+
692
+
693
+ end # module Page
694
+ end # class RDoc
695
+
696
+ require 'rdoc/generators/template/html/one_page_html'