diff options
Diffstat (limited to 'lib/rdoc/generators/template/html/hefss.rb')
-rw-r--r-- | lib/rdoc/generators/template/html/hefss.rb | 194 |
1 files changed, 103 insertions, 91 deletions
diff --git a/lib/rdoc/generators/template/html/hefss.rb b/lib/rdoc/generators/template/html/hefss.rb index e68ca85823..a7baac6fd3 100644 --- a/lib/rdoc/generators/template/html/hefss.rb +++ b/lib/rdoc/generators/template/html/hefss.rb @@ -112,9 +112,9 @@ td { font-family: Verdana, Arial, Helvetica, sans-serif; BODY = %{ <html><head> - <title>%title%</title> - <meta http-equiv="Content-Type" content="text/html; charset=%charset%"> - <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" /> + <title><%= values["title"] %></title> + <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>"> + <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" /> <script type="text/javascript" language="JavaScript"> <!-- function popCode(url) { @@ -125,68 +125,76 @@ BODY = %{ </head> <body bgcolor="#BBBBBB"> -!INCLUDE! <!-- banner header --> +<%= template_include %> <!-- banner header --> -IF:diagram +<% if values["diagram"] then %> <table width="100%"><tr><td align="center"> -%diagram% +<%= values["diagram"] %> </td></tr></table> -ENDIF:diagram +<% end %> -IF:description -<div class="description">%description%</div> -ENDIF:description +<% if values["description"] then %> +<div class="description"><%= values["description"] %></div> +<% end %> -IF:requires +<% if values["requires"] then %> <table cellpadding="5" width="100%"> <tr><td class="tablesubtitle">Required files</td></tr> </table><br /> <div class="name-list"> -START:requires -HREF:aref:name: -END:requires -ENDIF:requires +<% values["requires"].each do |requires| %> +<%= href requires["aref"], requires["name"] %> +<% end # values["requires"] %> +<% end %> </div> -IF:methods +<% if values["sections"] then %> +<% values["sections"].each do |sections| %> +<% if sections["method_list"] then %> +<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> <table cellpadding="5" width="100%"> <tr><td class="tablesubtitle">Subroutines and Functions</td></tr> </table><br /> <div class="name-list"> -START:methods -HREF:aref:name:, -END:methods +<% method_list["methods"].each do |methods| %> +<a href="<%= methods["codeurl"] %>" target="source"><%= methods["name"] %></a> +<% end # values["methods"] %> </div> -ENDIF:methods +<% end %> +<% end # values["method_list"] %> +<% end %> -IF:attributes +<% if sections["attributes"] then %> <table cellpadding="5" width="100%"> <tr><td class="tablesubtitle">Arguments</td></tr> </table><br /> <table cellspacing="5"> -START:attributes +<% sections["attributes"].each do |attributes| %> <tr valign="top"> -IF:rw - <td align="center" class="attr-rw"> [%rw%] </td> -ENDIF:rw -IFNOT:rw +<% if attributes["rw"] then %> + <td align="center" class="attr-rw"> [<%= attributes["rw"] %>] </td> +<% end %> +<% unless attributes["rw"] then %> <td></td> -ENDIF:rw - <td class="attr-name">%name%</td> - <td>%a_desc%</td> +<% end %> + <td class="attr-name"><%= attributes["name"] %></td> + <td><%= attributes["a_desc"] %></td> </tr> -END:attributes +<% end # values["attributes"] %> </table> -ENDIF:attributes +<% end %> +<% end # values["sections"] %> +<% end %> -IF:classlist +<% if values["classlist"] then %> <table cellpadding="5" width="100%"> <tr><td class="tablesubtitle">Modules</td></tr> </table><br /> -%classlist%<br /> -ENDIF:classlist +<%= values["classlist"] %><br /> +<% end %> - !INCLUDE! <!-- method descriptions --> + <%= template_include %> <!-- method descriptions --> </body> </html> @@ -198,19 +206,19 @@ FILE_PAGE = <<_FILE_PAGE_ <table width="100%"> <tr class="title-row"> <td><table width="100%"><tr> - <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font>%short_name%</td> + <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font><%= values["short_name"] %></td> <td align="right"><table cellspacing="0" cellpadding="2"> <tr> <td class="small-title-font">Path:</td> - <td class="small-title-font">%full_path% -IF:cvsurl - (<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>) -ENDIF:cvsurl + <td class="small-title-font"><%= values["full_path"] %> +<% if values["cvsurl"] then %> + (<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>) +<% end %> </td> </tr> <tr> <td class="small-title-font">Modified:</td> - <td class="small-title-font">%dtm_modified%</td> + <td class="small-title-font"><%= values["dtm_modified"] %></td> </tr> </table> </td></tr></table></td> @@ -224,35 +232,35 @@ CLASS_PAGE = %{ <table width="100%" border="0" cellspacing="0"> <tr class="title-row"> <td class="big-title-font"> - <font size="-3"><b>%classmod%</b><br /></font>%full_name% + <font size="-3"><b><%= values["classmod"] %></b><br /></font><%= values["full_name"] %> </td> <td align="right"> <table cellspacing="0" cellpadding="2"> <tr valign="top"> <td class="small-title-font">In:</td> <td class="small-title-font"> -START:infiles -HREF:full_path_url:full_path: -IF:cvsurl - (<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>) -ENDIF:cvsurl -END:infiles +<% values["infiles"].each do |infiles| %> +<%= href infiles["full_path_url"], infiles["full_path"] %> +<% if infiles["cvsurl"] then %> + (<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>) +<% end %> +<% end # values["infiles"] %> </td> </tr> -IF:parent +<% if values["parent"] then %> <tr> <td class="small-title-font">Parent:</td> <td class="small-title-font"> -IF:par_url - <a href="%par_url%" class="cyan"> -ENDIF:par_url -%parent% -IF:par_url +<% if values["par_url"] then %> + <a href="<%= values["par_url"] %>" class="cyan"> +<% end %> +<%= values["parent"] %> +<% if values["par_url"] then %> </a> -ENDIF:par_url +<% end %> </td> </tr> -ENDIF:parent +<% end %> </table> </td> </tr> @@ -262,40 +270,44 @@ ENDIF:parent ################################################################### METHOD_LIST = %{ -IF:includes +<% if values["includes"] then %> <div class="tablesubsubtitle">Uses</div><br /> <div class="name-list"> -START:includes - <span class="method-name">HREF:aref:name:</span> -END:includes +<% values["includes"].each do |includes| %> + <span class="method-name"><%= href includes["aref"], includes["name"] %></span> +<% end # values["includes"] %> </div> -ENDIF:includes +<% end %> -IF:method_list -START:method_list -IF:methods +<% if values["sections"] then %> +<% values["sections"].each do |sections| %> +<% if sections["method_list"] then %> +<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> <table cellpadding="5" width="100%"> -<tr><td class="tablesubtitle">%type% %category% methods</td></tr> +<tr><td class="tablesubtitle"><%= method_list["type"] %> <%= method_list["category"] %> methods</td></tr> </table> -START:methods +<% method_list["methods"].each do |methods| %> <table width="100%" cellspacing="0" cellpadding="5" border="0"> <tr><td class="methodtitle"> -<a name="%aref%"> -<b>%name%</b>%params% -IF:codeurl -<a href="%codeurl%" target="source" class="srclink">src</a> -ENDIF:codeurl +<a name="<%= methods["aref"] %>"> +<b><%= methods["name"] %></b><%= methods["params"] %> +<% if methods["codeurl"] then %> +<a href="<%= methods["codeurl"] %>" target="source" class="srclink">src</a> +<% end %> </a></td></tr> </table> -IF:m_desc +<% if method_list["m_desc"] then %> <div class="description"> -%m_desc% +<%= method_list["m_desc"] %> </div> -ENDIF:m_desc -END:methods -ENDIF:methods -END:method_list -ENDIF:method_list +<% end %> +<% end # method_list["methods"] %> +<% end %> +<% end # sections["method_list"] %> +<% end %> +<% end # values["sections"] %> +<% end %> } =begin @@ -305,8 +317,8 @@ ENDIF:method_list SRC_PAGE = %{ <html> -<head><title>%title%</title> -<meta http-equiv="Content-Type" content="text/html; charset=%charset%"> +<head><title><%= values["title"] %></title> +<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>"> <style type="text/css"> .kw { color: #3333FF; font-weight: bold } .cmt { color: green; font-style: italic } @@ -324,7 +336,7 @@ SRC_PAGE = %{ </style> </head> <body bgcolor="#BBBBBB"> -<pre>%code%</pre> +<pre><%= values["code"] %></pre> </body> </html> } @@ -332,13 +344,13 @@ SRC_PAGE = %{ ########################## Index ################################ FR_INDEX_BODY = %{ -!INCLUDE! +<%= template_include %> } FILE_INDEX = %{ <html> <head> -<meta http-equiv="Content-Type" content="text/html; charset=%charset%"> +<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>"> <style type="text/css"> <!-- body { @@ -360,16 +372,16 @@ div.banner { text-align: center; width: 100%; } - + --> </style> <base target="docwin"> </head> <body> -<div class="banner">%list_title%</div> -START:entries -<a href="%href%">%name%</a><br /> -END:entries +<div class="banner"><%= values["list_title"] %></div> +<% values["entries"].each do |entries| %> +<a href="<%= entries["href"] %>"><%= entries["name"] %></a><br /> +<% end # values["entries"] %> </body></html> } @@ -379,8 +391,8 @@ METHOD_INDEX = FILE_INDEX INDEX = %{ <html> <head> - <title>%title%</title> - <meta http-equiv="Content-Type" content="text/html; charset=%charset%"> + <title><%= values["title"] %></title> + <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>"> </head> <frameset cols="20%,*"> @@ -390,7 +402,7 @@ INDEX = %{ <frame src="fr_method_index.html" name="Subroutines and Functions"> </frameset> <frameset rows="80%,20%"> - <frame src="%initial_page%" name="docwin"> + <frame src="<%= values["initial_page"] %>" name="docwin"> <frame src="blank.html" name="source"> </frameset> <noframes> |