module RDoc
module Page
FONTS = "Verdana, Arial, Helvetica, sans-serif"
STYLE = %{
body,td,p { font-family: %fonts%;
color: }
.attr-rw { font-size: x-small; color:
.title-row { background: color: }
.big-title-font { color: white;
font-family: %fonts%;
font-size: large;
height: 50px}
.small-title-font { color: aqua;
font-family: %fonts%;
font-size: xx-small; }
.aqua { color: aqua }
.method-name, attr-name {
font-family: monospace; font-weight: bold;
}
.tablesubtitle, .tablesubsubtitle {
width: 100%;
margin-top: 1ex;
margin-bottom: .5ex;
padding: 5px 0px 5px 20px;
font-size: large;
color: aqua;
background: }
.name-list {
font-family: monospace;
margin-left: 40px;
margin-bottom: 2ex;
line-height: 140%;
}
.description {
margin-left: 40px;
margin-top: -2ex;
margin-bottom: 2ex;
}
.description p {
line-height: 140%;
}
.aka {
margin-left: 40px;
margin-bottom: 2ex;
line-height: 100%;
font-size: small;
color: }
.methodtitle {
font-size: medium;
text-decoration: none;
color: background: white;
}
.paramsig {
font-size: small;
}
.srcbut { float: right }
pre { font-size: 1.2em; }
tt { font-size: 1.2em; }
pre.source {
border-style: groove;
background-color: margin-left: 40px;
padding: 1em 0em 1em 2em;
}
.classlist {
margin-left: 40px;
margin-bottom: 2ex;
line-height: 140%;
}
li {
display: list-item;
margin-top: .6em;
}
.ruby-comment { color: green; font-style: italic }
.ruby-constant { color: .ruby-identifier { color: .ruby-ivar { color: .ruby-keyword { color: .ruby-node { color: .ruby-operator { color: .ruby-regexp { color: .ruby-value { color:
}
HEADER = %{
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<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" />
<script type="text/javascript" language="JavaScript">
<!--
function popCode(url) {
window.open(url, "Code",
"resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
//-->
</script>
</head>
}
METHOD_LIST = %{
IF:includes
<table summary="Included modules" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Included modules</td></tr>
</table>
<div class="name-list">
START:includes
<span class="method-name">HREF:aref:name:</span>
END:includes
</div>
ENDIF:includes
IF:method_list
START:method_list
IF:methods
<table summary="Method list" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">%type% %category% methods</td></tr>
</table>
START:methods
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="%aref%"></a>
IF:codeurl
<a href="%codeurl%" target="Code" class="methodtitle"
onClick="popCode('%codeurl%');return false;">
ENDIF:codeurl
IF:callseq
<b>%callseq%</b>
ENDIF:callseq
IFNOT:callseq
<b>%name%</b>%params%
ENDIF:callseq
IF:codeurl
</a>
ENDIF:codeurl
</td></tr>
</table>
IF:m_desc
<div class="description">
%m_desc%
</div>
ENDIF:m_desc
IF:aka
<div class="aka">
This method is also aliased as
START:aka
<a href="%aref%">%name%</a>
END:aka
</div>
ENDIF:aka
IF:sourcecode
<pre class="source">
%sourcecode%
</pre>
ENDIF:sourcecode
END:methods
ENDIF:methods
END:method_list
ENDIF:method_list
}
CONTEXT_CONTENT = %{
IF:diagram
<table summary="Diagram of classes and modules" width="100%">
<tr><td align="center">
%diagram%
</td></tr></table>
ENDIF:diagram
IF:description
<div class="description">%description%</div>
ENDIF:description
IF:requires
<table summary="Requires" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Required files</td></tr>
</table>
<div class="name-list">
START:requires
HREF:aref:name:
END:requires
</div>
ENDIF:requires
IF:methods
<table summary="Methods" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Methods</td></tr>
</table>
<div class="name-list">
START:methods
HREF:aref:name:
END:methods
</div>
ENDIF:methods
IF:constants
<table summary="Constants" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Constants</td></tr>
</table>
<table cellpadding="5">
START:constants
<tr valign="top"><td>%name%</td><td>=</td><td>%value%</td></tr>
IF:desc
<tr><td></td><td></td><td>%desc%</td></tr>
ENDIF:desc
END:constants
</table>
ENDIF:constants
IF:aliases
<table summary="Aliases" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">External Aliases</td></tr>
</table>
<div class="name-list">
START:aliases
%old_name% -> %new_name%<br />
END:aliases
</div>
ENDIF:aliases
IF:attributes
<table summary="Attributes" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Attributes</td></tr>
</table>
<table summary="Attribute details" cellspacing="5">
START:attributes
<tr valign="top">
<td class="attr-name">%name%</td>
IF:rw
<td align="center" class="attr-rw"> [%rw%] </td>
ENDIF:rw
IFNOT:rw
<td></td>
ENDIF:rw
<td>%a_desc%</td>
</tr>
END:attributes
</table>
ENDIF:attributes
IF:classlist
<table summary="List of classes" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Classes and Modules</td></tr>
</table>
<div class="classlist">
%classlist%
</div>
ENDIF:classlist
}
BODY = HEADER + %{
<body bgcolor="white">
!INCLUDE! <!-- banner header -->
} +
CONTEXT_CONTENT + METHOD_LIST +
%{
</body>
</html>
}
FILE_PAGE = <<_FILE_PAGE_
<table summary="Information on file" width="100%">
<tr class="title-row">
<td><table summary="layout" width="100%"><tr>
<td class="big-title-font" colspan="2">%short_name%</td>
<td align="right"><table summary="layout" 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>
</tr>
<tr>
<td class="small-title-font">Modified:</td>
<td class="small-title-font">%dtm_modified%</td>
</tr>
</table>
</td></tr></table></td>
</tr>
</table>
_FILE_PAGE_
CLASS_PAGE = %{
<table summary="Information on class" width="100%" border="0" cellspacing="0">
<tr class="title-row">
<td class="big-title-font">
<sup><font color="aqua">%classmod%</font></sup> %full_name%
</td>
<td align="right">
<table summary="layout" cellspacing="0" cellpadding="2">
<tr valign="top">
<td class="small-title-font">In:</td>
<td class="small-title-font">
START:infiles
IF:full_path_url
<a href="%full_path_url%" class="aqua">
ENDIF:full_path_url
%full_path%
IF:full_path_url
</a>
ENDIF:full_path_url
IF:cvsurl
(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
<br />
END:infiles
</td>
</tr>
IF:parent
<tr>
<td class="small-title-font">Parent:</td>
<td class="small-title-font">
IF:par_url
<a href="%par_url%" class="aqua">
ENDIF:par_url
%parent%
IF:par_url
</a>
ENDIF:par_url
</td>
</tr>
ENDIF:parent
</table>
</td>
</tr>
</table>
}
=begin
=end
SRC_PAGE = %{
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
<title>%title%</title>
<link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
</head>
<body bgcolor="white">
<pre>%code%</pre>
</body>
</html>
}
FR_INDEX_BODY = %{
!INCLUDE!
}
FILE_INDEX = %{
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
<title>%list_title%</title>
<style type="text/css">
<!--
body {
background-color: font-family: #{FONTS};
font-size: 11px;
font-style: normal;
line-height: 14px;
color: }
div.banner {
background: color: white;
padding: 1;
margin: 0;
font-size: 90%;
font-weight: bold;
line-height: 1.1;
text-align: center;
width: 100%;
}
A.xx { color: white; font-weight: bold; }
-->
</style>
<base target="docwin">
</head>
<body>
<div class="banner"><a href="%index_url%" class="xx">%list_title%</a></div>
START:entries
<a href="%href%">%name%</a><br />
END:entries
</body></html>
}
CLASS_INDEX = FILE_INDEX
METHOD_INDEX = FILE_INDEX
INDEX = %{
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
<title>%title%</title></head>
<frameset rows="20%, 80%">
<frameset cols="25%,35%,45%">
<frame src="fr_file_index.html" title="Files" name="Files">
<frame src="fr_class_index.html" name="Classes">
<frame src="fr_method_index.html" name="Methods">
</frameset>
<frame src="%initial_page%" name="docwin">
<noframes>
<body bgcolor="white">
Sorry, RDoc currently only generates HTML using frames.
</body>
</noframes>
</frameset>
</html>
}
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
}
end
end
require 'rdoc/generators/template/html/one_page_html'