# frozen_string_literal: true # # = CSS2 RDoc HTML template # # This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a # bit more of the appearance of the output to cascading stylesheets than the # default. It was designed for clean inline code display, and uses DHTMl to # toggle the visbility of each method's source with each click on the '[source]' # link. # # == Authors # # * Michael Granger # # Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved. # # This work is licensed under the Creative Commons Attribution License. To view # a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or # send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California # 94305, USA. # module RDoc module Page FONTS = "Verdana,Arial,Helvetica,sans-serif" STYLE = %{ /* Reset */ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} :focus{outline:0;} body{line-height:1;color:#282828;background:#fff;} ol,ul{list-style:none;} table{border-collapse:separate;border-spacing:0;} caption,th,td{text-align:left;font-weight:normal;} blockquote:before,blockquote:after,q:before,q:after{content:"";} blockquote,q{quotes:"""";} body { font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 0.9em; } pre { background: none repeat scroll 0 0 #F7F7F7; border: 1px dashed #DDDDDD; color: #555555; font-family: courier; margin: 10px 19px; padding: 10px; } h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; } h1 { font-size: 1.2em; } h2,h3,h4 { margin-top: 1em; color:#558; } h2,h3 { font-size: 1.1em; } a { color: #037; text-decoration: none; } a:hover { color: #04d; } /* Override the base stylesheet's Anchor inside a table cell */ td > a { background: transparent; color: #039; text-decoration: none; } /* and inside a section title */ .section-title > a { background: transparent; color: #eee; text-decoration: none; } /* === Structural elements =================================== */ div#index { padding: 0; } div#index a { display:inline-block; padding:2px 10px; } div#index .section-bar { background: #ffe; padding:10px; } div#classHeader, div#fileHeader { border-bottom: 1px solid #ddd; padding:10px; font-size:0.9em; } div#classHeader a, div#fileHeader a { background: inherit; color: white; } div#classHeader td, div#fileHeader td { color: white; padding:3px; font-size:0.9em; } div#fileHeader { background: #057; } div#classHeader { background: #048; } div#nodeHeader { background: #7f7f7f; } .class-name-in-header { font-weight: bold; } div#bodyContent { padding: 10px; } div#description { padding: 10px; background: #f5f5f5; border: 1px dotted #ddd; line-height:1.2em; } div#description h1,h2,h3,h4,h5,h6 { color: #125;; background: transparent; } div#validator-badges { text-align: center; } div#validator-badges img { border: 0; } div#copyright { color: #333; background: #efefef; font: 0.75em sans-serif; margin-top: 5em; margin-bottom: 0; padding: 0.5em 2em; } /* === Classes =================================== */ table.header-table { color: white; font-size: small; } .type-note { font-size: small; color: #DEDEDE; } .xxsection-bar { background: #eee; color: #333; padding: 3px; } .section-bar { color: #333; border-bottom: 1px solid #ddd; padding:10px 0; margin:5px 0 10px 0; } div#class-list, div#methods, div#includes, div#resources, div#requires, div#realizes, div#attribute-list { padding:10px; } .section-title { background: #79a; color: #eee; padding: 3px; margin-top: 2em; border: 1px solid #999; } .top-aligned-row { vertical-align: top } .bottom-aligned-row { vertical-align: bottom } /* --- Context section classes ----------------------- */ .context-row { } .context-item-name { font-family: monospace; font-weight: bold; color: black; } .context-item-value { font-size: small; color: #448; } .context-item-desc { color: #333; padding-left: 2em; } /* --- Method classes -------------------------- */ .method-detail { background: #f5f5f5; } .method-heading { color: #333; font-style:italic; background: #ddd; padding:5px 10px; } .method-signature { color: black; background: inherit; } .method-name { font-weight: bold; } .method-args { font-style: italic; } .method-description { padding: 10px 10px 20px 10px; } /* --- Source code sections -------------------- */ a.source-toggle { font-size: 90%; } div.method-source-code { background: #262626; color: #ffdead; margin: 1em; padding: 0.5em; border: 1px dashed #999; overflow: hidden; } div.method-source-code pre { color: #ffdead; overflow: hidden; } /* --- Ruby keyword styles --------------------- */ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; } .ruby-constant { color: #7fffd4; background: transparent; } .ruby-keyword { color: #00ffff; background: transparent; } .ruby-ivar { color: #eedd82; background: transparent; } .ruby-operator { color: #00ffee; background: transparent; } .ruby-identifier { color: #ffdead; background: transparent; } .ruby-node { color: #ffa07a; background: transparent; } .ruby-comment { color: #b22222; font-weight: bold; background: transparent; } .ruby-regexp { color: #ffa07a; background: transparent; } .ruby-value { color: #7fffd4; background: transparent; } } ##################################################################### ### H E A D E R T E M P L A T E ##################################################################### XHTML_PREAMBLE = %{ } HEADER = XHTML_PREAMBLE + %{ %title% } ##################################################################### ### C O N T E X T C O N T E N T T E M P L A T E ##################################################################### CONTEXT_CONTENT = %{ } ##################################################################### ### F O O T E R T E M P L A T E ##################################################################### FOOTER = %{

[Validate]

} ##################################################################### ### F I L E P A G E H E A D E R T E M P L A T E ##################################################################### FILE_PAGE = %{

%short_name%

Path: %full_path% IF:cvsurl  (CVS) ENDIF:cvsurl
Last Update: %dtm_modified%
} ##################################################################### ### C L A S S P A G E H E A D E R T E M P L A T E ##################################################################### CLASS_PAGE = %{
IF:parent ENDIF:parent
%classmod% %full_name%
In: START:infiles IF:full_path_url ENDIF:full_path_url %full_path% IF:full_path_url ENDIF:full_path_url IF:cvsurl  (CVS) ENDIF:cvsurl
END:infiles
Parent: IF:par_url ENDIF:par_url %parent% IF:par_url ENDIF:par_url
} NODE_PAGE = %{
IF:parent ENDIF:parent
%classmod% %full_name%
In: START:infiles IF:full_path_url ENDIF:full_path_url %full_path% IF:full_path_url ENDIF:full_path_url IF:cvsurl  (CVS) ENDIF:cvsurl
END:infiles
Parent: IF:par_url ENDIF:par_url %parent% IF:par_url ENDIF:par_url
} PLUGIN_PAGE = %{
%classmod% %full_name%
In: START:infiles IF:full_path_url ENDIF:full_path_url %full_path% IF:full_path_url ENDIF:full_path_url IF:cvsurl  (CVS) ENDIF:cvsurl
END:infiles
} ##################################################################### ### M E T H O D L I S T T E M P L A T E ##################################################################### PLUGIN_LIST = %{
IF:description
%description%
ENDIF:description IF:toc

Contents

ENDIF:toc
IF:confine START:confine

Confine

%type% %value%
END:confine ENDIF:confine IF:type

Type

%type%
ENDIF:type START:sections
IF:sectitle

%sectitle%

IF:seccomment
%seccomment%
ENDIF:seccomment ENDIF:sectitle END:sections } METHOD_LIST = %{
IF:diagram
%diagram%
ENDIF:diagram IF:description
%description%
ENDIF:description IF:toc

Contents

ENDIF:toc
IF:childs

Inherited by

START:childs HREF:aref:name: END:childs
ENDIF:childs IF:methods

Defines

START:methods HREF:aref:name:   END:methods
ENDIF:methods IF:resources

Resources

START:resources HREF:aref:name:   END:resources
ENDIF:resources
IF:includes

Included Classes

START:includes HREF:aref:name: END:includes
ENDIF:includes IF:requires

Required Classes

START:requires HREF:aref:name: END:requires
ENDIF:requires IF:realizes

Realized Resources

START:realizes HREF:aref:name: END:realizes
ENDIF:realizes START:sections
IF:sectitle

%sectitle%

IF:seccomment
%seccomment%
ENDIF:seccomment ENDIF:sectitle IF:facts

Custom Facts

START:facts HREF:aref:name:   END:facts
ENDIF:facts IF:plugins

Plugins

START:plugins HREF:aref:name:   END:plugins
ENDIF:plugins IF:nodelist

Nodes

%nodelist%
ENDIF:nodelist IF:classlist

Classes and Modules

%classlist%
ENDIF:classlist IF:constants

Global Variables

START:constants IF:desc ENDIF:desc END:constants
%name% = %value%  %desc%
ENDIF:constants IF:aliases

External Aliases

START:aliases IF:desc ENDIF:desc END:aliases
%old_name% -> %new_name%
  %desc%
ENDIF:aliases IF:attributes

Attributes

START:attributes IF:rw ENDIF:rw IFNOT:rw ENDIF:rw END:attributes
%name% [%rw%]   %a_desc%
ENDIF:attributes IF:method_list
START:method_list IF:methods

Defines

START:methods
IF:m_desc %m_desc% ENDIF:m_desc IF:sourcecode

[Source]

%sourcecode%
ENDIF:sourcecode
END:methods ENDIF:methods END:method_list
ENDIF:method_list IF:resource_list

Resources

START:resource_list
%name%
IF:params START:params    %name% => %value%
END:params ENDIF:params
IF:m_desc %m_desc% ENDIF:m_desc
END:resource_list
ENDIF:resource_list END:sections } ##################################################################### ### B O D Y T E M P L A T E ##################################################################### BODY = HEADER + %{ !INCLUDE!
} + METHOD_LIST + %{
} + FOOTER BODYINC = HEADER + %{ !INCLUDE!
!INCLUDE!
} + FOOTER ##################################################################### ### S O U R C E C O D E T E M P L A T E ##################################################################### SRC_PAGE = XHTML_PREAMBLE + %{ %title%
%code%
} ##################################################################### ### I N D E X F I L E T E M P L A T E S ##################################################################### FR_INDEX_BODY = %{ !INCLUDE! } FILE_INDEX = XHTML_PREAMBLE + %{ %list_title%

%list_title%

START:entries %name%
END:entries
} TOP_INDEX = XHTML_PREAMBLE + %{ %list_title%

%list_title%

START:entries %name%
END:entries
} CLASS_INDEX = FILE_INDEX METHOD_INDEX = FILE_INDEX COMBO_INDEX = XHTML_PREAMBLE + %{ %classes_title% & %defines_title%
All Classes

Module

START:module %name%
END:module
IF:nodes

%nodes_title%

START:nodes %name%
END:nodes
ENDIF:nodes IF:classes

%classes_title%

START:classes %name%
END:classes
ENDIF:classes IF:defines

%defines_title%

START:defines %name%
END:defines
ENDIF:defines IF:facts

%facts_title%

START:facts %name%
END:facts
ENDIF:facts IF:plugins

%plugins_title%

START:plugins %name%
END:plugins
ENDIF:plugins
} INDEX = %{ %title% } end # module Page end # class RDoc require 'rdoc/generators/template/html/one_page_html'