Add one_page_html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d881def1a
commit
c88e3627cf
1
MANIFEST
1
MANIFEST
@ -236,6 +236,7 @@ lib/rdoc/generators/template/html/hefss.rb
|
|||||||
lib/rdoc/generators/template/html/html.rb
|
lib/rdoc/generators/template/html/html.rb
|
||||||
lib/rdoc/generators/template/html/kilmer.rb
|
lib/rdoc/generators/template/html/kilmer.rb
|
||||||
lib/rdoc/generators/template/html/old_html.rb
|
lib/rdoc/generators/template/html/old_html.rb
|
||||||
|
lib/rdoc/generators/template/html/one_page_html.rb
|
||||||
lib/rdoc/generators/template/xml/rdf.rb
|
lib/rdoc/generators/template/xml/rdf.rb
|
||||||
lib/rdoc/generators/template/xml/xml.rb
|
lib/rdoc/generators/template/xml/xml.rb
|
||||||
lib/rdoc/generators/xml_generator.rb
|
lib/rdoc/generators/xml_generator.rb
|
||||||
|
116
lib/rdoc/generators/template/html/one_page_html.rb
Normal file
116
lib/rdoc/generators/template/html/one_page_html.rb
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
module RDoc
|
||||||
|
module Page
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# The following is used for the -1 option
|
||||||
|
#
|
||||||
|
|
||||||
|
CONTENTS_XML = %{
|
||||||
|
IF:description
|
||||||
|
%description%
|
||||||
|
ENDIF:description
|
||||||
|
|
||||||
|
IF:requires
|
||||||
|
<h4>Requires:</h4>
|
||||||
|
<ul>
|
||||||
|
START:requires
|
||||||
|
IF:aref
|
||||||
|
<li><a href="%aref%">%name%</a></li>
|
||||||
|
ENDIF:aref
|
||||||
|
IFNOT:aref
|
||||||
|
<li>%name%</li>
|
||||||
|
ENDIF:aref
|
||||||
|
END:requires
|
||||||
|
</ul>
|
||||||
|
ENDIF:requires
|
||||||
|
|
||||||
|
IF:attributes
|
||||||
|
<h4>Attributes</h4>
|
||||||
|
<table>
|
||||||
|
START:attributes
|
||||||
|
<tr><td>%name%</td><td>%rw%</td><td>%a_desc%</td></tr>
|
||||||
|
END:attributes
|
||||||
|
</table>
|
||||||
|
ENDIF:attributes
|
||||||
|
|
||||||
|
IF:includes
|
||||||
|
<h4>Includes</h4>
|
||||||
|
<ul>
|
||||||
|
START:includes
|
||||||
|
IF:aref
|
||||||
|
<li><a href="%aref%">%name%</a></li>
|
||||||
|
ENDIF:aref
|
||||||
|
IFNOT:aref
|
||||||
|
<li>%name%</li>
|
||||||
|
ENDIF:aref
|
||||||
|
END:includes
|
||||||
|
</ul>
|
||||||
|
ENDIF:includes
|
||||||
|
|
||||||
|
IF:method_list
|
||||||
|
<h3>Methods</h3>
|
||||||
|
START:method_list
|
||||||
|
IF:methods
|
||||||
|
START:methods
|
||||||
|
<h4>%type% %category% method: <a name="%aref%">%name%%params%</a></h4>
|
||||||
|
|
||||||
|
IF:m_desc
|
||||||
|
%m_desc%
|
||||||
|
ENDIF:m_desc
|
||||||
|
|
||||||
|
IF:sourcecode
|
||||||
|
<blockquote><pre>
|
||||||
|
%sourcecode%
|
||||||
|
</pre></blockquote>
|
||||||
|
ENDIF:sourcecode
|
||||||
|
END:methods
|
||||||
|
ENDIF:methods
|
||||||
|
END:method_list
|
||||||
|
ENDIF:method_list
|
||||||
|
}
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
ONE_PAGE = %{
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>%title%</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
START:files
|
||||||
|
<h2>File: %short_name%</h2>
|
||||||
|
<table>
|
||||||
|
<tr><td>Path:</td><td>%full_path%</td></tr>
|
||||||
|
<tr><td>Modified:</td><td>%dtm_modified%</td></tr>
|
||||||
|
</table>
|
||||||
|
} + CONTENTS_XML + %{
|
||||||
|
END:files
|
||||||
|
|
||||||
|
IF:classes
|
||||||
|
<h2>Classes</h2>
|
||||||
|
START:classes
|
||||||
|
IF:parent
|
||||||
|
<h3>%classmod% %full_name% < HREF:par_url:parent:</h3>
|
||||||
|
ENDIF:parent
|
||||||
|
IFNOT:parent
|
||||||
|
<h3>%classmod% %full_name%</h3>
|
||||||
|
ENDIF:parent
|
||||||
|
|
||||||
|
IF:infiles
|
||||||
|
(in files
|
||||||
|
START:infiles
|
||||||
|
HREF:full_path_url:full_path:
|
||||||
|
END:infiles
|
||||||
|
)
|
||||||
|
ENDIF:infiles
|
||||||
|
} + CONTENTS_XML + %{
|
||||||
|
END:classes
|
||||||
|
ENDIF:classes
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user