PageRenderTime 69ms CodeModel.GetById 46ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/1.8/rdoc/generators/template/html/kilmer.rb

http://github.com/agross/netopenspace
Ruby | 435 lines | 372 code | 54 blank | 9 comment | 1 complexity | b7976d7b94fa3c67e006ee1ce2bd4a2d MD5 | raw file
  1module RDoc
  2module Page
  3
  4
  5FONTS = "Verdana, Arial, Helvetica, sans-serif"
  6
  7STYLE = %{
  8body,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
 93BODY = %{
 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
110IF:diagram
111<table width="100%"><tr><td align="center">
112%diagram%
113</td></tr></table>
114ENDIF:diagram
115
116IF:description
117<div class="description">%description%</div>
118ENDIF:description
119
120IF:requires
121<table cellpadding="5" width="100%">
122<tr><td class="tablesubtitle">Required files</td></tr>
123</table><br />
124<div class="name-list">
125START:requires
126HREF:aref:name:
127END:requires
128ENDIF:requires
129</div>
130
131IF:methods
132<table cellpadding="5" width="100%">
133<tr><td class="tablesubtitle">Methods</td></tr>
134</table><br />
135<div class="name-list">
136START:methods
137HREF:aref:name:,
138END:methods
139</div>
140ENDIF:methods
141
142
143START:sections
144    <div id="section">
145IF:sectitle
146      <h2 class="section-title"><a name="%secsequence%">%sectitle%</a></h2>
147IF:seccomment
148      <div class="section-comment">
149        %seccomment%
150      </div>      
151ENDIF:seccomment
152ENDIF:sectitle
153
154IF:attributes
155<table cellpadding="5" width="100%">
156<tr><td class="tablesubtitle">Attributes</td></tr>
157</table><br />
158<table cellspacing="5">
159START:attributes
160     <tr valign="top">
161IF:rw
162       <td align="center" class="attr-rw">&nbsp;[%rw%]&nbsp;</td>
163ENDIF:rw
164IFNOT:rw
165       <td></td>
166ENDIF:rw
167       <td class="attr-name">%name%</td>
168       <td>%a_desc%</td>
169     </tr>
170END:attributes
171</table>
172ENDIF:attributes
173
174IF:classlist
175<table cellpadding="5" width="100%">
176<tr><td class="tablesubtitle">Classes and Modules</td></tr>
177</table><br />
178%classlist%<br />
179ENDIF:classlist
180
181  !INCLUDE!  <!-- method descriptions -->
182
183END:sections
184
185</body>
186</html>
187}
188
189###############################################################################
190
191FILE_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%
200IF:cvsurl
201				&nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
202ENDIF: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
217CLASS_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">
228START:infiles
229HREF:full_path_url:full_path:
230IF:cvsurl
231&nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
232ENDIF:cvsurl
233END:infiles
234      </td>
235     </tr>
236IF:parent
237     <tr>
238      <td class="small-title-font">Parent:</td>
239      <td class="small-title-font">
240IF:par_url
241        <a href="%par_url%" class="cyan">
242ENDIF:par_url
243%parent%
244IF:par_url
245         </a>
246ENDIF:par_url
247      </td>
248     </tr>
249ENDIF:parent
250   </table>
251  </td>
252  </tr>
253</table><br />
254}
255
256###################################################################
257
258METHOD_LIST = %{
259IF:includes
260<div class="tablesubsubtitle">Included modules</div><br />
261<div class="name-list">
262START:includes
263    <span class="method-name">HREF:aref:name:</span>
264END:includes
265</div>
266ENDIF:includes
267
268IF:method_list
269START:method_list
270IF:methods
271<table cellpadding=5 width="100%">
272<tr><td class="tablesubtitle">%type% %category% methods</td></tr>
273</table>
274START:methods
275<table width="100%" cellspacing="0" cellpadding="5" border="0">
276<tr><td class="methodtitle">
277<a name="%aref%">
278IF:callseq
279<b>%callseq%</b>
280ENDIF:callseq
281IFNOT:callseq
282 <b>%name%</b>%params%
283ENDIF:callseq
284IF:codeurl
285<a href="%codeurl%" target="source" class="srclink">src</a>
286ENDIF:codeurl
287</a></td></tr>
288</table>
289IF:m_desc
290<div class="description">
291%m_desc%
292</div>
293ENDIF:m_desc
294IF:aka
295<div class="aka">
296This method is also aliased as
297START:aka
298<a href="%aref%">%name%</a>
299END:aka
300</div>
301ENDIF:aka
302IF:sourcecode
303<pre class="source">
304%sourcecode%
305</pre>
306ENDIF:sourcecode
307END:methods
308ENDIF:methods
309END:method_list
310ENDIF:method_list
311}
312
313=begin
314=end
315
316########################## Source code ##########################
317
318SRC_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
346FR_INDEX_BODY = %{
347!INCLUDE!
348}
349
350FILE_INDEX = %{
351<html>
352<head>
353<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
354<style>
355<!--
356  body {
357background-color: #ddddff;
358     font-family: #{FONTS}; 
359       font-size: 11px; 
360      font-style: normal;
361     line-height: 14px; 
362           color: #000040;
363  }
364div.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>
382START:entries
383<a href="%href%">%name%</a><br />
384END:entries
385</body></html>
386}
387
388CLASS_INDEX = FILE_INDEX
389METHOD_INDEX = FILE_INDEX
390
391INDEX = %{
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>
404IF:inline_source
405      <frame  src="%initial_page%" name="docwin">
406ENDIF:inline_source
407IFNOT:inline_source
408    <frameset rows="80%,20%">
409      <frame  src="%initial_page%" name="docwin">
410      <frame  src="blank.html" name="source">
411    </frameset>
412ENDIF: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
425BLANK = %{
426<html><body bgcolor="white"></body></html>
427}
428
429def write_extra_pages
430  template = TemplatePage.new(BLANK)
431  File.open("blank.html", "w") { |f| template.write_html_on(f, {}) }
432end
433
434end
435end