PageRenderTime 223ms CodeModel.GetById 201ms app.highlight 18ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/agross/netopenspace
Ruby | 418 lines | 354 code | 55 blank | 9 comment | 1 complexity | 61bcaacc3566f9f4ab6e4f48b23383ca MD5 | raw file
  1module RDoc
  2module Page
  3
  4
  5FONTS = "Verdana, Arial, Helvetica, sans-serif"
  6
  7STYLE = %{
  8body,p { font-family: Verdana, Arial, Helvetica, sans-serif; 
  9       color: #000040; background: #BBBBBB;
 10}
 11
 12td { 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
113BODY = %{
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
130IF:diagram
131<table width="100%"><tr><td align="center">
132%diagram%
133</td></tr></table>
134ENDIF:diagram
135
136IF:description
137<div class="description">%description%</div>
138ENDIF:description
139
140IF:requires
141<table cellpadding="5" width="100%">
142<tr><td class="tablesubtitle">Required files</td></tr>
143</table><br />
144<div class="name-list">
145START:requires
146HREF:aref:name:
147END:requires
148ENDIF:requires
149</div>
150
151IF: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">
156START:methods
157HREF:aref:name:,
158END:methods
159</div>
160ENDIF:methods
161
162IF:attributes
163<table cellpadding="5" width="100%">
164<tr><td class="tablesubtitle">Arguments</td></tr>
165</table><br />
166<table cellspacing="5">
167START:attributes
168     <tr valign="top">
169IF:rw
170       <td align="center" class="attr-rw">&nbsp;[%rw%]&nbsp;</td>
171ENDIF:rw
172IFNOT:rw
173       <td></td>
174ENDIF:rw
175       <td class="attr-name">%name%</td>
176       <td>%a_desc%</td>
177     </tr>
178END:attributes
179</table>
180ENDIF:attributes
181
182IF:classlist
183<table cellpadding="5" width="100%">
184<tr><td class="tablesubtitle">Modules</td></tr>
185</table><br />
186%classlist%<br />
187ENDIF:classlist
188
189  !INCLUDE!  <!-- method descriptions -->
190
191</body>
192</html>
193}
194
195###############################################################################
196
197FILE_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%
206IF:cvsurl
207				&nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
208ENDIF: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
223CLASS_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">
234START:infiles
235HREF:full_path_url:full_path:
236IF:cvsurl
237&nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
238ENDIF:cvsurl
239END:infiles
240      </td>
241     </tr>
242IF:parent
243     <tr>
244      <td class="small-title-font">Parent:</td>
245      <td class="small-title-font">
246IF:par_url
247        <a href="%par_url%" class="cyan">
248ENDIF:par_url
249%parent%
250IF:par_url
251         </a>
252ENDIF:par_url
253      </td>
254     </tr>
255ENDIF:parent
256   </table>
257  </td>
258  </tr>
259</table><br />
260}
261
262###################################################################
263
264METHOD_LIST = %{
265IF:includes
266<div class="tablesubsubtitle">Uses</div><br />
267<div class="name-list">
268START:includes
269    <span class="method-name">HREF:aref:name:</span>
270END:includes
271</div>
272ENDIF:includes
273
274IF:method_list
275START:method_list
276IF:methods
277<table cellpadding="5" width="100%">
278<tr><td class="tablesubtitle">%type% %category% methods</td></tr>
279</table>
280START: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% 
285IF:codeurl
286<a href="%codeurl%" target="source" class="srclink">src</a>
287ENDIF:codeurl
288</a></td></tr>
289</table>
290IF:m_desc
291<div class="description">
292%m_desc%
293</div>
294ENDIF:m_desc
295END:methods
296ENDIF:methods
297END:method_list
298ENDIF:method_list
299}
300
301=begin
302=end
303
304########################## Source code ##########################
305
306SRC_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
334FR_INDEX_BODY = %{
335!INCLUDE!
336}
337
338FILE_INDEX = %{
339<html>
340<head>
341<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
342<style type="text/css">
343<!--
344  body {
345background-color: #bbbbbb;
346     font-family: #{FONTS}; 
347       font-size: 11px; 
348      font-style: normal;
349     line-height: 14px; 
350           color: #000040;
351  }
352div.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>
370START:entries
371<a href="%href%">%name%</a><br />
372END:entries
373</body></html>
374}
375
376CLASS_INDEX = FILE_INDEX
377METHOD_INDEX = FILE_INDEX
378
379INDEX = %{
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
408BLANK = %{
409<html><body bgcolor="#BBBBBB"></body></html>
410}
411
412def write_extra_pages
413  template = TemplatePage.new(BLANK)
414  File.open("blank.html", "w") { |f| template.write_html_on(f, {}) }
415end
416
417end
418end